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);
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];
148 if (
df.sample(0).gainId() != 1 ||
df.sample(1).gainId() != 1)
151 sampleADC[0] =
df.sample(0).adc();
152 sampleADC[1] =
df.sample(1).adc();
153 pedestal = (double)(sampleADC[0] + sampleADC[1]) / (double)2;
156 for (
int i = 0; (
unsigned int)i < digiItr->
size(); ++
i) {
159 if (
df.sample(
i).gainId() == 1)
161 else if (
df.sample(
i).gainId() == 2)
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];
214 if (
df.sample(0).gainId() != 1 ||
df.sample(1).gainId() != 1)
217 sampleADC[0] =
df.sample(0).adc();
218 sampleADC[1] =
df.sample(1).adc();
219 pedestal = (double)(sampleADC[0] + sampleADC[1]) / (double)2;
222 for (
int i = 0; (
unsigned int)i < digiItr->
size(); ++
i) {
225 if (
df.sample(
i).gainId() == 1)
227 else if (
df.sample(
i).gainId() == 2)
233 for (
int i = 0;
i < 10; ++
i) {
249 TH1::AddDirectory(
false);
271 ostringstream myStream;
272 myStream <<
num << flush;
273 return (myStream.str());