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 
19 
20 public:
21 
22  typedef std::vector<int> ChannelContainer;
24 
25  enum SharedInputType {all = TrackingRecHit::all, some = TrackingRecHit::some, allWires, someWires, allStrips, someStrips};
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,
34  const ChannelContainer& channels,
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 ); }
50  LocalPoint localPosition() const { return theLocalPosition; }
51  LocalError localPositionError() const { return theLocalError; }
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 
127  unsigned char nStrips_, nWireGroups_, nTimeBins_;
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
LocalPoint localPosition() const
Definition: CSCRecHit2D.h:50
float theErrorWithinStrip
Definition: CSCRecHit2D.h:118
int i
Definition: DBlmapReader.cc:9
float wireTime() const
Definition: CSCRecHit2D.h:89
LocalError theLocalError
Definition: CSCRecHit2D.h:134
float errorWithinStrip() const
The uncertainty of the estimated position within the strip.
Definition: CSCRecHit2D.h:79
LocalPoint theLocalPosition
Definition: CSCRecHit2D.h:133
float energyDepositedInLayer() const
Definition: CSCRecHit2D.h:100
short int hitWire() const
L1A.
Definition: CSCRecHit2D.h:62
edm::RangeMap< int, std::vector< float > > ADCContainer
Definition: CSCRecHit2D.h:23
short int badStrip() const
flags for involvement of &#39;bad&#39; channels
Definition: CSCRecHit2D.h:85
int channelsl1a(unsigned int i) const
Extract the L1A phase bits from the StripChannelContainer - high.
Definition: CSCRecHit2D.h:59
std::vector< int > ChannelContainer
Definition: CSCRecHit2D.h:22
unsigned int nTimeBins() const
Definition: CSCRecHit2D.h:70
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:8
short int wgroupsBX() const
Definition: CSCRecHit2D.h:63
float positionWithinStrip() const
The estimated position within the strip.
Definition: CSCRecHit2D.h:76
int quality() const
quality flag of the reconstruction
Definition: CSCRecHit2D.h:82
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
float theTpeak
Definition: CSCRecHit2D.h:116
float theEnergyDeposit
Definition: CSCRecHit2D.h:119
unsigned int nWireGroups() const
Definition: CSCRecHit2D.h:65
unsigned char nWireGroups_
Definition: CSCRecHit2D.h:127
float adcs(unsigned int strip, unsigned int timebin) const
Map of strip ADCs for strips comprising the rechit.
Definition: CSCRecHit2D.h:68
short int hitWire_
Definition: CSCRecHit2D.h:122
float thePositionWithinStrip
Definition: CSCRecHit2D.h:117
short int badWireGroup() const
Definition: CSCRecHit2D.h:86
unsigned int nStrips() const
Definition: CSCRecHit2D.h:56
CSCRecHit2D * clone() const
RecHit2DLocalPos base class interface.
Definition: CSCRecHit2D.h:49
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
Definition: CSCRecHit2D.h:55
LocalError localPositionError() const
Definition: CSCRecHit2D.h:51
short int theWGroupsBX_
Definition: CSCRecHit2D.h:123
float tpeak() const
Fitted peaking time.
Definition: CSCRecHit2D.h:73
short int theBadStrip
Definition: CSCRecHit2D.h:124
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
short int theBadWireGroup
Definition: CSCRecHit2D.h:125
int theScaledWireTime
Definition: CSCRecHit2D.h:121
Unlimited (trivial) bounds.