20 EEuncalibrechitCollection_token_ = consumes< EEUncalibratedRecHitCollection > (ps.
getParameter<
edm::InputTag>(
"EEuncalibrechitCollection") );
38 if ( verbose_ ) dbe_->showDirStructure();
43 meEEUncalibRecHitsOccupancyPlus_ = 0;
44 meEEUncalibRecHitsOccupancyMinus_ = 0;
45 meEEUncalibRecHitsAmplitude_ = 0;
46 meEEUncalibRecHitsPedestal_ = 0;
47 meEEUncalibRecHitsJitter_ = 0;
48 meEEUncalibRecHitsChi2_ = 0;
49 meEEUncalibRecHitMaxSampleRatio_ = 0;
50 meEEUncalibRecHitsOccupancyPlusGt60adc_ = 0;
51 meEEUncalibRecHitsOccupancyMinusGt60adc_ = 0;
52 meEEUncalibRecHitsAmplitudeGt60adc_ = 0;
53 meEEUncalibRecHitsPedestalGt60adc_ = 0;
54 meEEUncalibRecHitsJitterGt60adc_ = 0;
55 meEEUncalibRecHitsChi2Gt60adc_ = 0;
56 meEEUncalibRecHitMaxSampleRatioGt60adc_ = 0;
57 meEEUncalibRecHitsAmpFullMap_ = 0;
58 meEEUncalibRecHitsPedFullMap_ = 0;
65 dbe_->setCurrentFolder(
"EcalRecHitsV/EcalEndcapRecHitsTask");
67 sprintf (histo,
"EE+ Occupancy" );
68 meEEUncalibRecHitsOccupancyPlus_ = dbe_->book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
70 sprintf (histo,
"EE- Occupancy" );
71 meEEUncalibRecHitsOccupancyMinus_ = dbe_->book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
73 sprintf (histo,
"EE Amplitude" );
74 meEEUncalibRecHitsAmplitude_ = dbe_->book1D(histo, histo, 201, -20., 4000.);
76 sprintf (histo,
"EE Pedestal" );
77 meEEUncalibRecHitsPedestal_ = dbe_->book1D(histo, histo, 50, 190., 210.);
79 sprintf (histo,
"EE Jitter" );
80 meEEUncalibRecHitsJitter_ = dbe_->book1D(histo, histo, 100, 0., 100.);
82 sprintf (histo,
"EE Chi2" );
83 meEEUncalibRecHitsChi2_ = dbe_->book1D(histo, histo, 100, 18000., 22000.);
85 sprintf (histo,
"EE RecHit Max Sample Ratio");
86 meEEUncalibRecHitMaxSampleRatio_ = dbe_->book1D(histo, histo, 120, 0.90, 1.05);
88 sprintf (histo,
"EE+ Occupancy gt 60 adc counts" );
89 meEEUncalibRecHitsOccupancyPlusGt60adc_ = dbe_->book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
91 sprintf (histo,
"EE- Occupancy gt 60 adc counts" );
92 meEEUncalibRecHitsOccupancyMinusGt60adc_ = dbe_->book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
94 sprintf (histo,
"EE Amplitude gt 60 adc counts" );
95 meEEUncalibRecHitsAmplitudeGt60adc_ = dbe_->book1D(histo, histo, 200, 0., 4000.);
97 sprintf (histo,
"EE Pedestal gt 60 adc counts" );
98 meEEUncalibRecHitsPedestalGt60adc_ = dbe_->book1D(histo, histo, 50, 190., 210.);
100 sprintf (histo,
"EE Jitter gt 60 adc counts" );
101 meEEUncalibRecHitsJitterGt60adc_ = dbe_->book1D(histo, histo, 100, 0., 100.);
103 sprintf (histo,
"EE Chi2 gt 60 adc counts" );
104 meEEUncalibRecHitsChi2Gt60adc_ = dbe_->book1D(histo, histo, 100, 18000., 22000.);
106 sprintf (histo,
"EE RecHit Max Sample Ratio gt 60 adc counts");
107 meEEUncalibRecHitMaxSampleRatioGt60adc_ = dbe_->book1D(histo, histo, 120, 0.90, 1.05);
109 sprintf (histo,
"EE Amplitude Full Map");
110 meEEUncalibRecHitsAmpFullMap_ = dbe_->bookProfile2D(histo, histo, 100, 0., 100., 100, 0., 100., 200, 0., 4000.);
112 sprintf (histo,
"EE Pedestal Full Map");
113 meEEUncalibRecHitsPedFullMap_ = dbe_->bookProfile2D(histo, histo, 100, 0., 100., 100, 0., 100., 50, 194., 201.);
133 e.
getByToken( EEuncalibrechitCollection_token_, EcalUncalibRecHitEE);
134 if (EcalUncalibRecHitEE.
isValid()) {
135 EEUncalibRecHit = EcalUncalibRecHitEE.
product() ;
140 bool skipDigis =
false;
143 e.
getByToken( EEdigiCollection_token_, EcalDigiEE);
159 int mySide = EEid.
zside();
162 if (mySide > 0) {
if (meEEUncalibRecHitsOccupancyPlus_) meEEUncalibRecHitsOccupancyPlus_ ->Fill(EEid.
ix(), EEid.
iy()); }
163 if (mySide < 0) {
if (meEEUncalibRecHitsOccupancyMinus_) meEEUncalibRecHitsOccupancyMinus_ ->Fill(EEid.
ix(), EEid.
iy()); }
164 if (meEEUncalibRecHitsAmplitude_) meEEUncalibRecHitsAmplitude_ ->
Fill(uncalibRecHit->amplitude());
165 if (meEEUncalibRecHitsPedestal_) meEEUncalibRecHitsPedestal_ ->
Fill(uncalibRecHit->pedestal());
166 if (meEEUncalibRecHitsJitter_) meEEUncalibRecHitsJitter_ ->
Fill(uncalibRecHit->jitter());
167 if (meEEUncalibRecHitsChi2_) meEEUncalibRecHitsChi2_ ->
Fill(uncalibRecHit->chi2());
168 if (meEEUncalibRecHitsAmpFullMap_) meEEUncalibRecHitsAmpFullMap_ ->
Fill(EEid.
ix(), EEid.
iy(), uncalibRecHit->amplitude());
169 if (meEEUncalibRecHitsPedFullMap_) meEEUncalibRecHitsPedFullMap_ ->
Fill(EEid.
ix(), EEid.
iy(), uncalibRecHit->pedestal());
173 if ( uncalibRecHit->amplitude() > 60 )
175 if (mySide > 0) {
if (meEEUncalibRecHitsOccupancyPlusGt60adc_) meEEUncalibRecHitsOccupancyPlusGt60adc_ ->Fill(EEid.
ix(), EEid.
iy()); }
176 if (mySide < 0) {
if (meEEUncalibRecHitsOccupancyMinusGt60adc_) meEEUncalibRecHitsOccupancyMinusGt60adc_->Fill(EEid.
ix(), EEid.
iy()); }
177 if (meEEUncalibRecHitsAmplitudeGt60adc_) meEEUncalibRecHitsAmplitudeGt60adc_ ->
Fill(uncalibRecHit->amplitude());
178 if (meEEUncalibRecHitsPedestalGt60adc_) meEEUncalibRecHitsPedestalGt60adc_ ->
Fill(uncalibRecHit->pedestal());
179 if (meEEUncalibRecHitsJitterGt60adc_) meEEUncalibRecHitsJitterGt60adc_ ->
Fill(uncalibRecHit->jitter());
180 if (meEEUncalibRecHitsChi2Gt60adc_) meEEUncalibRecHitsChi2Gt60adc_ ->
Fill(uncalibRecHit->chi2());
188 if (myDigi != EEDigi->
end()){
191 double analogSample = thisSample.
adc();
192 if ( eMax < analogSample ){
206 if (eMax > (*it).mean_x1 + 5 * (*it).rms_x1 && eMax != 0 ){
208 if ( meEEUncalibRecHitMaxSampleRatio_ )
209 { meEEUncalibRecHitMaxSampleRatio_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax); }
211 if ( meEEUncalibRecHitMaxSampleRatioGt60adc_ && (uncalibRecHit->amplitude() > 60) )
212 { meEEUncalibRecHitMaxSampleRatioGt60adc_->Fill( (uncalibRecHit->amplitude()+uncalibRecHit->pedestal())/eMax); }
214 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
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)
Analyze.
const_iterator find(id_type i) const
~EcalEndcapRecHitsValidation()
Destructor.
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const_iterator end() const
T const * product() const
std::vector< Item >::const_iterator const_iterator
T const * product() const
const_iterator end() const
const_iterator find(uint32_t rawId) const
const_iterator end() const
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)