34 iConfig.getParameter<
edm::
InputTag>(
"EBUncalibratedRecHitCollection"))),
37 iConfig.getParameter<
edm::
InputTag>(
"EEUncalibratedRecHitCollection"))),
39 ampCut_(iConfig.getUntrackedParameter<
int>(
"AmplitudeCutADC", 13)),
40 rootFilename_(iConfig.getUntrackedParameter<
std::
string>(
"rootFilename",
"pulseShapeGrapher")) {
43 std::vector<int> listDefaults;
44 listDefaults.push_back(-1);
76 for (
int i = 0;
i < 10;
i++)
104 int FEDid = 600 + elecId.
dccId();
120 while (digiItr != EBdigis->
end() && digiItr->id() != hitItr->id()) {
123 if (digiItr == EBdigis->
end())
126 double sampleADC[10];
130 if (
df.sample(0).gainId() != 1 ||
df.sample(1).gainId() != 1)
133 sampleADC[0] =
df.sample(0).adc();
134 sampleADC[1] =
df.sample(1).adc();
135 pedestal = (double)(sampleADC[0] + sampleADC[1]) / (double)2;
138 for (
int i = 0; (
unsigned int)i < digiItr->
size(); ++
i) {
141 if (
df.sample(
i).gainId() == 1)
143 else if (
df.sample(
i).gainId() == 2)
148 for (
int i = 0;
i < 10; ++
i) {
163 int FEDid = 600 + elecId.
dccId();
179 while (digiItr != EEdigis->
end() && digiItr->id() != hitItr->id()) {
182 if (digiItr == EEdigis->
end())
185 double sampleADC[10];
189 if (
df.sample(0).gainId() != 1 ||
df.sample(1).gainId() != 1)
192 sampleADC[0] =
df.sample(0).adc();
193 sampleADC[1] =
df.sample(1).adc();
194 pedestal = (double)(sampleADC[0] + sampleADC[1]) / (double)2;
197 for (
int i = 0; (
unsigned int)i < digiItr->
size(); ++
i) {
200 if (
df.sample(
i).gainId() == 1)
202 else if (
df.sample(
i).gainId() == 2)
207 for (
int i = 0;
i < 10; ++
i) {
219 TH1::AddDirectory(
false);
238 ostringstream myStream;
239 myStream <<
num << flush;
240 return (myStream.str());
std::map< int, TH1F * > ampHistMap_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::vector< T >::const_iterator const_iterator
std::map< int, TH1F * > cutAmpHistMap_
EcalPulseShapeGrapher(const edm::ParameterSet &)
std::string getSliceFromFed(int)
std::string rootFilename_
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > listChannels_
std::string intToString(int)
const_iterator begin() const
const edm::EDGetTokenT< EcalUncalibratedRecHitCollection > EEUncalibratedRecHitCollection_
const edm::EDGetTokenT< EEDigiCollection > EEDigis_
std::map< int, TH1F * > firstSampleHistMap_
const_iterator end() const
const_iterator end() const
std::map< int, TH2F * > pulseShapeHistMap_
const_iterator begin() const
The iterator returned can not safely be used across threads.
std::map< int, TH2F * > rawPulseShapeHistMap_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const edm::EDGetTokenT< EcalUncalibratedRecHitCollection > EBUncalibratedRecHitCollection_
int hashedIndex() const
get a compact index for arrays
void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< EBDigiCollection > EBDigis_