43 EBRecHitCollection_ (iConfig.getParameter<
edm::
InputTag>(
"EcalRecHitCollectionEB")),
44 EERecHitCollection_ (iConfig.getParameter<
edm::
InputTag>(
"EcalRecHitCollectionEE")),
45 EBDigis_ (iConfig.getParameter<
edm::
InputTag>(
"EBDigiCollection")),
46 EEDigis_ (iConfig.getParameter<
edm::
InputTag>(
"EEDigiCollection")),
47 headerProducer_ (iConfig.getParameter<
edm::
InputTag> (
"headerProducer")),
49 side_ (iConfig.getUntrackedParameter<
int>(
"side", 3)),
50 threshold_ (iConfig.getUntrackedParameter<double>(
"amplitudeThreshold", 12.0)),
51 minTimingAmp_ (iConfig.getUntrackedParameter<double>(
"minimumTimingAmplitude", 0.100))
53 vector<int> listDefaults;
54 listDefaults.push_back(-1);
60 vector<string> defaultMaskedEBs;
61 defaultMaskedEBs.push_back(
"none");
66 string title1 =
"Jitter for all FEDs";
67 string name1 =
"JitterAllFEDs";
71 if(maskedFEDs_[0]==-1)
77 for(vector<string>::const_iterator ebItr =
maskedEBs_.begin(); ebItr !=
maskedEBs_.end(); ++ebItr)
79 maskedFEDs_.push_back(fedMap_->getFedFromSlice(*ebItr));
84 for (
int i=0;
i<10;
i++)
112 headerItr != DCCHeaders->
end ();
118 int ievt = iEvent.
id().
event();
125 names =
new std::vector<string>();
154 for (
int i=0;
i<10;
i++)
157 emptyGraph->SetTitle(
"NOT ECAL");
163 emptyGraph->SetTitle(
"NO DIGIS");
166 int FEDid = 600+elecId.
dccId();
168 if(FEDid < 610 || FEDid > 645)
171 int ic = isBarrel ? ((
EBDetId)thisDet).ic() : cryIndex;
209 if (gainId ==1) gainHuman =12;
210 else if (gainId ==2) gainHuman =6;
211 else if (gainId ==3) gainHuman =1;
216 emptyGraph->SetTitle(
"FIRST TWO SAMPLES NOT GAIN12");
225 for (
int i=0;
i < df.
size(); ++
i ) {
235 string gainString = (gainId==1) ?
"Free" :
intToString(gainHuman);
237 "_ic" +
intToString(ic) +
"_" + sliceName +
"_gain" + gainString;
240 map<int,float>::const_iterator itr;
245 energy = (
float) itr->second;
252 oneGraph->SetTitle(title.c_str());
253 oneGraph->SetName(name.c_str());
254 oneGraph->GetXaxis()->SetTitle(
"sample");
255 oneGraph->GetYaxis()->SetTitle(
"ADC");
267 int FEDid = 600+elecId.
dccId();
269 if(FEDid < 610 || FEDid > 645)
271 int cryIndex = isBarrel ? ((
EBDetId)det).hashedIndex() : ((
EEDetId)det).hashedIndex();
274 float ampli = hit.
energy();
276 vector<int>::iterator
result;
289 bool cryIsInList =
false;
302 string title =
"Digis";
305 pair<map<string,int>::iterator,
bool> pair =
seedFrequencyMap_.insert(make_pair(seed,freq));
308 ++(pair.first->second);
311 TCanvas can(name.c_str(),title.c_str(),200,50,900,900);
331 names->push_back(name);
335 if(timingHist==
nullptr)
342 timingHist->Fill(hit.
time());
350 int FEDid = 600+elecId.
dccId();
359 string title1 =
"Jitter for ";
361 string name1 =
"JitterFED";
363 TH1F* timingHist =
fileService->
make<TH1F>(name1.c_str(),title1.c_str(),150,-7,7);
382 string frequencies =
"";
388 frequencies+=itr->first;
389 frequencies+=
" Frequency: ";
394 LogWarning(
"EcalMipGraphs") <<
"Found seeds with frequency > 1: " <<
"\n\n" << frequencies;
405 for(std::vector<int>::const_iterator itr =
maskedFEDs_.begin();
412 LogWarning(
"EcalMipGraphs") <<
"Masked channels are: " << channels;
413 LogWarning(
"EcalMipGraphs") <<
"Masked FEDs are: " << feds <<
" and that is all!";
420 ostringstream myStream;
421 myStream << num << flush;
422 return(myStream.str());
428 ostringstream myStream;
429 myStream << num << flush;
430 return(myStream.str());
EventNumber_t event() const
void analyze(edm::Event const &, edm::EventSetup const &) override
T getUntrackedParameter(std::string const &, T const &) const
std::string floatToString(float num)
std::vector< int > maskedFEDs_
int xtalId() const
get the channel id
int getEEIndex(EcalElectronicsId elecId)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
edm::InputTag headerProducer_
int gainId(sample_type sample)
get the gainId (2 bits)
int stripId() const
get the tower id
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::map< int, EcalDCCHeaderBlock > FEDsAndDCCHeaders_
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
std::string intToString(int num)
edm::InputTag EERecHitCollection_
std::vector< std::string > maskedEBs_
EcalMGPASample sample(int i) const
int towerId() const
get the tower id
T * make(const Args &...args) const
make new ROOT object
const_iterator begin() const
const EcalElectronicsMapping * ecalElectronicsMap_
static edm::Service< TFileService > fileService
std::map< int, float > crysAndAmplitudesMap_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int gainId() const
get the gainId (2 bits)
std::set< EEDetId > listEEChannels
std::string getSliceFromFed(int)
EcalMipGraphs(const edm::ParameterSet &)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
std::set< EBDetId > listEBChannels
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
void selectHits(edm::Handle< EcalRecHitCollection > hits, int ievt, edm::ESHandle< CaloTopology > caloTopo)
edm::InputTag EBRecHitCollection_
std::map< int, TH1F * > FEDsAndTimingHists_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TGraph * selectDigi(DetId det, int ievt)
const_iterator end() const
void home() const
move the navigator back to the starting point
std::vector< int > seedCrys_
std::vector< int > maskedChannels_
DetId id() const
get the id
edm::Handle< EEDigiCollection > EEdigisHandle
std::vector< std::string > * names
void beginRun(edm::Run const &, edm::EventSetup const &) override
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
const_iterator end() const
~EcalMipGraphs() override
static float gainRatio[3]
T const * product() const
TH1F * allFedsTimingHist_
std::map< std::string, int > seedFrequencyMap_
edm::Handle< EBDigiCollection > EBdigisHandle
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)
constexpr Detector det() const
get the detector field from this detid