34 EBUncalibratedRecHitCollection_ (iConfig.getParameter<edm::InputTag>(
"EBUncalibratedRecHitCollection")),
35 EBDigis_ (iConfig.getParameter<edm::InputTag>(
"EBDigiCollection")),
36 EEUncalibratedRecHitCollection_ (iConfig.getParameter<edm::InputTag>(
"EEUncalibratedRecHitCollection")),
37 EEDigis_ (iConfig.getParameter<edm::InputTag>(
"EEDigiCollection")),
38 ampCut_ (iConfig.getUntrackedParameter<int>(
"AmplitudeCutADC", 13)),
39 rootFilename_ (iConfig.getUntrackedParameter<std::
string>(
"rootFilename",
"pulseShapeGrapher"))
43 std::vector<int> listDefaults;
44 listDefaults.push_back(-1);
51 ampHistMap_[*itr] =
new TH1F(name.c_str(),title.c_str(),100,0,100);
54 title =
"Amplitude (over 13 ADC) of cry "+
intToString(*itr);
56 cutAmpHistMap_[*itr] =
new TH1F(name.c_str(),title.c_str(),100,0,100);
64 title =
"Raw Pulse shape of cry "+
intToString(*itr);
69 title =
"Amplitude of first sample, cry "+
intToString(*itr);
77 for (
int i=0;
i<10;
i++)
102 int numHitsWithActivity = 0;
131 int FEDid = 600+elecId.
dccId();
148 numHitsWithActivity++;
150 while(digiItr != EBdigis->end() && digiItr->id() != hitItr->id())
154 if(digiItr == EBdigis->end())
157 double sampleADC[10];
159 double pedestal = 200;
165 pedestal = (double)(sampleADC[0]+sampleADC[1])/(double)2;
168 for (
int i=0; (
unsigned int)i< digiItr->
size(); ++
i ) {
175 sampleADC[
i] = pedestal+(df.
sample(
i).
adc()-pedestal)*gain;
179 for(
int i=0;
i<10;++
i)
200 int FEDid = 600+elecId.
dccId();
217 numHitsWithActivity++;
219 while(digiItr != EEdigis->end() && digiItr->id() != hitItr->id())
223 if(digiItr == EEdigis->end())
226 double sampleADC[10];
228 double pedestal = 200;
234 pedestal = (double)(sampleADC[0]+sampleADC[1])/(double)2;
237 for (
int i=0; (
unsigned int)i< digiItr->
size(); ++
i ) {
244 sampleADC[
i] = pedestal+(df.
sample(
i).
adc()-pedestal)*gain;
248 for(
int i=0;
i<10;++
i)
268 TH1::AddDirectory(
false);
293 ostringstream myStream;
294 myStream << num << flush;
295 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_
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
edm::InputTag EEUncalibratedRecHitCollection_
int gainId() const
get the gainId (2 bits)
EcalPulseShapeGrapher(const edm::ParameterSet &)
std::string getSliceFromFed(int)
std::string rootFilename_
std::vector< int > listChannels_
auto const T2 &decltype(t1.eta()) t2
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
std::map< int, TH1F * > firstSampleHistMap_
std::map< int, TH1F * > cutAmpHistMap_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::map< int, TH2F * > pulseShapeHistMap_
tuple size
Write out results.
int adc() const
get the ADC sample (12 bits)