64 for (
int sec=0; sec<16; sec++){
90 castorHists.meRECHIT_E_all =
m_dbe->
book1D(
"CastorRecHit Energies- above threshold on RecHitEnergy",
"CastorRecHit Energies- above threshold on RecHitEnergy",150,0,150);
91 castorHists.meRECHIT_T_all =
m_dbe->
book1D(
"CastorRecHit Times- above threshold on RecHitEnergy",
"CastorRecHit Times- above threshold on RecHitEnergy",300,-100,100);
93 castorHists.meRECHIT_MAP_CHAN_E =
m_dbe->
book1D(
"CastorRecHit Energy in each channel- above threshold",
"CastorRecHit Energy in each channel- above threshold",224,0,224);
95 castorHists.meRECHIT_E_modules =
m_dbe->
book1D(
"CastorRecHit Energy in modules- above threshold",
"CastorRecHit Energy in modules- above threshold", 14, 0, 14);
97 castorHists.meRECHIT_E_sectors =
m_dbe->
book1D(
"CastorRecHit Energy in sectors- above threshold",
"CastorRecHit Energy in sectors- above threshold", 16, 0, 16);
100 castorHists.meRECHIT_N_modules =
m_dbe->
book1D(
"Number of CastorRecHits in modules- above threshold",
"Number of CastorRecHits in modules- above threshold", 14, 0, 14);
102 castorHists.meRECHIT_N_sectors =
m_dbe->
book1D(
"Number of CastorRecHits in sectors- above threshold",
"Number of CastorRecHits in sectors- above threshold", 16, 0, 16);
104 castorHists.meCastorRecHitsOccupancy =
m_dbe->
book2D(
"CastorRecHits Occupancy Map",
"CastorRecHits Occupancy Map", 14, 0,14, 16, 0,16);
106 castorHists.meRECHIT_N_event =
m_dbe->
book1D(
"Number of CASTOR RecHits per event- above threshold",
"Number of CASTOR RecHits per event- above threshold", 23, 0, 230);
111 castorHists.meRECHIT_E_relative_modules =
m_dbe->
book1D(
"Fraction of the total energy in CASTOR modules",
"Fraction of the total energy in CASTOR modules", 14, 0, 14);
113 castorHists.meRECHIT_E_relative_sectors =
m_dbe->
book1D(
"Fraction of the total energy in CASTOR sectors",
"Fraction of the total energy in CASTOR sectors", 16, 0, 16);
135 if(
fVerbosity>0)
std::cout <<
"CastorRecHitMonitor::beginRun - NO DQMStore service" << std::endl;
148 namespace CastorRecHitPerChan{
150 template<
class RecHit>
153 std::map<HcalCastorDetId, MonitorElement*> &toolE,
154 std::map<HcalCastorDetId, MonitorElement*> &toolT,
157 std::map<HcalCastorDetId,MonitorElement*>::iterator _mei;
163 _mei=toolE.find(rhit.id());
164 if (_mei!=toolE.end()){
165 if (_mei->second==0)
return;
166 else _mei->second->Fill(rhit.energy());
171 sprintf(name,
"CastorRecHit Energy zside=%d module=%d sector=%d", rhit.id().zside(), rhit.id().module(), rhit.id().sector());
172 toolE[rhit.id()] = dbe->
book1D(name,name,60,-10,20);
173 toolE[rhit.id()]->
Fill(rhit.energy());
178 _mei=toolT.find(rhit.id());
179 if (_mei!=toolT.end()){
180 if (_mei->second==0)
return;
181 else _mei->second->Fill(rhit.time());
186 sprintf(name,
"CastorRecHit Time zside=%d module=%d sector=%d", rhit.id().zside(), rhit.id().module(), rhit.id().sector());
187 toolT[rhit.id()] = dbe->
book1D(name,name,200,-100,100);
188 toolT[rhit.id()]->
Fill(rhit.time());
214 if(
fVerbosity>0)
std::cout <<
"CastorRecHitMonitor::processEvent => DQMStore is not instantiated !!!"<<std::endl;
224 if(castorHits.
size()>0)
226 if(
fVerbosity>1)
std::cout <<
"==>CastorRecHitMonitor::processEvent: castorHits.size()>0 !!!" << std::endl;
229 for (CASTORiter=castorHits.
begin(); CASTORiter!=castorHits.
end(); ++CASTORiter) {
232 energy = CASTORiter->energy();
233 time = CASTORiter->time();
278 for(
int sec=0; sec<16;sec++)
289 for(
int sec=0; sec<16;sec++)
299 for(
int sec=0; sec<16;sec++)
306 else {
if(
fVerbosity>0)
std::cout<<
"CastorRecHitMonitor::processEvent NO Castor RecHits !!!"<<std::endl; }
T getUntrackedParameter(std::string const &, T const &) const
virtual void setup(const edm::ParameterSet &ps, DQMStore *dbe)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
float energyInEachChannel[14][16]
std::vector< CastorRecHit >::const_iterator const_iterator
float allEnergySector[16]
struct CastorRecHitMonitor::@257 castorHists
void perChanHists(const RecHit &rhit, std::map< HcalCastorDetId, MonitorElement * > &toolE, std::map< HcalCastorDetId, MonitorElement * > &toolT, DQMStore *dbe, std::string baseFolder)
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
const_iterator end() const
void beginRun(const edm::EventSetup &iSetup)
void processEvent(const CastorRecHitCollection &castorHits)
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
T mod(const T &a, const T &b)
void setCurrentFolder(const std::string &fullpath)
const_iterator begin() const
float allEnergyModule[14]