CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCStripHit.cc
Go to the documentation of this file.
2 #include <iostream>
3 
5  theDetId(),
6  theStripHitPosition(),
7  theStripHitTmax(),
8  theStrips(),
9  theStripHitADCs(),
10  theStripHitRawADCs(),
11  theConsecutiveStrips(),
12  theClosestMaximum(),
13  theDeadStrip()
14 {
15 
17 theStripsLowBits.clear();
18 for(int i=0; i<(int)theStrips.size(); i++){
19  theStripsLowBits.push_back(theStrips[i] & 0x000000FF);
20  }
22 theStripsHighBits.clear();
23 for(int i=0; i<(int)theStrips.size(); i++){
24  theStripsHighBits.push_back(theStrips[i] & 0x0000FF00);
25  }
26 
27 }
28 
30  const float& sHitPos,
31  const int& tmax,
32  const ChannelContainer& strips,
33  const StripHitADCContainer& s_adc,
34  const StripHitADCContainer& s_adcRaw,
35  const int& numberOfConsecutiveStrips,
36  const int& closestMaximum,
37  const short int & deadStrip) :
38  theDetId( id ),
39  theStripHitPosition( sHitPos ),
40  theStripHitTmax( tmax ),
41  theStrips( strips ),
42  theStripHitADCs( s_adc ),
43  theStripHitRawADCs( s_adcRaw ),
44  theConsecutiveStrips(numberOfConsecutiveStrips),
45  theClosestMaximum(closestMaximum),
46  theDeadStrip(deadStrip)
47 {
48 
50 theStripsLowBits.clear();
51 for(int i=0; i<(int)theStrips.size(); i++){
52  theStripsLowBits.push_back(theStrips[i] & 0x000000FF);
53  }
55 theStripsHighBits.clear();
56 for(int i=0; i<(int)theStrips.size(); i++){
57  theStripsHighBits.push_back(theStrips[i] & 0x0000FF00);
58  }
59 
60 }
61 
63 
64 
66 void
68  std::cout << "CSCStripHit in CSC Detector: " << std::dec << cscDetId() << std::endl;
69  std::cout << " sHitPos: " << sHitPos() << std::endl;
70  std::cout << " TMAX: " << tmax() << std::endl;
71  std::cout << " STRIPS: ";
72  for (int i=0; i<(int)strips().size(); i++) {std::cout << std::dec << strips()[i]
73  << " (" << "HEX: " << std::hex << strips()[i] << ")" << " ";}
74  std::cout << std::endl;
75 
77  std::cout << " L1APhase: ";
78  for (int i=0; i<(int)stripsl1a().size(); i++) {
79  //uint16_t L1ABitSet=(strips()[i] & 0xFF00);
80  //std::cout << std::hex << (stripsl1a()[i] >> 15)<< " ";
81 
82  std::cout << "|";
83  for (int k=0; k<8 ; k++){
84  std::cout << ((stripsl1a()[i] >> (15-k)) & 0x1) << " ";}
85  std::cout << "| ";
86  }
87  std::cout << std::endl;
88 
89  std::cout << " S_ADC: ";
90  for (int i=0; i<(float)s_adc().size(); i++) {std::cout << s_adc()[i] << " ";}
91  std::cout << std::endl;
92  std::cout << " S_ADC_RAW: ";
93  for (int i=0; i<(float)s_adcRaw().size(); i++) {std::cout << s_adcRaw()[i] << " ";}
94  std::cout << std::endl;
95 }
int i
Definition: DBlmapReader.cc:9
const ChannelContainer & stripsl1a() const
L1A.
Definition: CSCStripHit.h:56
const StripHitADCContainer & s_adcRaw() const
the raw ADC counts for each of the strip within cluster
Definition: CSCStripHit.h:62
ChannelContainer theStripsLowBits
Definition: CSCStripHit.h:82
const StripHitADCContainer & s_adc() const
L1A.
Definition: CSCStripHit.h:59
ChannelContainer theStrips
Definition: CSCStripHit.h:81
std::vector< float > StripHitADCContainer
Definition: CSCStripHit.h:21
ChannelContainer theStripsHighBits
L1A.
Definition: CSCStripHit.h:83
int k[5][pyjets_maxn]
static const double tmax[3]
int tmax() const
Strip hit maximum time bin.
Definition: CSCStripHit.h:47
std::vector< int > ChannelContainer
Definition: CSCStripHit.h:22
CSCDetId cscDetId() const
Strip Hit is in this DetId.
Definition: CSCStripHit.h:41
void print() const
Print content of the striphit including L1A.
Definition: CSCStripHit.cc:67
const ChannelContainer & strips() const
L1A.
Definition: CSCStripHit.h:53
tuple cout
Definition: gather_cfg.py:121
float sHitPos() const
Strip hit position (centroid)
Definition: CSCStripHit.h:44