20 EBuncalibrechitCollection_token_ = consumes< EBUncalibratedRecHitCollection > (ps.
getParameter<
edm::InputTag>(
"EBuncalibrechitCollection") );
38 if ( verbose_ ) dbe_->showDirStructure();
43 meEBUncalibRecHitsOccupancy_ = 0;
44 meEBUncalibRecHitsAmplitude_ = 0;
45 meEBUncalibRecHitsPedestal_ = 0;
46 meEBUncalibRecHitsJitter_ = 0;
47 meEBUncalibRecHitsChi2_ = 0;
48 meEBUncalibRecHitMaxSampleRatio_ = 0;
49 meEBUncalibRecHitsOccupancyGt100adc_ = 0;
50 meEBUncalibRecHitsAmplitudeGt100adc_ = 0;
51 meEBUncalibRecHitsPedestalGt100adc_ = 0;
52 meEBUncalibRecHitsJitterGt100adc_ = 0;
53 meEBUncalibRecHitsChi2Gt100adc_ = 0;
54 meEBUncalibRecHitMaxSampleRatioGt100adc_ = 0;
55 meEBUncalibRecHitsAmpFullMap_ = 0;
56 meEBUncalibRecHitsPedFullMap_ = 0;
57 for (
int i=0;
i<36 ;
i++)
59 meEBUncalibRecHitAmplMap_[
i] = 0;
60 meEBUncalibRecHitPedMap_[
i] = 0;
68 dbe_->setCurrentFolder(
"EcalRecHitsV/EcalBarrelRecHitsTask");
70 sprintf (histo,
"EB Occupancy" );
71 meEBUncalibRecHitsOccupancy_ = dbe_->book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
73 sprintf (histo,
"EB Amplitude" );
74 meEBUncalibRecHitsAmplitude_ = dbe_->book1D(histo, histo, 201, -20., 4000.);
76 sprintf (histo,
"EB Pedestal" );
77 meEBUncalibRecHitsPedestal_ = dbe_->book1D(histo, histo, 50, 190., 210.);
79 sprintf (histo,
"EB Jitter" );
80 meEBUncalibRecHitsJitter_ = dbe_->book1D(histo, histo, 100, 0., 100.);
82 sprintf (histo,
"EB Chi2" );
83 meEBUncalibRecHitsChi2_ = dbe_->book1D(histo, histo, 100, 18000., 22000.);
85 sprintf (histo,
"EB RecHit Max Sample Ratio");
86 meEBUncalibRecHitMaxSampleRatio_ = dbe_->book1D(histo, histo, 120, 0.90, 1.05);
88 sprintf (histo,
"EB Occupancy gt 100 adc counts" );
89 meEBUncalibRecHitsOccupancyGt100adc_ = dbe_->book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
91 sprintf (histo,
"EB Amplitude gt 100 adc counts" );
92 meEBUncalibRecHitsAmplitudeGt100adc_ = dbe_->book1D(histo, histo, 200, 0., 4000.);
94 sprintf (histo,
"EB Pedestal gt 100 adc counts" );
95 meEBUncalibRecHitsPedestalGt100adc_ = dbe_->book1D(histo, histo, 50, 190., 210.);
97 sprintf (histo,
"EB Jitter gt 100 adc counts" );
98 meEBUncalibRecHitsJitterGt100adc_ = dbe_->book1D(histo, histo, 100, 0., 100.);
100 sprintf (histo,
"EB Chi2 gt 100 adc counts" );
101 meEBUncalibRecHitsChi2Gt100adc_ = dbe_->book1D(histo, histo, 100, 18000., 22000.);
103 sprintf (histo,
"EB RecHit Max Sample Ratio gt 100 adc counts");
104 meEBUncalibRecHitMaxSampleRatioGt100adc_ = dbe_->book1D(histo, histo, 120, 0.90, 1.05);
106 sprintf (histo,
"EB Amplitude Full Map");
107 meEBUncalibRecHitsAmpFullMap_ = dbe_->bookProfile2D(histo, histo, 170, -85., 85., 360, 0., 360., 200, 0., 4000.);
109 sprintf (histo,
"EB Pedestal Full Map");
110 meEBUncalibRecHitsPedFullMap_ = dbe_->bookProfile2D(histo, histo, 170, -85., 85., 360, 0., 360., 50, 194., 201.);
112 for (
int i=0;
i<36 ;
i++)
114 sprintf(histo,
"EB Amp SM%02d",
i+1);
115 meEBUncalibRecHitAmplMap_[
i] = dbe_->bookProfile2D(histo, histo, 85, 0., 85., 20, 0., 20., 200, 0., 4000.);
117 sprintf(histo,
"EB Ped SM%02d",
i+1);
118 meEBUncalibRecHitPedMap_[
i] = dbe_->bookProfile2D(histo, histo, 85, 0., 85., 20, 0., 20., 50, 194., 201.);
140 e.
getByToken( EBuncalibrechitCollection_token_, EcalUncalibRecHitEB);
141 if (EcalUncalibRecHitEB.
isValid()) {
142 EBUncalibRecHit = EcalUncalibRecHitEB.
product();
147 bool skipDigis =
false;
150 e.
getByToken( EBdigiCollection_token_, EcalDigiEB);
167 if (meEBUncalibRecHitsOccupancy_) meEBUncalibRecHitsOccupancy_ ->
Fill(EBid.
ieta(), EBid.
iphi());
168 if (meEBUncalibRecHitsAmplitude_) meEBUncalibRecHitsAmplitude_ ->
Fill(uncalibRecHit->amplitude());
169 if (meEBUncalibRecHitsPedestal_) meEBUncalibRecHitsPedestal_ ->
Fill(uncalibRecHit->pedestal());
170 if (meEBUncalibRecHitsJitter_) meEBUncalibRecHitsJitter_ ->
Fill(uncalibRecHit->jitter());
171 if (meEBUncalibRecHitsChi2_) meEBUncalibRecHitsChi2_ ->
Fill(uncalibRecHit->chi2());
172 if (meEBUncalibRecHitsAmpFullMap_) meEBUncalibRecHitsAmpFullMap_ ->
Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->amplitude());
173 if (meEBUncalibRecHitsPedFullMap_) meEBUncalibRecHitsPedFullMap_ ->
Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->pedestal());
176 if ( uncalibRecHit->amplitude() > 100 )
178 if (meEBUncalibRecHitsOccupancyGt100adc_) meEBUncalibRecHitsOccupancyGt100adc_ ->
Fill(EBid.
ieta(), EBid.
iphi());
179 if (meEBUncalibRecHitsAmplitudeGt100adc_) meEBUncalibRecHitsAmplitudeGt100adc_ ->
Fill(uncalibRecHit->amplitude());
180 if (meEBUncalibRecHitsPedestalGt100adc_) meEBUncalibRecHitsPedestalGt100adc_ ->
Fill(uncalibRecHit->pedestal());
181 if (meEBUncalibRecHitsJitterGt100adc_) meEBUncalibRecHitsJitterGt100adc_ ->
Fill(uncalibRecHit->jitter());
182 if (meEBUncalibRecHitsChi2Gt100adc_) meEBUncalibRecHitsChi2Gt100adc_ ->
Fill(uncalibRecHit->chi2());
187 int ie = (ic-1)/20 + 1;
188 int ip = (ic-1)%20 + 1;
190 float xie = ie - 0.5;
191 float xip = ip - 0.5;
192 if( meEBUncalibRecHitPedMap_[ism-1] ) meEBUncalibRecHitPedMap_[ism-1]->Fill(xie, xip, uncalibRecHit->pedestal());
193 if( meEBUncalibRecHitAmplMap_[ism-1] ) meEBUncalibRecHitAmplMap_[ism-1]->Fill(xie, xip, uncalibRecHit->amplitude());
200 if (myDigi != EBDigi->
end()){
203 double analogSample = thisSample.
adc();
204 if ( eMax < analogSample ){
218 if (eMax > (*it).mean_x1 + 5 * (*it).rms_x1 && eMax != 0 ) {
220 if ( meEBUncalibRecHitMaxSampleRatio_ ) meEBUncalibRecHitMaxSampleRatio_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax);
221 if ( meEBUncalibRecHitMaxSampleRatioGt100adc_ && (uncalibRecHit->amplitude()>100) ) meEBUncalibRecHitMaxSampleRatioGt100adc_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax);
222 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.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const self & getMap() const
std::vector< EcalUncalibratedRecHit >::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
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int ieta() const
get the crystal ieta
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)