CMS 3D CMS Logo

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

#include <ZDCDigiStudy.h>

Inheritance diagram for ZDCDigiStudy:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 ZDCDigiStudy (const edm::ParameterSet &ps)
 
 ~ZDCDigiStudy () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void dqmEndRun (const edm::Run &run, const edm::EventSetup &c) override
 
int FillHitValHist (int side, int section, int channel, double energy, double time)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer<>
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Private Attributes

bool checkHit_
 
MonitorElementmeZdcfCNEMvHAD
 
MonitorElementmeZdcfCNHAD
 
MonitorElementmeZdcfCNTOT
 
MonitorElementmeZdcfCPEMvHAD
 
MonitorElementmeZdcfCPHAD
 
MonitorElementmeZdcfCPTOT
 
MonitorElementmeZdcNEM1fCvsTS
 
MonitorElementmeZdcNEM2fCvsTS
 
MonitorElementmeZdcNEM3fCvsTS
 
MonitorElementmeZdcNEM4fCvsTS
 
MonitorElementmeZdcNEM5fCvsTS
 
MonitorElementmeZdcNHAD1fCvsTS
 
MonitorElementmeZdcNHAD2fCvsTS
 
MonitorElementmeZdcNHAD3fCvsTS
 
MonitorElementmeZdcNHAD4fCvsTS
 
MonitorElementmeZdcPEM1fCvsTS
 
MonitorElementmeZdcPEM2fCvsTS
 
MonitorElementmeZdcPEM3fCvsTS
 
MonitorElementmeZdcPEM4fCvsTS
 
MonitorElementmeZdcPEM5fCvsTS
 
MonitorElementmeZdcPHAD1fCvsTS
 
MonitorElementmeZdcPHAD2fCvsTS
 
MonitorElementmeZdcPHAD3fCvsTS
 
MonitorElementmeZdcPHAD4fCvsTS
 
std::string outFile_
 
edm::EDGetTokenT< ZDCDigiCollectiontok_zdc_
 
bool verbose_
 
std::string zdcHits
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 44 of file ZDCDigiStudy.h.

Constructor & Destructor Documentation

◆ ZDCDigiStudy()

ZDCDigiStudy::ZDCDigiStudy ( const edm::ParameterSet ps)

Definition at line 26 of file ZDCDigiStudy.cc.

26  {
27  zdcHits = ps.getUntrackedParameter<std::string>("HitCollection", "ZdcHits");
28  outFile_ = ps.getUntrackedParameter<std::string>("outputFile", "zdcHitStudy.root");
29  verbose_ = ps.getUntrackedParameter<bool>("Verbose", false);
30  checkHit_ = true;
31 
32  tok_zdc_ = consumes<ZDCDigiCollection>(edm::InputTag("simHcalUnsuppressedDigis"));
33 
34  edm::LogInfo("ZDCDigiStudy")
35  //std::cout
36  << " Hits: " << zdcHits << " / " << checkHit_ << " Output: " << outFile_;
37 }

References checkHit_, edm::ParameterSet::getUntrackedParameter(), outFile_, AlCaHLTBitMon_QueryRunRegistry::string, tok_zdc_, verbose_, and zdcHits.

◆ ~ZDCDigiStudy()

ZDCDigiStudy::~ZDCDigiStudy ( )
override

Definition at line 39 of file ZDCDigiStudy.cc.

39 {}

Member Function Documentation

◆ analyze()

void ZDCDigiStudy::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 194 of file ZDCDigiStudy.cc.

194  {
196 
197  using namespace edm;
198  bool gotZDCDigis = true;
199 
200  Handle<ZDCDigiCollection> zdchandle;
201  if (!(iEvent.getByToken(tok_zdc_, zdchandle))) {
202  gotZDCDigis = false; //this is a boolean set up to check if there are ZDCDigis in the input root file
203  }
204  if (!(zdchandle.isValid())) {
205  gotZDCDigis = false; //if it is not there, leave it false
206  }
207 
208  double totalPHADCharge = 0;
209  double totalNHADCharge = 0;
210  double totalPEMCharge = 0;
211  double totalNEMCharge = 0;
212  double totalPCharge = 0;
213  double totalNCharge = 0;
214 
216  if (gotZDCDigis == true) {
217  for (ZDCDigiCollection::const_iterator zdc = zdchandle->begin(); zdc != zdchandle->end(); ++zdc) {
218  const ZDCDataFrame digi = (const ZDCDataFrame)(*zdc);
219  //std::cout <<"CHANNEL = "<<zdc->id().channel()<<std::endl;
220 
222 
223  if (digi.id().section() == 2) { // require HAD
224  if (digi.id().zside() == 1) { // require POS
225  for (int i = 0; i < digi.size(); ++i) // loop over all 10 TS because each digi has 10 entries
226  {
227  if (digi.id().channel() == 1) { //here i specify PHAD1
229  i, digi.sample(i).nominal_fC()); //filling the plot name with the nominal fC value for each TS
230  if (i == 0)
231  meZdcPHAD1fCvsTS->Fill(-1, 1); // on first iteration of loop, increment underflow bin
232  } //NEW AVERAGE Thingy
233  if (digi.id().channel() == 2) {
235  if (i == 0)
236  meZdcPHAD2fCvsTS->Fill(-1, 1);
237  }
238  if (digi.id().channel() == 3) {
240  if (i == 0)
241  meZdcPHAD3fCvsTS->Fill(-1, 1);
242  }
243  if (digi.id().channel() == 4) {
245  if (i == 0)
246  meZdcPHAD4fCvsTS->Fill(-1, 1);
247  }
248  if (i == 4 || i == 5 || i == 6)
249  totalPHADCharge += digi.sample(i).nominal_fC();
250  } // loop over all (10) TS for the given digi
251  } else {
252  for (int i = 0; i < digi.size(); ++i) {
253  if (digi.id().channel() == 1) {
255  if (i == 0)
256  meZdcNHAD1fCvsTS->Fill(-1, 1);
257  }
258  if (digi.id().channel() == 2) {
260  if (i == 0)
261  meZdcNHAD2fCvsTS->Fill(-1, 1);
262  }
263  if (digi.id().channel() == 3) {
265  if (i == 0)
266  meZdcNHAD3fCvsTS->Fill(-1, 1);
267  }
268  if (digi.id().channel() == 4) {
270  if (i == 0)
271  meZdcNHAD4fCvsTS->Fill(-1, 1);
272  }
273  if (i == 4 || i == 5 || i == 6)
274  totalNHADCharge += digi.sample(i).nominal_fC();
275  } //loop over all 10 TS
276  } //Requires NHAd
277  } //Requires HAD sections
279  if (digi.id().section() ==
280  1) { //require EM....here i do the smae thing that i did above but now for P/N EM sections
281  if (digi.id().zside() == 1) { //require pos
282  for (int i = 0; i < digi.size(); ++i) {
283  if (digi.id().channel() == 1) {
285  if (i == 0)
286  meZdcPEM1fCvsTS->Fill(-1, 1);
287  }
288  if (digi.id().channel() == 2) {
290  if (i == 0)
291  meZdcPEM2fCvsTS->Fill(-1, 1);
292  }
293  if (digi.id().channel() == 3) {
295  if (i == 0)
296  meZdcPEM3fCvsTS->Fill(-1, 1);
297  }
298  if (digi.id().channel() == 4) {
300  if (i == 0)
301  meZdcPEM4fCvsTS->Fill(-1, 1);
302  }
303  if (digi.id().channel() == 5) {
305  if (i == 0)
306  meZdcPEM5fCvsTS->Fill(-1, 1);
307  }
308  if (i == 4 || i == 5 || i == 6)
309  totalPEMCharge += digi.sample(i).nominal_fC();
310  }
311  } else {
312  for (int i = 0; i < digi.size(); ++i) {
313  if (digi.id().channel() == 1) {
315  if (i == 0)
316  meZdcNEM1fCvsTS->Fill(-1, 1);
317  }
318  if (digi.id().channel() == 2) {
320  if (i == 0)
321  meZdcNEM2fCvsTS->Fill(-1, 1);
322  }
323  if (digi.id().channel() == 3) {
325  if (i == 0)
326  meZdcNEM3fCvsTS->Fill(-1, 1);
327  }
328  if (digi.id().channel() == 4) {
330  if (i == 0)
331  meZdcNEM4fCvsTS->Fill(-1, 1);
332  }
333  if (digi.id().channel() == 5) {
335  if (i == 0)
336  meZdcNEM5fCvsTS->Fill(-1, 1);
337  }
338  if (i == 4 || i == 5 || i == 6)
339  totalNEMCharge += digi.sample(i).nominal_fC();
340  }
341  }
342  }
343 
344  totalPCharge = totalPHADCharge + (0.1) * totalPEMCharge;
345  totalNCharge = totalNHADCharge + (0.1) * totalNEMCharge;
346 
347  /* std::cout <<"CHANNEL = "<<digi.id().channel()<<std::endl;
348  for (int i=0;i<digi.size();++i)
349  std::cout <<"SAMPLE = "<<i<<" ADC = "<<digi.sample(i).adc()<<" fC = "<<digi.sample(i).nominal_fC()<<std::endl;
350  */
351  // digi[i] should be the sample as digi.sample(i), I think
352  } // loop on all (22) ZDC digis
353  }
355 
356  // Now fill total charge histogram
357  meZdcfCPEMvHAD->Fill(totalPCharge, totalPEMCharge);
358  meZdcfCNEMvHAD->Fill(totalNCharge, totalNEMCharge);
359  meZdcfCPHAD->Fill(totalPHADCharge);
360  meZdcfCNHAD->Fill(totalNHADCharge);
361  meZdcfCNTOT->Fill(totalNCharge);
362  meZdcfCPTOT->Fill(totalPCharge);
363 }

References edm::SortedCollection< T, SORT >::begin(), HcalZDCDetId::channel(), edm::SortedCollection< T, SORT >::end(), dqm::impl::MonitorElement::Fill(), mps_fire::i, ZDCDataFrame::id(), iEvent, edm::HandleBase::isValid(), meZdcfCNEMvHAD, meZdcfCNHAD, meZdcfCNTOT, meZdcfCPEMvHAD, meZdcfCPHAD, meZdcfCPTOT, meZdcNEM1fCvsTS, meZdcNEM2fCvsTS, meZdcNEM3fCvsTS, meZdcNEM4fCvsTS, meZdcNEM5fCvsTS, meZdcNHAD1fCvsTS, meZdcNHAD2fCvsTS, meZdcNHAD3fCvsTS, meZdcNHAD4fCvsTS, meZdcPEM1fCvsTS, meZdcPEM2fCvsTS, meZdcPEM3fCvsTS, meZdcPEM4fCvsTS, meZdcPEM5fCvsTS, meZdcPHAD1fCvsTS, meZdcPHAD2fCvsTS, meZdcPHAD3fCvsTS, meZdcPHAD4fCvsTS, HcalQIESample::nominal_fC(), ZDCDataFrame::sample(), HcalZDCDetId::section(), ZDCDataFrame::size(), tok_zdc_, hcalSimParameters_cfi::zdc, and HcalZDCDetId::zside().

◆ bookHistograms()

void ZDCDigiStudy::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMOneEDAnalyzer<>.

Definition at line 41 of file ZDCDigiStudy.cc.

41  {
42  ib.setCurrentFolder("ZDCDigiValidation");
43  // run histos only since there is dqmEndRun processing.
44  ib.setScope(MonitorElementData::Scope::RUN);
45 
46  //Histograms for Hits
48  //# Below we are filling the histograms made in the .h file. The syntax is as follows: #
49  //# plot_code_name = dbe_->TypeofPlot[(1,2,3)-D,(F,I,D)]("Name as it will appear","Title",axis options); #
50  //# They will be stored in the TFile subdirectory set by : dbe_->setCurrentFolder("FolderIwant") #
51  //# axis options are like (#ofbins,min,max) #
53 
54  if (checkHit_) {
56 
58  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/1D_fC");
59  meZdcfCPHAD = ib.book1D("PHAD_TotalfC", "PZDC_HAD_TotalfC", 1000, -50, 10000);
60  meZdcfCPHAD->setAxisTitle("Counts", 2);
61  meZdcfCPHAD->setAxisTitle("fC", 1);
63  meZdcfCPTOT = ib.book1D("PZDC_TotalfC", "PZDC_TotalfC", 1000, -50, 20000);
64  meZdcfCPTOT->setAxisTitle("Counts", 2);
65  meZdcfCPTOT->setAxisTitle("fC", 1);
67  meZdcfCNHAD = ib.book1D("NHAD_TotalfC", "NZDC_HAD_TotalfC", 1000, -50, 10000);
68  meZdcfCNHAD->setAxisTitle("Counts", 2);
69  meZdcfCNHAD->setAxisTitle("fC", 1);
71  meZdcfCNTOT = ib.book1D("NZDC_TotalfC", "NZDC_TotalfC", 1000, -50, 20000);
72  meZdcfCNTOT->setAxisTitle("Counts", 2);
73  meZdcfCNTOT->setAxisTitle("fC", 1);
75 
77  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/PZDC");
78 
80  meZdcPEM1fCvsTS = ib.book1D("PEM1_fCvsTS", "P-EM1_AveragefC_vsTS", 10, 0, 9);
81  meZdcPEM1fCvsTS->setAxisTitle("fC", 2);
82  meZdcPEM1fCvsTS->setAxisTitle("TS", 1);
85  meZdcPEM2fCvsTS = ib.book1D("PEM2_fCvsTS", "P-EM2_AveragefC_vsTS", 10, 0, 9);
86  meZdcPEM2fCvsTS->setAxisTitle("fC", 2);
87  meZdcPEM2fCvsTS->setAxisTitle("TS", 1);
90  meZdcPEM3fCvsTS = ib.book1D("PEM3_fCvsTS", "P-EM3_AveragefC_vsTS", 10, 0, 9);
91  meZdcPEM3fCvsTS->setAxisTitle("fC", 2);
92  meZdcPEM3fCvsTS->setAxisTitle("TS", 1);
95  meZdcPEM4fCvsTS = ib.book1D("PEM4_fCvsTS", "P-EM4_AveragefC_vsTS", 10, 0, 9);
96  meZdcPEM4fCvsTS->setAxisTitle("fC", 2);
97  meZdcPEM4fCvsTS->setAxisTitle("TS", 1);
100  meZdcPEM5fCvsTS = ib.book1D("PEM5_fCvsTS", "P-EM5_AveragefC_vsTS", 10, 0, 9);
101  meZdcPEM5fCvsTS->setAxisTitle("fC", 2);
102  meZdcPEM5fCvsTS->setAxisTitle("TS", 1);
105  meZdcPHAD1fCvsTS = ib.book1D("PHAD1_fCvsTS", "P-HAD1_AveragefC_vsTS", 10, 0, 9);
106  meZdcPHAD1fCvsTS->setAxisTitle("fC", 2);
107  meZdcPHAD1fCvsTS->setAxisTitle("TS", 1);
110  meZdcPHAD2fCvsTS = ib.book1D("PHAD2_fCvsTS", "P-HAD2_AveragefC_vsTS", 10, 0, 9);
111  meZdcPHAD2fCvsTS->setAxisTitle("fC", 2);
112  meZdcPHAD2fCvsTS->setAxisTitle("TS", 1);
115  meZdcPHAD3fCvsTS = ib.book1D("PHAD3_fCvsTS", "P-HAD3_AveragefC_vsTS", 10, 0, 9);
116  meZdcPHAD3fCvsTS->setAxisTitle("fC", 2);
117  meZdcPHAD3fCvsTS->setAxisTitle("TS", 1);
120  meZdcPHAD4fCvsTS = ib.book1D("PHAD4_fCvsTS", "P-HAD4_AveragefC_vsTS", 10, 0, 9);
121  meZdcPHAD4fCvsTS->setAxisTitle("fC", 2);
122  meZdcPHAD4fCvsTS->setAxisTitle("TS", 1);
124  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/NZDC");
125 
127  meZdcNEM1fCvsTS = ib.book1D("NEM1_fCvsTS", "N-EM1_AveragefC_vsTS", 10, 0, 9);
128  meZdcNEM1fCvsTS->setAxisTitle("fC", 2);
129  meZdcNEM1fCvsTS->setAxisTitle("TS", 1);
132  meZdcNEM2fCvsTS = ib.book1D("NEM2_fCvsTS", "N-EM2_AveragefC_vsTS", 10, 0, 9);
133  meZdcNEM2fCvsTS->setAxisTitle("fC", 2);
134  meZdcNEM2fCvsTS->setAxisTitle("TS", 1);
137  meZdcNEM3fCvsTS = ib.book1D("NEM3_fCvsTS", "N-EM3_AveragefC_vsTS", 10, 0, 9);
138  meZdcNEM3fCvsTS->setAxisTitle("fC", 2);
139  meZdcNEM3fCvsTS->setAxisTitle("TS", 1);
142  meZdcNEM4fCvsTS = ib.book1D("NEM4_fCvsTS", "N-EM4_AveragefC_vsTS", 10, 0, 9);
143  meZdcNEM4fCvsTS->setAxisTitle("fC", 2);
144  meZdcNEM4fCvsTS->setAxisTitle("TS", 1);
147  meZdcNEM5fCvsTS = ib.book1D("NEM5_fCvsTS", "N-EM5_AveragefC_vsTS", 10, 0, 9);
148  meZdcNEM5fCvsTS->setAxisTitle("fC", 2);
149  meZdcNEM5fCvsTS->setAxisTitle("TS", 1);
152  meZdcNHAD1fCvsTS = ib.book1D("NHAD1_fCvsTS", "N-HAD1_AveragefC_vsTS", 10, 0, 9);
153  meZdcNHAD1fCvsTS->setAxisTitle("fC", 2);
154  meZdcNHAD1fCvsTS->setAxisTitle("TS", 1);
157  meZdcNHAD2fCvsTS = ib.book1D("NHAD2_fCvsTS", "N-HAD2_AveragefC_vsTS", 10, 0, 9);
158  meZdcNHAD2fCvsTS->setAxisTitle("fC", 2);
159  meZdcNHAD2fCvsTS->setAxisTitle("TS", 1);
162  meZdcNHAD3fCvsTS = ib.book1D("NHAD3_fCvsTS", "N-HAD3_AveragefC_vsTS", 10, 0, 9);
163  meZdcNHAD3fCvsTS->setAxisTitle("fC", 2);
164  meZdcNHAD3fCvsTS->setAxisTitle("TS", 1);
167  meZdcNHAD4fCvsTS = ib.book1D("NHAD4_fCvsTS", "N-HAD4_AveragefC_vsTS", 10, 0, 9);
168  meZdcNHAD4fCvsTS->setAxisTitle("fC", 2);
169  meZdcNHAD4fCvsTS->setAxisTitle("TS", 1);
171 
173  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/2D_EMvHAD");
176  meZdcfCPEMvHAD = ib.book2D("PEMvPHAD", "PZDC_EMvHAD", 200, -25, 12000, 200, -25, 15000);
177  meZdcfCPEMvHAD->setAxisTitle("SumEM_fC", 2);
178  meZdcfCPEMvHAD->setAxisTitle("SumHAD_fC", 1);
179  meZdcfCPEMvHAD->setOption("colz");
181  meZdcfCNEMvHAD = ib.book2D("NEMvNHAD", "NZDC_EMvHAD", 1000, -25, 12000, 1000, -25, 15000);
182  meZdcfCNEMvHAD->setAxisTitle("SumEM_fC", 2);
183  meZdcfCNEMvHAD->setAxisTitle("SumHAD_fC", 1);
184  meZdcfCNEMvHAD->setOption("colz");
186  }
187 }

References checkHit_, cuy::ib, meZdcfCNEMvHAD, meZdcfCNHAD, meZdcfCNTOT, meZdcfCPEMvHAD, meZdcfCPHAD, meZdcfCPTOT, meZdcNEM1fCvsTS, meZdcNEM2fCvsTS, meZdcNEM3fCvsTS, meZdcNEM4fCvsTS, meZdcNEM5fCvsTS, meZdcNHAD1fCvsTS, meZdcNHAD2fCvsTS, meZdcNHAD3fCvsTS, meZdcNHAD4fCvsTS, meZdcPEM1fCvsTS, meZdcPEM2fCvsTS, meZdcPEM3fCvsTS, meZdcPEM4fCvsTS, meZdcPEM5fCvsTS, meZdcPHAD1fCvsTS, meZdcPHAD2fCvsTS, meZdcPHAD3fCvsTS, meZdcPHAD4fCvsTS, dqm::impl::MonitorElement::setAxisTitle(), and dqm::impl::MonitorElement::setOption().

◆ dqmEndRun()

void ZDCDigiStudy::dqmEndRun ( const edm::Run run,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 367 of file ZDCDigiStudy.cc.

367  {
368  int nevents =
370  ->GetBinContent(
371  0); //grab the number of digis that were read in and stored in the underflow bin, and call them Nevents
373  ->Scale(
374  1. /
375  nevents); // divide histogram by nevents thereby creating an average..it was done this way so that in DQM when everything is done in parallel and added at the end then the average will add appropriately
376 
377  int nevents1 = (meZdcPHAD2fCvsTS->getTH1F())->GetBinContent(0);
378  (meZdcPHAD2fCvsTS->getTH1F())->Scale(1. / nevents1);
379 
380  int nevents2 = (meZdcPHAD3fCvsTS->getTH1F())->GetBinContent(0);
381  (meZdcPHAD3fCvsTS->getTH1F())->Scale(1. / nevents2);
382 
383  int nevents3 = (meZdcPHAD4fCvsTS->getTH1F())->GetBinContent(0);
384  (meZdcPHAD4fCvsTS->getTH1F())->Scale(1. / nevents3);
385 
386  int nevents4 = (meZdcNHAD1fCvsTS->getTH1F())->GetBinContent(0);
387  (meZdcNHAD1fCvsTS->getTH1F())->Scale(1. / nevents4);
388 
389  int nevents5 = (meZdcNHAD2fCvsTS->getTH1F())->GetBinContent(0);
390  (meZdcNHAD2fCvsTS->getTH1F())->Scale(1. / nevents5);
391 
392  int nevents6 = (meZdcNHAD3fCvsTS->getTH1F())->GetBinContent(0);
393  (meZdcNHAD3fCvsTS->getTH1F())->Scale(1. / nevents6);
394 
395  int nevents7 = (meZdcNHAD4fCvsTS->getTH1F())->GetBinContent(0);
396  (meZdcNHAD4fCvsTS->getTH1F())->Scale(1. / nevents7);
397 
398  int nevents8 = (meZdcPEM1fCvsTS->getTH1F())->GetBinContent(0);
399  (meZdcPEM1fCvsTS->getTH1F())->Scale(1. / nevents8);
400 
401  int nevents9 = (meZdcPEM2fCvsTS->getTH1F())->GetBinContent(0);
402  (meZdcPEM2fCvsTS->getTH1F())->Scale(1. / nevents9);
403 
404  int nevents10 = (meZdcPEM3fCvsTS->getTH1F())->GetBinContent(0);
405  (meZdcPEM3fCvsTS->getTH1F())->Scale(1. / nevents10);
406 
407  int nevents11 = (meZdcPEM4fCvsTS->getTH1F())->GetBinContent(0);
408  (meZdcPEM4fCvsTS->getTH1F())->Scale(1. / nevents11);
409 
410  int nevents12 = (meZdcPEM5fCvsTS->getTH1F())->GetBinContent(0);
411  (meZdcPEM5fCvsTS->getTH1F())->Scale(1. / nevents12);
412 
413  int nevents13 = (meZdcNEM1fCvsTS->getTH1F())->GetBinContent(0);
414  (meZdcNEM1fCvsTS->getTH1F())->Scale(1. / nevents13);
415 
416  int nevents14 = (meZdcNEM2fCvsTS->getTH1F())->GetBinContent(0);
417  (meZdcNEM2fCvsTS->getTH1F())->Scale(1. / nevents14);
418 
419  int nevents15 = (meZdcNEM3fCvsTS->getTH1F())->GetBinContent(0);
420  (meZdcNEM3fCvsTS->getTH1F())->Scale(1. / nevents15);
421 
422  int nevents16 = (meZdcNEM4fCvsTS->getTH1F())->GetBinContent(0);
423  (meZdcNEM4fCvsTS->getTH1F())->Scale(1. / nevents16);
424 
425  int nevents17 = (meZdcNEM5fCvsTS->getTH1F())->GetBinContent(0);
426  (meZdcNEM5fCvsTS->getTH1F())->Scale(1. / nevents17);
427 }

References dqm::impl::MonitorElement::getTH1F(), meZdcNEM1fCvsTS, meZdcNEM2fCvsTS, meZdcNEM3fCvsTS, meZdcNEM4fCvsTS, meZdcNEM5fCvsTS, meZdcNHAD1fCvsTS, meZdcNHAD2fCvsTS, meZdcNHAD3fCvsTS, meZdcNHAD4fCvsTS, meZdcPEM1fCvsTS, meZdcPEM2fCvsTS, meZdcPEM3fCvsTS, meZdcPEM4fCvsTS, meZdcPEM5fCvsTS, meZdcPHAD1fCvsTS, meZdcPHAD2fCvsTS, meZdcPHAD3fCvsTS, meZdcPHAD4fCvsTS, and cmsHarvester::nevents.

◆ FillHitValHist()

int ZDCDigiStudy::FillHitValHist ( int  side,
int  section,
int  channel,
double  energy,
double  time 
)
protected

Member Data Documentation

◆ checkHit_

bool ZDCDigiStudy::checkHit_
private

Definition at line 65 of file ZDCDigiStudy.h.

Referenced by bookHistograms(), and ZDCDigiStudy().

◆ meZdcfCNEMvHAD

MonitorElement* ZDCDigiStudy::meZdcfCNEMvHAD
private

Definition at line 77 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

◆ meZdcfCNHAD

MonitorElement* ZDCDigiStudy::meZdcfCNHAD
private

Definition at line 74 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

◆ meZdcfCNTOT

MonitorElement* ZDCDigiStudy::meZdcfCNTOT
private

Definition at line 75 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

◆ meZdcfCPEMvHAD

MonitorElement* ZDCDigiStudy::meZdcfCPEMvHAD
private

Definition at line 76 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

◆ meZdcfCPHAD

MonitorElement* ZDCDigiStudy::meZdcfCPHAD
private

Definition at line 72 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

◆ meZdcfCPTOT

MonitorElement* ZDCDigiStudy::meZdcfCPTOT
private

Definition at line 73 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

◆ meZdcNEM1fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNEM1fCvsTS
private

Definition at line 87 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNEM2fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNEM2fCvsTS
private

Definition at line 88 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNEM3fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNEM3fCvsTS
private

Definition at line 89 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNEM4fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNEM4fCvsTS
private

Definition at line 90 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNEM5fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNEM5fCvsTS
private

Definition at line 91 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNHAD1fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNHAD1fCvsTS
private

Definition at line 92 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNHAD2fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNHAD2fCvsTS
private

Definition at line 93 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNHAD3fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNHAD3fCvsTS
private

Definition at line 94 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcNHAD4fCvsTS

MonitorElement* ZDCDigiStudy::meZdcNHAD4fCvsTS
private

Definition at line 95 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPEM1fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPEM1fCvsTS
private

Definition at line 78 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPEM2fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPEM2fCvsTS
private

Definition at line 79 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPEM3fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPEM3fCvsTS
private

Definition at line 80 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPEM4fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPEM4fCvsTS
private

Definition at line 81 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPEM5fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPEM5fCvsTS
private

Definition at line 82 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPHAD1fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPHAD1fCvsTS
private

Definition at line 83 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPHAD2fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPHAD2fCvsTS
private

Definition at line 84 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPHAD3fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPHAD3fCvsTS
private

Definition at line 85 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ meZdcPHAD4fCvsTS

MonitorElement* ZDCDigiStudy::meZdcPHAD4fCvsTS
private

Definition at line 86 of file ZDCDigiStudy.h.

Referenced by analyze(), bookHistograms(), and dqmEndRun().

◆ outFile_

std::string ZDCDigiStudy::outFile_
private

Definition at line 64 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().

◆ tok_zdc_

edm::EDGetTokenT<ZDCDigiCollection> ZDCDigiStudy::tok_zdc_
private

Definition at line 67 of file ZDCDigiStudy.h.

Referenced by analyze(), and ZDCDigiStudy().

◆ verbose_

bool ZDCDigiStudy::verbose_
private

Definition at line 65 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().

◆ zdcHits

std::string ZDCDigiStudy::zdcHits
private

Definition at line 64 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().

cmsHarvester.nevents
nevents
Definition: cmsHarvester.py:3177
ZDCDigiStudy::meZdcfCNEMvHAD
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:77
ZDCDigiStudy::meZdcfCPEMvHAD
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:76
HcalQIESample::nominal_fC
constexpr double nominal_fC() const
get the nominal FC (no calibrations applied)
Definition: HcalQIESample.h:45
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
ZDCDigiStudy::meZdcPHAD2fCvsTS
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:84
ZDCDigiStudy::meZdcPEM1fCvsTS
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:78
ZDCDigiStudy::meZdcfCNTOT
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:75
ZDCDigiStudy::meZdcPHAD4fCvsTS
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:86
dqm::impl::MonitorElement::setOption
virtual void setOption(const char *option)
Definition: MonitorElement.cc:887
ZDCDigiStudy::tok_zdc_
edm::EDGetTokenT< ZDCDigiCollection > tok_zdc_
Definition: ZDCDigiStudy.h:67
ZDCDigiStudy::meZdcPEM5fCvsTS
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:82
ZDCDigiStudy::meZdcNEM1fCvsTS
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:87
edm
HLT enums.
Definition: AlignableModifier.h:19
ZDCDigiStudy::meZdcfCPHAD
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:72
HcalZDCDetId::channel
int channel() const
get the channel
Definition: HcalZDCDetId.cc:63
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
ZDCDigiStudy::outFile_
std::string outFile_
Definition: ZDCDigiStudy.h:64
ZDCDigiStudy::meZdcNEM2fCvsTS
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:88
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
ZDCDataFrame::id
const HcalZDCDetId & id() const
Definition: ZDCDataFrame.h:22
ZDCDataFrame::size
int size() const
total number of samples in the digi
Definition: ZDCDataFrame.h:26
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
ZDCDigiStudy::meZdcfCPTOT
MonitorElement * meZdcfCPTOT
Definition: ZDCDigiStudy.h:73
dqm::impl::MonitorElement::getTH1F
virtual TH1F * getTH1F()
Definition: MonitorElement.cc:986
ZDCDigiStudy::meZdcPHAD3fCvsTS
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:85
ZDCDataFrame
Definition: ZDCDataFrame.h:15
ZDCDataFrame::sample
const HcalQIESample & sample(int i) const
access a sample
Definition: ZDCDataFrame.h:39
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalZDCDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:39
ZDCDigiStudy::meZdcNHAD2fCvsTS
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:93
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
iEvent
int iEvent
Definition: GenABIO.cc:224
ZDCDigiStudy::meZdcPEM3fCvsTS
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:80
cuy.ib
ib
Definition: cuy.py:662
ZDCDigiStudy::verbose_
bool verbose_
Definition: ZDCDigiStudy.h:65
ZDCDigiStudy::meZdcPEM2fCvsTS
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:79
ZDCDigiStudy::meZdcPEM4fCvsTS
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:81
ZDCDigiStudy::meZdcNEM4fCvsTS
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:90
ZDCDigiStudy::meZdcNHAD3fCvsTS
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:94
hcalSimParameters_cfi.zdc
zdc
Definition: hcalSimParameters_cfi.py:97
ZDCDigiStudy::meZdcNEM3fCvsTS
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:89
ZDCDigiStudy::meZdcNEM5fCvsTS
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:91
ZDCDigiStudy::meZdcNHAD4fCvsTS
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:95
ZDCDigiStudy::meZdcPHAD1fCvsTS
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:83
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
ZDCDigiStudy::checkHit_
bool checkHit_
Definition: ZDCDigiStudy.h:65
HcalZDCDetId::section
Section section() const
get the section
Definition: HcalZDCDetId.cc:44
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
edm::InputTag
Definition: InputTag.h:15
ZDCDigiStudy::meZdcNHAD1fCvsTS
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:92
ZDCDigiStudy::zdcHits
std::string zdcHits
Definition: ZDCDigiStudy.h:64
ZDCDigiStudy::meZdcfCNHAD
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:74