44 EBRecHitCollection_ (iConfig.getParameter<edm::
InputTag>(
"EcalRecHitCollectionEB")),
45 EERecHitCollection_ (iConfig.getParameter<edm::
InputTag>(
"EcalRecHitCollectionEE")),
46 EBDigis_ (iConfig.getParameter<edm::
InputTag>(
"EBDigiCollection")),
47 EEDigis_ (iConfig.getParameter<edm::
InputTag>(
"EEDigiCollection")),
48 headerProducer_ (iConfig.getParameter<edm::
InputTag> (
"headerProducer")),
50 side_ (iConfig.getUntrackedParameter<int>(
"side", 3)),
51 threshold_ (iConfig.getUntrackedParameter<double>(
"amplitudeThreshold", 12.0)),
52 minTimingAmp_ (iConfig.getUntrackedParameter<double>(
"minimumTimingAmplitude", 0.100))
54 vector<int> listDefaults;
55 listDefaults.push_back(-1);
61 vector<string> defaultMaskedEBs;
62 defaultMaskedEBs.push_back(
"none");
67 string title1 =
"Jitter for all FEDs";
68 string name1 =
"JitterAllFEDs";
72 if(maskedFEDs_[0]==-1)
78 for(vector<string>::const_iterator ebItr =
maskedEBs_.begin(); ebItr !=
maskedEBs_.end(); ++ebItr)
80 maskedFEDs_.push_back(fedMap_->getFedFromSlice(*ebItr));
85 for (
int i=0;
i<10;
i++)
113 headerItr != DCCHeaders->end ();
119 int ievt = iEvent.
id().
event();
126 names =
new std::vector<string>();
155 for (
int i=0;
i<10;
i++)
158 emptyGraph->SetTitle(
"NOT ECAL");
164 emptyGraph->SetTitle(
"NO DIGIS");
167 int FEDid = 600+elecId.
dccId();
168 bool isBarrel =
true;
169 if(FEDid < 610 || FEDid > 645)
172 int ic = isBarrel ? ((
EBDetId)thisDet).ic() : cryIndex;
210 if (gainId ==1) gainHuman =12;
211 else if (gainId ==2) gainHuman =6;
212 else if (gainId ==3) gainHuman =1;
215 double pedestal = 200;
217 emptyGraph->SetTitle(
"FIRST TWO SAMPLES NOT GAIN12");
226 for (
int i=0;
i < df.
size(); ++
i ) {
236 string gainString = (gainId==1) ?
"Free" :
intToString(gainHuman);
238 "_ic" +
intToString(ic) +
"_" + sliceName +
"_gain" + gainString;
241 map<int,float>::const_iterator itr;
246 energy = (float) itr->second;
253 oneGraph->SetTitle(title.c_str());
254 oneGraph->SetName(name.c_str());
255 oneGraph->GetXaxis()->SetTitle(
"sample");
256 oneGraph->GetYaxis()->SetTitle(
"ADC");
268 int FEDid = 600+elecId.
dccId();
269 bool isBarrel =
true;
270 if(FEDid < 610 || FEDid > 645)
272 int cryIndex = isBarrel ? ((
EBDetId)det).hashedIndex() : ((
EEDetId)det).hashedIndex();
275 float ampli = hit.
energy();
277 vector<int>::iterator
result;
290 bool cryIsInList =
false;
303 string title =
"Digis";
306 pair<map<string,int>::iterator,
bool> pair =
seedFrequencyMap_.insert(make_pair(seed,freq));
309 ++(pair.first->second);
312 TCanvas
can(name.c_str(),title.c_str(),200,50,900,900);
317 CaloNavigator<DetId> cursor = CaloNavigator<DetId>(det,caloTopo->getSubdetectorTopology(det));
324 cursor.offsetBy(
i,
j);
332 names->push_back(name);
343 timingHist->Fill(hit.
time());
351 int FEDid = 600+elecId.
dccId();
360 string title1 =
"Jitter for ";
362 string name1 =
"JitterFED";
364 TH1F* timingHist =
fileService->
make<TH1F>(name1.c_str(),title1.c_str(),150,-7,7);
383 string frequencies =
"";
389 frequencies+=itr->first;
390 frequencies+=
" Frequency: ";
395 LogWarning(
"EcalMipGraphs") <<
"Found seeds with frequency > 1: " <<
"\n\n" << frequencies;
406 for(std::vector<int>::const_iterator itr =
maskedFEDs_.begin();
413 LogWarning(
"EcalMipGraphs") <<
"Masked channels are: " << channels;
414 LogWarning(
"EcalMipGraphs") <<
"Masked FEDs are: " << feds <<
" and that is all!";
421 ostringstream myStream;
422 myStream << num << flush;
423 return(myStream.str());
429 ostringstream myStream;
430 myStream << num << flush;
431 return(myStream.str());
EventNumber_t event() const
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)
virtual void analyze(edm::Event const &, edm::EventSetup const &)
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< T >::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
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
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)
std::vector< int > seedCrys_
std::vector< int > maskedChannels_
DetId id() const
get the id
edm::Handle< EEDigiCollection > EEdigisHandle
std::vector< std::string > * names
T const * product() const
T * make() const
make new ROOT object
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
Detector det() const
get the detector field from this detid
static float gainRatio[3]
TH1F * allFedsTimingHist_
std::map< std::string, int > seedFrequencyMap_
edm::Handle< EBDigiCollection > EBdigisHandle
int adc() const
get the ADC sample (12 bits)