39 if ( verbose_ ) dbe_->showDirStructure();
44 meEBUncalibRecHitsOccupancy_ = 0;
45 meEBUncalibRecHitsAmplitude_ = 0;
46 meEBUncalibRecHitsPedestal_ = 0;
47 meEBUncalibRecHitsJitter_ = 0;
48 meEBUncalibRecHitsChi2_ = 0;
49 meEBUncalibRecHitMaxSampleRatio_ = 0;
50 meEBUncalibRecHitsOccupancyGt100adc_ = 0;
51 meEBUncalibRecHitsAmplitudeGt100adc_ = 0;
52 meEBUncalibRecHitsPedestalGt100adc_ = 0;
53 meEBUncalibRecHitsJitterGt100adc_ = 0;
54 meEBUncalibRecHitsChi2Gt100adc_ = 0;
55 meEBUncalibRecHitMaxSampleRatioGt100adc_ = 0;
56 meEBUncalibRecHitsAmpFullMap_ = 0;
57 meEBUncalibRecHitsPedFullMap_ = 0;
58 for (
int i=0;
i<36 ;
i++)
60 meEBUncalibRecHitAmplMap_[
i] = 0;
61 meEBUncalibRecHitPedMap_[
i] = 0;
69 dbe_->setCurrentFolder(
"EcalRecHitsV/EcalBarrelRecHitsTask");
71 sprintf (histo,
"EB Occupancy" );
72 meEBUncalibRecHitsOccupancy_ = dbe_->book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
74 sprintf (histo,
"EB Amplitude" );
75 meEBUncalibRecHitsAmplitude_ = dbe_->book1D(histo, histo, 201, -20., 4000.);
77 sprintf (histo,
"EB Pedestal" );
78 meEBUncalibRecHitsPedestal_ = dbe_->book1D(histo, histo, 50, 190., 210.);
80 sprintf (histo,
"EB Jitter" );
81 meEBUncalibRecHitsJitter_ = dbe_->book1D(histo, histo, 100, 0., 100.);
83 sprintf (histo,
"EB Chi2" );
84 meEBUncalibRecHitsChi2_ = dbe_->book1D(histo, histo, 100, 18000., 22000.);
86 sprintf (histo,
"EB RecHit Max Sample Ratio");
87 meEBUncalibRecHitMaxSampleRatio_ = dbe_->book1D(histo, histo, 120, 0.90, 1.05);
89 sprintf (histo,
"EB Occupancy gt 100 adc counts" );
90 meEBUncalibRecHitsOccupancyGt100adc_ = dbe_->book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
92 sprintf (histo,
"EB Amplitude gt 100 adc counts" );
93 meEBUncalibRecHitsAmplitudeGt100adc_ = dbe_->book1D(histo, histo, 200, 0., 4000.);
95 sprintf (histo,
"EB Pedestal gt 100 adc counts" );
96 meEBUncalibRecHitsPedestalGt100adc_ = dbe_->book1D(histo, histo, 50, 190., 210.);
98 sprintf (histo,
"EB Jitter gt 100 adc counts" );
99 meEBUncalibRecHitsJitterGt100adc_ = dbe_->book1D(histo, histo, 100, 0., 100.);
101 sprintf (histo,
"EB Chi2 gt 100 adc counts" );
102 meEBUncalibRecHitsChi2Gt100adc_ = dbe_->book1D(histo, histo, 100, 18000., 22000.);
104 sprintf (histo,
"EB RecHit Max Sample Ratio gt 100 adc counts");
105 meEBUncalibRecHitMaxSampleRatioGt100adc_ = dbe_->book1D(histo, histo, 120, 0.90, 1.05);
107 sprintf (histo,
"EB Amplitude Full Map");
108 meEBUncalibRecHitsAmpFullMap_ = dbe_->bookProfile2D(histo, histo, 170, -85., 85., 360, 0., 360., 200, 0., 4000.);
110 sprintf (histo,
"EB Pedestal Full Map");
111 meEBUncalibRecHitsPedFullMap_ = dbe_->bookProfile2D(histo, histo, 170, -85., 85., 360, 0., 360., 50, 194., 201.);
113 for (
int i=0;
i<36 ;
i++)
115 sprintf(histo,
"EB Amp SM%02d",
i+1);
116 meEBUncalibRecHitAmplMap_[
i] = dbe_->bookProfile2D(histo, histo, 85, 0., 85., 20, 0., 20., 200, 0., 4000.);
118 sprintf(histo,
"EB Ped SM%02d",
i+1);
119 meEBUncalibRecHitPedMap_[
i] = dbe_->bookProfile2D(histo, histo, 85, 0., 85., 20, 0., 20., 50, 194., 201.);
141 e.
getByLabel( EBuncalibrechitCollection_, EcalUncalibRecHitEB);
142 if (EcalUncalibRecHitEB.
isValid()) {
143 EBUncalibRecHit = EcalUncalibRecHitEB.
product();
148 bool skipDigis =
false;
168 if (meEBUncalibRecHitsOccupancy_) meEBUncalibRecHitsOccupancy_ -> Fill(EBid.
ieta(), EBid.
iphi());
169 if (meEBUncalibRecHitsAmplitude_) meEBUncalibRecHitsAmplitude_ -> Fill(uncalibRecHit->amplitude());
170 if (meEBUncalibRecHitsPedestal_) meEBUncalibRecHitsPedestal_ -> Fill(uncalibRecHit->pedestal());
171 if (meEBUncalibRecHitsJitter_) meEBUncalibRecHitsJitter_ -> Fill(uncalibRecHit->jitter());
172 if (meEBUncalibRecHitsChi2_) meEBUncalibRecHitsChi2_ -> Fill(uncalibRecHit->chi2());
173 if (meEBUncalibRecHitsAmpFullMap_) meEBUncalibRecHitsAmpFullMap_ -> Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->amplitude());
174 if (meEBUncalibRecHitsPedFullMap_) meEBUncalibRecHitsPedFullMap_ -> Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->pedestal());
177 if ( uncalibRecHit->amplitude() > 100 )
179 if (meEBUncalibRecHitsOccupancyGt100adc_) meEBUncalibRecHitsOccupancyGt100adc_ -> Fill(EBid.
ieta(), EBid.
iphi());
180 if (meEBUncalibRecHitsAmplitudeGt100adc_) meEBUncalibRecHitsAmplitudeGt100adc_ -> Fill(uncalibRecHit->amplitude());
181 if (meEBUncalibRecHitsPedestalGt100adc_) meEBUncalibRecHitsPedestalGt100adc_ -> Fill(uncalibRecHit->pedestal());
182 if (meEBUncalibRecHitsJitterGt100adc_) meEBUncalibRecHitsJitterGt100adc_ -> Fill(uncalibRecHit->jitter());
183 if (meEBUncalibRecHitsChi2Gt100adc_) meEBUncalibRecHitsChi2Gt100adc_ -> Fill(uncalibRecHit->chi2());
188 int ie = (ic-1)/20 + 1;
189 int ip = (ic-1)%20 + 1;
191 float xie = ie - 0.5;
192 float xip = ip - 0.5;
193 if( meEBUncalibRecHitPedMap_[ism-1] ) meEBUncalibRecHitPedMap_[ism-1]->Fill(xie, xip, uncalibRecHit->pedestal());
194 if( meEBUncalibRecHitAmplMap_[ism-1] ) meEBUncalibRecHitAmplMap_[ism-1]->Fill(xie, xip, uncalibRecHit->amplitude());
201 if (myDigi != EBDigi->
end()){
202 for (
unsigned int sample = 0 ; sample < myDigi->size(); ++sample){
204 double analogSample = thisSample.
adc();
205 if ( eMax < analogSample ){
219 if (eMax > (*it).mean_x1 + 5 * (*it).rms_x1 && eMax != 0 ) {
221 if ( meEBUncalibRecHitMaxSampleRatio_ ) meEBUncalibRecHitMaxSampleRatio_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax);
222 if ( meEBUncalibRecHitMaxSampleRatioGt100adc_ && (uncalibRecHit->amplitude()>100) ) meEBUncalibRecHitMaxSampleRatioGt100adc_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax);
223 LogDebug(
"EcalRecHitsTaskInfo") <<
"barrel, eMax = " << eMax <<
" Amplitude = " << uncalibRecHit->amplitude()+uncalibRecHit->pedestal();
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
EcalBarrelRecHitsValidation(const edm::ParameterSet &ps)
Constructor.
const self & getMap() const
std::vector< T >::const_iterator const_iterator
int ism() const
get the ECAL/SM id
int iphi() const
get the crystal iphi
~EcalBarrelRecHitsValidation()
Destructor.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
const_iterator find(id_type i) const
int ieta() const
get the crystal ieta
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int ic() const
get ECAL/crystal number inside SM
const_iterator end() const
std::vector< Item >::const_iterator const_iterator
T const * product() const
T const * product() const
const_iterator end() const
const_iterator find(uint32_t rawId) const
const_iterator end() const
int ism(int ieta, int iphi)
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)