CMS 3D CMS Logo

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

#include <CSCStripDigiValidation.h>

Inheritance diagram for CSCStripDigiValidation:
CSCBaseValidation

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &)
 
 CSCStripDigiValidation (const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
 
void plotResolution (const PSimHit &hit, int strip, const CSCLayer *layer, int chamberType)
 
 ~CSCStripDigiValidation () 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 Member Functions

void fillPedestalPlots (const CSCStripDigi &digi)
 
void fillSignalPlots (const CSCStripDigi &digi)
 

Private Attributes

edm::InputTag inputTag_
 
edm::EDGetTokenT< CSCStripDigiCollectionstrips_Token_
 
MonitorElementtheAmplitudePlot
 
MonitorElementtheNDigisPerChamberPlot
 
MonitorElementtheNDigisPerEventPlot
 
MonitorElementtheNDigisPerLayerPlot
 
int thePedestalCount
 
float thePedestalCovarianceSum
 
MonitorElementthePedestalNeighborCorrelationPlot
 
MonitorElementthePedestalPlot
 
float thePedestalSum
 
MonitorElementthePedestalTimeCorrelationPlot
 
MonitorElementtheRatio4to5Plot
 
MonitorElementtheRatio6to5Plot
 

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
 
bool isSimTrackGood (const SimTrack &t) const
 
- Protected Attributes inherited from CSCBaseValidation
bool doSim_
 
double simTrackMaxEta_
 
double simTrackMinEta_
 
double simTrackMinPt_
 
const CSCGeometrytheCSCGeometry
 
const PSimHitMaptheSimHitMap
 

Detailed Description

Definition at line 10 of file CSCStripDigiValidation.h.

Constructor & Destructor Documentation

◆ CSCStripDigiValidation()

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

Definition at line 6 of file CSCStripDigiValidation.cc.

References edm::ParameterSet::getParameterSet(), inputTag_, muonDTDigis_cfi::pset, and strips_Token_.

7  : CSCBaseValidation(ps),
13  theNDigisPerChamberPlot(nullptr) {
14  const auto &pset = ps.getParameterSet("cscStripDigi");
15  inputTag_ = pset.getParameter<edm::InputTag>("inputTag");
17 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetTokenT< CSCStripDigiCollection > strips_Token_
CSCBaseValidation(const edm::ParameterSet &ps)
MonitorElement * theNDigisPerChamberPlot
MonitorElement * thePedestalTimeCorrelationPlot
MonitorElement * thePedestalNeighborCorrelationPlot

◆ ~CSCStripDigiValidation()

CSCStripDigiValidation::~CSCStripDigiValidation ( )
override

Definition at line 19 of file CSCStripDigiValidation.cc.

19 {}

Member Function Documentation

◆ analyze()

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

Implements CSCBaseValidation.

Definition at line 43 of file CSCStripDigiValidation.cc.

References MillePedeFileConverter_cfg::e, edm::InputTag::encode(), dqm::impl::MonitorElement::Fill(), fillPedestalPlots(), fillSignalPlots(), inputTag_, dqmiolumiharvest::j, dqmdumpme::last, EcalCondDBWriter_cfi::pedestal, DigiDM_cff::strips, strips_Token_, theNDigisPerEventPlot, theNDigisPerLayerPlot, thePedestalCount, and thePedestalSum.

43  {
45  e.getByToken(strips_Token_, strips);
46  if (!strips.isValid()) {
47  edm::LogError("CSCStripDigiValidation") << "Cannot get strips by label " << inputTag_.encode();
48  }
49 
50  unsigned nDigisPerEvent = 0;
51 
52  for (auto j = strips->begin(); j != strips->end(); j++) {
53  auto digiItr = (*j).second.first;
54  auto last = (*j).second.second;
55 
56  int nDigis = last - digiItr;
57  nDigisPerEvent += nDigis;
58  theNDigisPerLayerPlot->Fill(nDigis);
59 
60  double maxAmplitude = 0.;
61 
62  for (; digiItr != last; ++digiItr) {
63  // average up the pedestals
64  std::vector<int> adcCounts = digiItr->getADCCounts();
65  thePedestalSum += adcCounts[0];
66  thePedestalSum += adcCounts[1];
67  thePedestalCount += 2;
69  if (adcCounts[4] - pedestal > maxAmplitude) {
70  maxAmplitude = adcCounts[4] - pedestal;
71  }
72 
73  // if we have enough pedestal statistics
74  if (thePedestalCount > 100) {
75  fillPedestalPlots(*digiItr);
76 
77  // see if it's big enough to count as "signal"
78  if (adcCounts[5] > (thePedestalSum / thePedestalCount + 100)) {
79  fillSignalPlots(*digiItr);
80  }
81  }
82  }
83  } // loop over digis
84 
85  theNDigisPerEventPlot->Fill(nDigisPerEvent);
86 }
MonitorElement * theNDigisPerEventPlot
std::string encode() const
Definition: InputTag.cc:159
Log< level::Error, false > LogError
void fillSignalPlots(const CSCStripDigi &digi)
void Fill(long long x)
edm::EDGetTokenT< CSCStripDigiCollection > strips_Token_
MonitorElement * theNDigisPerLayerPlot
void fillPedestalPlots(const CSCStripDigi &digi)
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

◆ bookHistograms()

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

Definition at line 21 of file CSCStripDigiValidation.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::setCurrentFolder(), theAmplitudePlot, theNDigisPerEventPlot, theNDigisPerLayerPlot, thePedestalPlot, theRatio4to5Plot, and theRatio6to5Plot.

21  {
22  iBooker.setCurrentFolder("MuonCSCDigisV/CSCDigiTask/Strip/Occupancy");
23 
24  thePedestalPlot = iBooker.book1D("CSCPedestal", "CSC Pedestal;ADC Counts;Entries", 400, 550, 650);
25  theAmplitudePlot = iBooker.book1D("CSCStripAmplitude", "CSC Strip Amplitude;Strip Amplitude;Entries", 200, 0, 2000);
26  theRatio4to5Plot = iBooker.book1D("CSCStrip4to5", "CSC Strip Ratio tbin 4 to tbin 5;Strip Ratio;Entries", 100, 0, 1);
28  iBooker.book1D("CSCStrip6to5", "CSC Strip Ratio tbin 6 to tbin 5;Strip Ratio;Entries", 120, 0, 1.2);
30  iBooker.book1D("CSCStripDigisPerLayer",
31  "Number of CSC Strip Digis per layer;Number of CSC Strip Digis per layer;Entries",
32  48,
33  0,
34  48);
36  iBooker.book1D("CSCStripDigisPerEvent",
37  "Number of CSC Strip Digis per event;Number of CSC Strip Digis per event;Entries",
38  100,
39  0,
40  500);
41 }
MonitorElement * theNDigisPerEventPlot
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * theRatio4to5Plot
MonitorElement * theRatio6to5Plot
MonitorElement * thePedestalPlot
MonitorElement * theNDigisPerLayerPlot
MonitorElement * theAmplitudePlot
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ fillPedestalPlots()

void CSCStripDigiValidation::fillPedestalPlots ( const CSCStripDigi digi)
private

Definition at line 88 of file CSCStripDigiValidation.cc.

References dqm::impl::MonitorElement::Fill(), CSCStripDigi::getADCCounts(), and thePedestalPlot.

Referenced by analyze().

88  {
89  std::vector<int> adcCounts = digi.getADCCounts();
90  thePedestalPlot->Fill(adcCounts[0]);
91  thePedestalPlot->Fill(adcCounts[1]);
92 }
void Fill(long long x)
MonitorElement * thePedestalPlot
std::vector< int > const & getADCCounts() const
Get ADC readings.
Definition: CSCStripDigi.h:47

◆ fillSignalPlots()

void CSCStripDigiValidation::fillSignalPlots ( const CSCStripDigi digi)
private

Definition at line 94 of file CSCStripDigiValidation.cc.

References dqm::impl::MonitorElement::Fill(), CSCStripDigi::getADCCounts(), EcalCondDBWriter_cfi::pedestal, theAmplitudePlot, thePedestalCount, thePedestalSum, theRatio4to5Plot, and theRatio6to5Plot.

Referenced by analyze().

94  {
95  std::vector<int> adcCounts = digi.getADCCounts();
97  theAmplitudePlot->Fill(adcCounts[4] - pedestal);
98  theRatio4to5Plot->Fill((adcCounts[3] - pedestal) / (adcCounts[4] - pedestal));
99  theRatio6to5Plot->Fill((adcCounts[5] - pedestal) / (adcCounts[4] - pedestal));
100 }
MonitorElement * theRatio4to5Plot
MonitorElement * theRatio6to5Plot
void Fill(long long x)
MonitorElement * theAmplitudePlot
std::vector< int > const & getADCCounts() const
Get ADC readings.
Definition: CSCStripDigi.h:47

◆ plotResolution()

void CSCStripDigiValidation::plotResolution ( const PSimHit hit,
int  strip,
const CSCLayer layer,
int  chamberType 
)

Member Data Documentation

◆ inputTag_

edm::InputTag CSCStripDigiValidation::inputTag_
private

Definition at line 24 of file CSCStripDigiValidation.h.

Referenced by analyze(), and CSCStripDigiValidation().

◆ strips_Token_

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

Definition at line 23 of file CSCStripDigiValidation.h.

Referenced by analyze(), and CSCStripDigiValidation().

◆ theAmplitudePlot

MonitorElement* CSCStripDigiValidation::theAmplitudePlot
private

Definition at line 31 of file CSCStripDigiValidation.h.

Referenced by bookHistograms(), and fillSignalPlots().

◆ theNDigisPerChamberPlot

MonitorElement* CSCStripDigiValidation::theNDigisPerChamberPlot
private

Definition at line 35 of file CSCStripDigiValidation.h.

◆ theNDigisPerEventPlot

MonitorElement* CSCStripDigiValidation::theNDigisPerEventPlot
private

Definition at line 36 of file CSCStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theNDigisPerLayerPlot

MonitorElement* CSCStripDigiValidation::theNDigisPerLayerPlot
private

Definition at line 34 of file CSCStripDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ thePedestalCount

int CSCStripDigiValidation::thePedestalCount
private

Definition at line 27 of file CSCStripDigiValidation.h.

Referenced by analyze(), and fillSignalPlots().

◆ thePedestalCovarianceSum

float CSCStripDigiValidation::thePedestalCovarianceSum
private

Definition at line 26 of file CSCStripDigiValidation.h.

◆ thePedestalNeighborCorrelationPlot

MonitorElement* CSCStripDigiValidation::thePedestalNeighborCorrelationPlot
private

Definition at line 30 of file CSCStripDigiValidation.h.

◆ thePedestalPlot

MonitorElement* CSCStripDigiValidation::thePedestalPlot
private

Definition at line 28 of file CSCStripDigiValidation.h.

Referenced by bookHistograms(), and fillPedestalPlots().

◆ thePedestalSum

float CSCStripDigiValidation::thePedestalSum
private

Definition at line 25 of file CSCStripDigiValidation.h.

Referenced by analyze(), and fillSignalPlots().

◆ thePedestalTimeCorrelationPlot

MonitorElement* CSCStripDigiValidation::thePedestalTimeCorrelationPlot
private

Definition at line 29 of file CSCStripDigiValidation.h.

◆ theRatio4to5Plot

MonitorElement* CSCStripDigiValidation::theRatio4to5Plot
private

Definition at line 32 of file CSCStripDigiValidation.h.

Referenced by bookHistograms(), and fillSignalPlots().

◆ theRatio6to5Plot

MonitorElement* CSCStripDigiValidation::theRatio6to5Plot
private

Definition at line 33 of file CSCStripDigiValidation.h.

Referenced by bookHistograms(), and fillSignalPlots().