63 if(
fVerbosity>1) {
std::cout <<
"CastorLEDMonitor::setup, illegal range for last sample: " << sigS1_ << std::endl; }
69 if(
fVerbosity>1) {
std::cout<<
"CastorLEDMonitor::setup, illegal range for first: "<<
sigS0_ <<
" and last sample: " << sigS1_ << std::endl; }
92 sprintf(name,
"DCC %d Mean Shape Map",fed);
94 sprintf(name,
"DCC %d RMS Shape Map",fed);
100 sprintf(name,
"DCC %d Mean Time Map",fed);
102 sprintf(name,
"DCC %d RMS Time Map",fed);
107 sprintf(name,
"DCC %d Mean Energy Map",fed);
109 sprintf(name,
"DCC %d RMS Energy Map",fed);
130 castHists.shapePED =
m_dbe->
book1D(
"Castor Ped Subtracted Pulse Shape",
"Castor Ped Subtracted Pulse Shape",10,-0.5,9.5);
131 castHists.shapeALL =
m_dbe->
book1D(
"Castor Average Pulse Shape",
"Castor Average Pulse Shape",10,-0.5,9.5);
132 castHists.energyALL =
m_dbe->
book1D(
"Castor Average Pulse Energy",
"Castor Average Pulse Energy",500,0,500);
133 castHists.timeALL =
m_dbe->
book1D(
"Castor Average Pulse Time",
"Castor Average Pulse Time",200,-1,10);
134 castHists.rms_shape =
m_dbe->
book1D(
"Castor LED Shape RMS Values",
"Castor LED Shape RMS Values",100,0,5);
135 castHists.mean_shape =
m_dbe->
book1D(
"Castor LED Shape Mean Values",
"Castor LED Shape Mean Values",100,-0.5,9.5);
136 castHists.rms_time =
m_dbe->
book1D(
"Castor LED Time RMS Values",
"Castor LED Time RMS Values",100,0,5);
137 castHists.mean_time =
m_dbe->
book1D(
"Castor LED Time Mean Values",
"Castor LED Time Mean Values",100,-1,10);
138 castHists.rms_energy =
m_dbe->
book1D(
"Castor LED Energy RMS Values",
"Castor LED Energy RMS Values",100,0,500);
139 castHists.mean_energy =
m_dbe->
book1D(
"Castor LED Energy Mean Values",
"Castor LED Energy Mean Values",100,0,1000);
143 if(
fVerbosity>0)
std::cout <<
"CastorLEDMonitor::beginRun - NO DQMStore service" << std::endl;
164 if(
fVerbosity>0)
std::cout<<
"CastorLEDMonitor::processEvent DQMStore not instantiated!!!"<<std::endl;
171 if(castorDigis.
size()>0) {
181 float ts =0;
float bs=0;
182 int maxi=0;
float maxa=0;
191 if(
i>=(maxi-1) &&
i<=maxi+1){
199 if(bs!=0)
castHists.timeALL->Fill(ts/bs);
202 for (
int i=0;
i<digi.
size();
i++) {
215 if(
fVerbosity > 0)
std::cout <<
"CastorLEDMonitor::processEvent NO Castor Digis !!!" << std::endl;
259 std::map<HcalCastorDetId, MonitorElement*> &tShape,
260 std::map<HcalCastorDetId, MonitorElement*> &tTime,
261 std::map<HcalCastorDetId, MonitorElement*> &tEnergy,
270 meIter = tShape.find(DetID);
272 if (
meIter!=tShape.end()){
274 if(me==
NULL &&
fVerbosity>0) printf(
"CastorLEDAnalysis::perChanHists This histo is NULL!!??\n");
277 float ts =0;
float bs=0;
278 int maxi=0;
float maxa=0;
280 if(vals[
i]>maxa){maxa=vals[
i]; maxi=
i;}
284 if(
i>=(maxi-1) &&
i<=maxi+1){
291 if(bs!=0) me->
Fill(ts/bs);
298 sprintf(name,
"Castor LED Shape zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
302 float ts =0;
float bs=0;
303 int maxi=0;
float maxa=0;
305 if(vals[
i]>maxa){maxa=vals[
i]; maxi=
i;}
306 insert1->Fill(
i,vals[
i]);
310 if(
i>=(maxi-1) &&
i<=maxi+1){
315 tShape[DetID] = insert1;
317 sprintf(name,
"Castor LED Time zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
319 if(bs!=0) insert2->
Fill(ts/bs);
320 tTime[DetID] = insert2;
323 sprintf(name,
"Castor LED Energy zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
325 insert3->
Fill(energy);
326 tEnergy[DetID] = insert3;
T getUntrackedParameter(std::string const &, T const &) const
std::map< unsigned int, MonitorElement * > RMS_MAP_ENERGY_DCC
virtual void setup(const edm::ParameterSet &ps, DQMStore *dbe)
int sector() const
get the sector (1-16)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::map< unsigned int, MonitorElement * > RMS_MAP_SHAPE_DCC
int adc() const
get the ADC sample
const HcalQIESample & sample(int i) const
access a sample
std::vector< CastorDataFrame >::const_iterator const_iterator
std::map< unsigned int, MonitorElement * >::iterator fedIter
void createFEDmap(unsigned int fed)
int module() const
get the module (1-2 for EM, 1-12 for HAD)
std::map< HcalCastorDetId, MonitorElement * >::iterator meIter
MonitorElement * rms_energy
MonitorElement * mean_energy
std::map< unsigned int, MonitorElement * > MEAN_MAP_ENERGY_DCC
std::map< unsigned int, MonitorElement * > MEAN_MAP_TIME_DCC
MonitorElement * rms_time
void processEvent(const CastorDigiCollection &cast, const CastorDbService &cond)
int zside() const
get the z-side of the cell (1/-1)
MonitorElement * mean_shape
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
MonitorElement * mean_time
double pedestal(int fCapId) const
get pedestal for capid=0..3
const_iterator end() const
static const float LedMonAdc2fc[128]
int capid() const
get the Capacitor id
void beginRun(const edm::EventSetup &iSetup)
MonitorElement * rms_shape
std::vector< std::vector< double > > tmp
void perChanHists(const HcalCastorDetId DetID, float *vals, std::map< HcalCastorDetId, MonitorElement * > &tShape, std::map< HcalCastorDetId, MonitorElement * > &tTime, std::map< HcalCastorDetId, MonitorElement * > &tEnergy, std::string baseFolder)
double getBinContent(int binx) const
get content of bin (1-D)
std::map< unsigned int, MonitorElement * > RMS_MAP_TIME_DCC
int getNbinsX(void) const
get # of bins in X-axis
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
std::map< unsigned int, MonitorElement * > MEAN_MAP_SHAPE_DCC
const HcalCastorDetId & id() const
struct CastorLEDMonitor::@277 castHists
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.
std::map< HcalCastorDetId, MonitorElement * > energy
int size() const
total number of samples in the digi
CastorCalibrations calibs_
void setCurrentFolder(const std::string &fullpath)
const_iterator begin() const