43 std::cout <<
"LED Monitor threshold set to " << adcThresh_ << std::endl;
44 std::cout <<
"LED Monitor signal window set to " <<
sigS0_ <<
"-"<< sigS1_ << std::endl;
47 std::cout <<
"CastorLEDMonitor::setup, illegal range for first sample: " <<
sigS0_ << std::endl;
51 std::cout <<
"CastorLEDMonitor::setup, illegal range for last sample: " << sigS1_ << std::endl;
56 std::cout<<
"CastorLEDMonitor::setup, illegal range for first: "<<
sigS0_ <<
" and last sample: " << sigS1_ << std::endl;
68 castHists.shapePED =
m_dbe->
book1D(
"Castor Ped Subtracted Pulse Shape",
"Castor Ped Subtracted Pulse Shape",10,-0.5,9.5);
69 castHists.shapeALL =
m_dbe->
book1D(
"Castor Average Pulse Shape",
"Castor Average Pulse Shape",10,-0.5,9.5);
70 castHists.energyALL =
m_dbe->
book1D(
"Castor Average Pulse Energy",
"Castor Average Pulse Energy",500,0,500);
71 castHists.timeALL =
m_dbe->
book1D(
"Castor Average Pulse Time",
"Castor Average Pulse Time",200,-1,10);
72 castHists.rms_shape =
m_dbe->
book1D(
"Castor LED Shape RMS Values",
"Castor LED Shape RMS Values",100,0,5);
73 castHists.mean_shape =
m_dbe->
book1D(
"Castor LED Shape Mean Values",
"Castor LED Shape Mean Values",100,-0.5,9.5);
74 castHists.rms_time =
m_dbe->
book1D(
"Castor LED Time RMS Values",
"Castor LED Time RMS Values",100,0,5);
75 castHists.mean_time =
m_dbe->
book1D(
"Castor LED Time Mean Values",
"Castor LED Time Mean Values",100,-1,10);
76 castHists.rms_energy =
m_dbe->
book1D(
"Castor LED Energy RMS Values",
"Castor LED Energy RMS Values",100,0,500);
77 castHists.mean_energy =
m_dbe->
book1D(
"Castor LED Energy Mean Values",
"Castor LED Energy Mean Values",100,0,1000);
96 sprintf(name,
"DCC %d Mean Shape Map",fed);
98 sprintf(name,
"DCC %d RMS Shape Map",fed);
104 sprintf(name,
"DCC %d Mean Time Map",fed);
106 sprintf(name,
"DCC %d RMS Time Map",fed);
111 sprintf(name,
"DCC %d Mean Energy Map",fed);
113 sprintf(name,
"DCC %d RMS Energy Map",fed);
149 if(
fVerbosity>0)
std::cout<<
"CastorLEDMonitor::processEvent DQMStore not instantiated!!!"<<std::endl;
155 if(castorDigis.
size()>0) {
165 float ts =0;
float bs=0;
166 int maxi=0;
float maxa=0;
175 if(
i>=(maxi-1) &&
i<=maxi+1){
183 if(bs!=0)
castHists.timeALL->Fill(ts/bs);
185 if(
ievt_%1000 == 0 ){
186 for (
int i=0;
i<digi.
size();
i++) {
199 if(
fVerbosity > 0)
std::cout <<
"CastorPSMonitor::processEvent NO Castor Digis !!!" << std::endl;
223 std::map<HcalCastorDetId, MonitorElement*> &tShape,
224 std::map<HcalCastorDetId, MonitorElement*> &tTime,
225 std::map<HcalCastorDetId, MonitorElement*> &tEnergy,
228 std::string
type =
"CastorLEDPerChannel";
234 meIter = tShape.find(DetID);
236 if (
meIter!=tShape.end()){
238 if(me==
NULL &&
fVerbosity>0) printf(
"CastorLEDAnalysis::perChanHists This histo is NULL!!??\n");
241 float ts =0;
float bs=0;
242 int maxi=0;
float maxa=0;
244 if(vals[
i]>maxa){maxa=vals[
i]; maxi=
i;}
248 if(
i>=(maxi-1) &&
i<=maxi+1){
255 if(bs!=0) me->
Fill(ts/bs);
262 sprintf(name,
"Castor LED Shape zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
266 float ts =0;
float bs=0;
267 int maxi=0;
float maxa=0;
269 if(vals[
i]>maxa){maxa=vals[
i]; maxi=
i;}
270 insert1->Fill(
i,vals[
i]);
274 if(
i>=(maxi-1) &&
i<=maxi+1){
279 tShape[DetID] = insert1;
281 sprintf(name,
"Castor LED Time zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
283 if(bs!=0) insert2->
Fill(ts/bs);
284 tTime[DetID] = insert2;
287 sprintf(name,
"Castor LED Energy zside=%d module=%d sector=%d",DetID.
zside(),DetID.
module(),DetID.
sector());
289 insert3->
Fill(energy);
290 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.
struct CastorLEDMonitor::@162 castHists
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)
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