CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCComparatorDigiValidation Class Reference

#include <CSCComparatorDigiValidation.h>

Inheritance diagram for CSCComparatorDigiValidation:
CSCBaseValidation

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &)
 
 CSCComparatorDigiValidation (const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
 
 ~CSCComparatorDigiValidation () override
 
- Public Member Functions inherited from CSCBaseValidation
 CSCBaseValidation (const edm::ParameterSet &ps)
 
void setGeometry (const CSCGeometry *geom)
 
void setSimHitMap (const PSimHitMap *simHitMap)
 
virtual ~CSCBaseValidation ()
 

Private Attributes

edm::EDGetTokenT< CSCComparatorDigiCollectioncomparators_Token_
 
edm::InputTag inputTagComp_
 
edm::InputTag inputTagStrip_
 
edm::EDGetTokenT< CSCStripDigiCollectionstrips_Token_
 
MonitorElementthe3StripPlots [10]
 
MonitorElementtheNDigisPerEventPlot
 
MonitorElementtheNDigisPerLayerPlots [10]
 
MonitorElementtheStripDigiPlots [10]
 
MonitorElementtheTimeBinPlots [10]
 

Additional Inherited Members

- Public Types inherited from CSCBaseValidation
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Member Functions inherited from CSCBaseValidation
const CSCLayerfindLayer (int detId) const
 
- Protected Attributes inherited from CSCBaseValidation
bool doSim_
 
const CSCGeometrytheCSCGeometry
 
const PSimHitMaptheSimHitMap
 

Detailed Description

Definition at line 12 of file CSCComparatorDigiValidation.h.

Constructor & Destructor Documentation

◆ CSCComparatorDigiValidation()

CSCComparatorDigiValidation::CSCComparatorDigiValidation ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  iC 
)

Definition at line 6 of file CSCComparatorDigiValidation.cc.

8  const auto &comps = ps.getParameterSet("cscComparatorDigi");
9  inputTagComp_ = comps.getParameter<edm::InputTag>("inputTag");
11 
12  const auto &strips = ps.getParameterSet("cscStripDigi");
13  inputTagStrip_ = strips.getParameter<edm::InputTag>("inputTag");
15 }

References comparators_Token_, edm::ParameterSet::getParameterSet(), inputTagComp_, inputTagStrip_, DigiDM_cff::strips, and strips_Token_.

◆ ~CSCComparatorDigiValidation()

CSCComparatorDigiValidation::~CSCComparatorDigiValidation ( )
override

Definition at line 17 of file CSCComparatorDigiValidation.cc.

17 {}

Member Function Documentation

◆ analyze()

void CSCComparatorDigiValidation::analyze ( const edm::Event e,
const edm::EventSetup  
)
overridevirtual

Implements CSCBaseValidation.

Definition at line 50 of file CSCComparatorDigiValidation.cc.

50  {
53 
54  e.getByToken(comparators_Token_, comparators);
55  if (!comparators.isValid()) {
56  edm::LogError("CSCComparatorDigiValidation") << "Cannot get comparators by label " << inputTagComp_.encode();
57  }
58  e.getByToken(strips_Token_, stripDigis);
59  if (!stripDigis.isValid()) {
60  edm::LogError("CSCComparatorDigiValidation") << "Cannot get strips by label " << inputTagComp_.encode();
61  }
62 
63  unsigned nDigisPerEvent = 0;
64 
65  for (auto j = comparators->begin(); j != comparators->end(); j++) {
66  auto digiItr = (*j).second.first;
67  auto last = (*j).second.second;
68 
69  CSCDetId detId((*j).first);
70  const CSCLayer *layer = findLayer(detId.rawId());
71  int chamberType = layer->chamber()->specs()->chamberType();
72 
73  theNDigisPerLayerPlots[chamberType - 1]->Fill(last - digiItr);
74 
75  for (auto stripRange = stripDigis->get(detId); digiItr != last; ++digiItr) {
76  ++nDigisPerEvent;
77  theTimeBinPlots[chamberType - 1]->Fill(digiItr->getTimeBin());
78 
79  int strip = digiItr->getStrip();
80  for (auto stripItr = stripRange.first; stripItr != stripRange.second; ++stripItr) {
81  if (stripItr->getStrip() == strip) {
82  std::vector<int> adc = stripItr->getADCCounts();
83  float pedc = 0.5 * (adc[0] + adc[1]);
84  float amp = adc[4] - pedc;
85  theStripDigiPlots[chamberType - 1]->Fill(amp);
86  // check neighbors
87  if (stripItr != stripRange.first && stripItr != stripRange.second - 1) {
88  std::vector<int> adcl = (stripItr - 1)->getADCCounts();
89  std::vector<int> adcr = (stripItr + 1)->getADCCounts();
90  float pedl = 0.5 * (adcl[0] + adcl[1]);
91  float pedr = 0.5 * (adcr[0] + adcr[1]);
92  float three = adcl[4] - pedl + adcr[4] - pedr + amp;
93  the3StripPlots[chamberType - 1]->Fill(three);
94  }
95  }
96  }
97  }
98  }
99  theNDigisPerEventPlot->Fill(nDigisPerEvent);
100 }

References gpuClustering::adc, comparators_Token_, MillePedeFileConverter_cfg::e, edm::InputTag::encode(), dqm::impl::MonitorElement::Fill(), CSCBaseValidation::findLayer(), inputTagComp_, edm::HandleBase::isValid(), dqmiolumiharvest::j, dqmdumpme::last, phase1PixelTopology::layer, DetId::rawId(), digitizers_cfi::strip, strips_Token_, the3StripPlots, theNDigisPerEventPlot, theNDigisPerLayerPlots, theStripDigiPlots, and theTimeBinPlots.

◆ bookHistograms()

void CSCComparatorDigiValidation::bookHistograms ( DQMStore::IBooker iBooker)

Definition at line 19 of file CSCComparatorDigiValidation.cc.

19  {
20  theNDigisPerEventPlot = iBooker.book1D("CSCComparatorDigisPerEvent",
21  "CSC Comparator Digis per event;CSC Comparator Digis per event;Entries",
22  100,
23  0,
24  100);
25  // 10 chamber types, if you consider ME1/a and ME1/b separate
26  for (int i = 1; i <= 10; ++i) {
27  const std::string t1("CSCComparatorDigiTime_" + CSCDetId::chamberName(i));
28  const std::string t2("CSCComparatorDigisPerLayer_" + CSCDetId::chamberName(i));
29  const std::string t3("CSCComparatorStripAmplitude_" + CSCDetId::chamberName(i));
30  const std::string t4("CSCComparator3StripAmplitude_" + CSCDetId::chamberName(i));
31  theTimeBinPlots[i - 1] = iBooker.book1D(
32  t1, "Comparator Time Bin " + CSCDetId::chamberName(i) + " ;Comparator Time Bin; Entries", 16, 0, 16);
33  theNDigisPerLayerPlots[i - 1] = iBooker.book1D(
34  t2,
35  "Number of Comparator Digis " + CSCDetId::chamberName(i) + " ;Number of Comparator Digis; Entries",
36  100,
37  0,
38  20);
39  theStripDigiPlots[i - 1] = iBooker.book1D(
40  t3, "Comparator Amplitude " + CSCDetId::chamberName(i) + " ;Comparator Amplitude; Entries", 100, 0, 1000);
41  the3StripPlots[i - 1] = iBooker.book1D(
42  t4,
43  "Comparator-triplet Amplitude " + CSCDetId::chamberName(i) + " ;Comparator-triplet Amplitude; Entries",
44  100,
45  0,
46  1000);
47  }
48 }

References dqm::implementation::IBooker::book1D(), CSCDetId::chamberName(), mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, RandomServiceHelper::t1, RandomServiceHelper::t2, RandomServiceHelper::t3, the3StripPlots, theNDigisPerEventPlot, theNDigisPerLayerPlots, theStripDigiPlots, and theTimeBinPlots.

Member Data Documentation

◆ comparators_Token_

edm::EDGetTokenT<CSCComparatorDigiCollection> CSCComparatorDigiValidation::comparators_Token_
private

Definition at line 21 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and CSCComparatorDigiValidation().

◆ inputTagComp_

edm::InputTag CSCComparatorDigiValidation::inputTagComp_
private

Definition at line 23 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and CSCComparatorDigiValidation().

◆ inputTagStrip_

edm::InputTag CSCComparatorDigiValidation::inputTagStrip_
private

Definition at line 22 of file CSCComparatorDigiValidation.h.

Referenced by CSCComparatorDigiValidation().

◆ strips_Token_

edm::EDGetTokenT<CSCStripDigiCollection> CSCComparatorDigiValidation::strips_Token_
private

Definition at line 20 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and CSCComparatorDigiValidation().

◆ the3StripPlots

MonitorElement* CSCComparatorDigiValidation::the3StripPlots[10]
private

Definition at line 28 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theNDigisPerEventPlot

MonitorElement* CSCComparatorDigiValidation::theNDigisPerEventPlot
private

Definition at line 30 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theNDigisPerLayerPlots

MonitorElement* CSCComparatorDigiValidation::theNDigisPerLayerPlots[10]
private

Definition at line 26 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theStripDigiPlots

MonitorElement* CSCComparatorDigiValidation::theStripDigiPlots[10]
private

Definition at line 27 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theTimeBinPlots

MonitorElement* CSCComparatorDigiValidation::theTimeBinPlots[10]
private

Definition at line 25 of file CSCComparatorDigiValidation.h.

Referenced by analyze(), and bookHistograms().

RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
mps_fire.i
i
Definition: mps_fire.py:428
CSCComparatorDigiValidation::theNDigisPerLayerPlots
MonitorElement * theNDigisPerLayerPlots[10]
Definition: CSCComparatorDigiValidation.h:26
CSCComparatorDigiValidation::theNDigisPerEventPlot
MonitorElement * theNDigisPerEventPlot
Definition: CSCComparatorDigiValidation.h:30
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
CSCStripDigiCollection
CSCComparatorDigiValidation::comparators_Token_
edm::EDGetTokenT< CSCComparatorDigiCollection > comparators_Token_
Definition: CSCComparatorDigiValidation.h:21
CSCComparatorDigiValidation::inputTagComp_
edm::InputTag inputTagComp_
Definition: CSCComparatorDigiValidation.h:23
CSCComparatorDigiValidation::inputTagStrip_
edm::InputTag inputTagStrip_
Definition: CSCComparatorDigiValidation.h:22
CSCLayer
Definition: CSCLayer.h:24
edm::Handle< CSCComparatorDigiCollection >
dqmdumpme.last
last
Definition: dqmdumpme.py:56
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
CSCBaseValidation::CSCBaseValidation
CSCBaseValidation(const edm::ParameterSet &ps)
Definition: CSCBaseValidation.cc:4
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
CSCBaseValidation::findLayer
const CSCLayer * findLayer(int detId) const
Definition: CSCBaseValidation.cc:7
RandomServiceHelper.t3
t3
Definition: RandomServiceHelper.py:258
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCDetId
Definition: CSCDetId.h:26
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
CSCComparatorDigiCollection
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CSCComparatorDigiValidation::strips_Token_
edm::EDGetTokenT< CSCStripDigiCollection > strips_Token_
Definition: CSCComparatorDigiValidation.h:20
CSCComparatorDigiValidation::theStripDigiPlots
MonitorElement * theStripDigiPlots[10]
Definition: CSCComparatorDigiValidation.h:27
CSCDetId::chamberName
std::string chamberName() const
Definition: CSCDetId.cc:74
CSCComparatorDigiValidation::theTimeBinPlots
MonitorElement * theTimeBinPlots[10]
Definition: CSCComparatorDigiValidation.h:25
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
CSCComparatorDigiValidation::the3StripPlots
MonitorElement * the3StripPlots[10]
Definition: CSCComparatorDigiValidation.h:28
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37