|
|
Go to the documentation of this file.
51 "FIT_METHOD",
"MTQ_AMPL",
"MTQ_TIME",
"MTQ_RISE",
"MTQ_FWHM",
"MTQ_FW20",
"MTQ_FW80",
"MTQ_SLIDING"};
66 TString out_(std::getenv(
"MELMDAT"));
74 TString out_(std::getenv(
"MESTORE"));
81 TString
ME::path() {
return TString(std::getenv(
"MUSECAL")) +
"/"; }
86 TString outfile_ = primPath(lmr_);
94 outfile_ +=
"_BlueLaser";
97 outfile_ +=
"_GreenLaser";
100 outfile_ +=
"_RedLaser";
103 outfile_ +=
"_IRedLaser";
109 outfile_ +=
"_testPulse";
112 outfile_ +=
header.rundir.c_str();
114 outfile_ +=
header.ts_beg;
120 TString outfile_ = primPath(lmr);
121 if (
type == iLaser) {
122 outfile_ +=
"runlist_";
140 }
else if (
type == iTestPulse) {
141 outfile_ +=
"runlist_Test_Pulse";
157 Time dt_min = dt_s / 60;
158 Time n_s = dt_s - dt_min * 60;
159 Time dt_h = dt_min / 60;
160 Time n_min = dt_min - dt_h * 60;
161 Time dt_day = dt_h / 24;
162 Time n_h = dt_h - dt_day * 24;
165 std::vector<Time> vec_;
166 vec_.push_back(n_day);
168 vec_.push_back(n_min);
186 return dt_f / 86400.;
216 ME::Time it_ = static_cast<ME::Time>(t_);
217 std::cout <<
"dt/it/t0/ " <<
dt <<
"/" << it_ <<
"/" <<
t0 << std::endl;
231 assert(ilmr > 0 && ilmr <= 92);
246 assert(side == 0 || side == 1);
250 assert(idcc >= 1 && idcc <= 54);
271 if (ireg == iEEM || ireg == iEEP) {
272 if (side == 1 && idcc != 8) {
278 if (idcc == 8 && side == 1)
280 }
else if (ireg == iEBM || ireg == iEBP) {
281 ilmr = 2 * (idcc - 1) + side + 1;
287 else if (ireg == iEEP)
289 else if (ireg == iEEM)
299 int ireg = ecalRegion(ilmr);
302 else if (ireg == iEBP)
304 else if (ireg == iEEP)
307 if (ireg == iEEM || ireg == iEEP) {
308 assert(ilmr >= 1 && ilmr <= 10);
316 assert(ilmr >= 1 && ilmr <= 36);
317 idcc = (ilmr - 1) / 2 + 1;
318 side = (ilmr - 1) % 2;
330 return std::pair<int, int>(idcc, side);
334 ireg = ecalRegion(ilmr);
336 std::pair<int, int> ipair_ = dccAndSide(ilmr);
338 side = ipair_.second;
341 if (ireg == iEEM || ireg == iEEP) {
344 if (idcc >= 1 && idcc <= 9) {
349 }
else if (idcc >= 46 && idcc <= 54) {
355 }
else if (ireg == iEBM || ireg == iEBP) {
358 assert(idcc >= 10 && idcc <= 45);
403 int ilmr = lmr(idcc, 0);
410 assert(ireg >= iEEM && ireg <= iEEP);
411 if (_trees[ireg] !=
nullptr)
414 int iEcalRegion_ = ireg;
418 int iSuperCrystal_ = 0;
423 if (iEcalRegion_ == iEBM || iEcalRegion_ == iEBP) {
424 for (
int isect = 1; isect <= 18; isect++) {
426 if (iEcalRegion_ == iEBM)
428 if (_trees[iEcalRegion_] ==
nullptr) {
431 _trees[iEcalRegion_] =
new MEChannel(0, 0, iEcalRegion_,
nullptr);
433 tree_ = _trees[iEcalRegion_];
434 for (
int iX = 0; iX < 17; iX++) {
435 for (
int iY = 0; iY < 4; iY++) {
438 for (
int jx = 0; jx < 5; jx++) {
439 for (
int jy = 0; jy < 5; jy++) {
440 int ix = 5 * iX + jx;
441 int iy = 5 * iY + jy;
442 if (useElectronicNumbering) {
448 int ieta = globalCoord.first;
449 int iphi = globalCoord.second;
462 }
else if (iEcalRegion_ == iEEM || iEcalRegion_ == iEEP) {
464 if (iEcalRegion_ == iEEM)
466 if (_trees[iEcalRegion_] ==
nullptr) {
469 _trees[iEcalRegion_] =
new MEChannel(0, 0, iEcalRegion_,
nullptr);
471 tree_ = _trees[iEcalRegion_];
473 for (
int ilmr = 72; ilmr <= 92; ilmr++)
475 if (ecalRegion(ilmr) != iEcalRegion_)
477 for (
int ilmm = 1; ilmm <= 19; ilmm++)
479 for (
int iXX = 1; iXX <= 10; iXX++) {
480 for (
int iside = 1; iside <= 2; iside++)
485 for (
int iY = 1; iY <= 20; iY++) {
491 if (iLMRegion_ != ilmr)
494 if (iLMModule_ != ilmm)
498 for (
int jxx = 1; jxx <= 5; jxx++) {
503 for (
int jy = 1; jy <= 5; jy++) {
504 int ix = 5 * (iX - 1) + jx;
505 int iy = 5 * (iY - 1) + jy;
513 leaf_ = leaf_->
getDaughter(ix, iy, iSuperCrystal_);
524 return _trees[iEcalRegion_];
528 int reg_ = ecalRegion(ilmr);
529 if (reg_ == iEEM || reg_ == iEEP)
531 else if (reg_ == iEBM || reg_ == iEBP)
543 return std::pair<int, int>();
550 return std::vector<int>();
558 return std::vector<int>();
562 std::vector<int> vec;
563 for (
int iside = 0; iside <= 1; iside++) {
564 int ilmr = lmr(idcc, iside);
567 std::pair<int, int> mem_ = memFromLmr(ilmr);
568 vec.push_back(mem_.first);
569 vec.push_back(mem_.second);
575 std::vector<int> vec;
576 for (
int iside = 0; iside <= 1; iside++) {
577 int ilmr = lmr(idcc, iside);
581 std::vector<int> vec_ = lmmodFromLmr(ilmr);
582 for (
unsigned ii = 0;
ii < vec_.size();
ii++) {
583 int ilmmod_ = vec_[
ii];
586 if (ilmmod_ == 18 && iside == 1)
588 if (ilmmod_ == 19 && iside == 1)
591 vec.push_back(ilmmod_);
598 std::pair<int, int> pnpair_(0, 0);
599 std::pair<int, int> mempair_ = memFromLmr(ilmr);
609 mem_ = mempair_.first;
612 mem_ = mempair_.second;
613 pn_ = pnpair_.second;
615 return std::pair<int, int>(mem_, pn_);
static std::vector< int > lmmodFromLmr(int ilmr)
static int ecalRegion(int ilmr)
static int sc(SuperCrysCoord iX, SuperCrysCoord iY)
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
static TString lmdataPath(int lmr)
static std::vector< Time > timeDiff(Time t1, Time t2, short int &sign)
static int crystal(CrysCoord ix, CrysCoord iy)
static std::vector< int > apdRefChannels(ME::LMMid ilmmod, ME::LMRid ilmr)
static const TimeStamp kLowMask
static Time time_low(TimeStamp t)
static TString color[iSizeC]
static TString smNameFromDcc(int idcc)
static bool useElectronicNumbering
static std::vector< ME::LMMid > lmmodFromLmr(ME::LMRid ilmr)
static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi)
static TString TPPNPrimVar[iSizeTPPN]
MEChannel * getDaughter(int ix, int iy, int ig)
static std::pair< int, int > pn(int ilmmod)
static std::vector< ME::LMMid > lmmodFromDcc(ME::DCCid idcc)
static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy)
static int sm(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
static TString granularity[iSizeG]
static std::pair< int, int > dccAndSide(int ilmr)
static std::vector< int > apdRefChannels(int ilmmod)
MEChannel * getDescendant(int ig, int ii)
static std::pair< int, int > pn(int dee, int ilmod)
std::pair< EBGlobalCoord, EBGlobalCoord > EtaPhiCoord
static TString type[iSizeT]
static std::pair< ME::DCCid, ME::DCCid > memFromLmr(ME::LMRid ilmr)
static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
static TString primPath(int lmr)
static std::pair< int, int > memFromLmr(int ilmr)
static std::vector< MEChannel * > _trees
static TString PNPrimVar[iSizePN]
const Time_t kLowMask(0xFFFFFFFF)
static std::pair< ME::DCCid, ME::PNid > pn(ME::LMRid ilmr, ME::LMMid ilmmod, ME::PN ipn)
static TString TPAPDPrimVar[iSizeTPAPD]
static TString smName(int ilmr)
static std::vector< int > lmmodFromLmr(int ilmr)
static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static std::pair< int, int > memFromLmr(int ilmr)
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
static int lmr(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
int ism(int ieta, int iphi)
static MEChannel * lmrTree(int ilmr)
static TString rootFileName(ME::Header header, ME::Settings settings)
static MEChannel * regTree(int ireg)
static TString APDPrimVar[iSizeAPD]
std::string smName(unsigned)
static bool isBarrel(int ilmr)
static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static TString runListName(int lmr, int type, int color)
static std::vector< int > apdRefChannels(int ilmmod)
static Time time(float dt, Time t0, int tunit=iHour)
static TString MTQPrimVar[iSizeMTQ]
static Time time_high(TimeStamp t)
static std::vector< ME::DCCid > memFromDcc(ME::DCCid idcc)
static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy)
static void regionAndSector(int ilmr, int &ireg, int &isect, int &idcc, int &iside)
unsigned long long TimeStamp
static int lmr(int idcc, int iside)