Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-18 22:30:28

0001 #ifndef CSC_UNGANGED_WIRE_GROUPING_H
0002 #define CSC_UNGANGED_WIRE_GROUPING_H
0003 
0004 /** \class CSCUngangedWireGrouping
0005  * A concrete CSCWireGrouping in which wires are not ganged.
0006  *
0007  * \author Tim Cox
0008  *
0009  */
0010 
0011 #include "Geometry/CSCGeometry/interface/CSCWireGrouping.h"
0012 
0013 class CSCUngangedWireGrouping : public CSCWireGrouping {
0014 public:
0015   virtual ~CSCUngangedWireGrouping() {}
0016   explicit CSCUngangedWireGrouping(int nwires) : theNumberOfWires(nwires) {}
0017 
0018   /**
0019    * Total number of (virtual) wires.
0020    * Some wires may not be implemented in the hardware.
0021    * This is the number which would fill the region covered
0022    * by wires, assuming the constant wire spacing.
0023    */
0024   int numberOfWires() const { return theNumberOfWires; }
0025 
0026   /**
0027    * How many wire groups. Unganged so #groups = #wires.
0028    */
0029   int numberOfWireGroups() const { return numberOfWires(); }
0030 
0031   /**
0032    * How many wires in a wiregroup. Unganged so 1 wire/group.
0033    */
0034   int numberOfWiresPerGroup(int wireGroup) const { return 1; }
0035 
0036   /**
0037    * Wire group containing a given wire. Unganged means wire group is wire.
0038    */
0039   int wireGroup(int wire) const { return wire; }
0040 
0041   /**
0042    * Middle of wire-group.
0043    * This is the central wire no. for a group with an odd no. of wires.
0044    * This is a pseudo-wire no. for a group with an even no. of wires.
0045    * Accordingly, it is non-integer.
0046    * Unganged, wire group is wire is middle!
0047    */
0048   float middleWireOfGroup(int wireGroup) const { return static_cast<float>(wireGroup); }
0049 
0050   /**
0051    * Clone to handle correct copy of component objects referenced
0052    * by base class pointer.
0053    */
0054   CSCWireGrouping* clone() const { return new CSCUngangedWireGrouping(*this); }
0055 
0056 private:
0057   int theNumberOfWires;
0058 };
0059 
0060 #endif