52 for (
int i = 0;
i < 36;
i++) {
93 for (
int i = 0;
i < 36;
i++) {
112 const int nbinsE = 25;
113 const float minlogE = -0.5;
114 const float maxlogE = 2.;
115 float binEdgesE[nbinsE + 1];
116 for(
int i = 0;
i <= nbinsE;
i++)
117 binEdgesE[
i] =
std::pow(10., minlogE + (maxlogE - minlogE) / nbinsE *
i);
119 const int nbinsT = 200;
120 const float minT = -50.;
121 const float maxT = 50.;
122 float binEdgesT[nbinsT + 1];
123 for(
int i = 0; i <= nbinsT; i++)
124 binEdgesT[i] = minT + (maxT - minT) / nbinsT *
i;
129 for (
int i = 0; i < 36; i++) {
136 meTimeMap_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., -20.+
shiftProf2D_, 20.+
shiftProf2D_,
"s");
142 name =
"EBTMT timing vs amplitude " +
Numbers::sEB(i+1);
149 name =
"EBTMT timing vs amplitude summary";
154 name =
"EBTMT timing 1D summary";
158 name =
"EBTMT timing map";
159 meTimeSummaryMap_ =
dqmStore_->
bookProfile2D(name, name, 72, 0., 360., 34, -85, 85, -20.+
shiftProf2D_, 20.+
shiftProf2D_,
"s");
170 if ( !
init_ )
return;
175 for (
int i = 0;
i < 36;
i++ ) {
214 for (
int i=0;
i<36;
i++) runType[
i] = -1;
226 runType[ism-1] = dcchItr->getRunType();
239 isData =
false; enable =
true;
244 if ( ! enable )
return;
257 int neh = hits->size();
258 LogDebug(
"EBTimingTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
265 int ie = (ic-1)/20 + 1;
266 int ip = (ic-1)%20 + 1;
270 float xie = ie - 0.5;
271 float xip = ip - 0.5;
292 float xval = hitItr->energy();
293 float yval = hitItr->time();
295 uint32_t
flag = hitItr->recoFlag();
297 uint32_t sev = sevlv->severityLevel(
id, *hits);
300 if ( meTimeAmpli ) meTimeAmpli->
Fill(xval, yval);
304 if ( meTime ) meTime->
Fill(yval);
308 float xebeta =
id.ieta() - 0.5 *
id.zside();
309 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.
static std::string sEB(const int ism)
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.
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.
void tag(MonitorElement *me, unsigned int myTag)
static int iSM(const int ism, const EcalSubdetector subdet)
MonitorElement * meTimeSummaryMap_
void removeElement(const std::string &name)
MonitorElement * meTimeMap_[36]
std::string getName(Reflex::Type &cc)
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]
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")