FairRoot/PandaRoot
PndEmcPoint.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // ----- PndEmcPoint header file -----
3 // ----- Created 14/08/06 by S.Spataro -----
4 // ------------------------------------------------------------------------
5 //#pragma once
6 #ifndef PNDEMCPOINT_H
7 #define PNDEMCPOINT_H
8 
9 #include "TObject.h"
10 #include "TVector3.h"
11 #include "TLorentzVector.h"
12 #include "FairMCPoint.h"
13 #include "PndDetectorList.h"
14 
19 class PndEmcPoint : public FairMCPoint
20 {
21 
22  public:
23 
25  PndEmcPoint();
26 
27 
42  PndEmcPoint(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom,
43  Double_t tof, Double_t length, Double_t eLoss,
44  Short_t mod, Short_t row, Short_t crys, Short_t copy, Bool_t entering = kFALSE, Bool_t exiting=kFALSE);
45 
48 
49 
51  virtual ~PndEmcPoint();
52 
53 
55  Double_t GetTheta() const { return fX == 0.0 && fY == 0.0 && fZ == 0.0 ? 0.0 : TMath::ATan2(sqrt(fX*fX+fY*fY),fZ)*TMath::RadToDeg() ;};
56  Double_t GetPhi() const { return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY,fX)*TMath::RadToDeg() ;};
57  Short_t GetXPad() const;
58  Short_t GetYPad() const;
59 
60  Short_t GetModule() const { return (fDetectorID/100000000);};
61  Short_t GetRow() const { return ((fDetectorID/1000000)%100);};
62  Short_t GetCrystal() const { return (fDetectorID%10000);};
63  Short_t GetCopy() const { return ((fDetectorID/10000)%100);};
64  Bool_t GetEntering() const { return fEntering;}
65  Bool_t GetExiting() const { return fExiting;}
68  void SetModule(Short_t mod) { nModule = mod;};
69  void SetRow(Short_t row) { nRow = row;};
70  void SetCrystal(Short_t crys) { nCrystal = crys;};
71  virtual void SetTrackID(Int_t trackId) {FairMCPoint::SetTrackID(trackId); SetLink(FairLink("MCTrack", trackId));} //14.09.10 Stefano FIX
72 
74  virtual void Print(const Option_t* opt) const;
75 
76 
77  protected:
78  Short_t nModule; // Module number
79  Short_t nRow; // Row number
80  Short_t nCrystal; // Crystal number
81  Short_t nCopy; // Copy number
82  Bool_t fEntering; //< Is particle entering into crystal
83  Bool_t fExiting; //< Is particle exiting the crystal
84 
85  ClassDef(PndEmcPoint,1)
86 
87 };
88 
89 
90 #endif
represents a mc hit in an emc crystal
Definition: PndEmcPoint.h:19
int row
Definition: anaLmdDigi.C:67
TVector3 pos
Short_t GetModule() const
Definition: PndEmcPoint.h:60
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Short_t GetYPad() const
Double_t fX
Definition: PndCaloDraw.cxx:34
Short_t nRow
Definition: PndEmcPoint.h:79
Short_t nModule
Definition: PndEmcPoint.h:78
Double_t mom
Definition: plot_dirc.C:14
Short_t nCopy
Definition: PndEmcPoint.h:81
Double_t fZ
Definition: PndCaloDraw.cxx:34
Bool_t GetExiting() const
Definition: PndEmcPoint.h:65
Short_t GetRow() const
Definition: PndEmcPoint.h:61
Double_t GetPhi() const
Definition: PndEmcPoint.h:56
Double_t
static T ATan2(const T &y, const T &x)
Short_t GetCrystal() const
Definition: PndEmcPoint.h:62
void SetModule(Short_t mod)
Definition: PndEmcPoint.h:68
Short_t GetXPad() const
Definition: PndEmcPoint.cxx:72
Bool_t fEntering
Definition: PndEmcPoint.h:82
void SetRow(Short_t row)
Definition: PndEmcPoint.h:69
Double_t GetTheta() const
Definition: PndEmcPoint.h:55
virtual void SetTrackID(Int_t trackId)
Definition: PndEmcPoint.h:71
Double_t fY
Definition: PndCaloDraw.cxx:34
Bool_t GetEntering() const
Definition: PndEmcPoint.h:64
void SetCrystal(Short_t crys)
Definition: PndEmcPoint.h:70
Bool_t fExiting
Definition: PndEmcPoint.h:83
Short_t nCrystal
Definition: PndEmcPoint.h:80
Short_t GetCopy() const
Definition: PndEmcPoint.h:63
virtual void Print(const Option_t *opt) const
Definition: PndEmcPoint.cxx:54
virtual ~PndEmcPoint()
Definition: PndEmcPoint.cxx:50
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72