37 for (
int i=0;
i<2; ++
i)
38 for (
int j=0;
j<2; ++
j)
39 for (
int k=0;
k<40; ++
k)
40 for (
int l=0;
l<40; ++
l)
41 senCount_[
i][
j][
k][
l] = -1;
54 if ( ! mergeRuns_ ) this->
reset();
69 int iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
70 int senZ_[4288], senP_[4288], senX_[4288], senY_[4288];
74 file.open(lookup_.fullPath().c_str());
75 if( file.is_open() ) {
79 for (
int i=0;
i<nLines_; ++
i) {
80 file>> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx;
87 iz = (senZ_[
i]==1) ? 0:1;
88 senCount_[iz][senP_[
i]-1][senX_[
i]-1][senY_[
i]-1] =
i;
92 cout<<
"ESPedestalTask : Look up table file can not be found in "<<lookup_.fullPath().c_str()<<endl;
98 dqmStore_->setCurrentFolder(prefixME_ +
"/ESPedestalTask");
100 for (
int i=0;
i<nLines_; ++
i) {
101 for (
int is=0; is<32; ++is) {
102 sprintf(hname,
"ADC Z %d P %d X %d Y %d Str %d", senZ_[
i], senP_[i], senX_[i], senY_[i], is+1);
103 meADC_[
i][is] = dqmStore_->book1D(hname, hname, 1000, 899.5, 1899.5);
112 if ( ! init_ )
return;
119 LogInfo(
"ESPedestalTask") <<
"analyzed " << ievt_ <<
" events";
121 if ( enableCleanup_ ) this->
cleanup();
127 if ( ! init_ ) this->
setup();
130 runNum_ = e.
id().
run();
138 int zside, plane, ix, iy, strip, iz;
150 iz = (zside==1) ? 0:1;
152 if (meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]) {
154 meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]->Fill(dataframe.
sample(0).
adc());
155 meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]->Fill(dataframe.
sample(1).
adc());
156 meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]->Fill(dataframe.
sample(2).
adc());
157 }
else if(runtype_ == 3) {
158 meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]->Fill(dataframe.
sample(1).
adc());
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const ESDetId & id() const
static void cleanup(const Factory::MakerMap::value_type &v)
virtual ~ESPedestalTask()
void analyze(const edm::Event &, const edm::EventSetup &)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
const ESSample & sample(int i) const
DEFINE_FWK_MODULE(CaloMETProducer)
ESPedestalTask(const edm::ParameterSet &ps)
void endRun(const edm::Run &r, const edm::EventSetup &c)
int adc() const
get the ADC sample (singed 16 bits)
void reset(double vett[256])
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")