38 if( !me )
return NULL;
50 if( !dqmStore )
return NULL;
52 if( className !=
"TH2F" && className !=
"TProfile2D" )
return NULL;
94 nBinsX = (Int_t)(xmax - xmin);
95 nBinsY = (Int_t)(ymax - ymin);
98 nBinsX = (Int_t)(xmax - xmin) / 5;
99 nBinsY = (Int_t)(ymax - ymin) / 5;
108 if( className ==
"TH2F" )
109 me = dqmStore->
book2D(name, title, nBinsX, xmin, xmax, nBinsY, ymin, ymax);
111 me = dqmStore->
bookProfile2D(name, title, nBinsX, xmin, xmax, nBinsY, ymin, ymax, lowZ, highZ);
130 float x =
id.ix() - 0.5;
131 float y =
id.iy() - 0.5;
132 if( info->
otype ==
kSM &&
id.zside() < 0 ) x = 100 - x;
133 if( info->
otype ==
kFullEE &&
id.zside() > 0 ) x += 100;
142 fillME( me, scid, wz, wprof );
150 fillME( me, ttid, wz, wprof );
172 for(
unsigned u = 0; u < vcry.size(); u++){
175 float x = cid.
ix() - 0.5;
176 float y = cid.
iy() - 0.5;
188 float x =
id.ix() * 5 - 2.5;
189 float y =
id.iy() * 5 - 2.5;
190 if( info->
otype ==
kSM &&
id.zside() < 0 ) x = 100 - x;
191 if( info->
otype ==
kFullEE &&
id.zside() > 0 ) x += 100;
214 for(
unsigned u = 0; u < vcry.size(); u++){
217 float x = cid.
ix() - 0.5;
218 float y = cid.
iy() - 0.5;
235 int kind = me->
kind();
241 if( !info )
return -1;
245 int zside =
id.zside();
264 if(zside > 0) ix += 100;
268 if(zside < 0)
return -1;
272 if(zside > 0)
return -1;
276 if(zside < 0 || ix > 50)
return -1;
280 if(zside < 0 || ix < 51)
return -1;
285 if(zside > 0 || ix > 50)
return -1;
289 if(zside > 0 || ix < 51)
return -1;
300 ix = (ix - 1) / scale + 1;
301 iy = (iy - 1) / scale + 1;
304 return iy * (nx + 2) + ix;
311 int kind = me->
kind();
317 if( !info )
return -1;
323 int zside =
id.zside();
342 if(zside > 0) ix += 20;
346 if(zside < 0)
return -1;
350 if(zside > 0)
return -1;
354 if(zside < 0 || ix > 10)
return -1;
358 if(zside < 0 || ix < 11)
return -1;
363 if(zside > 0 || ix > 10)
return -1;
367 if(zside > 0 || ix < 11)
return -1;
377 return iy * (nx + 2) + ix;
410 if( !crystals->size() )
return 0.;
443 if( !crystals->size() )
return 0.;
476 if( !crystals->size() )
return 0.;
506 std::vector<DetId> vcry = map->
ttConstituents( teid.tccId(), teid.ttId() );
507 for(
unsigned u = 0; u < vcry.size(); u++)
528 for(
unsigned u = 0; u < vcry.size(); u++)
552 for(
unsigned u = 0; u < crystals->size(); u++)
583 std::vector<DetId> vcry = map->
ttConstituents( teid.tccId(), teid.ttId() );
584 for(
unsigned u = 0; u < vcry.size(); u++)
605 for(
unsigned u = 0; u < vcry.size(); u++)
629 for(
unsigned u = 0; u < crystals->size(); u++)
660 std::vector<DetId> vcry = map->
ttConstituents( teid.tccId(), teid.ttId() );
661 for(
unsigned u = 0; u < vcry.size(); u++)
683 for(
unsigned u = 0; u < vcry.size(); u++)
707 for(
unsigned u = 0; u < crystals->size(); u++)
void fillME(MonitorElement *me, const EEDetId &id, double wz=1., double wprof=1.)
int getBinME(MonitorElement *me, const EEDetId &id)
static int iy0EE(const int ism)
Some "id" conversions.
EcalTrigTowerDetId getTrigTowerDetId(int TCCid, int iTT) const
Builds a EcalTrigTowerDetID from the TCCid & TriggerTower index in TCC.
static const EcalElectronicsMapping * getElectronicsMapping()
std::pair< int, int > getDCCandSC(EcalScDetId id) const
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
void setBinEntriesME(MonitorElement *me, const EEDetId &id, double entries)
void setBinContentME(MonitorElement *me, const EEDetId &id, double content)
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
Kind kind(void) const
Get the type of the monitor element.
const std::string getFullname(void) const
get full name of ME including Pathname
double getBinErrorME(MonitorElement *me, const EEDetId &id)
std::vector< DetId > ttConstituents(int tccId, int tt) const
Get the constituent detids for this dccId.
TObject * getRootObject(void) const
void setBinErrorME(MonitorElement *me, const EEDetId &id, double error)
MonitorElement * bookME(DQMStore *dqmStore, const std::string &name, const std::string &title, const std::string &className, ObjectType otype, BinningType btype=kCrystal, int ism=0, double lowZ=0., double highZ=0., const char *option="s")
static const MeInfo * get(MonitorElement *me)
double getBinContentME(MonitorElement *me, const EEDetId &id)
static int ix0EE(const int ism)
static void set(MonitorElement *me, ObjectType otype, BinningType btype, int ism)
static const EcalScDetId getEcalScDetId(const EEDetId &id)
double getBinEntriesME(MonitorElement *me, const EEDetId &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)
static std::map< std::string, MeInfo > infos
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
std::string className(const T &t)
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
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")