CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HGCalDigiValidation Class Reference

#include <Validation/HGCalValidation/plugins/HGCalDigiValidation.cc>

Inheritance diagram for HGCalDigiValidation:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  digiInfo
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &)
 
 HGCalDigiValidation (const edm::ParameterSet &)
 
 ~HGCalDigiValidation ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

std::vector< MonitorElement * > ADC_
 
std::vector< MonitorElement * > charge_
 
std::vector< MonitorElement * > DigiOccupancy_Minus_
 
std::vector< MonitorElement * > DigiOccupancy_Plus_
 
std::vector< MonitorElement * > DigiOccupancy_XY_
 
edm::EDGetToken digiSource_
 
int layers_
 
MonitorElementMeanDigiOccupancy_Minus_
 
MonitorElementMeanDigiOccupancy_Plus_
 
std::string nameDetector_
 
std::map< int, int > OccupancyMap_minus_
 
std::map< int, int > OccupancyMap_plus_
 
int SampleIndx_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: Validates SimHits of High Granularity Calorimeter Implementation: [Notes on implementation]

Definition at line 43 of file HGCalDigiValidation.h.

Constructor & Destructor Documentation

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

Definition at line 51 of file HGCalDigiValidation.cc.

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

51  :
52  nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
53  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity",0)),
54  SampleIndx_(iConfig.getUntrackedParameter<int>("SampleIndx",5)) {
55  auto temp = iConfig.getParameter<edm::InputTag>("DigiSource");
56  if( nameDetector_ == "HGCalEESensitive" ) {
57  digiSource_ = consumes<HGCEEDigiCollection>(temp);
58  } else if ( nameDetector_ == "HGCalHESiliconSensitive" ||
59  nameDetector_ == "HGCalHEScintillatorSensitive" ) {
60  digiSource_ = consumes<HGCHEDigiCollection>(temp);
61  } else if ( nameDetector_ == "HCal" ) {
62  digiSource_ =
63  consumes<edm::SortedCollection<HcalUpgradeDataFrame> >(temp);
64  } else {
65  throw cms::Exception("BadHGCDigiSource")
66  << "HGCal DetectorName given as " << nameDetector_ << " must be: "
67  << "\"HGCalHESiliconSensitive\", \"HGCalHESiliconSensitive\", "
68  << "\"HGCalHEScintillatorSensitive\", or \"HCal\"!";
69  }
70 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetToken digiSource_
HGCalDigiValidation::~HGCalDigiValidation ( )

Definition at line 73 of file HGCalDigiValidation.cc.

73 { }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 75 of file HGCalDigiValidation.cc.

References ecalMGPA::adc(), HcalCoderDb::adc2fC(), RecoTauCleanerPlugins::charge, HGCSample::data(), HcalDetId::depth(), digiSource_, digiValidation(), edm::EventID::event(), fillDigiInfo(), relativeConstraints::geom, motionPolicyChamber::geom0, geometryDiff::geom1, edm::EventSetup::get(), edm::Event::getByToken(), HcalEndcap, edm::EventBase::id(), edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), HGCEEDetId::layer(), HGCHEDetId::layer(), nameDetector_, OccupancyMap_minus_, OccupancyMap_plus_, HcalCalibrations::pedestal(), edm::ESHandle< class >::product(), SampleIndx_, HcalDetId::subdet(), HGCSample::toa(), and verbosity_.

76  {
77  OccupancyMap_plus_.clear();
78  OccupancyMap_minus_.clear();
79 
80  const HGCalGeometry* geom0(0);
81  const CaloGeometry* geom1(0);
82  if (nameDetector_ == "HCal") {
84  iSetup.get<CaloGeometryRecord>().get(geom);
85  if (!geom.isValid()) edm::LogWarning("HGCalValidation") << "Cannot get valid HGCalGeometry Object for " << nameDetector_;
86  geom1 = geom.product();
87  } else {
89  iSetup.get<IdealGeometryRecord>().get(nameDetector_, geom);
90  if (!geom.isValid()) edm::LogWarning("HGCalValidation") << "Cannot get valid HGCalGeometry Object for " << nameDetector_;
91  geom0 = geom.product();
92  }
93 
94  unsigned int ntot(0), nused(0);
95  if (nameDetector_ == "HGCalEESensitive") {
96  //HGCalEE
97  edm::Handle<HGCEEDigiCollection> theHGCEEDigiContainers;
98  iEvent.getByToken(digiSource_, theHGCEEDigiContainers);
99  if (theHGCEEDigiContainers.isValid()) {
100  if (verbosity_>0)
101  edm::LogInfo("HGCalValidation") << nameDetector_ << " with "
102  << theHGCEEDigiContainers->size()
103  << " element(s)";
104 
105  for (HGCEEDigiCollection::const_iterator it =theHGCEEDigiContainers->begin();
106  it !=theHGCEEDigiContainers->end(); ++it) {
107  ntot++; nused++;
108  HGCEEDetId detId = (it->id());
109  int layer = detId.layer();
110  HGCSample hgcSample = it->sample(SampleIndx_);
111  uint16_t gain = hgcSample.toa();
112  uint16_t adc = hgcSample.data();
113  double charge = adc*gain;
114  digiValidation(detId, geom0, layer, adc, charge);
115  }
116  fillDigiInfo();
117  } else {
118  edm::LogWarning("HGCalValidation") << "HGCEEDigiCollection handle does not exist !!!";
119  }
120  } else if ((nameDetector_ == "HGCalHESiliconSensitive") ||
121  (nameDetector_ == "HGCalHEScintillatorSensitive")) {
122  //HGCalHE
123  edm::Handle<HGCHEDigiCollection> theHGCHEDigiContainers;
124  iEvent.getByToken(digiSource_, theHGCHEDigiContainers);
125  if (theHGCHEDigiContainers.isValid()) {
126  if (verbosity_>0)
127  edm::LogInfo("HGCalValidation") << nameDetector_ << " with "
128  << theHGCHEDigiContainers->size()
129  << " element(s)";
130 
131  for (HGCHEDigiCollection::const_iterator it =theHGCHEDigiContainers->begin();
132  it !=theHGCHEDigiContainers->end(); ++it) {
133  ntot++; nused++;
134  HGCHEDetId detId = (it->id());
135  int layer = detId.layer();
136  HGCSample hgcSample = it->sample(SampleIndx_);
137  uint16_t gain = hgcSample.toa();
138  uint16_t adc = hgcSample.data();
139  double charge = adc*gain;
140  digiValidation(detId, geom0, layer, adc, charge);
141  }
142  fillDigiInfo();
143  } else {
144  edm::LogWarning("HGCalValidation") << "HGCHEDigiCollection handle does not exist !!!";
145  }
146  } else if (nameDetector_ == "HCal") {
147  //HE
149  iEvent.getByToken(digiSource_, theHEDigiContainers);
150  if (theHEDigiContainers.isValid()) {
151  if (verbosity_>0)
152  edm::LogInfo("HGCalValidation") << nameDetector_ << " with "
153  << theHEDigiContainers->size()
154  << " element(s)";
155  edm::ESHandle<HcalDbService> conditions;
156  iSetup.get<HcalDbRecord > ().get(conditions);
157 
158  for (edm::SortedCollection<HcalUpgradeDataFrame>::const_iterator it =theHEDigiContainers->begin();
159  it !=theHEDigiContainers->end(); ++it) {
160  HcalDetId detId = (it->id());
161  ntot++;
162  if (detId.subdet() == HcalEndcap) {
163  nused++;
164  HcalCalibrations calibrations = conditions->getHcalCalibrations(detId);
165  const HcalQIECoder* channelCoder = conditions->getHcalCoder(detId);
166  const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
167  HcalCoderDb coder(*channelCoder, *shape);
168  CaloSamples tool;
169  coder.adc2fC(*it, tool);
170  int layer = detId.depth();
171  uint16_t adc = (*it)[SampleIndx_].adc();
172  int capid = (*it)[SampleIndx_].capid();
173  double charge = (tool[SampleIndx_] - calibrations.pedestal(capid));
174  digiValidation(detId, geom1, layer, adc, charge);
175  }
176  }
177  fillDigiInfo();
178  } else {
179  edm::LogWarning("HGCalValidation") << "HGCHEDigiCollection handle does not exist !!!";
180  }
181  } else {
182  edm::LogWarning("HGCalValidation") << "invalid detector name !! "
183  << nameDetector_;
184  }
185  edm::LogInfo("HGCalValidation") << "Event " << iEvent.id().event()
186  << " with " << ntot << " total and "
187  << nused << " used digis";
188 }
int adc(sample_type sample)
get the ADC sample (12 bits)
EventNumber_t event() const
Definition: EventID.h:41
uint32_t data() const
Definition: HGCSample.h:56
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::vector< HGCEEDataFrame >::const_iterator const_iterator
double pedestal(int fCapId) const
get pedestal for capid=0..3
int layer() const
get the layer #
Definition: HGCHEDetId.h:50
wrapper for a data word
Definition: HGCSample.h:13
int depth() const
get the tower depth
Definition: HcalDetId.cc:129
bool isValid() const
Definition: HandleBase.h:75
int layer() const
get the layer #
Definition: HGCEEDetId.h:49
void digiValidation(const T1 &detId, const T2 *geom, int, uint16_t, double)
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
edm::EDGetToken digiSource_
uint32_t toa() const
Definition: HGCSample.h:55
std::map< int, int > OccupancyMap_minus_
std::map< int, int > OccupancyMap_plus_
edm::EventID id() const
Definition: EventBase.h:59
bool isValid() const
Definition: ESHandle.h:47
void HGCalDigiValidation::bookHistograms ( DQMStore::IBooker iB,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 269 of file HGCalDigiValidation.cc.

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

271  {
272 
273  iB.setCurrentFolder("HGCalDigiV/"+nameDetector_);
274 
275  std::ostringstream histoname;
276  for (int ilayer = 0; ilayer < layers_; ilayer++ ) {
277  histoname.str(""); histoname << "charge_"<< "layer_" << ilayer;
278  charge_.push_back(iB.book1D(histoname.str().c_str(),"charge_",100,-25,25));
279 
280  histoname.str(""); histoname << "ADC_" << "layer_" << ilayer;
281  ADC_.push_back(iB.book1D(histoname.str().c_str(), "DigiOccupancy",200,0,1000));
282 
283  histoname.str(""); histoname << "DigiOccupancy_XY_" << "layer_" << ilayer;
284  DigiOccupancy_XY_.push_back(iB.book2D(histoname.str().c_str(), "DigiOccupancy", 50, -500, 500, 50, -500, 500));
285 
286  histoname.str(""); histoname << "DigiOccupancy_Plus_" << "layer_" << ilayer;
287  DigiOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "DigiOccupancy +z", 100, 0, 1000));
288  histoname.str(""); histoname << "DigiOccupancy_Minus_" << "layer_" << ilayer;
289  DigiOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "DigiOccupancy -z", 100, 0, 1000));
290  }
291 
292  histoname.str(""); histoname << "SUMOfDigiOccupancy_Plus";
293  MeanDigiOccupancy_Plus_ = iB.book1D( histoname.str().c_str(), "SUMOfDigiOccupancy_Plus", layers_, -0.5, layers_-0.5);
294  histoname.str(""); histoname << "SUMOfRecDigiOccupancy_Minus";
295  MeanDigiOccupancy_Minus_ = iB.book1D( histoname.str().c_str(), "SUMOfDigiOccupancy_Minus", layers_, -0.5,layers_-0.5);
296 }
std::vector< MonitorElement * > charge_
std::vector< MonitorElement * > DigiOccupancy_XY_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::vector< MonitorElement * > DigiOccupancy_Minus_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
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 
)
private

Definition at line 191 of file HGCalDigiValidation.cc.

References ecalMGPA::adc(), HGCalDigiValidation::digiInfo::adc, RecoTauCleanerPlugins::charge, HGCalDigiValidation::digiInfo::charge, fillDigiInfo(), fillOccupancyMap(), HGCalDigiValidation::digiInfo::layer, OccupancyMap_minus_, OccupancyMap_plus_, verbosity_, HGCalDigiValidation::digiInfo::x, HGCalDigiValidation::digiInfo::y, and HGCalDigiValidation::digiInfo::z.

Referenced by analyze().

192  {
193 
194  if (verbosity_>1) edm::LogInfo("HGCalValidation") << detId;
195  DetId id1 = DetId(detId.rawId());
196  GlobalPoint global1 = geom->getPosition(id1);
197 
198  if (verbosity_>1)
199  edm::LogInfo("HGCalValidation") << " adc = " << adc
200  << " charge = " << charge;
201 
202  digiInfo hinfo;
203  hinfo.x = global1.x();
204  hinfo.y = global1.y();
205  hinfo.z = global1.z();
206  hinfo.adc = adc;
207  hinfo.charge = charge; //charges[0];
208  hinfo.layer = layer;
209 
210  if (verbosity_>1)
211  edm::LogInfo("HGCalValidation") << "gx = " << hinfo.x
212  << " gy = " << hinfo.y
213  << " gz = " << hinfo.z;
214 
215  fillDigiInfo(hinfo);
216 
217  if (global1.eta() > 0) fillOccupancyMap(OccupancyMap_plus_, layer -1);
218  else fillOccupancyMap(OccupancyMap_minus_, layer -1);
219 
220 }
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 
)
virtual

Reimplemented from DQMEDAnalyzer.

Definition at line 249 of file HGCalDigiValidation.cc.

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

250  {
251  if (nameDetector_ == "HCal") {
253  iSetup.get<HcalRecNumberingRecord>().get( pHRNDC );
254  const HcalDDDRecConstants *hcons = &(*pHRNDC);
255  layers_ = hcons->getMaxDepth(1);
256  } else {
258  iSetup.get<IdealGeometryRecord>().get(nameDetector_, pHGDC);
259  const HGCalDDDConstants & hgcons_ = (*pHGDC);
260  layers_ = hgcons_.layers(true);
261  }
262 
263  if (verbosity_>0)
264  edm::LogInfo("HGCalValidation") << "current DQM directory: "
265  << "HGCalDigiV/" << nameDetector_
266  << " layer = "<< layers_;
267 }
int getMaxDepth(const int type) const
unsigned int layers(bool reco) const
const T & get() const
Definition: EventSetup.h:56
void HGCalDigiValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 300 of file HGCalDigiValidation.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

300  {
301  //The following says we do not know what parameters are allowed so do no validation
302  // Please change this to state exactly what you do use, even if it is no parameters
304  desc.setUnknown();
305  descriptions.addDefault(desc);
306 }
void addDefault(ParameterSetDescription const &psetDescription)
void HGCalDigiValidation::fillDigiInfo ( digiInfo hinfo)
private

Definition at line 227 of file HGCalDigiValidation.cc.

References HGCalDigiValidation::digiInfo::adc, ADC_, HGCalDigiValidation::digiInfo::charge, charge_, DigiOccupancy_XY_, HGCalDigiValidation::digiInfo::layer, HGCalDigiValidation::digiInfo::x, and HGCalDigiValidation::digiInfo::y.

227  {
228  int ilayer = hinfo.layer -1;
229  charge_.at(ilayer)->Fill(hinfo.charge);
230  DigiOccupancy_XY_.at(ilayer)->Fill(hinfo.x, hinfo.y);
231  ADC_.at(ilayer)->Fill(hinfo.adc);
232 }
std::vector< MonitorElement * > charge_
std::vector< MonitorElement * > DigiOccupancy_XY_
std::vector< MonitorElement * > ADC_
void HGCalDigiValidation::fillDigiInfo ( )
private

Definition at line 234 of file HGCalDigiValidation.cc.

References DigiOccupancy_Minus_, DigiOccupancy_Plus_, OccupancyMap_minus_, and OccupancyMap_plus_.

Referenced by analyze(), and digiValidation().

234  {
235  for (auto itr = OccupancyMap_plus_.begin();
236  itr != OccupancyMap_plus_.end(); ++itr) {
237  int layer = (*itr).first;
238  int occupancy = (*itr).second;
239  DigiOccupancy_Plus_.at(layer)->Fill(occupancy);
240  }
241  for (auto itr = OccupancyMap_minus_.begin();
242  itr != OccupancyMap_minus_.end(); ++itr) {
243  int layer = (*itr).first;
244  int occupancy = (*itr).second;
245  DigiOccupancy_Minus_.at(layer)->Fill(occupancy);
246  }
247 }
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 222 of file HGCalDigiValidation.cc.

Referenced by digiValidation().

222  {
223  if (OccupancyMap.find(layer) != OccupancyMap.end()) OccupancyMap[layer] ++;
224  else OccupancyMap[layer] = 1;
225 }

Member Data Documentation

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

Definition at line 81 of file HGCalDigiValidation.h.

Referenced by bookHistograms(), and fillDigiInfo().

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

Definition at line 79 of file HGCalDigiValidation.h.

Referenced by bookHistograms(), and fillDigiInfo().

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

Definition at line 83 of file HGCalDigiValidation.h.

Referenced by bookHistograms(), and fillDigiInfo().

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

Definition at line 82 of file HGCalDigiValidation.h.

Referenced by bookHistograms(), and fillDigiInfo().

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

Definition at line 80 of file HGCalDigiValidation.h.

Referenced by bookHistograms(), and fillDigiInfo().

edm::EDGetToken HGCalDigiValidation::digiSource_
private

Definition at line 72 of file HGCalDigiValidation.h.

Referenced by analyze(), and HGCalDigiValidation().

int HGCalDigiValidation::layers_
private

Definition at line 74 of file HGCalDigiValidation.h.

Referenced by bookHistograms(), and dqmBeginRun().

MonitorElement* HGCalDigiValidation::MeanDigiOccupancy_Minus_
private

Definition at line 85 of file HGCalDigiValidation.h.

Referenced by bookHistograms().

MonitorElement* HGCalDigiValidation::MeanDigiOccupancy_Plus_
private

Definition at line 84 of file HGCalDigiValidation.h.

Referenced by bookHistograms().

std::string HGCalDigiValidation::nameDetector_
private

Definition at line 71 of file HGCalDigiValidation.h.

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

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

Definition at line 77 of file HGCalDigiValidation.h.

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

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

Definition at line 76 of file HGCalDigiValidation.h.

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

int HGCalDigiValidation::SampleIndx_
private

Definition at line 73 of file HGCalDigiValidation.h.

Referenced by analyze().

int HGCalDigiValidation::verbosity_
private

Definition at line 73 of file HGCalDigiValidation.h.

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