44 std::cout <<
"LED Monitor threshold set to " << adcThresh_ << std::endl;
45 std::cout <<
"LED Monitor signal window set to " <<
sigS0_ <<
"-"<< sigS1_ << std::endl;
48 std::cout <<
"CastorLEDMonitor::setup, illegal range for first sample: " <<
sigS0_ << std::endl;
52 std::cout <<
"CastorLEDMonitor::setup, illegal range for last sample: " << sigS1_ << std::endl;
57 std::cout<<
"CastorLEDMonitor::setup, illegal range for first: "<<
sigS0_ <<
" and last sample: " << sigS1_ << std::endl;
69 castHists.shapePED =
m_dbe->
book1D(
"Castor Ped Subtracted Pulse Shape",
"Castor Ped Subtracted Pulse Shape",10,-0.5,9.5);
70 castHists.shapeALL =
m_dbe->
book1D(
"Castor Average Pulse Shape",
"Castor Average Pulse Shape",10,-0.5,9.5);
71 castHists.energyALL =
m_dbe->
book1D(
"Castor Average Pulse Energy",
"Castor Average Pulse Energy",500,0,500);
72 castHists.timeALL =
m_dbe->
book1D(
"Castor Average Pulse Time",
"Castor Average Pulse Time",200,-1,10);
73 castHists.rms_shape =
m_dbe->
book1D(
"Castor LED Shape RMS Values",
"Castor LED Shape RMS Values",100,0,5);
74 castHists.mean_shape =
m_dbe->
book1D(
"Castor LED Shape Mean Values",
"Castor LED Shape Mean Values",100,-0.5,9.5);
75 castHists.rms_time =
m_dbe->
book1D(
"Castor LED Time RMS Values",
"Castor LED Time RMS Values",100,0,5);
76 castHists.mean_time =
m_dbe->
book1D(
"Castor LED Time Mean Values",
"Castor LED Time Mean Values",100,-1,10);
77 castHists.rms_energy =
m_dbe->
book1D(
"Castor LED Energy RMS Values",
"Castor LED Energy RMS Values",100,0,500);
78 castHists.mean_energy =
m_dbe->
book1D(
"Castor LED Energy Mean Values",
"Castor LED Energy Mean Values",100,0,1000);
97 sprintf(name,
"DCC %d Mean Shape Map",fed);
99 sprintf(name,
"DCC %d RMS Shape Map",fed);
105 sprintf(name,
"DCC %d Mean Time Map",fed);
107 sprintf(name,
"DCC %d RMS Time Map",fed);
112 sprintf(name,
"DCC %d Mean Energy Map",fed);
114 sprintf(name,
"DCC %d RMS Energy Map",fed);
150 if(
fVerbosity>0)
std::cout<<
"CastorLEDMonitor::processEvent DQMStore not instantiated!!!"<<std::endl;
156 if(castorDigis.
size()>0) {
166 float ts =0;
float bs=0;
167 int maxi=0;
float maxa=0;
176 if(
i>=(maxi-1) &&
i<=maxi+1){
184 if(bs!=0)
castHists.timeALL->Fill(ts/bs);
187 for (
int i=0;
i<digi.
size();
i++) {
200 if(
fVerbosity > 0)
std::cout <<
"CastorPSMonitor::processEvent NO Castor Digis !!!" << std::endl;
224 std::map<HcalCastorDetId, MonitorElement*> &tShape,
225 std::map<HcalCastorDetId, MonitorElement*> &tTime,
226 std::map<HcalCastorDetId, MonitorElement*> &tEnergy,
227 std::string baseFolder){
229 std::string
type =
"CastorLEDPerChannel";
235 meIter = tShape.find(DetID);
237 if (
meIter!=tShape.end()){
239 if(me==
NULL &&
fVerbosity>0) printf(
"CastorLEDAnalysis::perChanHists This histo is NULL!!??\n");
242 float ts =0;
float bs=0;
243 int maxi=0;
float maxa=0;
245 if(vals[
i]>maxa){maxa=vals[
i]; maxi=
i;}
249 if(
i>=(maxi-1) &&
i<=maxi+1){
256 if(bs!=0) me->
Fill(ts/bs);
263 sprintf(name,
"Castor LED Shape zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
267 float ts =0;
float bs=0;
268 int maxi=0;
float maxa=0;
270 if(vals[
i]>maxa){maxa=vals[
i]; maxi=
i;}
271 insert1->Fill(
i,vals[
i]);
275 if(
i>=(maxi-1) &&
i<=maxi+1){
280 tShape[DetID] = insert1;
282 sprintf(name,
"Castor LED Time zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
284 if(bs!=0) insert2->
Fill(ts/bs);
285 tTime[DetID] = insert2;
288 sprintf(name,
"Castor LED Energy zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
290 insert3->
Fill(energy);
291 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< T >::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
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)
struct CastorLEDMonitor::@168 castHists
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
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