CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HGCalDigiValidation Class Reference
Inheritance diagram for HGCalDigiValidation:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Classes

struct  digiInfo
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalDigiValidation (const edm::ParameterSet &)
 
 ~HGCalDigiValidation () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

template<class T1 , class T2 >
void digiValidation (const T1 &detId, const T2 *geom, int layer, uint16_t adc, double charge, bool mode, bool threshold)
 
void fillDigiInfo (digiInfo &hinfo)
 
void fillDigiInfo ()
 
void fillOccupancyMap (std::map< int, int > &OccupancyMap, int layer)
 

Private Attributes

std::vector< MonitorElement * > ADC_
 
std::vector< MonitorElement * > DigiOccupancy_Minus_
 
std::vector< MonitorElement * > DigiOccupancy_Plus_
 
std::vector< MonitorElement * > DigiOccupancy_XY_
 
edm::EDGetToken digiSource_
 
int firstLayer_
 
bool ifHCAL_
 
bool ifNose_
 
int layers_
 
MonitorElementMeanDigiOccupancy_Minus_
 
MonitorElementMeanDigiOccupancy_Plus_
 
std::string nameDetector_
 
std::map< int, int > OccupancyMap_minus_
 
std::map< int, int > OccupancyMap_plus_
 
int SampleIndx_
 
std::vector< MonitorElement * > TOA_
 
std::vector< MonitorElement * > TOT_
 
int verbosity_
 

Detailed Description

Definition at line 55 of file HGCalDigiValidation.cc.

Constructor & Destructor Documentation

HGCalDigiValidation::HGCalDigiValidation ( const edm::ParameterSet iConfig)
explicit

Definition at line 105 of file HGCalDigiValidation.cc.

References digiSource_, Exception, edm::ParameterSet::getParameter(), ifHCAL_, nameDetector_, and groupFilesInBlocks::temp.

105  :
106  nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
107  ifNose_(iConfig.getParameter<bool>("ifNose")),
108  ifHCAL_(iConfig.getParameter<bool>("ifHCAL")),
109  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity",0)),
110  SampleIndx_(iConfig.getUntrackedParameter<int>("SampleIndx",0)),
111  firstLayer_(1) {
112 
113  auto temp = iConfig.getParameter<edm::InputTag>("DigiSource");
114  if ((nameDetector_ == "HGCalEESensitive") ||
115  (nameDetector_ == "HGCalHESiliconSensitive") ||
116  (nameDetector_ == "HGCalHEScintillatorSensitive") ||
117  (nameDetector_ == "HGCalHFNoseSensitive")) {
118  digiSource_ = consumes<HGCalDigiCollection>(temp);
119  } else if (nameDetector_ == "HCal") {
120  if (ifHCAL_) digiSource_ = consumes<QIE11DigiCollection>(temp);
121  else digiSource_ = consumes<HGCalDigiCollection>(temp);
122  } else {
123  throw cms::Exception("BadHGCDigiSource")
124  << "HGCal DetectorName given as " << nameDetector_ << " must be: "
125  << "\"HGCalEESensitive\", \"HGCalHESiliconSensitive\", "
126  << "\"HGCalHEScintillatorSensitive\", \"HGCalHFNoseSensitive\", "
127  << "or \"HCal\"!";
128  }
129 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetToken digiSource_
HGCalDigiValidation::~HGCalDigiValidation ( )
inlineoverride

Member Function Documentation

void HGCalDigiValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 142 of file HGCalDigiValidation.cc.

References ecalMGPA::adc(), HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, ALCARECOTkAlJpsiMuMu_cff::charge, HGCSample::data(), HcalDetId::depth(), digiSource_, digiValidation(), edm::EventID::event(), fillDigiInfo(), muonCSCDigis_cfi::gain, relativeConstraints::geom, motionPolicyChamber::geom0, geometryDiff::geom1, HGCalTopology::geomMode(), edm::EventSetup::get(), edm::Event::getByToken(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), HcalEndcap, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, edm::EventBase::id(), QIE11DataFrame::id(), ifHCAL_, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), HGCalDetId::layer(), HGCScintillatorDetId::layer(), HGCSiliconDetId::layer(), HFNoseDetId::layer(), HGCSample::mode(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, nameDetector_, OccupancyMap_minus_, OccupancyMap_plus_, HcalCalibrations::pedestal(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), SampleIndx_, edm::SortedCollection< T, SORT >::size(), edm::DataFrameContainer::size(), HcalDetId::subdet(), HGCSample::threshold(), HGCSample::toa(), HGCalGeometry::topology(), HGCalGeometryMode::Trapezoid, and verbosity_.

Referenced by ~HGCalDigiValidation().

143  {
144  OccupancyMap_plus_.clear();
145  OccupancyMap_minus_.clear();
146 
147  const HGCalGeometry* geom0(nullptr);
148  const CaloGeometry* geom1(nullptr);
149  int geomType(0);
150  if (nameDetector_ == "HCal") {
152  iSetup.get<CaloGeometryRecord>().get(geom);
153  if (!geom.isValid())
154  edm::LogVerbatim("HGCalValidation") << "HGCalDigiValidation: Cannot get "
155  << "valid Geometry Object for "
156  << nameDetector_;
157  geom1 = geom.product();
158  } else {
160  iSetup.get<IdealGeometryRecord>().get(nameDetector_, geom);
161  if (!geom.isValid())
162  edm::LogVerbatim("HGCalValidation") << "HGCalDigiValidation: Cannot get "
163  << "valid Geometry Object for "
164  << nameDetector_;
165  geom0 = geom.product();
166  HGCalGeometryMode::GeometryMode mode = geom0->topology().geomMode();
167  if ((mode == HGCalGeometryMode::Hexagon8) ||
168  (mode == HGCalGeometryMode::Hexagon8Full)) geomType = 1;
169  else if (mode == HGCalGeometryMode::Trapezoid) geomType = 2;
170  if (nameDetector_ == "HGCalHFNoseSensitive") geomType = 3;
171  }
172 
173  unsigned int ntot(0), nused(0);
174  if ((nameDetector_ == "HGCalEESensitive") ||
175  (nameDetector_ == "HGCalHFNoseSensitive")) {
176  //HGCalEE
177  edm::Handle<HGCalDigiCollection> theHGCEEDigiContainers;
178  iEvent.getByToken(digiSource_, theHGCEEDigiContainers);
179  if (theHGCEEDigiContainers.isValid()) {
180  if (verbosity_>0)
181  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
182  << theHGCEEDigiContainers->size()
183  << " element(s)";
184  for (const auto & it: *(theHGCEEDigiContainers.product())) {
185  ntot++; nused++;
186  DetId detId = it.id();
187  int layer = ((geomType == 0) ? HGCalDetId(detId).layer() :
188  (geomType == 1) ?
189  HGCSiliconDetId(detId).layer() :
190  HFNoseDetId(detId).layer());
191  const HGCSample& hgcSample = it.sample(SampleIndx_);
192  uint16_t gain = hgcSample.toa();
193  uint16_t adc = hgcSample.data();
194  double charge = gain;
195  bool totmode = hgcSample.mode();
196  bool zerothreshold = hgcSample.threshold();
197  digiValidation(detId, geom0, layer, adc, charge, totmode, zerothreshold);
198  }
199  fillDigiInfo();
200  } else {
201  edm::LogVerbatim("HGCalValidation") << "DigiCollection handle does not "
202  << "exist for " << nameDetector_;
203  }
204  } else if ((nameDetector_ == "HGCalHESiliconSensitive") ||
205  (nameDetector_ == "HGCalHEScintillatorSensitive")) {
206  //HGCalHE
207  edm::Handle<HGCalDigiCollection> theHGCHEDigiContainers;
208  iEvent.getByToken(digiSource_, theHGCHEDigiContainers);
209  if (theHGCHEDigiContainers.isValid()) {
210  if (verbosity_>0)
211  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
212  << theHGCHEDigiContainers->size()
213  << " element(s)";
214  for (const auto & it: *(theHGCHEDigiContainers.product())) {
215  ntot++; nused++;
216  DetId detId = it.id();
217  int layer = ((geomType == 0) ? HGCalDetId(detId).layer() :
218  ((geomType == 1) ? HGCSiliconDetId(detId).layer() :
219  HGCScintillatorDetId(detId).layer()));
220  const HGCSample& hgcSample = it.sample(SampleIndx_);
221  uint16_t gain = hgcSample.toa();
222  uint16_t adc = hgcSample.data();
223  double charge = gain;
224  bool totmode = hgcSample.mode();
225  bool zerothreshold = hgcSample.threshold();
226  digiValidation(detId, geom0, layer, adc, charge, totmode, zerothreshold);
227  }
228  fillDigiInfo();
229  } else {
230  edm::LogVerbatim("HGCalValidation") << "DigiCollection handle does not "
231  << "exist for " << nameDetector_;
232  }
233  } else if ((nameDetector_ == "HCal") && (!ifHCAL_)) {
234  //HGCalBH
235  edm::Handle<HGCalDigiCollection> theHGCBHDigiContainers;
236  iEvent.getByToken(digiSource_, theHGCBHDigiContainers);
237  if (theHGCBHDigiContainers.isValid()) {
238  if (verbosity_>0)
239  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
240  << theHGCBHDigiContainers->size()
241  << " element(s)";
242  for (const auto & it: *(theHGCBHDigiContainers.product())) {
243  ntot++; nused++;
244  HcalDetId detId = it.id();
245  int layer = detId.depth();
246  const HGCSample& hgcSample = it.sample(SampleIndx_);
247  uint16_t gain = hgcSample.toa();
248  uint16_t adc = hgcSample.data();
249  double charge = gain;
250  bool totmode = hgcSample.mode();
251  bool zerothreshold = hgcSample.threshold();
252  digiValidation(detId, geom1, layer, adc, charge, totmode, zerothreshold);
253  }
254  fillDigiInfo();
255  } else {
256  edm::LogWarning("HGCalValidation") << "DigiCollection handle does not "
257  << "exist for " << nameDetector_;
258  }
259  } else if (nameDetector_ == "HCal") {
260  //HE
261  edm::Handle<QIE11DigiCollection> theHEDigiContainers;
262  iEvent.getByToken(digiSource_, theHEDigiContainers);
263  if (theHEDigiContainers.isValid()) {
264  if (verbosity_>0)
265  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
266  << theHEDigiContainers->size()
267  << " element(s)";
268  edm::ESHandle<HcalDbService> conditions;
269  iSetup.get<HcalDbRecord > ().get(conditions);
270 
271  for (const auto & it: *(theHEDigiContainers.product())) {
272  QIE11DataFrame df(it);
273  HcalDetId detId = (df.id());
274  ntot++;
275  if (detId.subdet() == HcalEndcap) {
276  nused++;
278  const HcalQIECoder* channelCoder = conditions->getHcalCoder(detId);
279  const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
280  HcalCoderDb coder(*channelCoder, *shape);
281  CaloSamples tool;
282  coder.adc2fC(df, tool);
283  int layer = detId.depth();
284  uint16_t adc = (df)[SampleIndx_].adc();
285  int capid = (df)[SampleIndx_].capid();
286  double charge = (tool[SampleIndx_] - calibrations.pedestal(capid));
287  bool totmode = false;
288  bool zerothreshold = false;
289  digiValidation(detId, geom1, layer, adc, charge, totmode, zerothreshold);
290  }
291  }
292  fillDigiInfo();
293  } else {
294  edm::LogWarning("HGCalValidation") << "DigiCollection handle does not "
295  << "exist for " << nameDetector_;
296  }
297  } else {
298  edm::LogWarning("HGCalValidation") << "invalid detector name !! "
299  << nameDetector_;
300  }
301  if (verbosity_>0)
302  edm::LogVerbatim("HGCalValidation") << "Event " << iEvent.id().event()
303  << " with " << ntot << " total and "
304  << nused << " used digis";
305 }
EventNumber_t event() const
Definition: EventID.h:41
uint32_t data() const
Definition: HGCSample.h:62
bool mode() const
Definition: HGCSample.h:59
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
wrapper for a data word
Definition: HGCSample.h:13
int depth() const
get the tower depth
Definition: HcalDetId.h:166
bool threshold() const
Definition: HGCSample.h:58
int layer() const
get the layer #
Definition: HFNoseDetId.h:58
int layer() const
get the layer #
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
bool isValid() const
Definition: HandleBase.h:74
Definition: DetId.h:18
constexpr double pedestal(int fCapId) const
get pedestal for capid=0..3
T const * product() const
Definition: Handle.h:74
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
void digiValidation(const T1 &detId, const T2 *geom, int layer, uint16_t adc, double charge, bool mode, bool threshold)
edm::EDGetToken digiSource_
uint32_t toa() const
Definition: HGCSample.h:61
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
std::map< int, int > OccupancyMap_minus_
int layer() const
get the layer #
std::map< int, int > OccupancyMap_plus_
edm::EventID id() const
Definition: EventBase.h:59
size_type size() const
T get() const
Definition: EventSetup.h:71
bool isValid() const
Definition: ESHandle.h:44
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
T const * product() const
Definition: ESHandle.h:86
int layer() const
get the layer #
Definition: HGCalDetId.h:48
void HGCalDigiValidation::bookHistograms ( DQMStore::IBooker iB,
edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 401 of file HGCalDigiValidation.cc.

References ADC_, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DEFINE_FWK_MODULE, DigiOccupancy_Minus_, DigiOccupancy_Plus_, DigiOccupancy_XY_, firstLayer_, layers_, MeanDigiOccupancy_Minus_, MeanDigiOccupancy_Plus_, nameDetector_, DQMStore::IBooker::setCurrentFolder(), TOA_, and TOT_.

Referenced by ~HGCalDigiValidation().

403  {
404 
405  iB.setCurrentFolder("HGCAL/HGCalDigisV/"+nameDetector_);
406 
407  std::ostringstream histoname;
408  for (int il = 0; il < layers_; ++il) {
409  int ilayer = firstLayer_ + il;
410  histoname.str(""); histoname << "TOA_"<< "layer_" << ilayer;
411  TOA_.push_back(iB.book1D(histoname.str().c_str(),"toa_",1024,0,1024));
412 
413  histoname.str(""); histoname << "ADC_" << "layer_" << ilayer;
414  ADC_.push_back(iB.book1D(histoname.str().c_str(), "ADCDigiOccupancy",1024,0,1024));
415 
416  histoname.str(""); histoname << "TOT_" << "layer_" << ilayer;
417  TOT_.push_back(iB.book1D(histoname.str().c_str(), "TOTDigiOccupancy",4096,0,4096));
418 
419  histoname.str(""); histoname << "DigiOccupancy_XY_" << "layer_" << ilayer;
420  DigiOccupancy_XY_.push_back(iB.book2D(histoname.str().c_str(), "DigiOccupancy", 50, -500, 500, 50, -500, 500));
421 
422  histoname.str(""); histoname << "DigiOccupancy_Plus_" << "layer_" << ilayer;
423  DigiOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "DigiOccupancy +z", 100, 0, 1000));
424  histoname.str(""); histoname << "DigiOccupancy_Minus_" << "layer_" << ilayer;
425  DigiOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "DigiOccupancy -z", 100, 0, 1000));
426  }
427 
428  histoname.str(""); histoname << "SUMOfDigiOccupancy_Plus";
429  MeanDigiOccupancy_Plus_ = iB.book1D( histoname.str().c_str(), "SUMOfDigiOccupancy_Plus", layers_, -0.5, layers_-0.5);
430  histoname.str(""); histoname << "SUMOfRecDigiOccupancy_Minus";
431  MeanDigiOccupancy_Minus_ = iB.book1D( histoname.str().c_str(), "SUMOfDigiOccupancy_Minus", layers_, -0.5,layers_-0.5);
432 }
std::vector< MonitorElement * > TOA_
std::vector< MonitorElement * > DigiOccupancy_XY_
std::vector< MonitorElement * > TOT_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
std::vector< MonitorElement * > DigiOccupancy_Minus_
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * MeanDigiOccupancy_Minus_
std::vector< MonitorElement * > ADC_
MonitorElement * MeanDigiOccupancy_Plus_
std::vector< MonitorElement * > DigiOccupancy_Plus_
template<class T1 , class T2 >
void HGCalDigiValidation::digiValidation ( const T1 &  detId,
const T2 *  geom,
int  layer,
uint16_t  adc,
double  charge,
bool  mode,
bool  threshold 
)
private

Definition at line 308 of file HGCalDigiValidation.cc.

References ecalMGPA::adc(), HGCalDigiValidation::digiInfo::adc, ALCARECOTkAlJpsiMuMu_cff::charge, HGCalDigiValidation::digiInfo::charge, TauDecayModes::dec, fillDigiInfo(), fillOccupancyMap(), firstLayer_, globals_cff::id1, HGCalDigiValidation::digiInfo::layer, HGCalDigiValidation::digiInfo::mode, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, OccupancyMap_minus_, OccupancyMap_plus_, electronIdCutBased_cfi::threshold, HGCalDigiValidation::digiInfo::threshold, verbosity_, HGCalDigiValidation::digiInfo::x, HGCalDigiValidation::digiInfo::y, and HGCalDigiValidation::digiInfo::z.

Referenced by analyze(), and ~HGCalDigiValidation().

310  {
311 
312  if (verbosity_>1) edm::LogVerbatim("HGCalValidation") << std::hex
313  << detId.rawId()
314  << std::dec
315  << " " << detId.rawId();
316  DetId id1 = DetId(detId.rawId());
317  const GlobalPoint& global1 = geom->getPosition(id1);
318 
319  if (verbosity_>1)
320  edm::LogVerbatim("HGCalValidation") << " adc = " << adc
321  << " toa = " << charge;
322 
323  digiInfo hinfo;
324  hinfo.x = global1.x();
325  hinfo.y = global1.y();
326  hinfo.z = global1.z();
327  hinfo.adc = adc;
328  hinfo.charge = charge;
329  hinfo.layer = layer-firstLayer_;
330  hinfo.mode = mode;
331  hinfo.threshold = threshold;
332 
333  if (verbosity_>1)
334  edm::LogVerbatim("HGCalValidation") << "gx = " << hinfo.x
335  << " gy = " << hinfo.y
336  << " gz = " << hinfo.z;
337 
338  if (global1.eta() > 0) fillOccupancyMap(OccupancyMap_plus_, hinfo.layer);
339  else fillOccupancyMap(OccupancyMap_minus_, hinfo.layer);
340 
341  fillDigiInfo(hinfo);
342 
343 }
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: DetId.h:18
std::map< int, int > OccupancyMap_minus_
std::map< int, int > OccupancyMap_plus_
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
void HGCalDigiValidation::dqmBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
override

Definition at line 378 of file HGCalDigiValidation.cc.

References HGCalDDDConstants::firstLayer(), firstLayer_, edm::EventSetup::get(), HcalDDDRecConstants::getMaxDepth(), HGCalDDDConstants::layers(), layers_, nameDetector_, and verbosity_.

Referenced by ~HGCalDigiValidation().

379  {
380  if (nameDetector_ == "HCal") {
382  iSetup.get<HcalRecNumberingRecord>().get( pHRNDC );
383  const HcalDDDRecConstants *hcons = &(*pHRNDC);
384  layers_ = hcons->getMaxDepth(1);
385  } else {
387  iSetup.get<IdealGeometryRecord>().get(nameDetector_, pHGDC);
388  const HGCalDDDConstants & hgcons_ = (*pHGDC);
389  layers_ = hgcons_.layers(true);
390  firstLayer_ = hgcons_.firstLayer();
391  }
392 
393  if (verbosity_>0)
394  edm::LogVerbatim("HGCalValidation") << "current DQM directory: "
395  << "HGCAL/HGCalDigisV/"
396  << nameDetector_ << " layer = "
397  << layers_ << " with the first one at "
398  << firstLayer_;
399 }
unsigned int layers(bool reco) const
int getMaxDepth(const int &type) const
T get() const
Definition: EventSetup.h:71
int firstLayer() const
void HGCalDigiValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 131 of file HGCalDigiValidation.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ~HGCalDigiValidation().

131  {
133  desc.add<std::string>("DetectorName","HGCalEESensitive");
134  desc.add<edm::InputTag>("DigiSource",edm::InputTag("hgcalDigis","EE"));
135  desc.add<bool>("ifNose",false);
136  desc.add<bool>("ifHCAL",false);
137  desc.addUntracked<int>("Verbosity",0);
138  desc.addUntracked<int>("SampleIndx",2); // central bx
139  descriptions.add("hgcalDigiValidationEEDefault",desc);
140 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void HGCalDigiValidation::fillDigiInfo ( digiInfo hinfo)
private

Definition at line 351 of file HGCalDigiValidation.cc.

References HGCalDigiValidation::digiInfo::adc, ADC_, HGCalDigiValidation::digiInfo::charge, DigiOccupancy_XY_, HGCalDigiValidation::digiInfo::layer, HGCalDigiValidation::digiInfo::mode, HGCalDigiValidation::digiInfo::threshold, TOA_, TOT_, HGCalDigiValidation::digiInfo::x, and HGCalDigiValidation::digiInfo::y.

351  {
352  int ilayer = hinfo.layer;
353  TOA_.at(ilayer)->Fill(hinfo.charge);
354 
355  if (hinfo.mode) {
356  TOT_.at(ilayer)->Fill(hinfo.adc);
357  }
358 
359  if (!hinfo.mode && hinfo.threshold) {
360  ADC_.at(ilayer)->Fill(hinfo.adc);
361  DigiOccupancy_XY_.at(ilayer)->Fill(hinfo.x, hinfo.y);
362  }
363 }
std::vector< MonitorElement * > TOA_
std::vector< MonitorElement * > DigiOccupancy_XY_
std::vector< MonitorElement * > TOT_
std::vector< MonitorElement * > ADC_
void HGCalDigiValidation::fillDigiInfo ( )
private

Definition at line 365 of file HGCalDigiValidation.cc.

References DigiOccupancy_Minus_, DigiOccupancy_Plus_, OccupancyMap_minus_, and OccupancyMap_plus_.

Referenced by analyze(), digiValidation(), and ~HGCalDigiValidation().

365  {
366  for (const auto & itr : OccupancyMap_plus_) {
367  int layer = itr.first;
368  int occupancy = itr.second;
369  DigiOccupancy_Plus_.at(layer)->Fill(occupancy);
370  }
371  for (const auto & itr : OccupancyMap_minus_) {
372  int layer = itr.first;
373  int occupancy = itr.second;
374  DigiOccupancy_Minus_.at(layer)->Fill(occupancy);
375  }
376 }
std::vector< MonitorElement * > DigiOccupancy_Minus_
std::map< int, int > OccupancyMap_minus_
std::map< int, int > OccupancyMap_plus_
std::vector< MonitorElement * > DigiOccupancy_Plus_
void HGCalDigiValidation::fillOccupancyMap ( std::map< int, int > &  OccupancyMap,
int  layer 
)
private

Definition at line 345 of file HGCalDigiValidation.cc.

Referenced by digiValidation(), and ~HGCalDigiValidation().

346  {
347  if (OccupancyMap.find(layer) != OccupancyMap.end()) OccupancyMap[layer] ++;
348  else OccupancyMap[layer] = 1;
349 }

Member Data Documentation

std::vector<MonitorElement*> HGCalDigiValidation::ADC_
private

Definition at line 97 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

std::vector<MonitorElement*> HGCalDigiValidation::DigiOccupancy_Minus_
private

Definition at line 100 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

std::vector<MonitorElement*> HGCalDigiValidation::DigiOccupancy_Plus_
private

Definition at line 99 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

std::vector<MonitorElement*> HGCalDigiValidation::DigiOccupancy_XY_
private

Definition at line 96 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

edm::EDGetToken HGCalDigiValidation::digiSource_
private

Definition at line 87 of file HGCalDigiValidation.cc.

Referenced by analyze(), and HGCalDigiValidation().

int HGCalDigiValidation::firstLayer_
private

Definition at line 90 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), digiValidation(), and dqmBeginRun().

bool HGCalDigiValidation::ifHCAL_
private

Definition at line 88 of file HGCalDigiValidation.cc.

Referenced by analyze(), and HGCalDigiValidation().

bool HGCalDigiValidation::ifNose_
private

Definition at line 88 of file HGCalDigiValidation.cc.

int HGCalDigiValidation::layers_
private

Definition at line 90 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and dqmBeginRun().

MonitorElement* HGCalDigiValidation::MeanDigiOccupancy_Minus_
private

Definition at line 102 of file HGCalDigiValidation.cc.

Referenced by bookHistograms().

MonitorElement* HGCalDigiValidation::MeanDigiOccupancy_Plus_
private

Definition at line 101 of file HGCalDigiValidation.cc.

Referenced by bookHistograms().

std::string HGCalDigiValidation::nameDetector_
private

Definition at line 86 of file HGCalDigiValidation.cc.

Referenced by analyze(), bookHistograms(), dqmBeginRun(), and HGCalDigiValidation().

std::map<int, int> HGCalDigiValidation::OccupancyMap_minus_
private

Definition at line 93 of file HGCalDigiValidation.cc.

Referenced by analyze(), digiValidation(), and fillDigiInfo().

std::map<int, int> HGCalDigiValidation::OccupancyMap_plus_
private

Definition at line 92 of file HGCalDigiValidation.cc.

Referenced by analyze(), digiValidation(), and fillDigiInfo().

int HGCalDigiValidation::SampleIndx_
private

Definition at line 89 of file HGCalDigiValidation.cc.

Referenced by analyze().

std::vector<MonitorElement*> HGCalDigiValidation::TOA_
private

Definition at line 95 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

std::vector<MonitorElement*> HGCalDigiValidation::TOT_
private

Definition at line 98 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

int HGCalDigiValidation::verbosity_
private

Definition at line 89 of file HGCalDigiValidation.cc.

Referenced by analyze(), digiValidation(), and dqmBeginRun().