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 
4 
5 
7  const float& sHitPos,
8  const int& tmax,
9  const ChannelContainer& strips,
10  const StripHitADCContainer& s_adc,
11  const StripHitADCContainer& s_adcRaw,
12  const int& numberOfConsecutiveStrips,
13  const int& closestMaximum,
14  const short int & deadStrip) :
15  theDetId( id ),
16  theStripHitPosition( sHitPos ),
17  theStripHitTmax( tmax ),
18  theStrips( strips ),
19  theStripHitADCs( s_adc ),
20  theStripHitRawADCs( s_adcRaw ),
21  theConsecutiveStrips(numberOfConsecutiveStrips),
22  theClosestMaximum(closestMaximum),
23  theDeadStrip(deadStrip)
24 {
25 
27 theStripsLowBits.clear();
28 for(int i=0; i<(int)theStrips.size(); i++){
29  theStripsLowBits.push_back(theStrips[i] & 0x000000FF);
30  }
32 theStripsHighBits.clear();
33 for(int i=0; i<(int)theStrips.size(); i++){
34  theStripsHighBits.push_back(theStrips[i] & 0x0000FF00);
35  }
36 
37 }
38 
39 
40 
42 void
44  std::cout << "CSCStripHit in CSC Detector: " << std::dec << cscDetId() << std::endl;
45  std::cout << " sHitPos: " << sHitPos() << std::endl;
46  std::cout << " TMAX: " << tmax() << std::endl;
47  std::cout << " STRIPS: ";
48  for (int i=0; i<(int)strips().size(); i++) {std::cout << std::dec << strips()[i]
49  << " (" << "HEX: " << std::hex << strips()[i] << ")" << " ";}
50  std::cout << std::endl;
51 
53  std::cout << " L1APhase: ";
54  for (int i=0; i<(int)stripsl1a().size(); i++) {
55  //uint16_t L1ABitSet=(strips()[i] & 0xFF00);
56  //std::cout << std::hex << (stripsl1a()[i] >> 15)<< " ";
57 
58  std::cout << "|";
59  for (int k=0; k<8 ; k++){
60  std::cout << ((stripsl1a()[i] >> (15-k)) & 0x1) << " ";}
61  std::cout << "| ";
62  }
63  std::cout << std::endl;
64 
65  std::cout << " S_ADC: ";
66  for (int i=0; i<(float)s_adc().size(); i++) {std::cout << s_adc()[i] << " ";}
67  std::cout << std::endl;
68  std::cout << " S_ADC_RAW: ";
69  for (int i=0; i<(float)s_adcRaw().size(); i++) {std::cout << s_adcRaw()[i] << " ";}
70  std::cout << std::endl;
71 }
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
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:43
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