CMS 3D CMS Logo

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

#include <EETimingTask.h>

Inheritance diagram for EETimingTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EETimingTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EETimingTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Attributes

static const float shiftProf2D = 50.
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
void reset (void)
 Reset. More...
 
void setup (void)
 Setup. More...
 
- 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)
 

Private Attributes

DQMStoredqmStore_
 
edm::EDGetTokenT
< EcalRawDataCollection
EcalRawDataCollection_
 
edm::EDGetTokenT
< EcalRecHitCollection
EcalRecHitCollection_
 
bool enableCleanup_
 
float energyThreshold_
 
int ievt_
 
bool init_
 
bool initCaloGeometry_
 
edm::EDGetTokenT
< L1GlobalTriggerEvmReadoutRecord
L1GtEvmReadoutRecord_
 
bool mergeRuns_
 
MonitorElementmeTime_ [18]
 
MonitorElementmeTimeAmpli_ [18]
 
MonitorElementmeTimeAmpliSummary_ [2]
 
MonitorElementmeTimeDelta2D_
 
MonitorElementmeTimeDelta_
 
MonitorElementmeTimeMap_ [18]
 
MonitorElementmeTimeSummary1D_ [2]
 
MonitorElementmeTimeSummaryMap_ [2]
 
edm::ESHandle< CaloGeometrypGeometry_
 
std::string prefixME_
 
bool stableBeamsDeclared_
 
bool useBeamStatus_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 28 of file EETimingTask.h.

Constructor & Destructor Documentation

EETimingTask::EETimingTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 29 of file EETimingTask.cc.

References dqmStore_, EcalRawDataCollection_, EcalRecHitCollection_, enableCleanup_, energyThreshold_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, initCaloGeometry_, L1GtEvmReadoutRecord_, mergeRuns_, meTime_, meTimeAmpli_, meTimeAmpliSummary_, meTimeDelta2D_, meTimeDelta_, meTimeMap_, meTimeSummary1D_, meTimeSummaryMap_, cppFunctionSkipper::operator, prefixME_, stableBeamsDeclared_, AlCaHLTBitMon_QueryRunRegistry::string, and useBeamStatus_.

29  {
30 
31  init_ = false;
32 
33  initCaloGeometry_ = false;
34 
36 
37  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
38 
39  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
40 
41  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
42 
43  energyThreshold_ = ps.getUntrackedParameter<double>("energyThreshold", 3.);
44 
45  EcalRawDataCollection_ = consumes<EcalRawDataCollection>(ps.getParameter<edm::InputTag>("EcalRawDataCollection"));
46  EcalRecHitCollection_ = consumes<EcalRecHitCollection>(ps.getParameter<edm::InputTag>("EcalRecHitCollection"));
47 
48  L1GtEvmReadoutRecord_ = consumes<L1GlobalTriggerEvmReadoutRecord>(ps.getParameter<edm::InputTag>("L1GtEvmReadoutRecord"));
49 
50  useBeamStatus_ = ps.getUntrackedParameter<bool>("useBeamStatus", false);
51 
52  for (int i = 0; i < 18; i++) {
53  meTime_[i] = 0;
54  meTimeMap_[i] = 0;
55  meTimeAmpli_[i] = 0;
56  }
57 
58  for (int i = 0; i < 2; i++) {
60  meTimeSummary1D_[i] = 0;
61  meTimeSummaryMap_[i] = 0;
62  }
63 
64  meTimeDelta_ = 0;
65  meTimeDelta2D_ = 0;
66 
67  stableBeamsDeclared_ = false;
68 
69 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:91
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitCollection_
Definition: EETimingTask.h:81
std::string prefixME_
Definition: EETimingTask.h:72
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:85
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:89
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:90
DQMStore * dqmStore_
Definition: EETimingTask.h:70
bool useBeamStatus_
Definition: EETimingTask.h:98
bool initCaloGeometry_
Definition: EETimingTask.h:96
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:91
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:88
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
Definition: EETimingTask.h:80
float energyThreshold_
Definition: EETimingTask.h:78
bool stableBeamsDeclared_
Definition: EETimingTask.h:99
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > L1GtEvmReadoutRecord_
Definition: EETimingTask.h:82
bool enableCleanup_
Definition: EETimingTask.h:74
MonitorElement * meTime_[18]
Definition: EETimingTask.h:84
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:86
EETimingTask::~EETimingTask ( )
virtual

Destructor.

Definition at line 71 of file EETimingTask.cc.

71  {
72 
73 }

Member Function Documentation

void EETimingTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 262 of file EETimingTask.cc.

References EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, EcalEndcap, EcalRawDataCollection_, EcalRecHitCollection_, energyThreshold_, MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), i, ievt_, init_, ecalpyutils::ism(), Numbers::iSM(), EEDetId::ix(), EcalRecHit::kGood, EcalRecHit::kOutOfTime, EcalSeverityLevel::kWeird, L1GtEvmReadoutRecord_, LogDebug, meTime_, meTimeAmpli_, meTimeAmpliSummary_, meTimeDelta2D_, meTimeDelta_, meTimeMap_, meTimeSummary1D_, meTimeSummaryMap_, EcalDCCHeaderBlock::MTCC, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, reset(), environment_file_cff::runType, setup(), shiftProf2D, stableBeamsDeclared_, Numbers::subDet(), and useBeamStatus_.

262  {
263 
264  const unsigned STABLE_BEAMS = 11;
265 
266  bool isData = true;
267  bool enable = false;
268  int runType[18];
269  for (int i=0; i<18; i++) runType[i] = -1;
270 
272 
273  if ( e.getByToken(EcalRawDataCollection_, dcchs) ) {
274 
275  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
276 
277  if ( Numbers::subDet( *dcchItr ) != EcalEndcap ) continue;
278 
279  int ism = Numbers::iSM( *dcchItr, EcalEndcap );
280 
281  runType[ism-1] = dcchItr->getRunType();
282 
283  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::COSMIC ||
284  dcchItr->getRunType() == EcalDCCHeaderBlock::MTCC ||
285  dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_GLOBAL ||
286  dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_GLOBAL ||
287  dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_LOCAL ||
288  dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_LOCAL ) enable = true;
289 
290  }
291 
292  } else {
293 
294  isData = false; enable = true;
295  edm::LogWarning("EETimingTask") << "EcalRawDataCollection not available";
296 
297  }
298 
299  if ( ! enable ) return;
300 
301  if ( ! init_ ) this->setup();
302 
303  ievt_++;
304 
305  // resetting plots when stable beam is declared
308  if( e.getByToken(L1GtEvmReadoutRecord_, gtRecord) ) {
309 
310  unsigned lhcBeamMode = gtRecord->gtfeWord().beamMode();
311 
312  if( lhcBeamMode == STABLE_BEAMS ){
313 
314  reset();
315 
316  stableBeamsDeclared_ = true;
317 
318  }
319  }
320  }
321 
322  float sumTime_hithr[2] = {0.,0.};
323  int n_hithr[2] = {0,0};
324 
326  c.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
327 
329 
330  if ( e.getByToken(EcalRecHitCollection_, hits) ) {
331 
332  int neh = hits->size();
333  LogDebug("EETimingTask") << "event " << ievt_ << " hits collection size " << neh;
334 
335  for ( EcalRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr ) {
336 
337  EEDetId id = hitItr->id();
338 
339  int ix = id.ix();
340  int iy = id.iy();
341  int iz = ( id.positiveZ() ) ? 1 : 0;
342 
343  int ism = Numbers::iSM( id );
344 
345  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
346 
347  float xix = ix - 0.5;
348  float xiy = iy - 0.5;
349 
350  if ( isData ) {
351 
352  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::COSMIC ||
353  runType[ism-1] == EcalDCCHeaderBlock::MTCC ||
354  runType[ism-1] == EcalDCCHeaderBlock::COSMICS_GLOBAL ||
355  runType[ism-1] == EcalDCCHeaderBlock::PHYSICS_GLOBAL ||
356  runType[ism-1] == EcalDCCHeaderBlock::COSMICS_LOCAL ||
357  runType[ism-1] == EcalDCCHeaderBlock::PHYSICS_LOCAL ) ) continue;
358 
359  }
360 
361  MonitorElement* meTime = 0;
362  MonitorElement* meTimeMap = 0;
363  MonitorElement* meTimeAmpli = 0;
364 
365  meTime = meTime_[ism-1];
366  meTimeMap = meTimeMap_[ism-1];
367  meTimeAmpli = meTimeAmpli_[ism-1];
368 
369  float xval = hitItr->energy();
370  float yval = hitItr->time();
371 
372  uint32_t flag = hitItr->recoFlag();
373 
374  uint32_t sev = sevlv->severityLevel(id, *hits );
375 
376  if ( (flag == EcalRecHit::kGood || flag == EcalRecHit::kOutOfTime) && sev != EcalSeverityLevel::kWeird ) {
377  if ( meTimeAmpli ) meTimeAmpli->Fill(xval, yval);
378  if ( meTimeAmpliSummary_[iz] ) meTimeAmpliSummary_[iz]->Fill(xval, yval);
379  if ( hitItr->energy() > energyThreshold_ ) {
380  if ( meTimeMap ) meTimeMap->Fill(xix, xiy, yval+shiftProf2D);
381  if ( meTime ) meTime->Fill(yval);
382  if ( meTimeSummary1D_[iz] ) meTimeSummary1D_[iz]->Fill(yval);
383 
384  if ( meTimeSummaryMap_[iz] ) meTimeSummaryMap_[iz]->Fill(id.ix()-0.5, xiy, yval+shiftProf2D);
385 
386  sumTime_hithr[iz] += yval;
387  n_hithr[iz]++;
388  }
389  } // good rh for timing
390  } // loop over rh
391 
392  if (n_hithr[0] > 0 && n_hithr[1] > 0 ) {
393  if ( meTimeDelta_ ) meTimeDelta_->Fill( sumTime_hithr[1]/n_hithr[1] - sumTime_hithr[0]/n_hithr[0] );
394  if ( meTimeDelta2D_ ) meTimeDelta2D_->Fill( sumTime_hithr[1]/n_hithr[1], sumTime_hithr[0]/n_hithr[0] );
395  }
396 
397  } else {
398 
399  edm::LogWarning("EETimingTask") << "EcalRecHitCollection not available";
400 
401  }
402 
403 }
#define LogDebug(id)
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:91
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitCollection_
Definition: EETimingTask.h:81
int ix() const
Definition: EEDetId.h:76
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:85
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:89
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:90
void Fill(long long x)
bool useBeamStatus_
Definition: EETimingTask.h:98
void setup(void)
Setup.
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:91
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:88
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
Definition: EETimingTask.h:80
float energyThreshold_
Definition: EETimingTask.h:78
const T & get() const
Definition: EventSetup.h:55
static const float shiftProf2D
Definition: EETimingTask.h:38
bool stableBeamsDeclared_
Definition: EETimingTask.h:99
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > L1GtEvmReadoutRecord_
Definition: EETimingTask.h:82
void reset(void)
Reset.
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:142
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
MonitorElement * meTime_[18]
Definition: EETimingTask.h:84
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:86
void EETimingTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 75 of file EETimingTask.cc.

References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

75  {
76 
77  ievt_ = 0;
78 
79  if ( dqmStore_ ) {
80  dqmStore_->setCurrentFolder(prefixME_ + "/EETimingTask");
81  dqmStore_->rmdir(prefixME_ + "/EETimingTask");
82  }
83 
84 }
std::string prefixME_
Definition: EETimingTask.h:72
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2730
DQMStore * dqmStore_
Definition: EETimingTask.h:70
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void EETimingTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file EETimingTask.cc.

References edm::EventSetup::get(), initCaloGeometry_, Numbers::initGeometry(), mergeRuns_, pGeometry_, reset(), and stableBeamsDeclared_.

86  {
87 
88  Numbers::initGeometry(c, true);
89 
90  if( !initCaloGeometry_ ) {
92  initCaloGeometry_ = true;
93  }
94 
95  if ( ! mergeRuns_ ) this->reset();
96 
97  stableBeamsDeclared_ = false;
98 
99 }
edm::ESHandle< CaloGeometry > pGeometry_
Definition: EETimingTask.h:93
bool initCaloGeometry_
Definition: EETimingTask.h:96
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:47
const T & get() const
Definition: EventSetup.h:55
bool stableBeamsDeclared_
Definition: EETimingTask.h:99
void reset(void)
Reset.
void EETimingTask::cleanup ( void  )
protected

Cleanup.

Definition at line 212 of file EETimingTask.cc.

References dqmStore_, MonitorElement::getName(), i, init_, meTime_, meTimeAmpli_, meTimeAmpliSummary_, meTimeDelta2D_, meTimeDelta_, meTimeMap_, meTimeSummary1D_, meTimeSummaryMap_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

212  {
213 
214  if ( ! init_ ) return;
215 
216  if ( dqmStore_ ) {
217  dqmStore_->setCurrentFolder(prefixME_ + "/EETimingTask");
218 
219  for ( int i = 0; i < 18; i++ ) {
220  if ( meTime_[i] ) dqmStore_->removeElement( meTime_[i]->getName() );
221  meTime_[i] = 0;
222 
223  if ( meTimeMap_[i] ) dqmStore_->removeElement( meTimeMap_[i]->getName() );
224  meTimeMap_[i] = 0;
225 
226  if ( meTimeAmpli_[i] ) dqmStore_->removeElement( meTimeAmpli_[i]->getName() );
227  meTimeAmpli_[i] = 0;
228  }
229 
230  for (int i = 0; i < 2; i++) {
232  meTimeAmpliSummary_[i] = 0;
233 
234  if ( meTimeSummary1D_[i] ) dqmStore_->removeElement( meTimeSummary1D_[i]->getName() );
235  meTimeSummary1D_[i] = 0;
236 
237  if ( meTimeSummaryMap_[i] ) dqmStore_->removeElement( meTimeSummaryMap_[i]->getName() );
238  meTimeSummaryMap_[i] = 0;
239 
240  }
241 
243  meTimeDelta_ = 0;
244 
246  meTimeDelta2D_ = 0;
247 
248  }
249 
250  init_ = false;
251 
252 }
const std::string & getName(void) const
get name of ME
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:91
int i
Definition: DBlmapReader.cc:9
std::string prefixME_
Definition: EETimingTask.h:72
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:85
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:89
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:90
DQMStore * dqmStore_
Definition: EETimingTask.h:70
void removeElement(const std::string &name)
Definition: DQMStore.cc:2772
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:91
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:88
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * meTime_[18]
Definition: EETimingTask.h:84
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:86
void EETimingTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 254 of file EETimingTask.cc.

References cleanup(), enableCleanup_, and ievt_.

254  {
255 
256  edm::LogInfo("EETimingTask") << "analyzed " << ievt_ << " events";
257 
258  if ( enableCleanup_ ) this->cleanup();
259 
260 }
void cleanup(void)
Cleanup.
bool enableCleanup_
Definition: EETimingTask.h:74
void EETimingTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file EETimingTask.cc.

101  {
102 
103 }
void EETimingTask::reset ( void  )
protected

Reset.

Definition at line 105 of file EETimingTask.cc.

References i, meTime_, meTimeAmpli_, meTimeAmpliSummary_, meTimeDelta2D_, meTimeDelta_, meTimeMap_, meTimeSummary1D_, meTimeSummaryMap_, and MonitorElement::Reset().

Referenced by analyze(), and beginRun().

105  {
106 
107  for (int i = 0; i < 18; i++) {
108  if ( meTime_[i] ) meTime_[i]->Reset();
109  if ( meTimeMap_[i] ) meTimeMap_[i]->Reset();
110  if ( meTimeAmpli_[i] ) meTimeAmpli_[i]->Reset();
111  }
112 
113  for (int i = 0; i < 2; i++) {
117  }
118 
119  if ( meTimeDelta_ ) meTimeDelta_->Reset();
121 
122 }
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:91
int i
Definition: DBlmapReader.cc:9
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:85
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:89
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:90
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:91
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:88
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meTime_[18]
Definition: EETimingTask.h:84
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:86
void EETimingTask::setup ( void  )
protected

Setup.

Definition at line 124 of file EETimingTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile2D(), dqmStore_, i, init_, Numbers::ix0EE(), Numbers::iy0EE(), meTime_, meTimeAmpli_, meTimeAmpliSummary_, meTimeDelta2D_, meTimeDelta_, meTimeMap_, meTimeSummary1D_, meTimeSummaryMap_, mergeVDriftHistosByStation::name, funct::pow(), prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), shiftProf2D, AlCaHLTBitMon_QueryRunRegistry::string, and DQMStore::tag().

Referenced by analyze().

124  {
125 
126  init_ = true;
127 
129 
130  //for timing vs amplitude plots
131  const int nbinsE = 25;
132  const float minlogE = -0.5;
133  const float maxlogE = 2.;
134  float binEdgesE[nbinsE + 1];
135  for(int i = 0; i <= nbinsE; i++)
136  binEdgesE[i] = std::pow((float)10., minlogE + (maxlogE - minlogE) / nbinsE * i);
137 
138  const int nbinsT = 200;
139  const float minT = -50.;
140  const float maxT = 50.;
141  float binEdgesT[nbinsT + 1];
142  for(int i = 0; i <= nbinsT; i++)
143  binEdgesT[i] = minT + (maxT - minT) / nbinsT * i;
144 
145  if ( dqmStore_ ) {
146  dqmStore_->setCurrentFolder(prefixME_ + "/EETimingTask");
147 
148  for (int i = 0; i < 18; i++) {
149  name = "EETMT timing 1D " + Numbers::sEE(i+1);
150  meTime_[i] = dqmStore_->book1D(name, name, 50, -25., 25.);
151  meTime_[i]->setAxisTitle("time (ns)", 1);
152  dqmStore_->tag(meTime_[i], i+1);
153 
154  name = "EETMT timing " + Numbers::sEE(i+1);
155  meTimeMap_[i] = dqmStore_->bookProfile2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., -20.+shiftProf2D, 20.+shiftProf2D, "s");
156  meTimeMap_[i]->setAxisTitle("ix", 1);
157  if ( i+1 >= 1 && i+1 <= 9 ) meTimeMap_[i]->setAxisTitle("101-ix", 1);
158  meTimeMap_[i]->setAxisTitle("iy", 2);
159  meTimeMap_[i]->setAxisTitle("time (ns)", 3);
160  dqmStore_->tag(meTimeMap_[i], i+1);
161 
162  name = "EETMT timing vs amplitude " + Numbers::sEE(i+1);
163  meTimeAmpli_[i] = dqmStore_->book2D(name, name, nbinsE, binEdgesE, nbinsT, binEdgesT);
164  meTimeAmpli_[i]->setAxisTitle("energy (GeV)", 1);
165  meTimeAmpli_[i]->setAxisTitle("time (ns)", 2);
166  dqmStore_->tag(meTimeAmpli_[i], i+1);
167  }
168 
169  name = "EETMT timing vs amplitude summary EE -";
170  meTimeAmpliSummary_[0] = dqmStore_->book2D(name, name, nbinsE, binEdgesE, nbinsT, binEdgesT);
171  meTimeAmpliSummary_[0]->setAxisTitle("energy (GeV)", 1);
172  meTimeAmpliSummary_[0]->setAxisTitle("time (ns)", 2);
173 
174  name = "EETMT timing vs amplitude summary EE +";
175  meTimeAmpliSummary_[1] = dqmStore_->book2D(name, name, nbinsE, binEdgesE, nbinsT, binEdgesT);
176  meTimeAmpliSummary_[1]->setAxisTitle("energy (GeV)", 1);
177  meTimeAmpliSummary_[1]->setAxisTitle("time (ns)", 2);
178 
179  name = "EETMT timing 1D summary EE -";
180  meTimeSummary1D_[0] = dqmStore_->book1D(name, name, 50, -25., 25.);
181  meTimeSummary1D_[0]->setAxisTitle("time (ns)", 1);
182 
183  name = "EETMT timing 1D summary EE +";
184  meTimeSummary1D_[1] = dqmStore_->book1D(name, name, 50, -25., 25.);
185  meTimeSummary1D_[1]->setAxisTitle("time (ns)", 1);
186 
187  name = "EETMT timing map EE -";
188  meTimeSummaryMap_[0] = dqmStore_->bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+shiftProf2D, 20.+shiftProf2D, "s");
189  meTimeSummaryMap_[0]->setAxisTitle("ix'", 1);
190  meTimeSummaryMap_[0]->setAxisTitle("101-iy'", 2);
191  meTimeSummaryMap_[0]->setAxisTitle("time (ns)", 3);
192 
193  name = "EETMT timing map EE +";
194  meTimeSummaryMap_[1] = dqmStore_->bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+shiftProf2D, 20.+shiftProf2D, "s");
195  meTimeSummaryMap_[1]->setAxisTitle("ix'", 1);
196  meTimeSummaryMap_[1]->setAxisTitle("iy'", 2);
197  meTimeSummaryMap_[1]->setAxisTitle("time (ns)", 3);
198 
199  name = "EETMT timing EE+ - EE-";
200  meTimeDelta_ = dqmStore_->book1D(name, name, 100, -3., 3.);
201  meTimeDelta_->setAxisTitle("time (ns)", 1);
202 
203  name = "EETMT timing EE+ vs EE-";
204  meTimeDelta2D_ = dqmStore_->book2D(name, name, 50, -25., 25., 50, -25., 25.);
205  meTimeDelta2D_->setAxisTitle("EE+ average time (ns)", 1);
206  meTimeDelta2D_->setAxisTitle("EE- average time (ns)", 2);
207 
208  }
209 
210 }
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:91
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:223
int i
Definition: DBlmapReader.cc:9
std::string prefixME_
Definition: EETimingTask.h:72
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:85
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:89
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:770
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:90
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:809
DQMStore * dqmStore_
Definition: EETimingTask.h:70
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:91
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:88
static const float shiftProf2D
Definition: EETimingTask.h:38
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * meTime_[18]
Definition: EETimingTask.h:84
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:86
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1330

Member Data Documentation

DQMStore* EETimingTask::dqmStore_
private

Definition at line 70 of file EETimingTask.h.

Referenced by beginJob(), cleanup(), EETimingTask(), and setup().

edm::EDGetTokenT<EcalRawDataCollection> EETimingTask::EcalRawDataCollection_
private

Definition at line 80 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

edm::EDGetTokenT<EcalRecHitCollection> EETimingTask::EcalRecHitCollection_
private

Definition at line 81 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

bool EETimingTask::enableCleanup_
private

Definition at line 74 of file EETimingTask.h.

Referenced by EETimingTask(), and endJob().

float EETimingTask::energyThreshold_
private

Definition at line 78 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

int EETimingTask::ievt_
private

Definition at line 68 of file EETimingTask.h.

Referenced by analyze(), beginJob(), and endJob().

bool EETimingTask::init_
private

Definition at line 95 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), and setup().

bool EETimingTask::initCaloGeometry_
private

Definition at line 96 of file EETimingTask.h.

Referenced by beginRun(), and EETimingTask().

edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> EETimingTask::L1GtEvmReadoutRecord_
private

Definition at line 82 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

bool EETimingTask::mergeRuns_
private

Definition at line 76 of file EETimingTask.h.

Referenced by beginRun(), and EETimingTask().

MonitorElement* EETimingTask::meTime_[18]
private

Definition at line 84 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

MonitorElement* EETimingTask::meTimeAmpli_[18]
private

Definition at line 86 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

MonitorElement* EETimingTask::meTimeAmpliSummary_[2]
private

Definition at line 88 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

MonitorElement * EETimingTask::meTimeDelta2D_
private

Definition at line 91 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

MonitorElement* EETimingTask::meTimeDelta_
private

Definition at line 91 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

MonitorElement* EETimingTask::meTimeMap_[18]
private

Definition at line 85 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

MonitorElement* EETimingTask::meTimeSummary1D_[2]
private

Definition at line 89 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

MonitorElement* EETimingTask::meTimeSummaryMap_[2]
private

Definition at line 90 of file EETimingTask.h.

Referenced by analyze(), cleanup(), EETimingTask(), reset(), and setup().

edm::ESHandle<CaloGeometry> EETimingTask::pGeometry_
private

Definition at line 93 of file EETimingTask.h.

Referenced by beginRun().

std::string EETimingTask::prefixME_
private

Definition at line 72 of file EETimingTask.h.

Referenced by beginJob(), cleanup(), EETimingTask(), and setup().

const float EETimingTask::shiftProf2D = 50.
static

Definition at line 38 of file EETimingTask.h.

Referenced by analyze(), and setup().

bool EETimingTask::stableBeamsDeclared_
private

Definition at line 99 of file EETimingTask.h.

Referenced by analyze(), beginRun(), and EETimingTask().

bool EETimingTask::useBeamStatus_
private

Definition at line 98 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().