37 : ebUncalibratedRecHitCollection_(iConfig.getParameter<edm::
InputTag>(
"EBUncalibratedRecHitCollection")),
38 eeUncalibratedRecHitCollection_(iConfig.getParameter<edm::
InputTag>(
"EEUncalibratedRecHitCollection")),
43 histRangeMax_(iConfig.getUntrackedParameter<double>(
"histogramMaxRange", 200.0)),
44 histRangeMin_(iConfig.getUntrackedParameter<double>(
"histogramMinRange", -10.0)),
45 fileName_(iConfig.getUntrackedParameter<std::
string>(
"fileName", std::
string(
"ecalURechHitHists"))) {
46 vector<int> listDefaults;
47 listDefaults.push_back(-1);
52 vector<string> defaultMaskedEBs;
53 defaultMaskedEBs.push_back(
"none");
57 string title1 =
"Uncalib Rec Hits (ADC counts)";
58 string name1 =
"URecHitsAllFEDs";
61 title1 =
"Jitter for all FEDs";
62 name1 =
"JitterAllFEDs";
66 if (maskedFEDs_[0] == -1) {
70 for (vector<string>::const_iterator ebItr =
maskedEBs_.begin(); ebItr !=
maskedEBs_.end(); ++ebItr) {
71 maskedFEDs_.push_back(fedMap_->getFedFromSlice(*ebItr));
90 LogDebug(
"EcalURecHitHists") <<
"event " << ievt <<
" hits collection size " << EBhits->size();
93 LogDebug(
"EcalURecHitHists") <<
"event " << ievt <<
" hits collection size " << EEhits->size();
101 int FEDid = 600 + elecId.
dccId();
104 vector<int>::iterator
result;
107 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for FED " << FEDid <<
" ; amplitude " << ampli;
113 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for channel: " << ic <<
" with amplitude " << ampli;
120 if (uRecHist ==
nullptr) {
126 uRecHist->Fill(ampli);
128 timingHist->Fill(hit.
jitter());
139 int FEDid = 600 + elecId.
dccId();
142 vector<int>::iterator
result;
145 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for FED " << FEDid <<
" ; amplitude " << ampli;
151 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for channel: " << ic <<
" with amplitude " << ampli;
158 if (uRecHist ==
nullptr) {
164 uRecHist->Fill(ampli);
166 timingHist->Fill(hit.
jitter());
180 string title1 =
"Uncalib Rec Hits (ADC counts) for ";
182 string name1 =
"URecHitsFED";
189 title1 =
"Jitter for ";
193 TH1F* timingHist =
new TH1F(name1.c_str(), title1.c_str(), 14, -7, 7);
210 TFile root_file_(
fileName_.c_str(),
"RECREATE");
214 TDirectory* FEDdir = gDirectory->mkdir(dir.c_str());
217 TH1F*
hist = itr->second;
221 cerr <<
"EcalPedHists: Error: This shouldn't happen!" << endl;
228 cerr <<
"EcalPedHists: Error: This shouldn't happen!" << endl;
242 LogWarning(
"EcalMipGraphs") <<
"Masked channels are: " << channels <<
" and that is all!";
247 ostringstream myStream;
248 myStream << num << flush;
249 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
const edm::EventSetup & c
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< EcalUncalibratedRecHitCollection > eeUncalibRecHitsToken_
void beginRun(edm::Run const &, edm::EventSetup const &) override
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
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const double histRangeMax_
const edm::EDGetTokenT< EcalUncalibratedRecHitCollection > ebUncalibRecHitsToken_
std::string getSliceFromFed(int)
bool getData(T &iHolder) const
int hashedIndex(int ieta, int iphi)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
void endRun(edm::Run const &, edm::EventSetup const &) override
void analyze(edm::Event const &, edm::EventSetup const &) override
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalMappingToken_
std::map< int, TH1F * > FEDsAndHists_
std::map< int, TH1F * > FEDsAndTimingHists_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
int ic() const
get ECAL/crystal number inside SM
EcalURecHitHists(const edm::ParameterSet &)
std::vector< int > maskedChannels_
std::vector< std::string > maskedEBs_
std::vector< int > maskedFEDs_
~EcalURecHitHists() override
std::string intToString(int num)
Log< level::Warning, false > LogWarning
const double histRangeMin_