FairRoot/PandaRoot
PndSciTHit.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // ----- Forward tof header file -----
3 // ----- created by A. Sanchez -----
4 // ----- modified by D. Steinschaden -----
5 // ----- last update 05.2015 -----
6 // --------------------------------------------------------------------------
7 
8 
18 #ifndef PNDSCITHIT_H
19 #define PNDSCITHIT_H
20 
21 
22 #include "TVector3.h"
23 #include "TString.h"
24 #include "FairHit.h"
25 
26 #include <stdio.h>
27 #include <iostream>
28 
29 class PndSciTHit : public FairHit
30 {
31 
32 
33  public:
34 
35  //** Default constructor (not for use) **/
36  PndSciTHit();
37 
38 
39  PndSciTHit(Int_t detID, TString detName,Double_t time,Double_t dt,
40  Double_t sipm1, Double_t dsipm1,Double_t sipm2, Double_t dsipm2,
41  TVector3& pos,TVector3& dpos,Int_t index, Double_t charge);
42 
43  //PndSciTHit(PndSciTHit& c);
44  //** Destructor **/
45  virtual ~PndSciTHit();
46 
47 
48  //** Accessors **/
49 
50  TString GetDetName()const { return fDetName; };
52 
53  Double_t GetSiPm1(){return fSiPm1;};
55  Double_t GetSiPm2(){return fSiPm2;};
57 
58 
59 // Following functions are redundant and should be removed.
60 //use the base funktion provided by FairHit instead!!
61 
62  Double_t GetTime() {return GetTimeStamp();};
63  Double_t GetDt() {return GetTimeStampError();};
64  TVector3 GetPosition() const { return TVector3(fX, fY, fZ);};
65 
69  void SetCharge(Double_t charge){fCharge = charge;};
70  void AddCharge(double charge){fCharge += charge;}
71 
72  void SetSiPm1(Double_t sipm1){fSiPm1 = sipm1;};
73  void SetDSiPm1(Double_t dsipm1){fDSiPm1 = dsipm1;};
74  void SetSiPm2(Double_t sipm2){fSiPm2 = sipm2;};
75  void SetDSiPm2(Double_t dsipm2){fDSiPm2 = dsipm2;};
76 
77 
78  //** Operator overload**/
79 
81 
82  virtual bool operator< (const PndSciTHit& right) const;
83  virtual bool operator> (const PndSciTHit& right) const;
84 
85  virtual bool equal(FairTimeStamp* data);
86 
87 
89  virtual void Print(const Option_t* opt = 0) const;
90 
91 
92  public:
93 
94  TString fDetName; // Detector name
95  Double_t fCharge;//, Eloss [GeV]
96 
97  Double_t fSiPm1; // Timestamp for SiPm1 [ns]
98  Double_t fDSiPm1; // Timing error for SiPm1
99  Double_t fSiPm2; // Timestamp for SiPm2
100  Double_t fDSiPm2; // Timing error for SiPm2
101 
102  ClassDef(PndSciTHit,3);
103 
104 };
105 
106 #endif
void SetDSiPm2(Double_t dsipm2)
Definition: PndSciTHit.h:75
TVector3 pos
void SetSiPm2(Double_t sipm2)
Definition: PndSciTHit.h:74
virtual bool equal(FairTimeStamp *data)
Definition: PndSciTHit.cxx:35
void SetDetName(TString name)
Definition: PndSciTHit.h:68
void SetDSiPm1(Double_t dsipm1)
Definition: PndSciTHit.h:73
Double_t fDSiPm1
Definition: PndSciTHit.h:98
virtual bool operator>(const PndSciTHit &right) const
Definition: PndSciTHit.cxx:27
Double_t fX
Definition: PndCaloDraw.cxx:34
void SetCharge(Double_t charge)
Definition: PndSciTHit.h:69
TVector3 GetPosition() const
Definition: PndSciTHit.h:64
Double_t fZ
Definition: PndCaloDraw.cxx:34
Double_t fSiPm2
Definition: PndSciTHit.h:99
ClassDef(PndSciTHit, 3)
Double_t fCharge
Definition: PndSciTHit.h:95
Double_t GetDSiPm2()
Definition: PndSciTHit.h:56
friend std::ostream & operator<<(std::ostream &out, PndSciTHit &hit)
Definition: PndSciTHit.cxx:14
virtual void Print(const Option_t *opt=0) const
Definition: PndSciTHit.cxx:76
Double_t
Double_t GetDt()
Definition: PndSciTHit.h:63
TString GetDetName() const
Definition: PndSciTHit.h:50
Double_t GetSiPm2()
Definition: PndSciTHit.h:55
Double_t GetDSiPm1()
Definition: PndSciTHit.h:54
TFile * out
Definition: reco_muo.C:20
TString name
TString fDetName
Definition: PndSciTHit.h:94
Double_t GetSiPm1()
Definition: PndSciTHit.h:53
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
Double_t fSiPm1
Definition: PndSciTHit.h:97
virtual bool operator<(const PndSciTHit &right) const
Definition: PndSciTHit.cxx:19
Double_t fY
Definition: PndCaloDraw.cxx:34
Double_t GetTime()
Definition: PndSciTHit.h:62
Double_t fDSiPm2
Definition: PndSciTHit.h:100
virtual ~PndSciTHit()
Definition: PndSciTHit.cxx:72
void SetSiPm1(Double_t sipm1)
Definition: PndSciTHit.h:72
void AddCharge(double charge)
Definition: PndSciTHit.h:70
Double_t GetCharge()
Definition: PndSciTHit.h:51