CMS 3D CMS Logo

CSCStripHit.cc
Go to the documentation of this file.
2 #include <iostream>
3 
5  const float& sHitPos,
6  const int& tmax,
8  const StripHitADCContainer& s_adc,
9  const StripHitADCContainer& s_adcRaw,
10  const int& numberOfConsecutiveStrips,
11  const int& closestMaximum,
12  const short int& deadStrip)
13  : theDetId(id),
14  theStripHitPosition(sHitPos),
15  theStripHitTmax(tmax),
16  theStrips(strips),
17  theStripHitADCs(s_adc),
18  theStripHitRawADCs(s_adcRaw),
19  theConsecutiveStrips(numberOfConsecutiveStrips),
20  theClosestMaximum(closestMaximum),
21  theDeadStrip(deadStrip) {
23  theStripsLowBits.clear();
24  for (int i = 0; i < (int)theStrips.size(); i++) {
25  theStripsLowBits.push_back(theStrips[i] & 0x000000FF);
26  }
28  theStripsHighBits.clear();
29  for (int i = 0; i < (int)theStrips.size(); i++) {
30  theStripsHighBits.push_back(theStrips[i] & 0x0000FF00);
31  }
32 }
33 
35 void CSCStripHit::print() const {
36  std::cout << "CSCStripHit in CSC Detector: " << std::dec << cscDetId() << std::endl;
37  std::cout << " sHitPos: " << sHitPos() << std::endl;
38  std::cout << " TMAX: " << tmax() << std::endl;
39  std::cout << " STRIPS: ";
40  for (int i = 0; i < (int)strips().size(); i++) {
41  std::cout << std::dec << strips()[i] << " ("
42  << "HEX: " << std::hex << strips()[i] << ")"
43  << " ";
44  }
45  std::cout << std::endl;
46 
48  std::cout << " L1APhase: ";
49  for (int i = 0; i < (int)stripsl1a().size(); i++) {
50  //uint16_t L1ABitSet=(strips()[i] & 0xFF00);
51  //std::cout << std::hex << (stripsl1a()[i] >> 15)<< " ";
52 
53  std::cout << "|";
54  for (int k = 0; k < 8; k++) {
55  std::cout << ((stripsl1a()[i] >> (15 - k)) & 0x1) << " ";
56  }
57  std::cout << "| ";
58  }
59  std::cout << std::endl;
60 
61  std::cout << " S_ADC: ";
62  for (int i = 0; i < (float)s_adc().size(); i++) {
63  std::cout << s_adc()[i] << " ";
64  }
65  std::cout << std::endl;
66  std::cout << " S_ADC_RAW: ";
67  for (int i = 0; i < (float)s_adcRaw().size(); i++) {
68  std::cout << s_adcRaw()[i] << " ";
69  }
70  std::cout << std::endl;
71 }
const ChannelContainer & stripsl1a() const
L1A.
Definition: CSCStripHit.h:53
const StripHitADCContainer & s_adcRaw() const
the raw ADC counts for each of the strip within cluster
Definition: CSCStripHit.h:59
ChannelContainer theStripsLowBits
Definition: CSCStripHit.h:78
const StripHitADCContainer & s_adc() const
L1A.
Definition: CSCStripHit.h:56
ChannelContainer theStrips
Definition: CSCStripHit.h:77
std::vector< float > StripHitADCContainer
Definition: CSCStripHit.h:18
ChannelContainer theStripsHighBits
L1A.
Definition: CSCStripHit.h:79
static const double tmax[3]
int tmax() const
Strip hit maximum time bin.
Definition: CSCStripHit.h:44
std::vector< int > ChannelContainer
Definition: CSCStripHit.h:19
CSCDetId cscDetId() const
Strip Hit is in this DetId.
Definition: CSCStripHit.h:38
void print() const
Print content of the striphit including L1A.
Definition: CSCStripHit.cc:35
const ChannelContainer & strips() const
L1A.
Definition: CSCStripHit.h:50
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
Definition: DigiDM_cff.py:32
float sHitPos() const
Strip hit position (centroid)
Definition: CSCStripHit.h:41