99 os <<
"[" << (
int)d.
mCh <<
"," << (
int)d.
mPh <<
"," << (
int)d.
mX <<
"," << (
int)d.
mY <<
"]=" << d.
mQ;
119 int chan2y[6] = {3, 2, 4, 1, 5, 0};
132 return abs(ch, pc, px, py);
143 uint8_t ch, ph, px, py;
144 int y2chan[6] = {5, 3, 1, 0, 2, 4};
148 bool isEven = (ph % 2) == 0 ?
true :
false;
203 return abs(Module, ph, px, py);
286Double_t
Digit::qdcTot(Double_t e, Double_t
time, Int_t pc, Int_t px, Int_t py, Double_t& localX, Double_t& localY)
299 localY = ((
y - localY) > 0) ?
y - 0.2 :
y + 0.2;
301 double x = (localX > 66.6) ? localX - 66.6 : localX;
302 double qdcEle = 34.06311 + 0.2337070 *
x + 5.807476e-3 *
x *
x - 2.956471e-04 *
x *
x *
x + 2.310001e-06 *
x *
x *
x *
x;
304 int iNele =
int((e / 26e-9) * 0.8);
308 for (Int_t
i = 1;
i <= iNele;
i++) {
309 double rnd = gRandom->Rndm();
313 Q -= qdcEle * TMath::Log(rnd);
376 double a = 1 - tanh_v * tanh_v;
390 double a = 1 - tanh_v * tanh_v;
405Double_t Digit::OrbitBcToTimeNs(uint32_t Orbit, uint16_t BC)
407 return (BC * o2::constants::lhc::LHCBunchSpacingNS + Orbit * o2::constants::lhc::LHCOrbitNS);
415uint32_t Digit::TimeNsToOrbit(Double_t TimeNs)
417 return (uint32_t)(TimeNs / o2::constants::lhc::LHCOrbitNS);
425uint16_t Digit::TimeNsToBc(Double_t TimeNs)
427 return (uint16_t)(std::fmod(TimeNs, o2::constants::lhc::LHCOrbitNS) / o2::constants::lhc::LHCBunchSpacingNS);
436void Digit::TimeNsToOrbitBc(double TimeNs, uint32_t& Orbit, uint16_t& Bc)
438 Orbit = TimeNsToOrbit(TimeNs);
439 Bc = TimeNsToBc(TimeNs);
444// ---- Functions to manage Digit vectors ----
452bool Digit::eventEquipPadsComp(Digit& d1, Digit& d2)
455 t1 = d1.getTriggerID();
456 t2 = d2.getTriggerID();
463 if (d1.getPadID() < d2.getPadID()) {
475std::vector<o2::hmpid::Digit>* Digit::extractDigitsPerEvent(std::vector<o2::hmpid::Digit>& Digits, uint64_t EventID)
477 std::vector<o2::hmpid::Digit>* subVector = new std::vector<o2::hmpid::Digit>();
478 for (const auto& digit : Digits) {
479 if (digit.getTriggerID() == EventID) {
480 subVector->push_back(digit);
490std::vector<uint64_t>* Digit::extractEvents(std::vector<o2::hmpid::Digit>& Digits)
492 std::vector<uint64_t>* eventIds = new std::vector<uint64_t>();
493 for (const auto& digit : Digits) {
494 if (find(eventIds->begin(), eventIds->end(), digit.getTriggerID()) == eventIds->end()) {
495 eventIds->push_back(digit.getTriggerID());
Header to collect LHC related constants.
short GetDetectorID() const
static uint32_t absolute2Pad(int Module, int x, int y)
static int a2C(uint32_t pad)
static void absolute2Equipment(int Module, int x, int y, int *Equi, int *Colu, int *Dilo, int *Chan)
static int a2X(uint32_t pad)
static double mathiesonY(double x)
static int a2Y(uint32_t pad)
static void pad2Absolute(uint32_t pad, int *Module, int *x, int *y)
static float lorsY(int pad)
static int a2P(uint32_t pad)
static double intPartMathiX(double x, int pad)
static uint32_t equipment2Pad(int Equi, int Colu, int Dilo, int Chan)
static void pad2Equipment(uint32_t pad, int *Equi, int *Colu, int *Dilo, int *Chan)
static void pad2Photo(uint32_t pad, uint8_t *chamber, uint8_t *photo, uint8_t *x, uint8_t *y)
static double qdcTot(double e, double time, int pc, int px, int py, double &localX, double &localY)
static float lorsX(int pad)
static double intPartMathiY(double y, int pad)
static double mathiesonX(double x)
static float getFractionalContributionForPad(o2::hmpid::HitType const &hit, int somepad)
static double intMathieson(double localX, double localY, int pad)
static void getPadAndTotalCharge(o2::hmpid::HitType const &hit, int &chamber, int &pc, int &px, int &py, float &totalcharge)
static uint32_t abs(int ch, int pc, int x, int y)
static void equipment2Absolute(int Equi, int Colu, int Dilo, int Chan, int *Module, int *x, int *y)
static constexpr int N_PHOTOCATODSY
static constexpr int N_COLXSEGMENT
static constexpr int N_COLUMNS
static constexpr int N_DILOGICS
static constexpr int N_CHANNELS
static constexpr int DILOPADSROWS
static constexpr int DILOPADSCOLS
static constexpr int MAXYPHOTO
static constexpr int MAXXPHOTO
static constexpr int EQUIPMENTSPERMODULE
static constexpr int HALFXROWS
static constexpr int MAXEQUIPMENTS
static float sizeHalfPadX()
void mars2Lors(Int_t c, double *m, double &x, double &y) const
static double pitchAnodeCathode()
static float sizeHalfPadY()
static void lors2Pad(float x, float y, Int_t &pc, Int_t &px, Int_t &py)
static float lorsY(Int_t pc, Int_t pady)
static Param * instance()
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)