BmnRoot
Loading...
Searching...
No Matches
BmnECALDigit.cxx
Go to the documentation of this file.
1
#include "
BmnECALDigit.h
"
2
#include "TError.h"
3
#include <iostream>
4
5
using namespace
std
;
6
7
void
BmnECALMapElement::SetAdcMap
(Int_t chan, ULong_t adcId, UShort_t adcChan) {
8
if
(fChan > -1 && fChan != chan) {
9
Error(__func__,
"ECAL channel does't match: was %d, become %d, reinitializing"
, fChan, chan);
10
}
11
fChan = chan;
12
fAdcId = adcId;
13
fAdcChan = adcChan;
14
}
15
16
void
BmnECALMapElement::SetCoeff
(Int_t chan, Double_t coeff) {
17
if
(fChan > -1 && fChan != chan) {
18
Error(__func__,
"ECAL channel does't match: was %d, become %d, reinitializing"
, fChan, chan);
19
}
20
fChan = chan;
21
fCoeff = coeff;
22
}
23
24
void
BmnECALMapElement::SetCoords
(TGeoNode* cell, TGeoNode* mother) {
25
Int_t chan = cell->GetNumber();
26
if
(fChan > -1 && fChan != chan) {
27
Fatal(__func__,
"ECAL channel does't match: was %d, become %d, fatal!"
, fChan, chan);
28
}
29
static
const
Double_t base[] = {0.,0.,0.};
30
cell->LocalToMaster(base,
EcalCoords
());
31
mother->LocalToMaster(
EcalCoords
(),
LabCoords
());
32
}
33
34
void
BmnECALMapElement::PrintTitle
() {
35
cout <<
"Id#"
36
<<
"\t"
<<
"fAdcChan"
37
<<
"\t"
<<
"fChan"
38
<<
"\t"
<<
"fCoeff"
39
<<
"\t"
<<
"fX"
40
<<
"\t"
<<
"fY"
41
<<
"\t"
<<
"fLabX"
42
<<
"\t"
<<
"fLabY"
43
<<
"\t"
<<
"fLabZ"
<<
"\n"
;
44
}
45
46
void
BmnECALMapElement::Print
() {
47
cout <<
"0x"
<< std::hex << fAdcId << std::dec
48
<<
"\t"
<< fAdcChan
49
<<
"\t"
<< fChan
50
<<
"\t"
<< fCoeff
51
<<
"\t"
<< fX
52
<<
"\t"
<< fY
53
<<
"\t"
<< fLabX
54
<<
"\t"
<< fLabY
55
<<
"\t"
<< fLabZ <<
"\n"
;
56
}
57
58
BmnECALDigit::BmnECALDigit
()
59
:
BmnCaloDigit
()
60
{
61
fPeakAmp = 0;
62
fPeakTime = 0;
63
fStartTime = 0;
64
fLabX = fLabY = fLabZ = 0;
65
}
66
67
BmnECALDigit::BmnECALDigit
(Float_t x, Float_t y, UChar_t ch, Float_t amp)
68
:
BmnCaloDigit
(x, y, ch, amp)
69
{
70
fPeakAmp = 0;
71
fPeakTime = 0;
72
fStartTime = 0;
73
fLabX = fLabY = fLabZ = 0;
74
}
75
76
BmnECALDigit::BmnECALDigit
(
BmnECALMapElement
* e) {
77
Set
(e);
78
}
79
80
void
BmnECALDigit::Set
(
BmnECALMapElement
* e, Float_t amp, Float_t peakAmp, Float_t startTime, Float_t peakTime) {
81
if
(e) {
82
fChannel
= e->
GetChan
();
83
fX
= e->
GetX
();
84
fY
= e->
GetY
();
85
fLabX = e->
GetLabX
();
86
fLabY = e->
GetLabY
();
87
fLabZ = e->
GetLabZ
();
88
}
89
fAmp
= amp;
90
fPeakAmp = peakAmp;
91
fPeakTime = peakTime;
92
fStartTime = startTime;
93
}
BmnCaloDigit
Definition
BmnCaloDigit.h:15
BmnCaloDigit::fChannel
UShort_t fChannel
Definition
BmnCaloDigit.h:39
BmnCaloDigit::fY
Float_t fY
Definition
BmnCaloDigit.h:38
BmnCaloDigit::fAmp
Float_t fAmp
Definition
BmnCaloDigit.h:40
BmnCaloDigit::fX
Float_t fX
Definition
BmnCaloDigit.h:37
BmnECALDigit::Set
void Set(BmnECALMapElement *e, Float_t amp=0., Float_t peakAmp=0., Float_t startTime=0., Float_t peakTime=0.)
Definition
BmnECALDigit.cxx:80
BmnECALDigit::BmnECALDigit
BmnECALDigit()
Definition
BmnECALDigit.cxx:58
BmnECALMapElement
Definition
BmnECALDigit.h:9
BmnECALMapElement::GetX
Float_t GetX()
Definition
BmnECALDigit.h:31
BmnECALMapElement::Print
void Print()
Definition
BmnECALDigit.cxx:46
BmnECALMapElement::GetY
Float_t GetY()
Definition
BmnECALDigit.h:32
BmnECALMapElement::PrintTitle
static void PrintTitle()
Definition
BmnECALDigit.cxx:34
BmnECALMapElement::SetCoords
void SetCoords(TGeoNode *cell, TGeoNode *mother)
Definition
BmnECALDigit.cxx:24
BmnECALMapElement::SetCoeff
void SetCoeff(Int_t chan, Double_t coeff)
Definition
BmnECALDigit.cxx:16
BmnECALMapElement::GetLabZ
Double_t GetLabZ()
Definition
BmnECALDigit.h:36
BmnECALMapElement::EcalCoords
Double_t * EcalCoords()
Definition
BmnECALDigit.h:40
BmnECALMapElement::GetLabY
Double_t GetLabY()
Definition
BmnECALDigit.h:35
BmnECALMapElement::SetAdcMap
void SetAdcMap(Int_t chan, ULong_t adcId, UShort_t adcChan)
Definition
BmnECALDigit.cxx:7
BmnECALMapElement::GetChan
Int_t GetChan()
Definition
BmnECALDigit.h:30
BmnECALMapElement::GetLabX
Double_t GetLabX()
Definition
BmnECALDigit.h:34
BmnECALMapElement::LabCoords
Double_t * LabCoords()
Definition
BmnECALDigit.h:41
BmnECALDigit.h
std
STL namespace.
detectors
ecal
BmnECALDigit.cxx
Generated on Fri May 15 2026 10:40:51 for BmnRoot by
1.9.8