38 EBUncalibratedRecHitCollection_ (iConfig.getParameter<edm::
InputTag>(
"EBUncalibratedRecHitCollection")),
39 EEUncalibratedRecHitCollection_ (iConfig.getParameter<edm::
InputTag>(
"EEUncalibratedRecHitCollection")),
41 histRangeMax_ (iConfig.getUntrackedParameter<double>(
"histogramMaxRange",200.0)),
42 histRangeMin_ (iConfig.getUntrackedParameter<double>(
"histogramMinRange",-10.0)),
43 fileName_ (iConfig.getUntrackedParameter<std::string>(
"fileName", std::string(
"ecalURechHitHists")))
45 vector<int> listDefaults;
46 listDefaults.push_back(-1);
51 vector<string> defaultMaskedEBs;
52 defaultMaskedEBs.push_back(
"none");
56 string title1 =
"Uncalib Rec Hits (ADC counts)";
57 string name1 =
"URecHitsAllFEDs";
60 title1 =
"Jitter for all FEDs";
61 name1 =
"JitterAllFEDs";
65 if(maskedFEDs_[0]==-1)
71 for(vector<string>::const_iterator ebItr =
maskedEBs_.begin(); ebItr !=
maskedEBs_.end(); ++ebItr)
73 maskedFEDs_.push_back(fedMap_->getFedFromSlice(*ebItr));
98 LogDebug(
"EcalURecHitHists") <<
"event " << ievt <<
" hits collection size " << EBhits->size();
101 LogDebug(
"EcalURecHitHists") <<
"event " << ievt <<
" hits collection size " << EEhits->size();
113 vector<int>::iterator
result;
117 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for FED " << FEDid <<
" ; amplitude " << ampli;
124 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for channel: " << ic <<
" with amplitude " << ampli ;
138 uRecHist->Fill(ampli);
140 timingHist->Fill(hit.
jitter());
155 vector<int>::iterator
result;
159 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for FED " << FEDid <<
" ; amplitude " << ampli;
166 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for channel: " << ic <<
" with amplitude " << ampli ;
180 uRecHist->Fill(ampli);
182 timingHist->Fill(hit.
jitter());
199 string title1 =
"Uncalib Rec Hits (ADC counts) for ";
201 string name1 =
"URecHitsFED";
208 title1 =
"Jitter for ";
212 TH1F* timingHist =
new TH1F(name1.c_str(),title1.c_str(),14,-7,7);
233 TFile root_file_(
fileName_.c_str() ,
"RECREATE");
235 for(map<int,TH1F*>::const_iterator itr =
FEDsAndHists_.begin();
239 TDirectory* FEDdir = gDirectory->mkdir(dir.c_str());
242 TH1F*
hist = itr->second;
247 cerr <<
"EcalPedHists: Error: This shouldn't happen!" << endl;
255 cerr <<
"EcalPedHists: Error: This shouldn't happen!" << endl;
263 std::string channels;
271 LogWarning(
"EcalMipGraphs") <<
"Masked channels are: " << channels <<
" and that is all!";
278 ostringstream myStream;
279 myStream << num << flush;
280 return(myStream.str());
const EcalElectronicsMapping * ecalElectronicsMap_
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
TH1F * allFedsTimingHist_
int hashedIndex() const
get a compact index for arrays
virtual void analyze(edm::Event const &, edm::EventSetup const &)
edm::InputTag EBUncalibratedRecHitCollection_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::vector< T >::const_iterator const_iterator
edm::InputTag EEUncalibratedRecHitCollection_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::string getSliceFromFed(int)
int hashedIndex(int ieta, int iphi)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int ic() const
get ECAL/crystal number inside SM
std::map< int, TH1F * > FEDsAndHists_
EcalURecHitHists(const edm::ParameterSet &)
T const * product() const
std::vector< int > maskedChannels_
std::map< int, TH1F * > FEDsAndTimingHists_
std::vector< std::string > maskedEBs_
std::vector< int > maskedFEDs_
std::string intToString(int num)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)