57 for (
int i = 0;
i < 36;
i++) {
102 for (
int i = 0;
i < 36;
i++) {
121 const int nbinsE = 25;
122 const float minlogE = -0.5;
123 const float maxlogE = 2.;
124 float binEdgesE[nbinsE + 1];
125 for(
int i = 0;
i <= nbinsE;
i++)
126 binEdgesE[
i] =
std::pow((
float)10., minlogE + (maxlogE - minlogE) / nbinsE *
i);
128 const int nbinsT = 200;
129 const float minT = -50.;
130 const float maxT = 50.;
131 float binEdgesT[nbinsT + 1];
132 for(
int i = 0; i <= nbinsT; i++)
133 binEdgesT[i] = minT + (maxT - minT) / nbinsT *
i;
138 for (
int i = 0; i < 36; i++) {
145 meTimeMap_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., -20.+
shiftProf2D_, 20.+
shiftProf2D_,
"s");
151 name =
"EBTMT timing vs amplitude " +
Numbers::sEB(i+1);
158 name =
"EBTMT timing vs amplitude summary";
163 name =
"EBTMT timing 1D summary";
167 name =
"EBTMT timing map";
168 meTimeSummaryMap_ =
dqmStore_->
bookProfile2D(name, name, 72, 0., 360., 34, -85, 85, -20.+
shiftProf2D_, 20.+
shiftProf2D_,
"s");
179 if ( !
init_ )
return;
184 for (
int i = 0;
i < 36;
i++ ) {
220 const unsigned STABLE_BEAMS = 11;
225 for (
int i=0;
i<36;
i++) runType[
i] = -1;
237 runType[ism-1] = dcchItr->getRunType();
250 isData =
false; enable =
true;
255 if ( ! enable )
return;
266 unsigned lhcBeamMode = gtRecord->gtfeWord().beamMode();
268 if( lhcBeamMode == STABLE_BEAMS ){
285 int neh = hits->size();
286 LogDebug(
"EBTimingTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
293 int ie = (ic-1)/20 + 1;
294 int ip = (ic-1)%20 + 1;
298 float xie = ie - 0.5;
299 float xip = ip - 0.5;
320 float xval = hitItr->energy();
321 float yval = hitItr->time();
323 uint32_t
flag = hitItr->recoFlag();
325 uint32_t sev = sevlv->severityLevel(
id, *hits);
328 if ( meTimeAmpli ) meTimeAmpli->
Fill(xval, yval);
332 if ( meTime ) meTime->
Fill(yval);
336 float xebeta =
id.ieta() - 0.5 *
id.zside();
337 float xebphi =
id.iphi() - 0.5;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
void beginJob(void)
BeginJob.
MonitorElement * meTimeAmpli_[36]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
EBTimingTask(const edm::ParameterSet &ps)
Constructor.
Some "id" conversions.
static std::string sEB(const unsigned ism)
std::vector< T >::const_iterator const_iterator
virtual ~EBTimingTask()
Destructor.
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void cleanup(void)
Cleanup.
bool stableBeamsDeclared_
void tag(MonitorElement *me, unsigned int myTag)
edm::InputTag L1GtEvmReadoutRecord_
MonitorElement * meTimeSummaryMap_
void removeElement(const std::string &name)
MonitorElement * meTimeMap_[36]
edm::InputTag EcalRawDataCollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int ic() const
get ECAL/crystal number inside SM
MonitorElement * meTimeSummary1D_
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
edm::InputTag EcalRecHitCollection_
MonitorElement * meTime_[36]
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
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.
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)
MonitorElement * meTimeAmpliSummary_
Power< A, B >::type pow(const A &a, const B &b)
void setCurrentFolder(const std::string &fullpath)
static const float shiftProf2D_
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")