CMS 3D CMS Logo

CSCRecHit2D.h
Go to the documentation of this file.
1 #ifndef DataFormats_CSCRecHit2D_H
2 #define DataFormats_CSCRecHit2D_H
3 
14 #include <vector>
15 #include <map>
16 #include <iosfwd>
17 
18 class CSCRecHit2D final : public RecHit2DLocalPos {
19 public:
20  typedef std::vector<int> ChannelContainer;
22 
30  };
31 
32  static const unsigned int MAXSTRIPS = 3;
33  static const unsigned int MAXTIMEBINS = 4;
34  static const unsigned int N_ADC = MAXSTRIPS * MAXTIMEBINS;
35  CSCRecHit2D();
36 
37  CSCRecHit2D(const CSCDetId& id,
38  const LocalPoint& pos,
39  const LocalError& err,
41  const ADCContainer& adcs,
42  const ChannelContainer& wgroups,
43  float tpeak,
44  float posInStrip,
45  float errInStrip,
46  int quality,
47  short int badStrip = 0,
48  short int badWireGroup = 0,
49  int scaledWireTime = 0,
50  float energyDeposit = -995.);
51 
52  ~CSCRecHit2D() override;
53 
55  CSCRecHit2D* clone() const override { return new CSCRecHit2D(*this); }
56  LocalPoint localPosition() const override { return theLocalPosition; }
57  LocalError localPositionError() const override { return theLocalError; }
58  CSCDetId cscDetId() const { return geographicalId(); }
59 
61  int channels(unsigned int i) const { return theStrips_[i]; }
62  unsigned int nStrips() const { return nStrips_; }
63 
65  int channelsl1a(unsigned int i) const { return theL1APhaseBits_[i]; }
66 
68  short int hitWire() const { return hitWire_; }
69  short int wgroupsBX() const { return theWGroupsBX_; }
70 
71  unsigned int nWireGroups() const { return nWireGroups_; }
72 
74  float adcs(unsigned int strip, unsigned int timebin) const { return theADCs_[strip * MAXTIMEBINS + timebin]; }
75 
76  unsigned int nTimeBins() const { return nTimeBins_; }
77 
79  float tpeak() const { return theTpeak; }
80 
82  float positionWithinStrip() const { return thePositionWithinStrip; };
83 
85  float errorWithinStrip() const { return theErrorWithinStrip; };
86 
88  int quality() const { return theQuality; }
89 
91  short int badStrip() const { return theBadStrip; }
92  short int badWireGroup() const { return theBadWireGroup; }
93 
94  // Calculated wire time in ns
95  float wireTime() const { return (float)theScaledWireTime / 100.; }
96 
106  float energyDepositedInLayer() const { return theEnergyDeposit; }
107 
109  bool sharesInput(const TrackingRecHit* other, TrackingRecHit::SharedInputType what) const override;
110 
113 
115  bool sharesInput(const CSCRecHit2D* otherRecHit, CSCRecHit2D::SharedInputType what) const;
116 
118  void print() const;
119 
120 private:
121  float theTpeak;
127  short int hitWire_;
128  short int theWGroupsBX_;
129  short int theBadStrip;
130  short int theBadWireGroup;
131 
133 
134  unsigned char theL1APhaseBits_[MAXSTRIPS];
135  unsigned char theStrips_[MAXSTRIPS];
136  float theADCs_[N_ADC];
137 
140 };
141 
143 std::ostream& operator<<(std::ostream& os, const CSCRecHit2D& rh);
144 
145 #endif
CSCRecHit2D::theLocalPosition
LocalPoint theLocalPosition
Definition: CSCRecHit2D.h:138
CSCRecHit2D::ChannelContainer
std::vector< int > ChannelContainer
Definition: CSCRecHit2D.h:20
CSCRecHit2D::quality
int quality() const
quality flag of the reconstruction
Definition: CSCRecHit2D.h:88
CSCRecHit2D::theQuality
int theQuality
Definition: CSCRecHit2D.h:125
mps_fire.i
i
Definition: mps_fire.py:355
CSCRecHit2D::print
void print() const
Print the content of the RecHit2D including L1A (for debugging)
Definition: CSCRecHit2D.cc:174
CSCRecHit2D::theStrips_
unsigned char theStrips_[MAXSTRIPS]
Definition: CSCRecHit2D.h:135
CSCRecHit2D::nStrips_
unsigned char nStrips_
Definition: CSCRecHit2D.h:132
CSCRecHit2D::~CSCRecHit2D
~CSCRecHit2D() override
Definition: CSCRecHit2D.cc:88
CSCRecHit2D::nTimeBins_
unsigned char nTimeBins_
Definition: CSCRecHit2D.h:132
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
pos
Definition: PixelAliasList.h:18
CSCRecHit2D::MAXSTRIPS
static const unsigned int MAXSTRIPS
Definition: CSCRecHit2D.h:32
CSCRecHit2D::clone
CSCRecHit2D * clone() const override
RecHit2DLocalPos base class interface.
Definition: CSCRecHit2D.h:55
CSCRecHit2D::sharesInput
bool sharesInput(const TrackingRecHit *other, TrackingRecHit::SharedInputType what) const override
Returns true if the two TrackingRecHits are using the same input information, false otherwise....
Definition: CSCRecHit2D.cc:90
RangeMap.h
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
CSCRecHit2D::theBadStrip
short int theBadStrip
Definition: CSCRecHit2D.h:129
CSCDetId.h
CSCRecHit2D::cscDetId
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:58
CSCRecHit2D::ADCContainer
edm::RangeMap< int, std::vector< float > > ADCContainer
Definition: CSCRecHit2D.h:21
CSCRecHit2D::errorWithinStrip
float errorWithinStrip() const
The uncertainty of the estimated position within the strip.
Definition: CSCRecHit2D.h:85
CSCRecHit2D::nWireGroups_
unsigned char nWireGroups_
Definition: CSCRecHit2D.h:132
CSCRecHit2D::nWireGroups
unsigned int nWireGroups() const
Definition: CSCRecHit2D.h:71
TrackingRecHit::SharedInputType
SharedInputType
definition of equality via shared input
Definition: TrackingRecHit.h:59
CSCRecHit2D::hitWire_
short int hitWire_
Definition: CSCRecHit2D.h:127
CSCRecHit2D::theTpeak
float theTpeak
Definition: CSCRecHit2D.h:121
CSCRecHit2D::adcs
float adcs(unsigned int strip, unsigned int timebin) const
Map of strip ADCs for strips comprising the rechit.
Definition: CSCRecHit2D.h:74
CSCRecHit2D::badWireGroup
short int badWireGroup() const
Definition: CSCRecHit2D.h:92
CSCRecHit2D::badStrip
short int badStrip() const
flags for involvement of 'bad' channels
Definition: CSCRecHit2D.h:91
RecHit2DLocalPos::LocalPoint
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: RecHit2DLocalPos.h:10
CSCRecHit2D::all
Definition: CSCRecHit2D.h:24
trackingPlots.other
other
Definition: trackingPlots.py:1465
CSCRecHit2D::tpeak
float tpeak() const
Fitted peaking time.
Definition: CSCRecHit2D.h:79
operator<<
std::ostream & operator<<(std::ostream &os, const CSCRecHit2D &rh)
Output operator for CSCRecHit2D.
Definition: CSCRecHit2D.cc:207
TrackingRecHit::some
Definition: TrackingRecHit.h:59
edm::RangeMap
Definition: RangeMap.h:32
CSCRecHit2D::theScaledWireTime
int theScaledWireTime
Definition: CSCRecHit2D.h:126
CSCRecHit2D
Definition: CSCRecHit2D.h:18
CSCRecHit2D::wireTime
float wireTime() const
Definition: CSCRecHit2D.h:95
TrackingRecHit::all
Definition: TrackingRecHit.h:59
CSCRecHit2D::theLocalError
LocalError theLocalError
Definition: CSCRecHit2D.h:139
runTheMatrix.err
err
Definition: runTheMatrix.py:288
CSCRecHit2D::someStrips
Definition: CSCRecHit2D.h:29
LocalError
Definition: LocalError.h:12
CSCRecHit2D::localPosition
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:56
CSCRecHit2D::theBadWireGroup
short int theBadWireGroup
Definition: CSCRecHit2D.h:130
CSCRecHit2D::thePositionWithinStrip
float thePositionWithinStrip
Definition: CSCRecHit2D.h:122
CSCDetId
Definition: CSCDetId.h:26
CSCRecHit2D::channelsl1a
int channelsl1a(unsigned int i) const
Extract the L1A phase bits from the StripChannelContainer - high.
Definition: CSCRecHit2D.h:65
CSCRecHit2D::energyDepositedInLayer
float energyDepositedInLayer() const
Definition: CSCRecHit2D.h:106
CSCRecHit2D::some
Definition: CSCRecHit2D.h:25
CSCRecHit2D::N_ADC
static const unsigned int N_ADC
Definition: CSCRecHit2D.h:34
CSCRecHit2D::localPositionError
LocalError localPositionError() const override
Definition: CSCRecHit2D.h:57
CSCRecHit2D::nTimeBins
unsigned int nTimeBins() const
Definition: CSCRecHit2D.h:76
CSCRecHit2D::theWGroupsBX_
short int theWGroupsBX_
Definition: CSCRecHit2D.h:128
RecHit2DLocalPos
Definition: RecHit2DLocalPos.h:8
TrackingRecHit
Definition: TrackingRecHit.h:21
CSCRecHit2D::CSCRecHit2D
CSCRecHit2D()
Definition: CSCRecHit2D.cc:4
CSCRecHit2D::channels
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
Definition: CSCRecHit2D.h:61
CSCRecHit2D::someWires
Definition: CSCRecHit2D.h:27
CSCRecHit2D::MAXTIMEBINS
static const unsigned int MAXTIMEBINS
Definition: CSCRecHit2D.h:33
CSCRecHit2D::allWires
Definition: CSCRecHit2D.h:26
CSCRecHit2D::positionWithinStrip
float positionWithinStrip() const
The estimated position within the strip.
Definition: CSCRecHit2D.h:82
CSCRecHit2D::theEnergyDeposit
float theEnergyDeposit
Definition: CSCRecHit2D.h:124
CSCRecHit2D::theErrorWithinStrip
float theErrorWithinStrip
Definition: CSCRecHit2D.h:123
CSCRecHit2D::wgroupsBX
short int wgroupsBX() const
Definition: CSCRecHit2D.h:69
CSCRecHit2D::SharedInputType
SharedInputType
Definition: CSCRecHit2D.h:23
CSCRecHit2D::theADCs_
float theADCs_[N_ADC]
Definition: CSCRecHit2D.h:136
CSCRecHit2D::nStrips
unsigned int nStrips() const
Definition: CSCRecHit2D.h:62
CSCRecHit2D::allStrips
Definition: CSCRecHit2D.h:28
CSCRecHit2D::hitWire
short int hitWire() const
L1A.
Definition: CSCRecHit2D.h:68
CSCRecHit2D::theL1APhaseBits_
unsigned char theL1APhaseBits_[MAXSTRIPS]
Definition: CSCRecHit2D.h:134
RecHit2DLocalPos.h