forked from GRIFFINCollaboration/NTuple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Griffin.hh
90 lines (82 loc) · 2 KB
/
Griffin.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef __GRIFFIN_HH
#define __GRIFFIN_HH
#include "TVector3.h"
class Detector : public TObject {
public:
Detector(){};
Detector(int evNumber, int detNumber, int cryNumber, double simEnergy, double energy, TVector3 pos, double time)
: fEventNumber(evNumber), fDetectorId(detNumber), fCrystalId(cryNumber), fSimulationEnergy(simEnergy), fEnergy(energy), fPosition(pos), fTime(time) {
}
~Detector(){};
void AddEnergy(double simEnergy, double energy) {
fSimulationEnergy += simEnergy;
fEnergy += energy;
}
void Set(int evNumber, int detNumber, int cryNumber, double simEnergy, double energy, TVector3 pos, double time) {
fEventNumber = evNumber;
fDetectorId = detNumber;
fCrystalId = cryNumber;
fSimulationEnergy = simEnergy;
fEnergy = energy;
fPosition = pos;
fTime = time;
}
void SetTime(double time) {
fTime = time;
}
void Clear(Option_t* opt = NULL) {
fEventNumber = -1;
fDetectorId = 0;
fCrystalId = 0;
fSimulationEnergy = 0;
fEnergy = 0;
fPosition.SetXYZ(0.,0.,0.);
fTime = 0;
}
int EventNumber() {
return fEventNumber;
}
int DetectorId() {
return fDetectorId;
}
int CrystalId() {
return fCrystalId;
}
double SimulationEnergy() {
return fSimulationEnergy;
}
double Energy() {
return fEnergy;
}
TVector3 Position() {
return fPosition;
}
double Time() {
return fTime;
}
private:
int fEventNumber;
int fDetectorId;
int fCrystalId;
double fSimulationEnergy;
double fEnergy;
TVector3 fPosition;
double fTime;
ClassDef(Detector,1);
};
//class GriffinDetector : public Detector {
//public:
// using Detector::Detector;
//
//private:
// ClassDef(GriffinDetector,1);
//};
//
//class GriffinBgo : public Detector {
//public:
// using Detector::Detector;
//
//private:
// ClassDef(GriffinBgo,1);
//};
#endif