CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
20 public:
21 
22  typedef std::vector<int> ChannelContainer;
24 
26 
27  static const unsigned int MAXSTRIPS=3;
28  static const unsigned int MAXTIMEBINS=4;
29  static const unsigned int N_ADC=MAXSTRIPS*MAXTIMEBINS;
30  CSCRecHit2D();
31 
32  CSCRecHit2D( const CSCDetId& id,
33  const LocalPoint& pos, const LocalError& err,
35  const ADCContainer& adcs,
36  const ChannelContainer& wgroups,
37  float tpeak,
38  float posInStrip,
39  float errInStrip,
40  int quality,
41  short int badStrip=0, short int badWireGroup=0,
42  int scaledWireTime=0,
43  float energyDeposit=-995.);
44 
45  ~CSCRecHit2D();
46 
47 
49  CSCRecHit2D* clone() const { return new CSCRecHit2D( *this ); }
52  CSCDetId cscDetId() const { return geographicalId(); }
53 
55  int channels(unsigned int i) const { return theStrips_[i]; }
56  unsigned int nStrips() const {return nStrips_;}
57 
59  int channelsl1a(unsigned int i) const { return theL1APhaseBits_[i]; }
60 
62  short int hitWire() const { return hitWire_;}
63  short int wgroupsBX() const {return theWGroupsBX_;}
64 
65  unsigned int nWireGroups() const {return nWireGroups_;}
66 
68  float adcs(unsigned int strip, unsigned int timebin) const { return theADCs_[strip*MAXTIMEBINS+timebin]; }
69 
70  unsigned int nTimeBins() const {return nTimeBins_;}
71 
73  float tpeak() const { return theTpeak; }
74 
76  float positionWithinStrip() const { return thePositionWithinStrip; };
77 
79  float errorWithinStrip() const { return theErrorWithinStrip;} ;
80 
82  int quality() const { return theQuality;}
83 
85  short int badStrip() const { return theBadStrip; }
86  short int badWireGroup() const { return theBadWireGroup; }
87 
88  // Calculated wire time in ns
89  float wireTime() const { return (float)theScaledWireTime/100.; }
90 
100  float energyDepositedInLayer() const { return theEnergyDeposit; }
101 
103  virtual bool sharesInput(const TrackingRecHit *other, TrackingRecHit::SharedInputType what) const;
104 
106  bool sharesInput(const TrackingRecHit *other, CSCRecHit2D::SharedInputType what) const;
107 
109  bool sharesInput(const CSCRecHit2D *otherRecHit, CSCRecHit2D::SharedInputType what) const;
110 
112  void print() const;
113 
114 private:
115 
116  float theTpeak;
122  short int hitWire_;
123  short int theWGroupsBX_;
124  short int theBadStrip;
125  short int theBadWireGroup;
126 
128 
129  unsigned char theL1APhaseBits_[MAXSTRIPS];
130  unsigned char theStrips_[MAXSTRIPS];
131  float theADCs_[N_ADC];
132 
135 
136 };
137 
139 std::ostream& operator<<(std::ostream& os, const CSCRecHit2D& rh);
140 
141 #endif
142 
SharedInputType
definition of equality via shared input
int i
Definition: DBlmapReader.cc:9
LocalPoint theLocalPosition
Definition: CSCRecHit2D.h:133
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
unsigned char nTimeBins_
Definition: CSCRecHit2D.h:127
unsigned char nWireGroups_
Definition: CSCRecHit2D.h:127
float tpeak() const
Fitted peaking time.
Definition: CSCRecHit2D.h:73
short int badStrip() const
flags for involvement of &#39;bad&#39; channels
Definition: CSCRecHit2D.h:85
unsigned char nStrips_
Definition: CSCRecHit2D.h:127
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
virtual bool sharesInput(const TrackingRecHit *other, TrackingRecHit::SharedInputType what) const
Returns true if the two TrackingRecHits are using the same input information, false otherwise...
Definition: CSCRecHit2D.cc:88
short int hitWire_
Definition: CSCRecHit2D.h:122
static const unsigned int MAXSTRIPS
Definition: CSCRecHit2D.h:27
short int theBadStrip
Definition: CSCRecHit2D.h:124
CSCRecHit2D * clone() const
RecHit2DLocalPos base class interface.
Definition: CSCRecHit2D.h:49
edm::RangeMap< int, std::vector< float > > ADCContainer
Definition: CSCRecHit2D.h:23
float energyDepositedInLayer() const
Definition: CSCRecHit2D.h:100
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
Definition: CSCRecHit2D.h:55
short int theBadWireGroup
Definition: CSCRecHit2D.h:125
void print() const
Print the content of the RecHit2D including L1A (for debugging)
Definition: CSCRecHit2D.cc:165
LocalError localPositionError() const
Definition: CSCRecHit2D.h:51
short int wgroupsBX() const
Definition: CSCRecHit2D.h:63
static const unsigned int N_ADC
Definition: CSCRecHit2D.h:29
LocalError theLocalError
Definition: CSCRecHit2D.h:134
unsigned int nStrips() const
Definition: CSCRecHit2D.h:56
float theTpeak
Definition: CSCRecHit2D.h:116
float adcs(unsigned int strip, unsigned int timebin) const
Map of strip ADCs for strips comprising the rechit.
Definition: CSCRecHit2D.h:68
float positionWithinStrip() const
The estimated position within the strip.
Definition: CSCRecHit2D.h:76
int theScaledWireTime
Definition: CSCRecHit2D.h:121
float thePositionWithinStrip
Definition: CSCRecHit2D.h:117
float theErrorWithinStrip
Definition: CSCRecHit2D.h:118
short int hitWire() const
L1A.
Definition: CSCRecHit2D.h:62
int quality() const
quality flag of the reconstruction
Definition: CSCRecHit2D.h:82
float wireTime() const
Definition: CSCRecHit2D.h:89
float theEnergyDeposit
Definition: CSCRecHit2D.h:119
static const unsigned int MAXTIMEBINS
Definition: CSCRecHit2D.h:28
int channelsl1a(unsigned int i) const
Extract the L1A phase bits from the StripChannelContainer - high.
Definition: CSCRecHit2D.h:59
short int theWGroupsBX_
Definition: CSCRecHit2D.h:123
float theADCs_[N_ADC]
Definition: CSCRecHit2D.h:131
float errorWithinStrip() const
The uncertainty of the estimated position within the strip.
Definition: CSCRecHit2D.h:79
GloballyPositioned< float >::LocalPoint LocalPoint
unsigned int nTimeBins() const
Definition: CSCRecHit2D.h:70
DetId geographicalId() const
LocalPoint localPosition() const
Definition: CSCRecHit2D.h:50
short int badWireGroup() const
Definition: CSCRecHit2D.h:86
unsigned char theStrips_[MAXSTRIPS]
Definition: CSCRecHit2D.h:130
std::vector< int > ChannelContainer
Definition: CSCRecHit2D.h:22
unsigned char theL1APhaseBits_[MAXSTRIPS]
Definition: CSCRecHit2D.h:129
unsigned int nWireGroups() const
Definition: CSCRecHit2D.h:65