57 for (
int i = 0;
i < 18;
i++) {
63 for (
int i = 0;
i < 2;
i++) {
112 for (
int i = 0;
i < 18;
i++) {
118 for (
int i = 0;
i < 2;
i++) {
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);
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;
153 for (
int i = 0; i < 18; i++) {
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");
167 name =
"EETMT timing vs amplitude " +
Numbers::sEE(i+1);
174 name =
"EETMT timing vs amplitude summary EE -";
179 name =
"EETMT timing vs amplitude summary EE +";
184 name =
"EETMT timing 1D summary EE -";
188 name =
"EETMT timing 1D summary EE +";
192 name =
"EETMT timing map EE -";
193 meTimeSummaryMap_[0] =
dqmStore_->
bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+
shiftProf2D, 20.+
shiftProf2D,
"s");
198 name =
"EETMT timing map EE +";
199 meTimeSummaryMap_[1] =
dqmStore_->
bookProfile2D(name, name, 20, 0., 100., 20, 0., 100., -20.+
shiftProf2D, 20.+
shiftProf2D,
"s");
204 name =
"EETMT timing EE+ - EE-";
208 name =
"EETMT timing EE+ vs EE-";
219 if ( !
init_ )
return;
224 for (
int i = 0;
i < 18;
i++ ) {
235 for (
int i = 0;
i < 2;
i++) {
269 const unsigned STABLE_BEAMS = 11;
274 for (
int i=0;
i<18;
i++) runType[
i] = -1;
286 runType[ism-1] = dcchItr->getRunType();
299 isData =
false; enable =
true;
304 if ( ! enable )
return;
315 unsigned lhcBeamMode = gtRecord->gtfeWord().beamMode();
317 if( lhcBeamMode == STABLE_BEAMS ){
327 float sumTime_hithr[2] = {0.,0.};
328 int n_hithr[2] = {0,0};
337 int neh = hits->size();
338 LogDebug(
"EETimingTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
346 int iz = (
id.positiveZ() ) ? 1 : 0;
350 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
352 float xix = ix - 0.5;
353 float xiy = iy - 0.5;
374 float xval = hitItr->energy();
375 float yval = hitItr->time();
377 uint32_t
flag = hitItr->recoFlag();
379 uint32_t sev = sevlv->severityLevel(
id, *hits );
382 if ( meTimeAmpli ) meTimeAmpli->
Fill(xval, yval);
386 if ( meTime ) meTime->
Fill(yval);
391 sumTime_hithr[iz] += yval;
397 if (n_hithr[0] > 0 && n_hithr[1] > 0 ) {
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::InputTag EcalRawDataCollection_
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)
Some "id" conversions.
MonitorElement * meTimeSummary1D_[2]
edm::ESHandle< CaloGeometry > pGeometry_
std::vector< T >::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::InputTag L1GtEvmReadoutRecord_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)
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)
edm::InputTag EcalRecHitCollection_
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")