52 for (
int i = 0;
i < 36;
i++) {
97 for (
int i = 0;
i < 36;
i++) {
116 const int nbinsE = 25;
117 const float minlogE = -0.5;
118 const float maxlogE = 2.;
119 float binEdgesE[nbinsE + 1];
120 for(
int i = 0;
i <= nbinsE;
i++)
121 binEdgesE[
i] =
std::pow((
float)10., minlogE + (maxlogE - minlogE) / nbinsE *
i);
123 const int nbinsT = 200;
124 const float minT = -50.;
125 const float maxT = 50.;
126 float binEdgesT[nbinsT + 1];
127 for(
int i = 0; i <= nbinsT; i++)
128 binEdgesT[i] = minT + (maxT - minT) / nbinsT *
i;
133 for (
int i = 0; i < 36; i++) {
140 meTimeMap_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., -20.+
shiftProf2D_, 20.+
shiftProf2D_,
"s");
146 name =
"EBTMT timing vs amplitude " +
Numbers::sEB(i+1);
153 name =
"EBTMT timing vs amplitude summary";
158 name =
"EBTMT timing 1D summary";
162 name =
"EBTMT timing map";
163 meTimeSummaryMap_ =
dqmStore_->
bookProfile2D(name, name, 72, 0., 360., 34, -85, 85, -20.+
shiftProf2D_, 20.+
shiftProf2D_,
"s");
174 if ( !
init_ )
return;
179 for (
int i = 0;
i < 36;
i++ ) {
215 const unsigned STABLE_BEAMS = 11;
220 for (
int i=0;
i<36;
i++) runType[
i] = -1;
232 runType[ism-1] = dcchItr->getRunType();
245 isData =
false; enable =
true;
246 edm::LogWarning(
"EBTimingTask") <<
"EcalRawDataCollection not available";
250 if ( ! enable )
return;
261 unsigned lhcBeamMode = gtRecord->gtfeWord().beamMode();
263 if( lhcBeamMode == STABLE_BEAMS ){
280 int neh = hits->size();
281 LogDebug(
"EBTimingTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
288 int ie = (ic-1)/20 + 1;
289 int ip = (ic-1)%20 + 1;
293 float xie = ie - 0.5;
294 float xip = ip - 0.5;
315 float xval = hitItr->energy();
316 float yval = hitItr->time();
318 uint32_t flag = hitItr->recoFlag();
320 uint32_t sev = sevlv->severityLevel(
id, *hits);
323 if ( meTimeAmpli ) meTimeAmpli->
Fill(xval, yval);
327 if ( meTime ) meTime->
Fill(yval);
331 float xebeta =
id.ieta() - 0.5 *
id.zside();
332 float xebphi =
id.iphi() - 0.5;
341 edm::LogWarning(
"EBTimingTask") <<
"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
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.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Some "id" conversions.
static std::string sEB(const unsigned ism)
std::vector< EcalDCCHeaderBlock >::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)
MonitorElement * meTimeSummaryMap_
void removeElement(const std::string &name)
MonitorElement * meTimeMap_[36]
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > L1GtEvmReadoutRecord_
int ic() const
get ECAL/crystal number inside SM
MonitorElement * meTimeSummary1D_
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitCollection_
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
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")