41 : EBRecHitCollection_(iConfig.getParameter<
edm::
InputTag>(
"EcalRecHitCollectionEB")),
42 EERecHitCollection_(iConfig.getParameter<
edm::
InputTag>(
"EcalRecHitCollectionEE")),
43 EBDigis_(iConfig.getParameter<
edm::
InputTag>(
"EBDigiCollection")),
44 EEDigis_(iConfig.getParameter<
edm::
InputTag>(
"EEDigiCollection")),
45 headerProducer_(iConfig.getParameter<
edm::
InputTag>(
"headerProducer")),
54 side_(iConfig.getUntrackedParameter<
int>(
"side", 3)),
55 threshold_(iConfig.getUntrackedParameter<double>(
"amplitudeThreshold", 12.0)),
56 minTimingAmp_(iConfig.getUntrackedParameter<double>(
"minimumTimingAmplitude", 0.100)) {
57 vector<int> listDefaults;
58 listDefaults.push_back(-1);
64 vector<string> defaultMaskedEBs;
65 defaultMaskedEBs.push_back(
"none");
70 string title1 =
"Jitter for all FEDs";
71 string name1 =
"JitterAllFEDs";
79 for (vector<string>::const_iterator ebItr =
maskedEBs_.begin(); ebItr !=
maskedEBs_.end(); ++ebItr) {
85 for (
int i = 0;
i < 10;
i++)
109 int ievt =
iEvent.id().event();
115 names =
new std::vector<string>();
138 for (
int i = 0;
i < 10;
i++)
141 emptyGraph->SetTitle(
"NOT ECAL");
147 emptyGraph->SetTitle(
"NO DIGIS");
150 int FEDid = 600 + elecId.
dccId();
152 if (FEDid < 610 || FEDid > 645)
196 emptyGraph->SetTitle(
"FIRST TWO SAMPLES NOT GAIN12");
197 if (
df.sample(0).gainId() != 1 ||
df.sample(1).gainId() != 1)
205 for (
int i = 0;
i <
df.size(); ++
i) {
206 if (
df.sample(
i).gainId() != 0)
216 sliceName +
"_gain" + gainString;
219 map<int, float>::const_iterator itr;
230 oneGraph->SetTitle(
title.c_str());
231 oneGraph->SetName(
name.c_str());
232 oneGraph->GetXaxis()->SetTitle(
"sample");
233 oneGraph->GetYaxis()->SetTitle(
"ADC");
242 int FEDid = 600 + elecId.
dccId();
244 if (FEDid < 610 || FEDid > 645)
249 float ampli =
hit.energy();
251 vector<int>::iterator
result;
262 bool cryIsInList =
false;
273 string title =
"Digis";
278 ++(pair.first->second);
281 TCanvas
can(
name.c_str(),
title.c_str(), 200, 50, 900, 900);
303 if (timingHist ==
nullptr) {
308 timingHist->Fill(
hit.time());
315 int FEDid = 600 + elecId.
dccId();
323 string title1 =
"Jitter for ";
325 string name1 =
"JitterFED";
327 TH1F* timingHist =
fileService->
make<TH1F>(name1.c_str(), title1.c_str(), 150, -7, 7);
342 string frequencies =
"";
345 if (itr->second > 1) {
346 frequencies += itr->first;
347 frequencies +=
" Frequency: ";
352 LogWarning(
"EcalMipGraphs") <<
"Found seeds with frequency > 1: " 369 LogWarning(
"EcalMipGraphs") <<
"Masked FEDs are: " <<
feds <<
" and that is all!";
374 ostringstream myStream;
375 myStream <<
num << flush;
376 return (myStream.str());
381 ostringstream myStream;
382 myStream <<
num << flush;
383 return (myStream.str());
void analyze(edm::Event const &, edm::EventSetup const &) override
std::string floatToString(float num)
void home() const
move the navigator back to the starting point
std::vector< int > maskedFEDs_
int getEEIndex(EcalElectronicsId elecId)
const edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
void selectHits(edm::Handle< EcalRecHitCollection > hits, int ievt)
int getFedFromSlice(std::string)
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::vector< T >::const_iterator const_iterator
std::string intToString(int num)
std::vector< std::string > maskedEBs_
const EcalElectronicsMapping * ecalElectronicsMap_
static edm::Service< TFileService > fileService
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::map< std::string, int > seedFrequencyMap_
constexpr Detector det() const
get the detector field from this detid
void endRun(edm::Run const &, edm::EventSetup const &) override
std::set< EEDetId > listEEChannels
std::map< int, EcalDCCHeaderBlock > FEDsAndDCCHeaders_
std::string getSliceFromFed(int)
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
T getUntrackedParameter(std::string const &, T const &) const
EcalMipGraphs(const edm::ParameterSet &)
std::set< EBDetId > listEBChannels
std::map< int, float > crysAndAmplitudesMap_
int towerId() const
get the tower id
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalMappingToken_
bool getData(T &iHolder) const
const_iterator begin() const
TGraph * selectDigi(DetId det, int ievt)
const_iterator end() const
const_iterator end() const
const CaloTopology * caloTopo_
std::vector< int > seedCrys_
const edm::EDGetTokenT< EcalRecHitCollection > ebRecHitToken_
std::vector< int > maskedChannels_
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
edm::Handle< EEDigiCollection > EEdigisHandle
std::vector< std::string > * names
const_iterator begin() const
The iterator returned can not safely be used across threads.
const edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
void beginRun(edm::Run const &, edm::EventSetup const &) override
int stripId() const
get the tower id
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > topologyToken_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int xtalId() const
get the channel id
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
const edm::EDGetTokenT< EcalRecHitCollection > eeRecHitToken_
std::map< int, TH1F * > FEDsAndTimingHists_
T * make(const Args &...args) const
make new ROOT object
Log< level::Warning, false > LogWarning
~EcalMipGraphs() override
static float gainRatio[3]
const double minTimingAmp_
TH1F * allFedsTimingHist_
edm::Handle< EBDigiCollection > EBdigisHandle