Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 13:02:39

0001 #ifndef CSC_GANGED_WIRE_GROUPING_H
0002 #define CSC_GANGED_WIRE_GROUPING_H
0003 
0004 /** \class CSCGangedWireGrouping
0005  * A concrete CSCWireGrouping in which wires are ganged.
0006  *
0007  * All 'wire'-related values refer to 'virtual wires' which cover the
0008  * face of the detector. All 'wire-group' values refer to actual
0009  * active (in principle) read out channels.
0010  *
0011  * \author Tim Cox
0012  *
0013  */
0014 
0015 #include "Geometry/CSCGeometry/interface/CSCWireGrouping.h"
0016 #include <vector>
0017 
0018 class CSCGangedWireGrouping : public CSCWireGrouping {
0019 public:
0020   typedef std::vector<int> Container;
0021   typedef Container::const_iterator CIterator;
0022 
0023   ~CSCGangedWireGrouping() override {}
0024 
0025   /**
0026    * Constructor from endcap muon wire information parsed from DDD
0027    */
0028   CSCGangedWireGrouping(const Container& consecutiveGroups,
0029                         const Container& wiresInConsecutiveGroups,
0030                         int numberOfGroups);
0031 
0032   /**
0033    * Total number of (virtual) wires.
0034    * Some wires may not be implemented in the hardware.
0035    * This is the number which would fill the region covered
0036    * by wires, assuming the constant wire spacing.
0037    */
0038   int numberOfWires() const override { return theNumberOfWires; }
0039 
0040   /**
0041    * How many wire groups
0042    */
0043   int numberOfWireGroups() const override { return theNumberOfGroups; }
0044 
0045   /**
0046    * How many wires in a wiregroup
0047    */
0048   int numberOfWiresPerGroup(int wireGroup) const override;
0049 
0050   /**
0051    * Wire group containing a given wire
0052    */
0053   int wireGroup(int wire) const override;
0054 
0055   /**
0056    * Middle of wire-group.
0057    * This is the central wire no. for a group with an odd no. of wires.
0058    * This is a pseudo-wire no. for a group with an even no. of wires.
0059    * Accordingly, it is non-integer.
0060    */
0061   float middleWireOfGroup(int wireGroup) const override;
0062 
0063   /**
0064    * Clone to handle correct copy of component objects referenced
0065    * by base class pointer.
0066    */
0067   CSCWireGrouping* clone() const override { return new CSCGangedWireGrouping(*this); }
0068 
0069 private:
0070   // Expanded information from DDD
0071   int theNumberOfWires;
0072   int theNumberOfGroups;
0073   Container theFirstWireOfEachWireGroup;
0074   Container theNumberOfWiresPerWireGroup;
0075 };
0076 
0077 #endif