20 EBuncalibrechitCollection_token_ = consumes< EBUncalibratedRecHitCollection > (ps.
getParameter<
edm::InputTag>(
"EBuncalibrechitCollection") );
27 meEBUncalibRecHitsOccupancy_ =
nullptr;
28 meEBUncalibRecHitsAmplitude_ =
nullptr;
29 meEBUncalibRecHitsPedestal_ =
nullptr;
30 meEBUncalibRecHitsJitter_ =
nullptr;
31 meEBUncalibRecHitsChi2_ =
nullptr;
32 meEBUncalibRecHitMaxSampleRatio_ =
nullptr;
33 meEBUncalibRecHitsOccupancyGt100adc_ =
nullptr;
34 meEBUncalibRecHitsAmplitudeGt100adc_ =
nullptr;
35 meEBUncalibRecHitsPedestalGt100adc_ =
nullptr;
36 meEBUncalibRecHitsJitterGt100adc_ =
nullptr;
37 meEBUncalibRecHitsChi2Gt100adc_ =
nullptr;
38 meEBUncalibRecHitMaxSampleRatioGt100adc_ =
nullptr;
39 meEBUncalibRecHitsAmpFullMap_ =
nullptr;
40 meEBUncalibRecHitsPedFullMap_ =
nullptr;
41 for (
int i=0;
i<36 ;
i++)
43 meEBUncalibRecHitAmplMap_[
i] =
nullptr;
44 meEBUncalibRecHitPedMap_[
i] =
nullptr;
57 sprintf (histo,
"EB Occupancy" );
58 meEBUncalibRecHitsOccupancy_ = ibooker.
book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
60 sprintf (histo,
"EB Amplitude" );
61 meEBUncalibRecHitsAmplitude_ = ibooker.
book1D(histo, histo, 201, -20., 4000.);
63 sprintf (histo,
"EB Pedestal" );
64 meEBUncalibRecHitsPedestal_ = ibooker.
book1D(histo, histo, 50, 190., 210.);
66 sprintf (histo,
"EB Jitter" );
67 meEBUncalibRecHitsJitter_ = ibooker.
book1D(histo, histo, 100, 0., 100.);
69 sprintf (histo,
"EB Chi2" );
70 meEBUncalibRecHitsChi2_ = ibooker.
book1D(histo, histo, 100, 18000., 22000.);
72 sprintf (histo,
"EB RecHit Max Sample Ratio");
73 meEBUncalibRecHitMaxSampleRatio_ = ibooker.
book1D(histo, histo, 120, 0.90, 1.05);
75 sprintf (histo,
"EB Occupancy gt 100 adc counts" );
76 meEBUncalibRecHitsOccupancyGt100adc_ = ibooker.
book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
78 sprintf (histo,
"EB Amplitude gt 100 adc counts" );
79 meEBUncalibRecHitsAmplitudeGt100adc_ = ibooker.
book1D(histo, histo, 200, 0., 4000.);
81 sprintf (histo,
"EB Pedestal gt 100 adc counts" );
82 meEBUncalibRecHitsPedestalGt100adc_ = ibooker.
book1D(histo, histo, 50, 190., 210.);
84 sprintf (histo,
"EB Jitter gt 100 adc counts" );
85 meEBUncalibRecHitsJitterGt100adc_ = ibooker.
book1D(histo, histo, 100, 0., 100.);
87 sprintf (histo,
"EB Chi2 gt 100 adc counts" );
88 meEBUncalibRecHitsChi2Gt100adc_ = ibooker.
book1D(histo, histo, 100, 18000., 22000.);
90 sprintf (histo,
"EB RecHit Max Sample Ratio gt 100 adc counts");
91 meEBUncalibRecHitMaxSampleRatioGt100adc_ = ibooker.
book1D(histo, histo, 120, 0.90, 1.05);
93 sprintf (histo,
"EB Amplitude Full Map");
94 meEBUncalibRecHitsAmpFullMap_ = ibooker.
bookProfile2D(histo, histo, 170, -85., 85., 360, 0., 360., 200, 0., 4000.);
96 sprintf (histo,
"EB Pedestal Full Map");
97 meEBUncalibRecHitsPedFullMap_ = ibooker.
bookProfile2D(histo, histo, 170, -85., 85., 360, 0., 360., 50, 194., 201.);
99 for (
int i=0;
i<36 ;
i++)
101 sprintf(histo,
"EB Amp SM%02d",
i+1);
102 meEBUncalibRecHitAmplMap_[
i] = ibooker.
bookProfile2D(histo, histo, 85, 0., 85., 20, 0., 20., 200, 0., 4000.);
104 sprintf(histo,
"EB Ped SM%02d",
i+1);
105 meEBUncalibRecHitPedMap_[
i] = ibooker.
bookProfile2D(histo, histo, 85, 0., 85., 20, 0., 20., 50, 194., 201.);
114 e.
getByToken( EBuncalibrechitCollection_token_, EcalUncalibRecHitEB);
115 if (EcalUncalibRecHitEB.
isValid()) {
116 EBUncalibRecHit = EcalUncalibRecHitEB.
product();
121 bool skipDigis =
false;
124 e.
getByToken( EBdigiCollection_token_, EcalDigiEB);
141 if (meEBUncalibRecHitsOccupancy_) meEBUncalibRecHitsOccupancy_ ->
Fill(EBid.
ieta(), EBid.
iphi());
142 if (meEBUncalibRecHitsAmplitude_) meEBUncalibRecHitsAmplitude_ ->
Fill(uncalibRecHit->amplitude());
143 if (meEBUncalibRecHitsPedestal_) meEBUncalibRecHitsPedestal_ ->
Fill(uncalibRecHit->pedestal());
144 if (meEBUncalibRecHitsJitter_) meEBUncalibRecHitsJitter_ ->
Fill(uncalibRecHit->jitter());
145 if (meEBUncalibRecHitsChi2_) meEBUncalibRecHitsChi2_ ->
Fill(uncalibRecHit->chi2());
146 if (meEBUncalibRecHitsAmpFullMap_) meEBUncalibRecHitsAmpFullMap_ ->
Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->amplitude());
147 if (meEBUncalibRecHitsPedFullMap_) meEBUncalibRecHitsPedFullMap_ ->
Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->pedestal());
150 if ( uncalibRecHit->amplitude() > 100 )
152 if (meEBUncalibRecHitsOccupancyGt100adc_) meEBUncalibRecHitsOccupancyGt100adc_ ->
Fill(EBid.
ieta(), EBid.
iphi());
153 if (meEBUncalibRecHitsAmplitudeGt100adc_) meEBUncalibRecHitsAmplitudeGt100adc_ ->
Fill(uncalibRecHit->amplitude());
154 if (meEBUncalibRecHitsPedestalGt100adc_) meEBUncalibRecHitsPedestalGt100adc_ ->
Fill(uncalibRecHit->pedestal());
155 if (meEBUncalibRecHitsJitterGt100adc_) meEBUncalibRecHitsJitterGt100adc_ ->
Fill(uncalibRecHit->jitter());
156 if (meEBUncalibRecHitsChi2Gt100adc_) meEBUncalibRecHitsChi2Gt100adc_ ->
Fill(uncalibRecHit->chi2());
161 int ie = (ic-1)/20 + 1;
162 int ip = (ic-1)%20 + 1;
164 float xie = ie - 0.5;
165 float xip = ip - 0.5;
166 if( meEBUncalibRecHitPedMap_[ism-1] ) meEBUncalibRecHitPedMap_[ism-1]->Fill(xie, xip, uncalibRecHit->pedestal());
167 if( meEBUncalibRecHitAmplMap_[ism-1] ) meEBUncalibRecHitAmplMap_[ism-1]->Fill(xie, xip, uncalibRecHit->amplitude());
174 if (myDigi != EBDigi->
end()){
177 double analogSample = thisSample.
adc();
178 if ( eMax < analogSample ){
192 if (eMax > (*it).mean_x1 + 5 * (*it).rms_x1 && eMax != 0 ) {
194 if ( meEBUncalibRecHitMaxSampleRatio_ ) meEBUncalibRecHitMaxSampleRatio_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax);
195 if ( meEBUncalibRecHitMaxSampleRatioGt100adc_ && (uncalibRecHit->amplitude()>100) ) meEBUncalibRecHitMaxSampleRatioGt100adc_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax);
196 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
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Analyze.
int ism() const
get the ECAL/SM id
int iphi() const
get the crystal iphi
const_iterator find(id_type i) const
MonitorElement * bookProfile2D(Args &&...args)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
int ieta() const
get the crystal ieta
int ic() const
get ECAL/crystal number inside SM
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const_iterator end() const
void setCurrentFolder(const std::string &fullpath)
T const * product() const
MonitorElement * book2D(Args &&...args)
std::vector< Item >::const_iterator const_iterator
const_iterator end() const
const_iterator find(uint32_t rawId) const
const_iterator end() const
int ism(int ieta, int iphi)
T const * product() const
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)
~EcalBarrelRecHitsValidation() override
Destructor.