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:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > 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 DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
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::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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 edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 

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 DQMEDAnalyzer
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 DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 45 of file ZDCDigiStudy.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file ZDCDigiStudy.cc.

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

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 }
T getUntrackedParameter(std::string const &, T const &) const
std::string zdcHits
Definition: ZDCDigiStudy.h:65
std::string outFile_
Definition: ZDCDigiStudy.h:65
edm::EDGetTokenT< ZDCDigiCollection > tok_zdc_
Definition: ZDCDigiStudy.h:68
ZDCDigiStudy::~ZDCDigiStudy ( )
override

Definition at line 39 of file ZDCDigiStudy.cc.

39 {}

Member Function Documentation

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

Definition at line 191 of file ZDCDigiStudy.cc.

References edm::SortedCollection< T, SORT >::begin(), HcalZDCDetId::channel(), edm::SortedCollection< T, SORT >::end(), dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), mps_fire::i, ZDCDataFrame::id(), 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().

191  {
193 
194  using namespace edm;
195  bool gotZDCDigis = true;
196 
197  Handle<ZDCDigiCollection> zdchandle;
198  if (!(iEvent.getByToken(tok_zdc_, zdchandle))) {
199  gotZDCDigis = false; //this is a boolean set up to check if there are ZDCDigis in the input root file
200  }
201  if (!(zdchandle.isValid())) {
202  gotZDCDigis = false; //if it is not there, leave it false
203  }
204 
205  double totalPHADCharge = 0;
206  double totalNHADCharge = 0;
207  double totalPEMCharge = 0;
208  double totalNEMCharge = 0;
209  double totalPCharge = 0;
210  double totalNCharge = 0;
211 
213  if (gotZDCDigis == true) {
214  for (ZDCDigiCollection::const_iterator zdc = zdchandle->begin(); zdc != zdchandle->end(); ++zdc) {
215  const ZDCDataFrame digi = (const ZDCDataFrame)(*zdc);
216  //std::cout <<"CHANNEL = "<<zdc->id().channel()<<std::endl;
217 
219 
220  if (digi.id().section() == 2) { // require HAD
221  if (digi.id().zside() == 1) { // require POS
222  for (int i = 0; i < digi.size(); ++i) // loop over all 10 TS because each digi has 10 entries
223  {
224  if (digi.id().channel() == 1) { //here i specify PHAD1
226  i, digi.sample(i).nominal_fC()); //filling the plot name with the nominal fC value for each TS
227  if (i == 0)
228  meZdcPHAD1fCvsTS->Fill(-1, 1); // on first iteration of loop, increment underflow bin
229  } //NEW AVERAGE Thingy
230  if (digi.id().channel() == 2) {
232  if (i == 0)
233  meZdcPHAD2fCvsTS->Fill(-1, 1);
234  }
235  if (digi.id().channel() == 3) {
237  if (i == 0)
238  meZdcPHAD3fCvsTS->Fill(-1, 1);
239  }
240  if (digi.id().channel() == 4) {
242  if (i == 0)
243  meZdcPHAD4fCvsTS->Fill(-1, 1);
244  }
245  if (i == 4 || i == 5 || i == 6)
246  totalPHADCharge += digi.sample(i).nominal_fC();
247  } // loop over all (10) TS for the given digi
248  } else {
249  for (int i = 0; i < digi.size(); ++i) {
250  if (digi.id().channel() == 1) {
252  if (i == 0)
253  meZdcNHAD1fCvsTS->Fill(-1, 1);
254  }
255  if (digi.id().channel() == 2) {
257  if (i == 0)
258  meZdcNHAD2fCvsTS->Fill(-1, 1);
259  }
260  if (digi.id().channel() == 3) {
262  if (i == 0)
263  meZdcNHAD3fCvsTS->Fill(-1, 1);
264  }
265  if (digi.id().channel() == 4) {
267  if (i == 0)
268  meZdcNHAD4fCvsTS->Fill(-1, 1);
269  }
270  if (i == 4 || i == 5 || i == 6)
271  totalNHADCharge += digi.sample(i).nominal_fC();
272  } //loop over all 10 TS
273  } //Requires NHAd
274  } //Requires HAD sections
276  if (digi.id().section() ==
277  1) { //require EM....here i do the smae thing that i did above but now for P/N EM sections
278  if (digi.id().zside() == 1) { //require pos
279  for (int i = 0; i < digi.size(); ++i) {
280  if (digi.id().channel() == 1) {
282  if (i == 0)
283  meZdcPEM1fCvsTS->Fill(-1, 1);
284  }
285  if (digi.id().channel() == 2) {
287  if (i == 0)
288  meZdcPEM2fCvsTS->Fill(-1, 1);
289  }
290  if (digi.id().channel() == 3) {
292  if (i == 0)
293  meZdcPEM3fCvsTS->Fill(-1, 1);
294  }
295  if (digi.id().channel() == 4) {
297  if (i == 0)
298  meZdcPEM4fCvsTS->Fill(-1, 1);
299  }
300  if (digi.id().channel() == 5) {
302  if (i == 0)
303  meZdcPEM5fCvsTS->Fill(-1, 1);
304  }
305  if (i == 4 || i == 5 || i == 6)
306  totalPEMCharge += digi.sample(i).nominal_fC();
307  }
308  } else {
309  for (int i = 0; i < digi.size(); ++i) {
310  if (digi.id().channel() == 1) {
312  if (i == 0)
313  meZdcNEM1fCvsTS->Fill(-1, 1);
314  }
315  if (digi.id().channel() == 2) {
317  if (i == 0)
318  meZdcNEM2fCvsTS->Fill(-1, 1);
319  }
320  if (digi.id().channel() == 3) {
322  if (i == 0)
323  meZdcNEM3fCvsTS->Fill(-1, 1);
324  }
325  if (digi.id().channel() == 4) {
327  if (i == 0)
328  meZdcNEM4fCvsTS->Fill(-1, 1);
329  }
330  if (digi.id().channel() == 5) {
332  if (i == 0)
333  meZdcNEM5fCvsTS->Fill(-1, 1);
334  }
335  if (i == 4 || i == 5 || i == 6)
336  totalNEMCharge += digi.sample(i).nominal_fC();
337  }
338  }
339  }
340 
341  totalPCharge = totalPHADCharge + (0.1) * totalPEMCharge;
342  totalNCharge = totalNHADCharge + (0.1) * totalNEMCharge;
343 
344  /* std::cout <<"CHANNEL = "<<digi.id().channel()<<std::endl;
345  for (int i=0;i<digi.size();++i)
346  std::cout <<"SAMPLE = "<<i<<" ADC = "<<digi.sample(i).adc()<<" fC = "<<digi.sample(i).nominal_fC()<<std::endl;
347  */
348  // digi[i] should be the sample as digi.sample(i), I think
349  } // loop on all (22) ZDC digis
350  }
352 
353  // Now fill total charge histogram
354  meZdcfCPEMvHAD->Fill(totalPCharge, totalPEMCharge);
355  meZdcfCNEMvHAD->Fill(totalNCharge, totalNEMCharge);
356  meZdcfCPHAD->Fill(totalPHADCharge);
357  meZdcfCNHAD->Fill(totalNHADCharge);
358  meZdcfCNTOT->Fill(totalNCharge);
359  meZdcfCPTOT->Fill(totalPCharge);
360 }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:39
std::vector< T >::const_iterator const_iterator
MonitorElement * meZdcfCPTOT
Definition: ZDCDigiStudy.h:74
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:79
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:77
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:76
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:73
void Fill(long long x)
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:94
int iEvent
Definition: GenABIO.cc:224
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:81
const HcalQIESample & sample(int i) const
access a sample
Definition: ZDCDataFrame.h:39
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:80
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:91
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:90
bool isValid() const
Definition: HandleBase.h:70
constexpr double nominal_fC() const
get the nominal FC (no calibrations applied)
Definition: HcalQIESample.h:45
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:84
const_iterator end() const
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:96
const HcalZDCDetId & id() const
Definition: ZDCDataFrame.h:22
int channel() const
get the channel
Definition: HcalZDCDetId.cc:63
int size() const
total number of samples in the digi
Definition: ZDCDataFrame.h:26
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:93
Section section() const
get the section
Definition: HcalZDCDetId.cc:44
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:75
HLT enums.
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:78
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:82
edm::EDGetTokenT< ZDCDigiCollection > tok_zdc_
Definition: ZDCDigiStudy.h:68
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:83
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:88
const_iterator begin() const
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:92
void ZDCDigiStudy::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 41 of file ZDCDigiStudy.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), checkHit_, 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(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and dqm::impl::MonitorElement::setOption().

41  {
42  ib.setCurrentFolder("ZDCDigiValidation");
43  //Histograms for Hits
45  //# Below we are filling the histograms made in the .h file. The syntax is as follows: #
46  //# plot_code_name = dbe_->TypeofPlot[(1,2,3)-D,(F,I,D)]("Name as it will appear","Title",axis options); #
47  //# They will be stored in the TFile subdirectory set by : dbe_->setCurrentFolder("FolderIwant") #
48  //# axis options are like (#ofbins,min,max) #
50 
51  if (checkHit_) {
53 
55  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/1D_fC");
56  meZdcfCPHAD = ib.book1D("PHAD_TotalfC", "PZDC_HAD_TotalfC", 1000, -50, 10000);
57  meZdcfCPHAD->setAxisTitle("Counts", 2);
58  meZdcfCPHAD->setAxisTitle("fC", 1);
60  meZdcfCPTOT = ib.book1D("PZDC_TotalfC", "PZDC_TotalfC", 1000, -50, 20000);
61  meZdcfCPTOT->setAxisTitle("Counts", 2);
62  meZdcfCPTOT->setAxisTitle("fC", 1);
64  meZdcfCNHAD = ib.book1D("NHAD_TotalfC", "NZDC_HAD_TotalfC", 1000, -50, 10000);
65  meZdcfCNHAD->setAxisTitle("Counts", 2);
66  meZdcfCNHAD->setAxisTitle("fC", 1);
68  meZdcfCNTOT = ib.book1D("NZDC_TotalfC", "NZDC_TotalfC", 1000, -50, 20000);
69  meZdcfCNTOT->setAxisTitle("Counts", 2);
70  meZdcfCNTOT->setAxisTitle("fC", 1);
72 
74  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/PZDC");
75 
77  meZdcPEM1fCvsTS = ib.book1D("PEM1_fCvsTS", "P-EM1_AveragefC_vsTS", 10, 0, 9);
78  meZdcPEM1fCvsTS->setAxisTitle("fC", 2);
79  meZdcPEM1fCvsTS->setAxisTitle("TS", 1);
82  meZdcPEM2fCvsTS = ib.book1D("PEM2_fCvsTS", "P-EM2_AveragefC_vsTS", 10, 0, 9);
83  meZdcPEM2fCvsTS->setAxisTitle("fC", 2);
84  meZdcPEM2fCvsTS->setAxisTitle("TS", 1);
87  meZdcPEM3fCvsTS = ib.book1D("PEM3_fCvsTS", "P-EM3_AveragefC_vsTS", 10, 0, 9);
88  meZdcPEM3fCvsTS->setAxisTitle("fC", 2);
89  meZdcPEM3fCvsTS->setAxisTitle("TS", 1);
92  meZdcPEM4fCvsTS = ib.book1D("PEM4_fCvsTS", "P-EM4_AveragefC_vsTS", 10, 0, 9);
93  meZdcPEM4fCvsTS->setAxisTitle("fC", 2);
94  meZdcPEM4fCvsTS->setAxisTitle("TS", 1);
97  meZdcPEM5fCvsTS = ib.book1D("PEM5_fCvsTS", "P-EM5_AveragefC_vsTS", 10, 0, 9);
98  meZdcPEM5fCvsTS->setAxisTitle("fC", 2);
99  meZdcPEM5fCvsTS->setAxisTitle("TS", 1);
102  meZdcPHAD1fCvsTS = ib.book1D("PHAD1_fCvsTS", "P-HAD1_AveragefC_vsTS", 10, 0, 9);
103  meZdcPHAD1fCvsTS->setAxisTitle("fC", 2);
104  meZdcPHAD1fCvsTS->setAxisTitle("TS", 1);
107  meZdcPHAD2fCvsTS = ib.book1D("PHAD2_fCvsTS", "P-HAD2_AveragefC_vsTS", 10, 0, 9);
108  meZdcPHAD2fCvsTS->setAxisTitle("fC", 2);
109  meZdcPHAD2fCvsTS->setAxisTitle("TS", 1);
112  meZdcPHAD3fCvsTS = ib.book1D("PHAD3_fCvsTS", "P-HAD3_AveragefC_vsTS", 10, 0, 9);
113  meZdcPHAD3fCvsTS->setAxisTitle("fC", 2);
114  meZdcPHAD3fCvsTS->setAxisTitle("TS", 1);
117  meZdcPHAD4fCvsTS = ib.book1D("PHAD4_fCvsTS", "P-HAD4_AveragefC_vsTS", 10, 0, 9);
118  meZdcPHAD4fCvsTS->setAxisTitle("fC", 2);
119  meZdcPHAD4fCvsTS->setAxisTitle("TS", 1);
121  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/NZDC");
122 
124  meZdcNEM1fCvsTS = ib.book1D("NEM1_fCvsTS", "N-EM1_AveragefC_vsTS", 10, 0, 9);
125  meZdcNEM1fCvsTS->setAxisTitle("fC", 2);
126  meZdcNEM1fCvsTS->setAxisTitle("TS", 1);
129  meZdcNEM2fCvsTS = ib.book1D("NEM2_fCvsTS", "N-EM2_AveragefC_vsTS", 10, 0, 9);
130  meZdcNEM2fCvsTS->setAxisTitle("fC", 2);
131  meZdcNEM2fCvsTS->setAxisTitle("TS", 1);
134  meZdcNEM3fCvsTS = ib.book1D("NEM3_fCvsTS", "N-EM3_AveragefC_vsTS", 10, 0, 9);
135  meZdcNEM3fCvsTS->setAxisTitle("fC", 2);
136  meZdcNEM3fCvsTS->setAxisTitle("TS", 1);
139  meZdcNEM4fCvsTS = ib.book1D("NEM4_fCvsTS", "N-EM4_AveragefC_vsTS", 10, 0, 9);
140  meZdcNEM4fCvsTS->setAxisTitle("fC", 2);
141  meZdcNEM4fCvsTS->setAxisTitle("TS", 1);
144  meZdcNEM5fCvsTS = ib.book1D("NEM5_fCvsTS", "N-EM5_AveragefC_vsTS", 10, 0, 9);
145  meZdcNEM5fCvsTS->setAxisTitle("fC", 2);
146  meZdcNEM5fCvsTS->setAxisTitle("TS", 1);
149  meZdcNHAD1fCvsTS = ib.book1D("NHAD1_fCvsTS", "N-HAD1_AveragefC_vsTS", 10, 0, 9);
150  meZdcNHAD1fCvsTS->setAxisTitle("fC", 2);
151  meZdcNHAD1fCvsTS->setAxisTitle("TS", 1);
154  meZdcNHAD2fCvsTS = ib.book1D("NHAD2_fCvsTS", "N-HAD2_AveragefC_vsTS", 10, 0, 9);
155  meZdcNHAD2fCvsTS->setAxisTitle("fC", 2);
156  meZdcNHAD2fCvsTS->setAxisTitle("TS", 1);
159  meZdcNHAD3fCvsTS = ib.book1D("NHAD3_fCvsTS", "N-HAD3_AveragefC_vsTS", 10, 0, 9);
160  meZdcNHAD3fCvsTS->setAxisTitle("fC", 2);
161  meZdcNHAD3fCvsTS->setAxisTitle("TS", 1);
164  meZdcNHAD4fCvsTS = ib.book1D("NHAD4_fCvsTS", "N-HAD4_AveragefC_vsTS", 10, 0, 9);
165  meZdcNHAD4fCvsTS->setAxisTitle("fC", 2);
166  meZdcNHAD4fCvsTS->setAxisTitle("TS", 1);
168 
170  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/2D_EMvHAD");
173  meZdcfCPEMvHAD = ib.book2D("PEMvPHAD", "PZDC_EMvHAD", 200, -25, 12000, 200, -25, 15000);
174  meZdcfCPEMvHAD->setAxisTitle("SumEM_fC", 2);
175  meZdcfCPEMvHAD->setAxisTitle("SumHAD_fC", 1);
176  meZdcfCPEMvHAD->setOption("colz");
178  meZdcfCNEMvHAD = ib.book2D("NEMvNHAD", "NZDC_EMvHAD", 1000, -25, 12000, 1000, -25, 15000);
179  meZdcfCNEMvHAD->setAxisTitle("SumEM_fC", 2);
180  meZdcfCNEMvHAD->setAxisTitle("SumHAD_fC", 1);
181  meZdcfCNEMvHAD->setOption("colz");
183  }
184 }
virtual void setOption(const char *option)
MonitorElement * meZdcfCPTOT
Definition: ZDCDigiStudy.h:74
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:79
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:77
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:76
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:73
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:81
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:80
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:91
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:84
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:93
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:75
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:78
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:82
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:83
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:92
ib
Definition: cuy.py:662
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void ZDCDigiStudy::dqmEndRun ( const edm::Run run,
const edm::EventSetup c 
)
overrideprotected

Definition at line 364 of file ZDCDigiStudy.cc.

References DEFINE_FWK_MODULE, 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.

364  {
365  int nevents =
367  ->GetBinContent(
368  0); //grab the number of digis that were read in and stored in the underflow bin, and call them Nevents
370  ->Scale(
371  1. /
372  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
373 
374  int nevents1 = (meZdcPHAD2fCvsTS->getTH1F())->GetBinContent(0);
375  (meZdcPHAD2fCvsTS->getTH1F())->Scale(1. / nevents1);
376 
377  int nevents2 = (meZdcPHAD3fCvsTS->getTH1F())->GetBinContent(0);
378  (meZdcPHAD3fCvsTS->getTH1F())->Scale(1. / nevents2);
379 
380  int nevents3 = (meZdcPHAD4fCvsTS->getTH1F())->GetBinContent(0);
381  (meZdcPHAD4fCvsTS->getTH1F())->Scale(1. / nevents3);
382 
383  int nevents4 = (meZdcNHAD1fCvsTS->getTH1F())->GetBinContent(0);
384  (meZdcNHAD1fCvsTS->getTH1F())->Scale(1. / nevents4);
385 
386  int nevents5 = (meZdcNHAD2fCvsTS->getTH1F())->GetBinContent(0);
387  (meZdcNHAD2fCvsTS->getTH1F())->Scale(1. / nevents5);
388 
389  int nevents6 = (meZdcNHAD3fCvsTS->getTH1F())->GetBinContent(0);
390  (meZdcNHAD3fCvsTS->getTH1F())->Scale(1. / nevents6);
391 
392  int nevents7 = (meZdcNHAD4fCvsTS->getTH1F())->GetBinContent(0);
393  (meZdcNHAD4fCvsTS->getTH1F())->Scale(1. / nevents7);
394 
395  int nevents8 = (meZdcPEM1fCvsTS->getTH1F())->GetBinContent(0);
396  (meZdcPEM1fCvsTS->getTH1F())->Scale(1. / nevents8);
397 
398  int nevents9 = (meZdcPEM2fCvsTS->getTH1F())->GetBinContent(0);
399  (meZdcPEM2fCvsTS->getTH1F())->Scale(1. / nevents9);
400 
401  int nevents10 = (meZdcPEM3fCvsTS->getTH1F())->GetBinContent(0);
402  (meZdcPEM3fCvsTS->getTH1F())->Scale(1. / nevents10);
403 
404  int nevents11 = (meZdcPEM4fCvsTS->getTH1F())->GetBinContent(0);
405  (meZdcPEM4fCvsTS->getTH1F())->Scale(1. / nevents11);
406 
407  int nevents12 = (meZdcPEM5fCvsTS->getTH1F())->GetBinContent(0);
408  (meZdcPEM5fCvsTS->getTH1F())->Scale(1. / nevents12);
409 
410  int nevents13 = (meZdcNEM1fCvsTS->getTH1F())->GetBinContent(0);
411  (meZdcNEM1fCvsTS->getTH1F())->Scale(1. / nevents13);
412 
413  int nevents14 = (meZdcNEM2fCvsTS->getTH1F())->GetBinContent(0);
414  (meZdcNEM2fCvsTS->getTH1F())->Scale(1. / nevents14);
415 
416  int nevents15 = (meZdcNEM3fCvsTS->getTH1F())->GetBinContent(0);
417  (meZdcNEM3fCvsTS->getTH1F())->Scale(1. / nevents15);
418 
419  int nevents16 = (meZdcNEM4fCvsTS->getTH1F())->GetBinContent(0);
420  (meZdcNEM4fCvsTS->getTH1F())->Scale(1. / nevents16);
421 
422  int nevents17 = (meZdcNEM5fCvsTS->getTH1F())->GetBinContent(0);
423  (meZdcNEM5fCvsTS->getTH1F())->Scale(1. / nevents17);
424 }
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:79
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:81
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:80
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:91
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:84
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:93
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:82
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:83
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:92
int ZDCDigiStudy::FillHitValHist ( int  side,
int  section,
int  channel,
double  energy,
double  time 
)
protected

Member Data Documentation

bool ZDCDigiStudy::checkHit_
private

Definition at line 66 of file ZDCDigiStudy.h.

Referenced by bookHistograms(), and ZDCDigiStudy().

MonitorElement* ZDCDigiStudy::meZdcfCNEMvHAD
private

Definition at line 78 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCNHAD
private

Definition at line 75 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCNTOT
private

Definition at line 76 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCPEMvHAD
private

Definition at line 77 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCPHAD
private

Definition at line 73 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCPTOT
private

Definition at line 74 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcNEM1fCvsTS
private

Definition at line 88 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM2fCvsTS
private

Definition at line 89 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM3fCvsTS
private

Definition at line 90 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM4fCvsTS
private

Definition at line 91 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM5fCvsTS
private

Definition at line 92 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD1fCvsTS
private

Definition at line 93 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD2fCvsTS
private

Definition at line 94 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD3fCvsTS
private

Definition at line 95 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD4fCvsTS
private

Definition at line 96 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM1fCvsTS
private

Definition at line 79 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM2fCvsTS
private

Definition at line 80 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM3fCvsTS
private

Definition at line 81 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM4fCvsTS
private

Definition at line 82 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM5fCvsTS
private

Definition at line 83 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD1fCvsTS
private

Definition at line 84 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD2fCvsTS
private

Definition at line 85 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD3fCvsTS
private

Definition at line 86 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD4fCvsTS
private

Definition at line 87 of file ZDCDigiStudy.h.

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

std::string ZDCDigiStudy::outFile_
private

Definition at line 65 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().

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

Definition at line 68 of file ZDCDigiStudy.h.

Referenced by analyze(), and ZDCDigiStudy().

bool ZDCDigiStudy::verbose_
private

Definition at line 66 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().

std::string ZDCDigiStudy::zdcHits
private

Definition at line 65 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().