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")) {
41 std::vector<int> listDefaults;
42 listDefaults.push_back(-1);
48 ampHistMap_[*itr] =
new TH1F(name.c_str(), title.c_str(), 100, 0, 100);
51 title =
"Amplitude (over 13 ADC) of cry " +
intToString(*itr);
53 cutAmpHistMap_[*itr] =
new TH1F(name.c_str(), title.c_str(), 100, 0, 100);
58 pulseShapeHistMap_[*itr] =
new TH2F(name.c_str(), title.c_str(), 10, 0, 10, 220, -20, 2);
61 title =
"Raw Pulse shape of cry " +
intToString(*itr);
66 title =
"Amplitude of first sample, cry " +
intToString(*itr);
74 for (
int i = 0;
i < 10;
i++)
92 int numHitsWithActivity = 0;
120 int FEDid = 600 + elecId.
dccId();
136 numHitsWithActivity++;
138 while (digiItr != EBdigis->end() && digiItr->id() != hitItr->id()) {
141 if (digiItr == EBdigis->end())
144 double sampleADC[10];
153 pedestal = (double)(sampleADC[0] + sampleADC[1]) / (double)2;
156 for (
int i = 0; (
unsigned int)i < digiItr->
size(); ++
i) {
167 for (
int i = 0;
i < 10; ++
i) {
186 int FEDid = 600 + elecId.
dccId();
202 numHitsWithActivity++;
204 while (digiItr != EEdigis->end() && digiItr->id() != hitItr->id()) {
207 if (digiItr == EEdigis->end())
210 double sampleADC[10];
219 pedestal = (double)(sampleADC[0] + sampleADC[1]) / (double)2;
222 for (
int i = 0; (
unsigned int)i < digiItr->
size(); ++
i) {
233 for (
int i = 0;
i < 10; ++
i) {
249 TH1::AddDirectory(
false);
271 ostringstream myStream;
272 myStream << num << flush;
273 return (myStream.str());
T getUntrackedParameter(std::string const &, T const &) const
std::map< int, TH1F * > ampHistMap_
int hashedIndex() const
get a compact index for arrays
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< T >::const_iterator const_iterator
std::map< int, TH1F * > cutAmpHistMap_
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_
std::string intToString(int)
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, TH2F * > pulseShapeHistMap_
std::map< int, TH2F * > rawPulseShapeHistMap_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void analyze(const edm::Event &, const edm::EventSetup &) override
tuple size
Write out results.
int adc() const
get the ADC sample (12 bits)