|
|
Go to the documentation of this file.
37 : EBUncalibratedRecHitCollection_(iConfig.getParameter<
edm::
InputTag>(
"EBUncalibratedRecHitCollection")),
38 EEUncalibratedRecHitCollection_(iConfig.getParameter<
edm::
InputTag>(
"EEUncalibratedRecHitCollection")),
40 histRangeMax_(iConfig.getUntrackedParameter<double>(
"histogramMaxRange", 200.0)),
41 histRangeMin_(iConfig.getUntrackedParameter<double>(
"histogramMinRange", -10.0)),
42 fileName_(iConfig.getUntrackedParameter<
std::
string>(
"fileName",
std::
string(
"ecalURechHitHists"))) {
43 vector<int> listDefaults;
44 listDefaults.push_back(-1);
49 vector<string> defaultMaskedEBs;
50 defaultMaskedEBs.push_back(
"none");
54 string title1 =
"Uncalib Rec Hits (ADC counts)";
55 string name1 =
"URecHitsAllFEDs";
58 title1 =
"Jitter for all FEDs";
59 name1 =
"JitterAllFEDs";
67 for (vector<string>::const_iterator ebItr =
maskedEBs_.begin(); ebItr !=
maskedEBs_.end(); ++ebItr) {
82 int ievt =
iEvent.id().event();
87 LogDebug(
"EcalURecHitHists") <<
"event " << ievt <<
" hits collection size " << EBhits->
size();
90 LogDebug(
"EcalURecHitHists") <<
"event " << ievt <<
" hits collection size " << EEhits->
size();
98 int FEDid = 600 + elecId.
dccId();
99 float ampli =
hit.amplitude();
101 vector<int>::iterator
result;
104 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for FED " << FEDid <<
" ; amplitude " << ampli;
110 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for channel: " << ic <<
" with amplitude " << ampli;
117 if (uRecHist ==
nullptr) {
123 uRecHist->Fill(ampli);
125 timingHist->Fill(
hit.jitter());
136 int FEDid = 600 + elecId.
dccId();
137 float ampli =
hit.amplitude();
139 vector<int>::iterator
result;
142 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for FED " << FEDid <<
" ; amplitude " << ampli;
148 LogWarning(
"EcalURecHitHists") <<
"skipping uncalRecHit for channel: " << ic <<
" with amplitude " << ampli;
155 if (uRecHist ==
nullptr) {
161 uRecHist->Fill(ampli);
163 timingHist->Fill(
hit.jitter());
177 string title1 =
"Uncalib Rec Hits (ADC counts) for ";
179 string name1 =
"URecHitsFED";
186 title1 =
"Jitter for ";
190 TH1F* timingHist =
new TH1F(name1.c_str(), title1.c_str(), 14, -7, 7);
207 TFile root_file_(
fileName_.c_str(),
"RECREATE");
211 TDirectory* FEDdir = gDirectory->mkdir(
dir.c_str());
214 TH1F*
hist = itr->second;
218 cerr <<
"EcalPedHists: Error: This shouldn't happen!" << endl;
225 cerr <<
"EcalPedHists: Error: This shouldn't happen!" << endl;
239 LogWarning(
"EcalMipGraphs") <<
"Masked channels are: " <<
channels <<
" and that is all!";
244 ostringstream myStream;
245 myStream <<
num << flush;
246 return (myStream.str());
int hashedIndex() const
get a compact index for arrays
T const * product() const
EcalURecHitHists(const edm::ParameterSet &)
std::vector< T >::const_iterator const_iterator
void analyze(edm::Event const &, edm::EventSetup const &) override
std::map< int, TH1F * > FEDsAndTimingHists_
int ic() const
get ECAL/crystal number inside SM
std::string intToString(int num)
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > maskedEBs_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::vector< int > maskedFEDs_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< int > maskedChannels_
Log< level::Warning, false > LogWarning
TH1F * allFedsTimingHist_
const_iterator begin() const
~EcalURecHitHists() override
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
const_iterator end() const
const EcalElectronicsMapping * ecalElectronicsMap_
std::string getSliceFromFed(int)
edm::InputTag EEUncalibratedRecHitCollection_
edm::InputTag EBUncalibratedRecHitCollection_
void beginRun(edm::Run const &, edm::EventSetup const &) override
int getFedFromSlice(std::string)
int hashedIndex(int ieta, int iphi)
std::map< int, TH1F * > FEDsAndHists_
Namespace of DDCMS conversion namespace.