BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnECALDigit.h
Go to the documentation of this file.
1#ifndef BMNECALDIGIT1_H
2#define BMNECALDIGIT1_H
3
4#include "BmnCaloDigit.h"
5
6#include <TGeoNode.h>
7
9{
10 ULong_t fAdcId = 0;
12 Int_t fChan = -1;
13 Double_t fX, fY, fZ;
15 Double_t fCoeff = 1.;
16
17 public:
19 virtual ~BmnECALMapElement() {}
20
21 void SetAdcMap(Int_t chan, ULong_t adcId, UShort_t adcChan);
22 void SetCoeff(Int_t chan, Double_t coeff);
23 void SetCoords(TGeoNode* cell, TGeoNode* mother);
24
25 static void PrintTitle();
26 void Print();
27
29 {
30 return fChan > -1 && fAdcId == adcId && fAdcChan == adcChan + 1;
31 }
32
33 Int_t GetChan() { return fChan; }
34 Float_t GetX() { return fX; }
35 Float_t GetY() { return fY; }
36
37 Double_t GetLabX() { return fLabX; }
38 Double_t GetLabY() { return fLabY; }
39 Double_t GetLabZ() { return fLabZ; }
40
41 Double_t GetCoeff() { return fCoeff; }
42
43 Double_t* EcalCoords() { return &fX; }
44 Double_t* LabCoords() { return &fLabX; }
45};
46
47class BmnECALDigit : public BmnCaloDigit
48{
49 public:
50 /** Default constructor **/
52
53 /** Main constructor **/
55
57
59 Float_t amp = 0.,
60 Float_t peakAmp = 0.,
61 Float_t startTime = 0.,
62 Float_t peakTime = 0.);
63
64 void SetIX(UChar_t ix) {}
65 void SetIY(UChar_t iy) {}
66 void SetSize(UChar_t size) {}
67 void SetPeakAmp(Float_t amp) { fPeakAmp = amp; }
68 void SetPeakTime(Float_t ns) { fPeakTime = ns; }
69 void SetStartTime(Float_t ns) { fStartTime = ns; }
71 {
72 fLabX = x;
73 fLabY = y;
74 fLabZ = z;
75 }
76
77 UChar_t GetIX() const { return (Short_t)(fX / 40.); }
78 UChar_t GetIY() const
79 {
80 return (Short_t)(fY / 40.);
81 ;
82 }
83 UChar_t GetSize() const { return 1; }
84 Float_t GetPeakAmp() const { return fPeakAmp; }
85 Float_t GetPeakTime() const { return fPeakTime; }
86 Float_t GetStartTime() const { return fStartTime; }
87 void GetLabCoords(Float_t& x, Float_t& y, Float_t& z) const
88 {
89 x = fLabX;
90 y = fLabY;
91 z = fLabZ;
92 }
93
94 /** Destructor **/
95 virtual ~BmnECALDigit() {}
96
97 private:
102
104};
105
106#endif /* BMNECALDIGIT1_H */
bool Bool_t
unsigned short UShort_t
int Int_t
unsigned char UChar_t
unsigned long ULong_t
float Float_t
short Short_t
double Double_t
#define ClassDef(name, id)
void SetSize(UChar_t size)
UChar_t GetSize() const
Float_t GetPeakAmp() const
void SetPeakAmp(Float_t amp)
void SetPeakTime(Float_t ns)
Float_t fStartTime
virtual ~BmnECALDigit()
Destructor.
void SetLabCoords(Float_t x, Float_t y, Float_t z)
UChar_t GetIX() const
BmnECALDigit(BmnECALMapElement *e)
void Set(BmnECALMapElement *e, Float_t amp=0., Float_t peakAmp=0., Float_t startTime=0., Float_t peakTime=0.)
void SetIY(UChar_t iy)
Float_t fPeakAmp
void SetIX(UChar_t ix)
UChar_t GetIY() const
void GetLabCoords(Float_t &x, Float_t &y, Float_t &z) const
BmnECALDigit(Float_t x, Float_t y, UChar_t ch, Float_t amp)
Main constructor.
void SetStartTime(Float_t ns)
BmnECALDigit()
Default constructor.
Float_t GetPeakTime() const
Float_t GetStartTime() const
Float_t fPeakTime
Double_t GetCoeff()
Bool_t IsAdcMatch(ULong_t adcId, UShort_t adcChan)
void SetCoords(TGeoNode *cell, TGeoNode *mother)
void SetCoeff(Int_t chan, Double_t coeff)
Double_t GetLabZ()
Double_t * EcalCoords()
virtual ~BmnECALMapElement()
Double_t GetLabY()
void SetAdcMap(Int_t chan, ULong_t adcId, UShort_t adcChan)
Double_t GetLabX()
Double_t * LabCoords()
static void PrintTitle()