CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HGCalDigiValidation Class Reference
Inheritance diagram for HGCalDigiValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

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 DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 

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_
 
const bool ifNose_
 
int layers_
 
MonitorElementMeanDigiOccupancy_Minus_
 
MonitorElementMeanDigiOccupancy_Plus_
 
const std::string nameDetector_
 
std::map< int, int > OccupancyMap_minus_
 
std::map< int, int > OccupancyMap_plus_
 
const int SampleIndx_
 
std::vector< MonitorElement * > TOA_
 
const edm::ESGetToken
< HGCalDDDConstants,
IdealGeometryRecord
tok_hgcalc_
 
const edm::ESGetToken
< HGCalGeometry,
IdealGeometryRecord
tok_hgcalg_
 
std::vector< MonitorElement * > TOT_
 
const int verbosity_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 38 of file HGCalDigiValidation.cc.

Constructor & Destructor Documentation

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

Definition at line 89 of file HGCalDigiValidation.cc.

References nameDetector_.

90  : nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
91  ifNose_(iConfig.getParameter<bool>("ifNose")),
92  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity", 0)),
93  SampleIndx_(iConfig.getUntrackedParameter<int>("SampleIndx", 0)),
94  tok_hgcalc_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
96  tok_hgcalg_(esConsumes<HGCalGeometry, IdealGeometryRecord>(edm::ESInputTag{"", nameDetector_})),
97  firstLayer_(1) {
98  auto temp = iConfig.getParameter<edm::InputTag>("DigiSource");
99  if ((nameDetector_ == "HGCalEESensitive") || (nameDetector_ == "HGCalHESiliconSensitive") ||
100  (nameDetector_ == "HGCalHEScintillatorSensitive") || (nameDetector_ == "HGCalHFNoseSensitive")) {
101  digiSource_ = consumes<HGCalDigiCollection>(temp);
102  } else {
103  throw cms::Exception("BadHGCDigiSource") << "HGCal DetectorName given as " << nameDetector_ << " must be: "
104  << "\"HGCalEESensitive\", \"HGCalHESiliconSensitive\", or "
105  << "\"HGCalHEScintillatorSensitive\", \"HGCalHFNoseSensitive\"!";
106  }
107 }
T getUntrackedParameter(std::string const &, T const &) const
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tok_hgcalg_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tok_hgcalc_
const std::string nameDetector_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetToken digiSource_
HGCalDigiValidation::~HGCalDigiValidation ( )
inlineoverride

Definition at line 52 of file HGCalDigiValidation.cc.

52 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 119 of file HGCalDigiValidation.cc.

References gpuClustering::adc, RecoTauCleanerPlugins::charge, HGCSample::data(), digiSource_, digiValidation(), edm::EventID::event(), fillDigiInfo(), motionPolicyChamber::geom0, edm::Event::getByToken(), edm::EventSetup::getData(), edm::EventBase::id(), edm::HandleBase::isValid(), HGCalDetId::layer(), HGCScintillatorDetId::layer(), HFNoseDetId::layer(), HGCSiliconDetId::layer(), phase1PixelTopology::layer, HGCSample::mode(), nameDetector_, gpuPixelDoublets::ntot, OccupancyMap_minus_, OccupancyMap_plus_, edm::Handle< T >::product(), SampleIndx_, HGCSample::threshold(), HGCalTopology::tileTrapezoid(), HGCSample::toa(), tok_hgcalg_, HGCalGeometry::topology(), verbosity_, and HGCalTopology::waferHexagon8().

119  {
120  OccupancyMap_plus_.clear();
121  OccupancyMap_minus_.clear();
122 
123  int geomType(0);
124  const HGCalGeometry* geom0 = &iSetup.getData(tok_hgcalg_);
125  if (geom0->topology().waferHexagon8())
126  geomType = 1;
127  else if (geom0->topology().tileTrapezoid())
128  geomType = 2;
129  if (nameDetector_ == "HGCalHFNoseSensitive")
130  geomType = 3;
131 
132  unsigned int ntot(0), nused(0);
133  if ((nameDetector_ == "HGCalEESensitive") || (nameDetector_ == "HGCalHFNoseSensitive")) {
134  //HGCalEE
135  edm::Handle<HGCalDigiCollection> theHGCEEDigiContainers;
136  iEvent.getByToken(digiSource_, theHGCEEDigiContainers);
137  if (theHGCEEDigiContainers.isValid()) {
138  if (verbosity_ > 0)
139  edm::LogVerbatim("HGCalValidation")
140  << nameDetector_ << " with " << theHGCEEDigiContainers->size() << " element(s)";
141  for (const auto& it : *(theHGCEEDigiContainers.product())) {
142  ntot++;
143  nused++;
144  DetId detId = it.id();
145  int layer = ((geomType == 0) ? HGCalDetId(detId).layer()
146  : (geomType == 1) ? HGCSiliconDetId(detId).layer()
147  : HFNoseDetId(detId).layer());
148  const HGCSample& hgcSample = it.sample(SampleIndx_);
149  uint16_t gain = hgcSample.toa();
150  uint16_t adc = hgcSample.data();
151  double charge = gain;
152  bool totmode = hgcSample.mode();
153  bool zerothreshold = hgcSample.threshold();
154  digiValidation(detId, geom0, layer, adc, charge, totmode, zerothreshold);
155  }
156  fillDigiInfo();
157  } else {
158  edm::LogVerbatim("HGCalValidation") << "DigiCollection handle does not "
159  << "exist for " << nameDetector_;
160  }
161  } else if ((nameDetector_ == "HGCalHESiliconSensitive") || (nameDetector_ == "HGCalHEScintillatorSensitive")) {
162  //HGCalHE
163  edm::Handle<HGCalDigiCollection> theHGCHEDigiContainers;
164  iEvent.getByToken(digiSource_, theHGCHEDigiContainers);
165  if (theHGCHEDigiContainers.isValid()) {
166  if (verbosity_ > 0)
167  edm::LogVerbatim("HGCalValidation")
168  << nameDetector_ << " with " << theHGCHEDigiContainers->size() << " element(s)";
169  for (const auto& it : *(theHGCHEDigiContainers.product())) {
170  ntot++;
171  nused++;
172  DetId detId = it.id();
173  int layer = ((geomType == 0)
174  ? HGCalDetId(detId).layer()
175  : ((geomType == 1) ? HGCSiliconDetId(detId).layer() : HGCScintillatorDetId(detId).layer()));
176  const HGCSample& hgcSample = it.sample(SampleIndx_);
177  uint16_t gain = hgcSample.toa();
178  uint16_t adc = hgcSample.data();
179  double charge = gain;
180  bool totmode = hgcSample.mode();
181  bool zerothreshold = hgcSample.threshold();
182  digiValidation(detId, geom0, layer, adc, charge, totmode, zerothreshold);
183  }
184  fillDigiInfo();
185  } else {
186  edm::LogVerbatim("HGCalValidation") << "DigiCollection handle does not "
187  << "exist for " << nameDetector_;
188  }
189  } else {
190  edm::LogWarning("HGCalValidation") << "invalid detector name !! " << nameDetector_;
191  }
192  if (verbosity_ > 0)
193  edm::LogVerbatim("HGCalValidation") << "Event " << iEvent.id().event() << " with " << ntot << " total and " << nused
194  << " used digis";
195 }
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
Definition: EventID.h:40
bool mode() const
Definition: HGCSample.h:67
uint16_t toa() const
Definition: HGCSample.h:69
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tok_hgcalg_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
bool tileTrapezoid() const
wrapper for a data word
Definition: HGCSample.h:13
constexpr std::array< uint8_t, layerIndexSize > layer
bool getData(T &iHolder) const
Definition: EventSetup.h:128
bool threshold() const
Definition: HGCSample.h:66
int layer() const
get the layer #
Definition: HFNoseDetId.h:56
int layer() const
get the layer #
const HGCalTopology & topology() const
const std::string nameDetector_
bool isValid() const
Definition: HandleBase.h:70
Definition: DetId.h:17
T const * product() const
Definition: Handle.h:70
void digiValidation(const T1 &detId, const T2 *geom, int layer, uint16_t adc, double charge, bool mode, bool threshold)
edm::EDGetToken digiSource_
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
bool waferHexagon8() const
Log< level::Warning, false > LogWarning
uint16_t data() const
Definition: HGCSample.h:70
__shared__ uint32_t ntot
int layer() const
get the layer #
Definition: HGCalDetId.h:46
uint16_t *__restrict__ uint16_t const *__restrict__ adc
void HGCalDigiValidation::bookHistograms ( DQMStore::IBooker iB,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 274 of file HGCalDigiValidation.cc.

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

274  {
275  iB.setCurrentFolder("HGCAL/HGCalDigisV/" + nameDetector_);
276 
277  std::ostringstream histoname;
278  for (int il = 0; il < layers_; ++il) {
279  int ilayer = firstLayer_ + il;
280  auto istr1 = std::to_string(ilayer);
281  while (istr1.size() < 2) {
282  istr1.insert(0, "0");
283  }
284  histoname.str("");
285  histoname << "TOA_"
286  << "layer_" << istr1;
287  TOA_.push_back(iB.book1D(histoname.str().c_str(), "toa_", 1024, 0, 1024));
288 
289  histoname.str("");
290  histoname << "ADC_"
291  << "layer_" << istr1;
292  ADC_.push_back(iB.book1D(histoname.str().c_str(), "ADCDigiOccupancy", 1024, 0, 1024));
293 
294  histoname.str("");
295  histoname << "TOT_"
296  << "layer_" << istr1;
297  TOT_.push_back(iB.book1D(histoname.str().c_str(), "TOTDigiOccupancy", 4096, 0, 4096));
298 
299  histoname.str("");
300  histoname << "DigiOccupancy_XY_"
301  << "layer_" << istr1;
302  DigiOccupancy_XY_.push_back(iB.book2D(histoname.str().c_str(), "DigiOccupancy", 50, -500, 500, 50, -500, 500));
303 
304  histoname.str("");
305  histoname << "DigiOccupancy_Plus_"
306  << "layer_" << istr1;
307  DigiOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "DigiOccupancy +z", 100, 0, 1000));
308  histoname.str("");
309  histoname << "DigiOccupancy_Minus_"
310  << "layer_" << istr1;
311  DigiOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "DigiOccupancy -z", 100, 0, 1000));
312  }
313 
314  histoname.str("");
315  histoname << "SUMOfDigiOccupancy_Plus";
316  MeanDigiOccupancy_Plus_ = iB.book1D(histoname.str().c_str(), "SUMOfDigiOccupancy_Plus", layers_, -0.5, layers_ - 0.5);
317  histoname.str("");
318  histoname << "SUMOfRecDigiOccupancy_Minus";
320  iB.book1D(histoname.str().c_str(), "SUMOfDigiOccupancy_Minus", layers_, -0.5, layers_ - 0.5);
321 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::vector< MonitorElement * > TOA_
std::vector< MonitorElement * > DigiOccupancy_XY_
std::vector< MonitorElement * > TOT_
const std::string nameDetector_
std::vector< MonitorElement * > DigiOccupancy_Minus_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
MonitorElement * MeanDigiOccupancy_Minus_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
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 198 of file HGCalDigiValidation.cc.

References gpuClustering::adc, HGCalDigiValidation::digiInfo::adc, RecoTauCleanerPlugins::charge, HGCalDigiValidation::digiInfo::charge, TauDecayModes::dec, fillDigiInfo(), fillOccupancyMap(), firstLayer_, HGCalDigiValidation::digiInfo::layer, HGCalDigiValidation::digiInfo::mode, universalConfigTemplate::mode, OccupancyMap_minus_, OccupancyMap_plus_, dtDQMClient_cfg::threshold, HGCalDigiValidation::digiInfo::threshold, verbosity_, HGCalDigiValidation::digiInfo::x, HGCalDigiValidation::digiInfo::y, and HGCalDigiValidation::digiInfo::z.

Referenced by analyze().

199  {
200  if (verbosity_ > 1)
201  edm::LogVerbatim("HGCalValidation") << std::hex << detId.rawId() << std::dec << " " << detId.rawId();
202  DetId id1 = DetId(detId.rawId());
203  const GlobalPoint& global1 = geom->getPosition(id1);
204 
205  if (verbosity_ > 1)
206  edm::LogVerbatim("HGCalValidation") << " adc = " << adc << " toa = " << charge;
207 
208  digiInfo hinfo;
209  hinfo.x = global1.x();
210  hinfo.y = global1.y();
211  hinfo.z = global1.z();
212  hinfo.adc = adc;
213  hinfo.charge = charge;
214  hinfo.layer = layer - firstLayer_;
215  hinfo.mode = mode;
216  hinfo.threshold = threshold;
217 
218  if (verbosity_ > 1)
219  edm::LogVerbatim("HGCalValidation") << "gx = " << hinfo.x << " gy = " << hinfo.y << " gz = " << hinfo.z;
220 
221  if (global1.eta() > 0)
222  fillOccupancyMap(OccupancyMap_plus_, hinfo.layer);
223  else
225 
226  fillDigiInfo(hinfo);
227 }
Log< level::Info, true > LogVerbatim
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: DetId.h:17
std::map< int, int > OccupancyMap_minus_
std::map< int, int > OccupancyMap_plus_
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
uint16_t *__restrict__ uint16_t const *__restrict__ adc
void HGCalDigiValidation::dqmBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 263 of file HGCalDigiValidation.cc.

References HGCalDDDConstants::firstLayer(), firstLayer_, edm::EventSetup::getData(), HGCalDDDConstants::layers(), layers_, nameDetector_, tok_hgcalc_, and verbosity_.

263  {
264  const HGCalDDDConstants* hgcons = &iSetup.getData(tok_hgcalc_);
265  layers_ = hgcons->layers(true);
266  firstLayer_ = hgcons->firstLayer();
267 
268  if (verbosity_ > 0)
269  edm::LogVerbatim("HGCalValidation") << "current DQM directory: "
270  << "HGCAL/HGCalDigisV/" << nameDetector_ << " layer = " << layers_
271  << " with the first one at " << firstLayer_;
272 }
Log< level::Info, true > LogVerbatim
bool getData(T &iHolder) const
Definition: EventSetup.h:128
unsigned int layers(bool reco) const
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tok_hgcalc_
const std::string nameDetector_
int firstLayer() const
void HGCalDigiValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 109 of file HGCalDigiValidation.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

109  {
111  desc.add<std::string>("DetectorName", "HGCalEESensitive");
112  desc.add<edm::InputTag>("DigiSource", edm::InputTag("hgcalDigis", "EE"));
113  desc.add<bool>("ifNose", false);
114  desc.addUntracked<int>("Verbosity", 0);
115  desc.addUntracked<int>("SampleIndx", 2); // central bx
116  descriptions.add("hgcalDigiValidationEEDefault", desc);
117 }
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 236 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.

236  {
237  int ilayer = hinfo.layer;
238  TOA_.at(ilayer)->Fill(hinfo.charge);
239 
240  if (hinfo.mode) {
241  TOT_.at(ilayer)->Fill(hinfo.adc);
242  }
243 
244  if (!hinfo.mode && hinfo.threshold) {
245  ADC_.at(ilayer)->Fill(hinfo.adc);
246  DigiOccupancy_XY_.at(ilayer)->Fill(hinfo.x, hinfo.y);
247  }
248 }
std::vector< MonitorElement * > TOA_
std::vector< MonitorElement * > DigiOccupancy_XY_
std::vector< MonitorElement * > TOT_
std::vector< MonitorElement * > ADC_
void HGCalDigiValidation::fillDigiInfo ( )
private

Definition at line 250 of file HGCalDigiValidation.cc.

References DigiOccupancy_Minus_, DigiOccupancy_Plus_, phase1PixelTopology::layer, OccupancyMap_minus_, and OccupancyMap_plus_.

Referenced by analyze(), and digiValidation().

250  {
251  for (const auto& itr : OccupancyMap_plus_) {
252  int layer = itr.first;
253  int occupancy = itr.second;
254  DigiOccupancy_Plus_.at(layer)->Fill(occupancy);
255  }
256  for (const auto& itr : OccupancyMap_minus_) {
257  int layer = itr.first;
258  int occupancy = itr.second;
259  DigiOccupancy_Minus_.at(layer)->Fill(occupancy);
260  }
261 }
constexpr std::array< uint8_t, layerIndexSize > layer
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 229 of file HGCalDigiValidation.cc.

References phase1PixelTopology::layer.

Referenced by digiValidation().

229  {
230  if (OccupancyMap.find(layer) != OccupancyMap.end())
231  OccupancyMap[layer]++;
232  else
233  OccupancyMap[layer] = 1;
234 }
constexpr std::array< uint8_t, layerIndexSize > layer

Member Data Documentation

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

Definition at line 81 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

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

Definition at line 84 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

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

Definition at line 83 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

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

Definition at line 80 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

edm::EDGetToken HGCalDigiValidation::digiSource_
private

Definition at line 74 of file HGCalDigiValidation.cc.

Referenced by analyze().

int HGCalDigiValidation::firstLayer_
private

Definition at line 73 of file HGCalDigiValidation.cc.

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

const bool HGCalDigiValidation::ifNose_
private

Definition at line 69 of file HGCalDigiValidation.cc.

int HGCalDigiValidation::layers_
private

Definition at line 73 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and dqmBeginRun().

MonitorElement* HGCalDigiValidation::MeanDigiOccupancy_Minus_
private

Definition at line 86 of file HGCalDigiValidation.cc.

Referenced by bookHistograms().

MonitorElement* HGCalDigiValidation::MeanDigiOccupancy_Plus_
private

Definition at line 85 of file HGCalDigiValidation.cc.

Referenced by bookHistograms().

const std::string HGCalDigiValidation::nameDetector_
private

Definition at line 68 of file HGCalDigiValidation.cc.

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

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

Definition at line 77 of file HGCalDigiValidation.cc.

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

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

Definition at line 76 of file HGCalDigiValidation.cc.

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

const int HGCalDigiValidation::SampleIndx_
private

Definition at line 70 of file HGCalDigiValidation.cc.

Referenced by analyze().

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

Definition at line 79 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> HGCalDigiValidation::tok_hgcalc_
private

Definition at line 71 of file HGCalDigiValidation.cc.

Referenced by dqmBeginRun().

const edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalDigiValidation::tok_hgcalg_
private

Definition at line 72 of file HGCalDigiValidation.cc.

Referenced by analyze().

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

Definition at line 82 of file HGCalDigiValidation.cc.

Referenced by bookHistograms(), and fillDigiInfo().

const int HGCalDigiValidation::verbosity_
private

Definition at line 70 of file HGCalDigiValidation.cc.

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