38 for (
int i=0;
i<2; ++
i)
39 for (
int j=0;
j<2; ++
j)
40 for (
int k=0;
k<40; ++
k)
41 for (
int l=0;
l<40; ++
l)
42 senCount_[
i][
j][
k][
l] = -1;
55 if ( ! mergeRuns_ ) this->
reset();
70 int iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
71 int senZ_[4288], senP_[4288], senX_[4288], senY_[4288];
75 file.open(lookup_.fullPath().c_str());
76 if( file.is_open() ) {
80 for (
int i=0;
i<nLines_; ++
i) {
81 file>> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx;
88 iz = (senZ_[
i]==1) ? 0:1;
89 senCount_[iz][senP_[
i]-1][senX_[
i]-1][senY_[
i]-1] =
i;
93 cout<<
"ESPedestalTask : Look up table file can not be found in "<<lookup_.fullPath().c_str()<<endl;
99 dqmStore_->setCurrentFolder(prefixME_ +
"/ESPedestalTask");
101 for (
int i=0;
i<nLines_; ++
i) {
102 for (
int is=0; is<32; ++is) {
103 sprintf(hname,
"ADC Z %d P %d X %d Y %d Str %d", senZ_[
i], senP_[i], senX_[i], senY_[i], is+1);
104 meADC_[
i][is] = dqmStore_->book1D(hname, hname, 1000, 899.5, 1899.5);
113 if ( ! init_ )
return;
120 LogInfo(
"ESPedestalTask") <<
"analyzed " << ievt_ <<
" events";
122 if ( enableCleanup_ ) this->
cleanup();
128 if ( ! init_ ) this->
setup();
131 runNum_ = e.
id().
run();
139 int zside, plane, ix, iy,
strip, iz;
151 iz = (zside==1) ? 0:1;
153 if (meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]) {
155 meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]->Fill(dataframe.
sample(0).
adc());
156 meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]->Fill(dataframe.
sample(1).
adc());
157 meADC_[senCount_[iz][plane-1][ix-1][iy-1]][strip-1]->Fill(dataframe.
sample(2).
adc());
158 }
else if(runtype_ == 3) {
159 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
DEFINE_FWK_MODULE(TauMET)
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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="")