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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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::InputTag EcalRawDataCollection_
 
edm::InputTag EcalRecHitCollection_
 
bool enableCleanup_
 
float energyThreshold_
 
int ievt_
 
bool init_
 
bool initCaloGeometry_
 
edm::InputTag 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
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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 26 of file EETimingTask.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 34 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_.

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

Destructor.

Definition at line 76 of file EETimingTask.cc.

76  {
77 
78 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 267 of file EETimingTask.cc.

References EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, EcalEndcap, EcalRawDataCollection_, EcalRecHitCollection_, energyThreshold_, MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByLabel(), 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_.

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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 80 of file EETimingTask.cc.

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

80  {
81 
82  ievt_ = 0;
83 
84  if ( dqmStore_ ) {
85  dqmStore_->setCurrentFolder(prefixME_ + "/EETimingTask");
86  dqmStore_->rmdir(prefixME_ + "/EETimingTask");
87  }
88 
89 }
std::string prefixME_
Definition: EETimingTask.h:70
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
DQMStore * dqmStore_
Definition: EETimingTask.h:68
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void EETimingTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file EETimingTask.cc.

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

91  {
92 
93  Numbers::initGeometry(c, true);
94 
95  if( !initCaloGeometry_ ) {
97  initCaloGeometry_ = true;
98  }
99 
100  if ( ! mergeRuns_ ) this->reset();
101 
102  stableBeamsDeclared_ = false;
103 
104 }
edm::ESHandle< CaloGeometry > pGeometry_
Definition: EETimingTask.h:91
bool initCaloGeometry_
Definition: EETimingTask.h:94
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:50
const T & get() const
Definition: EventSetup.h:55
bool stableBeamsDeclared_
Definition: EETimingTask.h:97
void reset(void)
Reset.
void EETimingTask::cleanup ( void  )
protected

Cleanup.

Definition at line 217 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().

217  {
218 
219  if ( ! init_ ) return;
220 
221  if ( dqmStore_ ) {
222  dqmStore_->setCurrentFolder(prefixME_ + "/EETimingTask");
223 
224  for ( int i = 0; i < 18; i++ ) {
225  if ( meTime_[i] ) dqmStore_->removeElement( meTime_[i]->getName() );
226  meTime_[i] = 0;
227 
228  if ( meTimeMap_[i] ) dqmStore_->removeElement( meTimeMap_[i]->getName() );
229  meTimeMap_[i] = 0;
230 
231  if ( meTimeAmpli_[i] ) dqmStore_->removeElement( meTimeAmpli_[i]->getName() );
232  meTimeAmpli_[i] = 0;
233  }
234 
235  for (int i = 0; i < 2; i++) {
237  meTimeAmpliSummary_[i] = 0;
238 
239  if ( meTimeSummary1D_[i] ) dqmStore_->removeElement( meTimeSummary1D_[i]->getName() );
240  meTimeSummary1D_[i] = 0;
241 
242  if ( meTimeSummaryMap_[i] ) dqmStore_->removeElement( meTimeSummaryMap_[i]->getName() );
243  meTimeSummaryMap_[i] = 0;
244 
245  }
246 
248  meTimeDelta_ = 0;
249 
251  meTimeDelta2D_ = 0;
252 
253  }
254 
255  init_ = false;
256 
257 }
const std::string & getName(void) const
get name of ME
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:89
int i
Definition: DBlmapReader.cc:9
std::string prefixME_
Definition: EETimingTask.h:70
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:83
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:87
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:88
DQMStore * dqmStore_
Definition: EETimingTask.h:68
void removeElement(const std::string &name)
Definition: DQMStore.cc:2577
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:89
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:86
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * meTime_[18]
Definition: EETimingTask.h:82
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:84
void EETimingTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 259 of file EETimingTask.cc.

References cleanup(), enableCleanup_, and ievt_.

259  {
260 
261  edm::LogInfo("EETimingTask") << "analyzed " << ievt_ << " events";
262 
263  if ( enableCleanup_ ) this->cleanup();
264 
265 }
void cleanup(void)
Cleanup.
bool enableCleanup_
Definition: EETimingTask.h:72
void EETimingTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 106 of file EETimingTask.cc.

106  {
107 
108 }
void EETimingTask::reset ( void  )
protected

Reset.

Definition at line 110 of file EETimingTask.cc.

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

Referenced by analyze(), and beginRun().

110  {
111 
112  for (int i = 0; i < 18; i++) {
113  if ( meTime_[i] ) meTime_[i]->Reset();
114  if ( meTimeMap_[i] ) meTimeMap_[i]->Reset();
115  if ( meTimeAmpli_[i] ) meTimeAmpli_[i]->Reset();
116  }
117 
118  for (int i = 0; i < 2; i++) {
122  }
123 
124  if ( meTimeDelta_ ) meTimeDelta_->Reset();
126 
127 }
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:89
int i
Definition: DBlmapReader.cc:9
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:83
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:87
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:88
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:89
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:86
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meTime_[18]
Definition: EETimingTask.h:82
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:84
void EETimingTask::setup ( void  )
protected

Setup.

Definition at line 129 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().

129  {
130 
131  init_ = true;
132 
134 
135  //for timing vs amplitude plots
136  const int nbinsE = 25;
137  const float minlogE = -0.5;
138  const float maxlogE = 2.;
139  float binEdgesE[nbinsE + 1];
140  for(int i = 0; i <= nbinsE; i++)
141  binEdgesE[i] = std::pow((float)10., minlogE + (maxlogE - minlogE) / nbinsE * i);
142 
143  const int nbinsT = 200;
144  const float minT = -50.;
145  const float maxT = 50.;
146  float binEdgesT[nbinsT + 1];
147  for(int i = 0; i <= nbinsT; i++)
148  binEdgesT[i] = minT + (maxT - minT) / nbinsT * i;
149 
150  if ( dqmStore_ ) {
151  dqmStore_->setCurrentFolder(prefixME_ + "/EETimingTask");
152 
153  for (int i = 0; i < 18; i++) {
154  name = "EETMT timing 1D " + Numbers::sEE(i+1);
155  meTime_[i] = dqmStore_->book1D(name, name, 50, -25., 25.);
156  meTime_[i]->setAxisTitle("time (ns)", 1);
157  dqmStore_->tag(meTime_[i], i+1);
158 
159  name = "EETMT timing " + Numbers::sEE(i+1);
160  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");
161  meTimeMap_[i]->setAxisTitle("ix", 1);
162  if ( i+1 >= 1 && i+1 <= 9 ) meTimeMap_[i]->setAxisTitle("101-ix", 1);
163  meTimeMap_[i]->setAxisTitle("iy", 2);
164  meTimeMap_[i]->setAxisTitle("time (ns)", 3);
165  dqmStore_->tag(meTimeMap_[i], i+1);
166 
167  name = "EETMT timing vs amplitude " + Numbers::sEE(i+1);
168  meTimeAmpli_[i] = dqmStore_->book2D(name, name, nbinsE, binEdgesE, nbinsT, binEdgesT);
169  meTimeAmpli_[i]->setAxisTitle("energy (GeV)", 1);
170  meTimeAmpli_[i]->setAxisTitle("time (ns)", 2);
171  dqmStore_->tag(meTimeAmpli_[i], i+1);
172  }
173 
174  name = "EETMT timing vs amplitude summary EE -";
175  meTimeAmpliSummary_[0] = dqmStore_->book2D(name, name, nbinsE, binEdgesE, nbinsT, binEdgesT);
176  meTimeAmpliSummary_[0]->setAxisTitle("energy (GeV)", 1);
177  meTimeAmpliSummary_[0]->setAxisTitle("time (ns)", 2);
178 
179  name = "EETMT timing vs amplitude summary EE +";
180  meTimeAmpliSummary_[1] = dqmStore_->book2D(name, name, nbinsE, binEdgesE, nbinsT, binEdgesT);
181  meTimeAmpliSummary_[1]->setAxisTitle("energy (GeV)", 1);
182  meTimeAmpliSummary_[1]->setAxisTitle("time (ns)", 2);
183 
184  name = "EETMT timing 1D summary EE -";
185  meTimeSummary1D_[0] = dqmStore_->book1D(name, name, 50, -25., 25.);
186  meTimeSummary1D_[0]->setAxisTitle("time (ns)", 1);
187 
188  name = "EETMT timing 1D summary EE +";
189  meTimeSummary1D_[1] = dqmStore_->book1D(name, name, 50, -25., 25.);
190  meTimeSummary1D_[1]->setAxisTitle("time (ns)", 1);
191 
192  name = "EETMT timing map EE -";
193  meTimeSummaryMap_[0] = dqmStore_->bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+shiftProf2D, 20.+shiftProf2D, "s");
194  meTimeSummaryMap_[0]->setAxisTitle("ix'", 1);
195  meTimeSummaryMap_[0]->setAxisTitle("101-iy'", 2);
196  meTimeSummaryMap_[0]->setAxisTitle("time (ns)", 3);
197 
198  name = "EETMT timing map EE +";
199  meTimeSummaryMap_[1] = dqmStore_->bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+shiftProf2D, 20.+shiftProf2D, "s");
200  meTimeSummaryMap_[1]->setAxisTitle("ix'", 1);
201  meTimeSummaryMap_[1]->setAxisTitle("iy'", 2);
202  meTimeSummaryMap_[1]->setAxisTitle("time (ns)", 3);
203 
204  name = "EETMT timing EE+ - EE-";
205  meTimeDelta_ = dqmStore_->book1D(name, name, 100, -3., 3.);
206  meTimeDelta_->setAxisTitle("time (ns)", 1);
207 
208  name = "EETMT timing EE+ vs EE-";
209  meTimeDelta2D_ = dqmStore_->book2D(name, name, 50, -25., 25., 50, -25., 25.);
210  meTimeDelta2D_->setAxisTitle("EE+ average time (ns)", 1);
211  meTimeDelta2D_->setAxisTitle("EE- average time (ns)", 2);
212 
213  }
214 
215 }
MonitorElement * meTimeDelta2D_
Definition: EETimingTask.h:89
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:226
int i
Definition: DBlmapReader.cc:9
std::string prefixME_
Definition: EETimingTask.h:70
MonitorElement * meTimeMap_[18]
Definition: EETimingTask.h:83
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * meTimeSummary1D_[2]
Definition: EETimingTask.h:87
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:773
MonitorElement * meTimeSummaryMap_[2]
Definition: EETimingTask.h:88
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:812
DQMStore * dqmStore_
Definition: EETimingTask.h:68
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1359
MonitorElement * meTimeDelta_
Definition: EETimingTask.h:89
MonitorElement * meTimeAmpliSummary_[2]
Definition: EETimingTask.h:86
static const float shiftProf2D
Definition: EETimingTask.h:36
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:850
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:434
MonitorElement * meTime_[18]
Definition: EETimingTask.h:82
MonitorElement * meTimeAmpli_[18]
Definition: EETimingTask.h:84
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:1180

Member Data Documentation

DQMStore* EETimingTask::dqmStore_
private

Definition at line 68 of file EETimingTask.h.

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

edm::InputTag EETimingTask::EcalRawDataCollection_
private

Definition at line 78 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

edm::InputTag EETimingTask::EcalRecHitCollection_
private

Definition at line 79 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

bool EETimingTask::enableCleanup_
private

Definition at line 72 of file EETimingTask.h.

Referenced by EETimingTask(), and endJob().

float EETimingTask::energyThreshold_
private

Definition at line 76 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

int EETimingTask::ievt_
private

Definition at line 66 of file EETimingTask.h.

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

bool EETimingTask::init_
private

Definition at line 93 of file EETimingTask.h.

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

bool EETimingTask::initCaloGeometry_
private

Definition at line 94 of file EETimingTask.h.

Referenced by beginRun(), and EETimingTask().

edm::InputTag EETimingTask::L1GtEvmReadoutRecord_
private

Definition at line 80 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().

bool EETimingTask::mergeRuns_
private

Definition at line 74 of file EETimingTask.h.

Referenced by beginRun(), and EETimingTask().

MonitorElement* EETimingTask::meTime_[18]
private

Definition at line 82 of file EETimingTask.h.

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

MonitorElement* EETimingTask::meTimeAmpli_[18]
private

Definition at line 84 of file EETimingTask.h.

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

MonitorElement* EETimingTask::meTimeAmpliSummary_[2]
private

Definition at line 86 of file EETimingTask.h.

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

MonitorElement * EETimingTask::meTimeDelta2D_
private

Definition at line 89 of file EETimingTask.h.

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

MonitorElement* EETimingTask::meTimeDelta_
private

Definition at line 89 of file EETimingTask.h.

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

MonitorElement* EETimingTask::meTimeMap_[18]
private

Definition at line 83 of file EETimingTask.h.

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

MonitorElement* EETimingTask::meTimeSummary1D_[2]
private

Definition at line 87 of file EETimingTask.h.

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

MonitorElement* EETimingTask::meTimeSummaryMap_[2]
private

Definition at line 88 of file EETimingTask.h.

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

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

Definition at line 91 of file EETimingTask.h.

Referenced by beginRun().

std::string EETimingTask::prefixME_
private

Definition at line 70 of file EETimingTask.h.

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

const float EETimingTask::shiftProf2D = 50.
static

Definition at line 36 of file EETimingTask.h.

Referenced by analyze(), and setup().

bool EETimingTask::stableBeamsDeclared_
private

Definition at line 97 of file EETimingTask.h.

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

bool EETimingTask::useBeamStatus_
private

Definition at line 96 of file EETimingTask.h.

Referenced by analyze(), and EETimingTask().