52 for (
int i = 0;
i < 18;
i++) {
58 for (
int i = 0;
i < 2;
i++) {
107 for (
int i = 0;
i < 18;
i++) {
113 for (
int i = 0;
i < 2;
i++) {
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);
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;
148 for (
int i = 0; i < 18; i++) {
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");
162 name =
"EETMT timing vs amplitude " +
Numbers::sEE(i+1);
169 name =
"EETMT timing vs amplitude summary EE -";
174 name =
"EETMT timing vs amplitude summary EE +";
179 name =
"EETMT timing 1D summary EE -";
183 name =
"EETMT timing 1D summary EE +";
187 name =
"EETMT timing map EE -";
188 meTimeSummaryMap_[0] =
dqmStore_->
bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+
shiftProf2D, 20.+
shiftProf2D,
"s");
193 name =
"EETMT timing map EE +";
194 meTimeSummaryMap_[1] =
dqmStore_->
bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+
shiftProf2D, 20.+
shiftProf2D,
"s");
199 name =
"EETMT timing EE+ - EE-";
203 name =
"EETMT timing EE+ vs EE-";
214 if ( !
init_ )
return;
219 for (
int i = 0;
i < 18;
i++ ) {
230 for (
int i = 0;
i < 2;
i++) {
264 const unsigned STABLE_BEAMS = 11;
269 for (
int i=0;
i<18;
i++) runType[
i] = -1;
281 runType[ism-1] = dcchItr->getRunType();
294 isData =
false; enable =
true;
295 edm::LogWarning(
"EETimingTask") <<
"EcalRawDataCollection not available";
299 if ( ! enable )
return;
310 unsigned lhcBeamMode = gtRecord->gtfeWord().beamMode();
312 if( lhcBeamMode == STABLE_BEAMS ){
322 float sumTime_hithr[2] = {0.,0.};
323 int n_hithr[2] = {0,0};
332 int neh = hits->size();
333 LogDebug(
"EETimingTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
341 int iz = (
id.positiveZ() ) ? 1 : 0;
345 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
347 float xix = ix - 0.5;
348 float xiy = iy - 0.5;
369 float xval = hitItr->energy();
370 float yval = hitItr->time();
372 uint32_t flag = hitItr->recoFlag();
374 uint32_t sev = sevlv->severityLevel(
id, *hits );
377 if ( meTimeAmpli ) meTimeAmpli->
Fill(xval, yval);
381 if ( meTime ) meTime->
Fill(yval);
386 sumTime_hithr[iz] += yval;
392 if (n_hithr[0] > 0 && n_hithr[1] > 0 ) {
399 edm::LogWarning(
"EETimingTask") <<
"EcalRecHitCollection not available";
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meTimeDelta2D_
static std::string sEE(const unsigned ism)
EETimingTask(const edm::ParameterSet &ps)
Constructor.
void cleanup(void)
Cleanup.
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitCollection_
MonitorElement * meTimeMap_[18]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Some "id" conversions.
MonitorElement * meTimeSummary1D_[2]
edm::ESHandle< CaloGeometry > pGeometry_
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
static int ix0EE(const unsigned ism)
MonitorElement * meTimeSummaryMap_[2]
virtual ~EETimingTask()
Destructor.
static int iy0EE(const unsigned ism)
void tag(MonitorElement *me, unsigned int myTag)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void removeElement(const std::string &name)
MonitorElement * meTimeDelta_
MonitorElement * meTimeAmpliSummary_[2]
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
static const float shiftProf2D
bool stableBeamsDeclared_
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > L1GtEvmReadoutRecord_
static EcalSubdetector subDet(const EBDetId &id)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void beginJob(void)
BeginJob.
int ism(int ieta, int iphi)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
Power< A, B >::type pow(const A &a, const B &b)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meTime_[18]
MonitorElement * meTimeAmpli_[18]
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")