ProtoDUNEBeamInstrument.h
Go to the documentation of this file.
1 // ProtoDUNEBeamInstrument.h
2 //
3 // Leigh Whitehead
4 // leigh.howard.whitehead@cern.ch
5 // June 2018
6 //
7 // This class contains all of the information from a given
8 // simulated beam line component
9 
10 #ifndef PROTODUNEBEAMINSTRUMENT_H
11 #define PROTODUNEBEAMINSTRUMENT_H
12 
13 #include <string>
14 #include <vector>
15 #include "TVector3.h"
16 
17 namespace sim {
19 
20  public:
21  ProtoDUNEBeamInstrument(); //constructor
22  ~ProtoDUNEBeamInstrument(); //destructor
23 
25  Float_t x,
26  Float_t y,
27  Float_t z,
28  Float_t t,
29  Float_t Px,
30  Float_t Py,
31  Float_t Pz,
32  Int_t PDGid,
33  Int_t EventID,
34  Int_t TrackID,
35  Float_t Resolution
36  );
37 
38  /// Vector-based constructor
40  std::vector<Float_t> position,
41  Float_t t,
42  std::vector<Float_t> momentum,
43  Int_t PDGid,
44  Int_t EventID,
45  Int_t TrackID,
46  Float_t Resolution
47  );
48 
49  // TVector3-based constructor
51  TVector3 position,
52  Float_t t,
53  TVector3 momentum,
54  Int_t PDGid,
55  Int_t EventID,
56  Int_t TrackID,
57  Float_t Resolution
58  );
59 
60  // Copy constructor
62 
64  Float_t GetX() const {return fX;};
65  Float_t GetY() const {return fY;};
66  Float_t GetZ() const {return fZ;};
67  Float_t GetT() const {return fT;};
68  Float_t GetPx() const {return fPx;};
69  Float_t GetPy() const {return fPy;};
70  Float_t GetPz() const {return fPz;};
71  Int_t GetPDGid() const {return fPDGid;};
72  Int_t GetEventID() const {return fEventID;};
73  Int_t GetTrackID() const {return fTrackID;};
74  Float_t GetSmearedVar1() const {return fSmearedVar1;};
75  Float_t GetSmearedVar2() const {return fSmearedVar2;};
76  Float_t GetResolution() const {return fResolution;};
77 
79  void SetX(Float_t val) {fX = val;};
80  void SetY(Float_t val) {fY = val;};
81  void SetZ(Float_t val) {fZ = val;};
82  void SetT(Float_t val) {fT = val;};
83  void SetPx(Float_t val) {fPx = val;};
84  void SetPy(Float_t val) {fPy = val;};
85  void SetPz(Float_t val) {fPz = val;};
86  void SetPDGid(Int_t val) {fPDGid = val;};
87  void SetEventID(Int_t val) {fEventID = val;};
88  void SetTrackID(Int_t val) {fTrackID = val;};
89  void SetSmearedVar1(Float_t val) {fSmearedVar1 = val;};
90  void SetSmearedVar2(Float_t val) {fSmearedVar2 = val;};
91  void SetResolution(Float_t val) {fResolution = val;};
92 
93 
94  Float_t UnitGauss(Float_t mean, Float_t value, Float_t sigma){
95  Float_t p = exp(-0.5*pow((mean-value),2)/(pow(sigma,2)));
96  return p;}
97 
98 
99 
100  private:
101 
103 
104  Float_t fX;
105  Float_t fY;
106  Float_t fZ;
107  Float_t fT;
108  Float_t fPx;
109  Float_t fPy;
110  Float_t fPz;
111  Int_t fPDGid;
112  Int_t fEventID;
113  Int_t fTrackID;
114  Float_t fSmearedVar1;
115  Float_t fSmearedVar2;
116  Float_t fResolution;
117  };
118 }
119 
120 ////////////////////////////////////////////////////////////////////////
121 #endif // PROTODUNEBEAMINSTRUMENT_H
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
constexpr T pow(T x)
Definition: pow.h:72
std::string GetInstrumentName() const
p
Definition: test.py:223
Code to link reconstructed objects back to the MC truth information.
list x
Definition: train.py:276
def momentum(x1, x2, x3, scale=1.)
void SetInstrumentName(std::string name)
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
Definition: statistics.cc:16
Float_t UnitGauss(Float_t mean, Float_t value, Float_t sigma)