50 eventHeaderCollection_(iConfig.getParameter<std::
string>(
"eventHeaderCollection")),
51 eventHeaderProducer_(iConfig.getParameter<std::
string>(
"eventHeaderProducer")),
52 digiCollection_(iConfig.getParameter<std::
string>(
"digiCollection")),
53 digiProducer_(iConfig.getParameter<std::
string>(
"digiProducer")),
54 digiPNCollection_(iConfig.getParameter<std::
string>(
"digiPNCollection")),
59 _nsamples(iConfig.getUntrackedParameter<unsigned int>(
"nSamples", 10)),
60 _presample(iConfig.getUntrackedParameter<unsigned int>(
"nPresamples", 2)),
61 _firstsample(iConfig.getUntrackedParameter<unsigned int>(
"firstSample", 1)),
62 _lastsample(iConfig.getUntrackedParameter<unsigned int>(
"lastSample", 2)),
63 _nsamplesPN(iConfig.getUntrackedParameter<unsigned int>(
"nSamplesPN", 50)),
64 _presamplePN(iConfig.getUntrackedParameter<unsigned int>(
"nPresamplesPN", 6)),
65 _firstsamplePN(iConfig.getUntrackedParameter<unsigned int>(
"firstSamplePN", 7)),
66 _lastsamplePN(iConfig.getUntrackedParameter<unsigned int>(
"lastSamplePN", 8)),
67 _timingcutlow(iConfig.getUntrackedParameter<unsigned int>(
"timingCutLow", 2)),
68 _timingcuthigh(iConfig.getUntrackedParameter<unsigned int>(
"timingCutHigh", 9)),
69 _timingquallow(iConfig.getUntrackedParameter<unsigned int>(
"timingQualLow", 3)),
70 _timingqualhigh(iConfig.getUntrackedParameter<unsigned int>(
"timingQualHigh", 8)),
71 _ratiomincutlow(iConfig.getUntrackedParameter<double>(
"ratioMinCutLow", 0.4)),
72 _ratiomincuthigh(iConfig.getUntrackedParameter<double>(
"ratioMinCutHigh", 0.95)),
73 _ratiomaxcutlow(iConfig.getUntrackedParameter<double>(
"ratioMaxCutLow", 0.8)),
74 _presamplecut(iConfig.getUntrackedParameter<double>(
"presampleCut", 5.0)),
75 _niter(iConfig.getUntrackedParameter<unsigned int>(
"nIter", 5)),
76 _noise(iConfig.getUntrackedParameter<double>(
"noise", 2.0)),
77 _ecalPart(iConfig.getUntrackedParameter<std::
string>(
"ecalPart",
"EB")),
78 _saveshapes(iConfig.getUntrackedParameter<bool>(
"saveShapes",
true)),
79 _docorpn(iConfig.getUntrackedParameter<bool>(
"doCorPN",
false)),
80 _fedid(iConfig.getUntrackedParameter<int>(
"fedID", -999)),
81 _saveallevents(iConfig.getUntrackedParameter<bool>(
"saveAllEvents",
false)),
82 _qualpercent(iConfig.getUntrackedParameter<double>(
"qualPercent", 0.2)),
83 _debug(iConfig.getUntrackedParameter<int>(
"debug", 0)),
84 resdir_(iConfig.getUntrackedParameter<std::
string>(
"resDir")),
85 elecfile_(iConfig.getUntrackedParameter<std::
string>(
"elecFile")),
86 pncorfile_(iConfig.getUntrackedParameter<std::
string>(
"pnCorFile")),
114 channelIteratorEE(0),
139 for (
unsigned int j = 0;
j <
nCrys;
j++) {
151 for (
unsigned int j = 0;
j <
nMod;
j++) {
207 ADCfile +=
"/APDSamplesLaser.root";
210 APDfile +=
"/APDPNLaserAllEvents.root";
214 for (
unsigned int i = 0;
i <
nCrys;
i++) {
216 name <<
"ADCTree" <<
i + 1;
217 ADCtrees[
i] =
new TTree(name.str().c_str(), name.str().c_str());
246 stringstream namefile1;
247 namefile1 <<
resdir_ <<
"/SHAPE_LASER.root";
250 stringstream namefile2;
251 namefile2 << resdir_ <<
"/APDPN_LASER.root";
254 stringstream namefile3;
255 namefile3 << resdir_ <<
"/MATACQ.root";
264 edm::LogError(
"noshape") <<
" ERROR! No matacq shape available: analysis aborted !";
286 DCCHeader = pDCCHeader.
product();
309 edm::LogError(
"cfg_error") <<
" Wrong ecalPart in cfg file ";
334 int fed = headerItr->fedId();
338 runType = headerItr->getRunType();
339 runNum = headerItr->getRunNumber();
340 event = headerItr->getLV1();
342 dccID = headerItr->getDccInTCCCommand();
343 fedID = headerItr->fedId();
365 if (iter ==
colors.end()) {
393 unsigned int samplemax = 0;
396 map<int, vector<double> > allPNAmpl;
397 map<int, vector<double> > allPNGain;
406 <<
"-- debug test -- Inside PNDigi - pnID=" << pnDetId.
iPnId() <<
", dccID=" << pnDetId.
iDCCId();
416 for (
int samId = 0; samId < (*pnItr).size(); samId++) {
417 pn[samId] = (*pnItr).sample(samId).adc();
418 pnG[samId] = (*pnItr).sample(samId).gainId();
434 if (chi2pn == 101 || chi2pn == 102 || chi2pn == 103)
452 <<
"-- debug -- Inside PNDigi - PNampl=" <<
pnAmpl <<
", PNgain=" << pnGain;
471 EBDetId id_crystal(digiItr->id());
475 int etaG = id_crystal.ieta();
476 int phiG = id_crystal.iphi();
480 int etaL = LocalCoord.first;
481 int phiL = LocalCoord.second;
484 int xtal = elecid_crystal.
xtalId();
492 unsigned int MyPn0 = pnpair.first;
493 unsigned int MyPn1 = pnpair.second;
499 setGeomEB(etaG, phiG, module, tower, strip, xtal, apdRefTT, channel, lmr);
503 <<
"-- debug -- Inside EBDigi - towerID:" <<
towerID <<
" channelID:" <<
channelID <<
" module:" << module
504 <<
" modules:" <<
modules.size();
511 for (
unsigned int i = 0;
i < (*digiItr).size(); ++
i) {
513 adc[
i] = samp_crystal.adc();
514 adcG[
i] = samp_crystal.gainId();
536 int mem0 =
Mem->
Mem(lmr, 0);
537 int mem1 =
Mem->
Mem(lmr, 1);
539 if (allPNAmpl[mem0].
size() > MyPn0)
540 pn0 = allPNAmpl[mem0][MyPn0];
543 if (allPNAmpl[mem1].
size() > MyPn1)
544 pn1 = allPNAmpl[mem1][MyPn1];
567 EEDetId id_crystal(digiItr->id());
571 int etaG = id_crystal.iy();
572 int phiG = id_crystal.ix();
574 int iX = (phiG - 1) / 5 + 1;
575 int iY = (etaG - 1) / 5 + 1;
581 if (module >= 18 &&
side == 1)
588 unsigned int MyPn0 = pnpair.first;
589 unsigned int MyPn1 = pnpair.second;
599 setGeomEE(etaG, phiG, iX, iY,
iZ, module, tower, ch, apdRefTT, channel, lmr);
603 <<
"-- debug -- Inside EEDigi - towerID:" <<
towerID <<
" channelID:" <<
channelID <<
" module:" << module
604 <<
" modules:" <<
modules.size();
609 if ((*digiItr).size() > 10)
610 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"SAMPLES SIZE > 10!" << (*digiItr).size();
614 for (
unsigned int i = 0;
i < (*digiItr).size(); ++
i) {
616 adc[
i] = samp_crystal.adc();
617 adcG[
i] = samp_crystal.gainId();
640 int mem0 =
Mem->
Mem(lmr, 0);
641 int mem1 =
Mem->
Mem(lmr, 1);
643 if (allPNAmpl[mem0].
size() > MyPn0)
644 pn0 = allPNAmpl[mem0][MyPn0];
647 if (allPNAmpl[mem1].
size() > MyPn1)
648 pn1 = allPNAmpl[mem1][MyPn1];
671 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
673 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
704 system(del.str().c_str());
712 double BadGainEvtPercentage = 0.0;
713 double BadTimingEvtPercentage = 0.0;
715 int nChanBadGain = 0;
716 int nChanBadTiming = 0;
718 for (
unsigned int i = 0;
i <
nCrys;
i++) {
733 double BadGainChanPercentage = double(nChanBadGain) / double(nCrys);
734 double BadTimingChanPercentage = double(nChanBadTiming) / double(nCrys);
744 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
745 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\t+=+ Analyzing laser data: getting APD, PN, APD/PN, PN/PN +=+";
748 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\t+=+ ............................ WARNING! APD GAIN WAS NOT 1 +=+";
750 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\t+=+ ............................ WARNING! TIMING WAS BAD +=+";
757 for (
unsigned int i = 0;
i <
nCrys;
i++) {
759 name <<
"APDTree" <<
i + 1;
761 APDtrees[
i] =
new TTree(name.str().c_str(), name.str().c_str());
767 APDtrees[
i]->Branch(
"iphi", &iphi,
"iphi/I");
768 APDtrees[
i]->Branch(
"ieta", &ieta,
"ieta/I");
777 APDtrees[
i]->Branch(
"flagfit", &flagfit,
"flagfit/I");
783 APDtrees[
i]->SetBranchAddress(
"iphi", &iphi);
784 APDtrees[
i]->SetBranchAddress(
"ieta", &ieta);
793 APDtrees[
i]->SetBranchAddress(
"flagfit", &flagfit);
798 for (
unsigned int iref = 0; iref <
nRefChan; iref++) {
799 for (
unsigned int imod = 0; imod <
nMod; imod++) {
802 stringstream nameref;
803 nameref <<
"refAPDTree" << imod <<
"_" << iref;
805 RefAPDtrees[iref][jmod] =
new TTree(nameref.str().c_str(), nameref.str().c_str());
824 unsigned int nCol =
colors.size();
829 for (
unsigned int iM = 0; iM <
nMod; iM++) {
830 unsigned int iMod =
modules[iM] - 1;
832 for (
unsigned int ich = 0; ich <
nPNPerMod; ich++) {
833 for (
unsigned int icol = 0; icol < nCol; icol++) {
845 for (
unsigned int iCry = 0; iCry <
nCrys; iCry++) {
846 for (
unsigned int icol = 0; icol < nCol; icol++) {
853 cut <<
"color==" <<
colors.at(icol);
854 if (
ADCtrees[iCry]->GetEntries(cut.str().c_str()) < 10)
858 unsigned int iMod =
iModule[iCry] - 1;
867 Long64_t nbytes = 0, nb = 0;
868 for (Long64_t jentry = 0; jentry <
ADCtrees[iCry]->GetEntriesFast(); jentry++) {
869 nb =
ADCtrees[iCry]->GetEntry(jentry);
880 unsigned int iCol = 0;
881 for (
unsigned int i = 0;
i < nCol;
i++) {
906 <<
"-- debug test -- endJob -- apdAmpl:" <<
apdAmpl <<
" apdTime:" <<
apdTime;
908 if (pn0 < 10 && pn1 > 10) {
910 }
else if (pn1 < 10 && pn0 > 10) {
913 pnmean = 0.5 * (
pn0 +
pn1);
916 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"-- debug test -- endJob -- pnMean:" << pnmean;
922 for (
unsigned int ichan = 0; ichan <
nPNPerMod; ichan++) {
933 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"-- debug test -- endJob -- filling APDTree";
946 for (
unsigned int ir = 0; ir <
nRefChan; ir++) {
949 <<
" refmap:" <<
apdRefMap[ir][iMod + 1] <<
" iCry:" << iCry;
964 <<
", ir:" << ir <<
" tt-1:" <<
towerID - 1;
981 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"-- debug test -- endJob -- after apdAmpl Loop";
987 system(del.str().c_str());
994 for (
unsigned int iColor = 0; iColor < nCol; iColor++) {
995 stringstream nametree;
996 nametree <<
"APDCol" <<
colors.at(iColor);
997 stringstream nametree2;
998 nametree2 <<
"PNCol" <<
colors.at(iColor);
1000 restrees[iColor] =
new TTree(nametree.str().c_str(), nametree.str().c_str());
1001 respntrees[iColor] =
new TTree(nametree2.str().c_str(), nametree2.str().c_str());
1003 restrees[iColor]->Branch(
"iphi", &iphi,
"iphi/I");
1004 restrees[iColor]->Branch(
"ieta", &ieta,
"ieta/I");
1010 restrees[iColor]->Branch(
"APD", &
APD,
"APD[6]/D");
1020 respntrees[iColor]->Branch(
"moduleID", &
moduleID,
"moduleID/I");
1021 respntrees[iColor]->Branch(
"pnID", &
pnID,
"pnID/I");
1022 respntrees[iColor]->Branch(
"PN", &
PN,
"PN[6]/D");
1023 respntrees[iColor]->Branch(
"PNoPN", &
PNoPN,
"PNoPN[6]/D");
1024 respntrees[iColor]->Branch(
"PNoPNA", &
PNoPNA,
"PNoPNA[6]/D");
1025 respntrees[iColor]->Branch(
"PNoPNB", &
PNoPNB,
"PNoPNB[6]/D");
1027 restrees[iColor]->SetBranchAddress(
"iphi", &iphi);
1028 restrees[iColor]->SetBranchAddress(
"ieta", &ieta);
1043 respntrees[iColor]->SetBranchAddress(
"moduleID", &
moduleID);
1044 respntrees[iColor]->SetBranchAddress(
"pnID", &
pnID);
1045 respntrees[iColor]->SetBranchAddress(
"PN",
PN);
1046 respntrees[iColor]->SetBranchAddress(
"PNoPN",
PNoPN);
1047 respntrees[iColor]->SetBranchAddress(
"PNoPNA",
PNoPNA);
1048 respntrees[iColor]->SetBranchAddress(
"PNoPNB",
PNoPNB);
1054 for (
unsigned int iM = 0; iM <
nMod; iM++) {
1055 unsigned int iMod =
modules[iM] - 1;
1057 for (
unsigned int ich = 0; ich <
nPNPerMod; ich++) {
1058 for (
unsigned int icol = 0; icol < nCol; icol++) {
1067 for (
unsigned int imod = 0; imod <
nMod; imod++) {
1078 for (
unsigned int iCry = 0; iCry <
nCrys; iCry++) {
1079 unsigned int iMod =
iModule[iCry] - 1;
1084 for (
unsigned int iCol = 0; iCol < nCol; iCol++) {
1085 std::vector<double> lowcut;
1086 std::vector<double> highcut;
1095 lowcut.push_back(cutMin);
1096 highcut.push_back(cutMax);
1100 lowcut.push_back(cutMin);
1101 highcut.push_back(cutMax);
1121 Long64_t nbytes = 0, nb = 0;
1122 for (Long64_t jentry = 0; jentry <
APDtrees[iCry]->GetEntriesFast(); jentry++) {
1123 nb =
APDtrees[iCry]->GetEntry(jentry);
1127 if (pn0 < 10 && pn1 > 10) {
1129 }
else if (pn1 < 10 && pn0 > 10) {
1132 pnmean = 0.5 * (
pn0 +
pn1);
1137 unsigned int iCol = 0;
1138 for (
unsigned int i = 0;
i < nCol;
i++) {
1149 for (
unsigned int ichan = 0; ichan <
nPNPerMod; ichan++) {
1158 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"-- debug test -- LastLoop event:" <<
event <<
" apdAmpl:" <<
apdAmpl;
1162 for (
unsigned int iRef = 0; iRef <
nRefChan; iRef++) {
1168 <<
"-- debug test -- LastLoop apdAmplA:" <<
apdAmplA <<
" apdAmplB:" <<
apdAmplB <<
", event:" <<
event
1185 for (
unsigned int iColor = 0; iColor < nCol; iColor++) {
1186 std::vector<double> apdvec =
APDAnal[iCry][iColor]->
getAPD();
1194 for (
unsigned int i = 0;
i < apdvec.size();
i++) {
1195 APD[
i] = apdvec.at(
i);
1221 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"-- debug test -- endJob -- APD[0]" <<
APD[0] <<
" APDoPN[0] "
1230 for (
unsigned int iM = 0; iM <
nMod; iM++) {
1231 unsigned int iMod =
modules[iM] - 1;
1235 for (
unsigned int ch = 0; ch <
nPNPerMod; ch++) {
1242 for (
unsigned int iColor = 0; iColor < nCol; iColor++) {
1243 std::vector<double> pnvec =
PNAnal[iMod][ch][iColor]->
getPN();
1244 std::vector<double> pnopnvec =
PNAnal[iMod][ch][iColor]->
getPNoPN();
1245 std::vector<double> pnopn0vec =
PNAnal[iMod][ch][iColor]->
getPNoPN0();
1246 std::vector<double> pnopn1vec =
PNAnal[iMod][ch][iColor]->
getPNoPN1();
1248 for (
unsigned int i = 0;
i < pnvec.size();
i++) {
1249 PN[
i] = pnvec.at(
i);
1257 <<
"-- debug test -- endJob -- filling pn results'tree: PN[0]:" <<
PN[0] <<
" iModule:" << iMod
1258 <<
" iColor:" << iColor <<
" ch:" << ch;
1274 system(del2.str().c_str());
1287 for (
unsigned int i = 0;
i < nCol;
i++) {
1294 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\t+=+ .................................................. done +=+";
1295 edm::LogVerbatim(
"EcalLaserAnalyzer2") <<
"\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
1307 int doesMatFileExist = 0;
1308 int doesMatShapeExist = 0;
1310 TProfile* laserShape =
nullptr;
1311 test2 = fopen(
matfile.c_str(),
"r");
1313 doesMatFileExist = 1;
1315 TFile* MatShapeFile;
1316 if (doesMatFileExist == 1) {
1317 MatShapeFile =
new TFile(
matfile.c_str());
1318 laserShape = (TProfile*)MatShapeFile->Get(
"shapeLaser");
1320 doesMatShapeExist = 1;
1321 double y = laserShape->Integral(
"w");
1323 laserShape->Scale(1.0 / y);
1326 edm::LogError(
"file_not_found") <<
" ERROR! Matacq shape file not found !";
1328 if (doesMatShapeExist)
1334 int doesElecFileExist = 0;
1338 doesElecFileExist = 1;
1340 TFile* ElecShapesFile;
1341 TH1D* elecShape =
nullptr;
1343 if (doesElecFileExist == 1) {
1344 ElecShapesFile =
new TFile(
elecfile_.c_str());
1346 name <<
"MeanElecShape";
1347 elecShape = (TH1D*)ElecShapesFile->Get(name.str().c_str());
1348 if (elecShape && doesMatShapeExist == 1) {
1349 double x = elecShape->GetMaximum();
1351 elecShape->Scale(1.0 / x);
1358 edm::LogError(
"file_not_found") <<
" ERROR! Elec shape file not found !";
1364 unsigned int nBins = int(laserShape->GetEntries());
1366 double elec_jj, laser_iiMinusjj;
1370 unsigned int nBins2 = int(elecShape->GetNbinsX());
1372 if (nBins2 < nBins) {
1374 <<
"EcalLaserAnalyzer2::getShapes: wrong configuration of the shapes' number of bins";
1380 name <<
"PulseShape";
1382 PulseShape =
new TProfile(name.str().c_str(), name.str().c_str(), nBins, -0.5, double(nBins) - 0.5);
1386 for (
int ii = 0;
ii < 50;
ii++) {
1391 for (
unsigned int ii = 0;
ii < nBins - 50;
ii++) {
1393 for (
unsigned int jj = 0;
jj <
ii;
jj++) {
1394 elec_jj = elecShape->GetBinContent(
jj + 1);
1395 laser_iiMinusjj = laserShape->GetBinContent(ii -
jj + 1);
1396 sum_jj += elec_jj * laser_iiMinusjj;
1399 shapes[ii + 50] = sum_jj;
1407 for (
unsigned int ii = 0;
ii < nBins;
ii++) {
1421 system(del.str().c_str());
1428 int etaG,
int phiG,
int module,
int tower,
int strip,
int xtal,
int apdRefTT,
int channel,
int lmr) {
1440 for (
unsigned int iref = 0; iref <
nRefChan; iref++) {
1461 int etaG,
int phiG,
int iX,
int iY,
int iZ,
int module,
int tower,
int ch,
int apdRefTT,
int channel,
int lmr) {
1473 for (
unsigned int iref = 0; iref <
nRefChan; iref++) {
void addEntry(double val)
Log< level::Info, true > LogVerbatim
static XYCoord localCoord(int icr)
const bool _saveallevents
TPN * PNAnal[9][2][nColor]
const std::string eventHeaderCollection_
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const edm::EventSetup & c
void setAPDCut(double, double)
const std::string _ecalPart
std::map< int, int > channelMapEE
const std::string digiPNCollection_
int xtalId() const
get the channel id
std::vector< double > getPN()
const unsigned int _firstsamplePN
const std::string pncorfile_
static int apdRefTower(int ilmr, int ilmmod)
void addEntry(double, double, double)
int stripId() const
get the tower id
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double getDelta(int, int)
TAPD * APDAnal[1700][nColor]
#define DEFINE_FWK_MODULE(type)
std::vector< double > getPNoPN1()
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
TAPD * APDFirstAnal[1700][nColor]
static int side(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
TPN * PNFirstAnal[9][2][nColor]
void setPNCut(double, double)
void addEntry(double, double, double, double, double, double, double)
double getPNCorrectionFactor(double val0, int gain)
std::vector< T >::const_iterator const_iterator
int towerId() const
get the tower id
double * getAdcWithoutPedestal()
const std::string resdir_
const unsigned int _firstsample
const_iterator begin() const
The iterator returned can not safely be used across threads.
unsigned int isFirstChanModFilled[21]
void setGeomEE(int etaG, int phiG, int iX, int iY, int iZ, int module, int tower, int ch, int apdRefTT, int channel, int lmr)
const unsigned int _lastsamplePN
static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi)
Log< level::Error, false > LogError
const unsigned int _lastsample
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< double > getAPDoPN0()
void setTimeCut(double, double)
const unsigned int _presamplePN
const double _ratiomaxcutlow
const unsigned int _timingcuthigh
std::vector< double > shapesVec
static std::pair< int, int > pn(int ilmmod)
void set2DAPDoAPD1Cut(const std::vector< double > &, const std::vector< double > &)
void setAPDoPN0Cut(double, double)
virtual double doFit(double *, double *cova=nullptr)
std::vector< double > getPNoPN0()
std::vector< double > getAPDoPN1()
edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
bool getData(T &iHolder) const
int iPnId() const
get the PnId
int hashedIndex(int ieta, int iphi)
static std::pair< int, int > pn(int dee, int ilmod)
std::vector< double > getAPDoAPD0()
void set2DAPDoAPD0Cut(const std::vector< double > &, const std::vector< double > &)
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
virtual void init(int, int, int, int, int, const std::vector< double > &, double)
const unsigned int _timingqualhigh
const unsigned int _nsamples
const std::string digiProducer_
double * getAdcWithoutPedestal()
EcalLaserAnalyzer2(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
static int apdRefTower(int ilmmod)
std::vector< int > modules
const std::string elecfile_
int iDCCId() const
get the DCCId
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
std::vector< double > getAPDoAPD1()
const double _presamplecut
std::vector< double > getAPD()
const_iterator end() const
const std::string digiCollection_
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > mappingToken_
unsigned int firstChanMod[21]
void setGeomEB(int etaG, int phiG, int module, int tower, int strip, int xtal, int apdRefTT, int channel, int lmr)
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
const unsigned int _niter
T const * product() const
const double _qualpercent
unsigned int nSamplesShapes
const double _ratiomincutlow
int IsThereDataADC[1700][nColor]
const double _ratiomincuthigh
const unsigned int _timingquallow
const unsigned int _timingcutlow
TTree * respntrees[nColor]
TTree * RefAPDtrees[2][21]
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator end() const
std::vector< double > getPNoPN()
std::vector< int > colors
static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
unsigned int iModule[1700]
~EcalLaserAnalyzer2() override
double doFit(int, double *)
EcalLogicID towerID(EcalElectronicsId const &)
const unsigned int _nsamplesPN
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
std::vector< double > getAPDoPN()
const edm::EDGetTokenT< EcalPnDiodeDigiCollection > pnDiodeDigiToken_
std::map< int, unsigned int > apdRefMap[2]
std::vector< double > getTime()
static std::vector< int > apdRefChannels(ME::LMMid ilmmod, ME::LMRid ilmr)
static std::vector< ME::LMMid > lmmodFromDcc(ME::DCCid idcc)
static int lmr(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
tuple size
Write out results.
int channelId() const
so far for EndCap only :
const_iterator begin() const
void setAPDoPNCut(double, double)
void setAPDoPN1Cut(double, double)