20 EEuncalibrechitCollection_token_ = consumes< EEUncalibratedRecHitCollection > (ps.
getParameter<
edm::InputTag>(
"EEuncalibrechitCollection") );
27 meEEUncalibRecHitsOccupancyPlus_ =
nullptr;
28 meEEUncalibRecHitsOccupancyMinus_ =
nullptr;
29 meEEUncalibRecHitsAmplitude_ =
nullptr;
30 meEEUncalibRecHitsPedestal_ =
nullptr;
31 meEEUncalibRecHitsJitter_ =
nullptr;
32 meEEUncalibRecHitsChi2_ =
nullptr;
33 meEEUncalibRecHitMaxSampleRatio_ =
nullptr;
34 meEEUncalibRecHitsOccupancyPlusGt60adc_ =
nullptr;
35 meEEUncalibRecHitsOccupancyMinusGt60adc_ =
nullptr;
36 meEEUncalibRecHitsAmplitudeGt60adc_ =
nullptr;
37 meEEUncalibRecHitsPedestalGt60adc_ =
nullptr;
38 meEEUncalibRecHitsJitterGt60adc_ =
nullptr;
39 meEEUncalibRecHitsChi2Gt60adc_ =
nullptr;
40 meEEUncalibRecHitMaxSampleRatioGt60adc_ =
nullptr;
41 meEEUncalibRecHitsAmpFullMap_ =
nullptr;
42 meEEUncalibRecHitsPedFullMap_ =
nullptr;
56 sprintf (histo,
"EE+ Occupancy" );
57 meEEUncalibRecHitsOccupancyPlus_ = ibooker.
book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
59 sprintf (histo,
"EE- Occupancy" );
60 meEEUncalibRecHitsOccupancyMinus_ = ibooker.
book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
62 sprintf (histo,
"EE Amplitude" );
63 meEEUncalibRecHitsAmplitude_ = ibooker.
book1D(histo, histo, 201, -20., 4000.);
65 sprintf (histo,
"EE Pedestal" );
66 meEEUncalibRecHitsPedestal_ = ibooker.
book1D(histo, histo, 50, 190., 210.);
68 sprintf (histo,
"EE Jitter" );
69 meEEUncalibRecHitsJitter_ = ibooker.
book1D(histo, histo, 100, 0., 100.);
71 sprintf (histo,
"EE Chi2" );
72 meEEUncalibRecHitsChi2_ = ibooker.
book1D(histo, histo, 100, 18000., 22000.);
74 sprintf (histo,
"EE RecHit Max Sample Ratio");
75 meEEUncalibRecHitMaxSampleRatio_ = ibooker.
book1D(histo, histo, 120, 0.90, 1.05);
77 sprintf (histo,
"EE+ Occupancy gt 60 adc counts" );
78 meEEUncalibRecHitsOccupancyPlusGt60adc_ = ibooker.
book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
80 sprintf (histo,
"EE- Occupancy gt 60 adc counts" );
81 meEEUncalibRecHitsOccupancyMinusGt60adc_ = ibooker.
book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
83 sprintf (histo,
"EE Amplitude gt 60 adc counts" );
84 meEEUncalibRecHitsAmplitudeGt60adc_ = ibooker.
book1D(histo, histo, 200, 0., 4000.);
86 sprintf (histo,
"EE Pedestal gt 60 adc counts" );
87 meEEUncalibRecHitsPedestalGt60adc_ = ibooker.
book1D(histo, histo, 50, 190., 210.);
89 sprintf (histo,
"EE Jitter gt 60 adc counts" );
90 meEEUncalibRecHitsJitterGt60adc_ = ibooker.
book1D(histo, histo, 100, 0., 100.);
92 sprintf (histo,
"EE Chi2 gt 60 adc counts" );
93 meEEUncalibRecHitsChi2Gt60adc_ = ibooker.
book1D(histo, histo, 100, 18000., 22000.);
95 sprintf (histo,
"EE RecHit Max Sample Ratio gt 60 adc counts");
96 meEEUncalibRecHitMaxSampleRatioGt60adc_ = ibooker.
book1D(histo, histo, 120, 0.90, 1.05);
98 sprintf (histo,
"EE Amplitude Full Map");
99 meEEUncalibRecHitsAmpFullMap_ = ibooker.
bookProfile2D(histo, histo, 100, 0., 100., 100, 0., 100., 200, 0., 4000.);
101 sprintf (histo,
"EE Pedestal Full Map");
102 meEEUncalibRecHitsPedFullMap_ = ibooker.
bookProfile2D(histo, histo, 100, 0., 100., 100, 0., 100., 50, 194., 201.);
110 e.
getByToken( EEuncalibrechitCollection_token_, EcalUncalibRecHitEE);
111 if (EcalUncalibRecHitEE.
isValid()) {
112 EEUncalibRecHit = EcalUncalibRecHitEE.
product() ;
117 bool skipDigis =
false;
120 e.
getByToken( EEdigiCollection_token_, EcalDigiEE);
136 int mySide = EEid.
zside();
139 if (mySide > 0) {
if (meEEUncalibRecHitsOccupancyPlus_) meEEUncalibRecHitsOccupancyPlus_ ->Fill(EEid.
ix(), EEid.
iy()); }
140 if (mySide < 0) {
if (meEEUncalibRecHitsOccupancyMinus_) meEEUncalibRecHitsOccupancyMinus_ ->Fill(EEid.
ix(), EEid.
iy()); }
141 if (meEEUncalibRecHitsAmplitude_) meEEUncalibRecHitsAmplitude_ ->
Fill(uncalibRecHit->amplitude());
142 if (meEEUncalibRecHitsPedestal_) meEEUncalibRecHitsPedestal_ ->
Fill(uncalibRecHit->pedestal());
143 if (meEEUncalibRecHitsJitter_) meEEUncalibRecHitsJitter_ ->
Fill(uncalibRecHit->jitter());
144 if (meEEUncalibRecHitsChi2_) meEEUncalibRecHitsChi2_ ->
Fill(uncalibRecHit->chi2());
145 if (meEEUncalibRecHitsAmpFullMap_) meEEUncalibRecHitsAmpFullMap_ ->
Fill(EEid.
ix(), EEid.
iy(), uncalibRecHit->amplitude());
146 if (meEEUncalibRecHitsPedFullMap_) meEEUncalibRecHitsPedFullMap_ ->
Fill(EEid.
ix(), EEid.
iy(), uncalibRecHit->pedestal());
150 if ( uncalibRecHit->amplitude() > 60 )
152 if (mySide > 0) {
if (meEEUncalibRecHitsOccupancyPlusGt60adc_) meEEUncalibRecHitsOccupancyPlusGt60adc_ ->Fill(EEid.
ix(), EEid.
iy()); }
153 if (mySide < 0) {
if (meEEUncalibRecHitsOccupancyMinusGt60adc_) meEEUncalibRecHitsOccupancyMinusGt60adc_->Fill(EEid.
ix(), EEid.
iy()); }
154 if (meEEUncalibRecHitsAmplitudeGt60adc_) meEEUncalibRecHitsAmplitudeGt60adc_ ->
Fill(uncalibRecHit->amplitude());
155 if (meEEUncalibRecHitsPedestalGt60adc_) meEEUncalibRecHitsPedestalGt60adc_ ->
Fill(uncalibRecHit->pedestal());
156 if (meEEUncalibRecHitsJitterGt60adc_) meEEUncalibRecHitsJitterGt60adc_ ->
Fill(uncalibRecHit->jitter());
157 if (meEEUncalibRecHitsChi2Gt60adc_) meEEUncalibRecHitsChi2Gt60adc_ ->
Fill(uncalibRecHit->chi2());
165 if (myDigi != EEDigi->
end()){
168 double analogSample = thisSample.
adc();
169 if ( eMax < analogSample ){
183 if (eMax > (*it).mean_x1 + 5 * (*it).rms_x1 && eMax != 0 ){
185 if ( meEEUncalibRecHitMaxSampleRatio_ )
186 { meEEUncalibRecHitMaxSampleRatio_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax); }
188 if ( meEEUncalibRecHitMaxSampleRatioGt60adc_ && (uncalibRecHit->amplitude() > 60) )
189 { meEEUncalibRecHitMaxSampleRatioGt60adc_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax); }
191 LogDebug(
"EcalRecHitsTaskInfo") <<
"endcap, eMax = " << eMax <<
" Amplitude = " << uncalibRecHit->amplitude()+uncalibRecHit->pedestal();
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
EcalEndcapRecHitsValidation(const edm::ParameterSet &ps)
Constructor.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const self & getMap() const
std::vector< EcalUncalibratedRecHit >::const_iterator const_iterator
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
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)
Namespace of DDCMS conversion namespace.
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
~EcalEndcapRecHitsValidation() override
Destructor.
T const * product() const
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)