33 EBUncalibratedRecHitCollection_ (iConfig.getParameter<
edm::InputTag>(
"EBUncalibratedRecHitCollection")),
34 EBDigis_ (iConfig.getParameter<
edm::InputTag>(
"EBDigiCollection")),
35 EEUncalibratedRecHitCollection_ (iConfig.getParameter<
edm::InputTag>(
"EEUncalibratedRecHitCollection")),
36 EEDigis_ (iConfig.getParameter<
edm::InputTag>(
"EEDigiCollection")),
37 ampCut_ (iConfig.getUntrackedParameter<
int>(
"AmplitudeCutADC", 13)),
38 rootFilename_ (iConfig.getUntrackedParameter<
std::
string>(
"rootFilename",
"pulseShapeGrapher"))
42 std::vector<int> listDefaults;
43 listDefaults.push_back(-1);
50 ampHistMap_[*itr] =
new TH1F(name.c_str(),title.c_str(),100,0,100);
53 title =
"Amplitude (over 13 ADC) of cry "+
intToString(*itr);
55 cutAmpHistMap_[*itr] =
new TH1F(name.c_str(),title.c_str(),100,0,100);
63 title =
"Raw Pulse shape of cry "+
intToString(*itr);
68 title =
"Amplitude of first sample, cry "+
intToString(*itr);
76 for (
int i=0;
i<10;
i++)
101 int numHitsWithActivity = 0;
130 int FEDid = 600+elecId.
dccId();
147 numHitsWithActivity++;
149 while(digiItr != EBdigis->
end() && digiItr->id() != hitItr->id())
153 if(digiItr == EBdigis->
end())
156 double sampleADC[10];
164 pedestal = (double)(sampleADC[0]+sampleADC[1])/(double)2;
167 for (
int i=0; (
unsigned int)i< digiItr->
size(); ++
i ) {
178 for(
int i=0;
i<10;++
i)
199 int FEDid = 600+elecId.
dccId();
216 numHitsWithActivity++;
218 while(digiItr != EEdigis->
end() && digiItr->id() != hitItr->id())
222 if(digiItr == EEdigis->
end())
225 double sampleADC[10];
233 pedestal = (double)(sampleADC[0]+sampleADC[1])/(double)2;
236 for (
int i=0; (
unsigned int)i< digiItr->
size(); ++
i ) {
247 for(
int i=0;
i<10;++
i)
267 TH1::AddDirectory(
false);
292 ostringstream myStream;
293 myStream << num << flush;
294 return(myStream.str());
T getUntrackedParameter(std::string const &, T const &) const
int hashedIndex() const
get a compact index for arrays
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
edm::InputTag EBUncalibratedRecHitCollection_
~EcalPulseShapeGrapher() override
std::vector< EcalUncalibratedRecHit >::const_iterator const_iterator
EcalMGPASample sample(int i) const
edm::InputTag EEUncalibratedRecHitCollection_
const_iterator begin() const
int gainId() const
get the gainId (2 bits)
EcalPulseShapeGrapher(const edm::ParameterSet &)
std::string getSliceFromFed(int)
std::string rootFilename_
std::vector< int > listChannels_
std::map< int, TH1F * > ampHistMap_
std::string intToString(int)
std::map< int, TH2F * > rawPulseShapeHistMap_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
const_iterator end() const
std::map< int, TH1F * > firstSampleHistMap_
std::map< int, TH1F * > cutAmpHistMap_
std::map< int, TH2F * > pulseShapeHistMap_
void analyze(const edm::Event &, const edm::EventSetup &) override
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)