Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:39

0001 #ifndef CSCRecHitD_CSCWireHit_H
0002 #define CSCRecHitD_CSCWireHit_H
0003 
0004 /**
0005  * \class CSCSWireHit
0006  *
0007  * Yields the position in terms wire group # of a 1-D reconstructed 
0008  * wire hit in one layer of an Endcap Muon CSC.
0009  *
0010  */
0011 
0012 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0013 
0014 #include <vector>
0015 #include <iosfwd>
0016 
0017 class CSCWireHit {
0018 public:
0019   typedef std::vector<int> ChannelContainer;
0020 
0021   CSCWireHit();
0022   CSCWireHit(const CSCDetId& id,
0023              const float& wHitPos,
0024              ChannelContainer& wgroups,
0025              const int& tmax,
0026              const short int& deadWG,
0027              const std::vector<int>& timeBinsOn);
0028 
0029   ~CSCWireHit();
0030 
0031   /// CSCWireHit base class interface
0032   CSCWireHit* clone() const { return new CSCWireHit(*this); }
0033 
0034   /// Position of the wire hit in CSC
0035   CSCDetId cscDetId() const { return theDetId; }
0036 
0037   /// The wire hit position expressed in terms of wire #
0038   float wHitPos() const { return theWireHitPosition; }
0039 
0040   /// The wire groups used for forming the cluster
0041   //ChannelContainer wgroups() const { return theWgroups; }
0042   ChannelContainer wgroups() const { return theWgroupsLowBits; }
0043 
0044   /// The BX number
0045   ChannelContainer wgroupsBX() const { return theWgroupsHighBits; }
0046 
0047   /// The BX + wire group number
0048   ChannelContainer wgroupsBXandWire() const { return theWgroups; }
0049 
0050   /// The timing for the wire hit
0051   int tmax() const { return theWireHitTmax; }
0052 
0053   /// a dead WG in the cluster?
0054   short int deadWG() const { return theDeadWG; };
0055 
0056   /// Vector of time bins ON for central wire digi, lower of center pair if even number
0057   std::vector<int> timeBinsOn() const { return theTimeBinsOn; };
0058 
0059   /// Print content of the wirehit
0060   void print() const;
0061 
0062 private:
0063   CSCDetId theDetId;
0064   float theWireHitPosition;
0065   ChannelContainer theWgroups;          /// BX and wire group number combined
0066   ChannelContainer theWgroupsHighBits;  /// to extract BX
0067   ChannelContainer theWgroupsLowBits;   /// to extract the wire group number
0068   int theWireHitTmax;
0069   short int theDeadWG;
0070   std::vector<int> theTimeBinsOn;
0071 };
0072 
0073 #endif