FairRoot/PandaRoot
PndEmcApdPoint.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // ----- PndEmcApdPoint header file -----
3 // ----- Created 07/04/08 by S.Spataro -----
4 // ------------------------------------------------------------------------
5 //#pragma once
6 #ifndef PNDEMCAPDPOINT_H
7 #define PNDEMCAPDPOINT_H
8 
9 #include "TObject.h"
10 #include "TVector3.h"
11 #include "TLorentzVector.h"
12 #include "FairMCPoint.h"
13 
14 class PndEmcApdPoint : public FairMCPoint
15 {
16 
17  public:
18 
21 
22 
35  PndEmcApdPoint(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom,
36  Double_t tof, Double_t length, Double_t eLoss,
37  Short_t mod, Short_t row, Short_t crys, Short_t copy, Short_t flag);
38 
41 
42 
44  virtual ~PndEmcApdPoint();
45 
46 
48  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() ;};
49  Double_t GetPhi() const { return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY,fX)*TMath::RadToDeg() ;};
50  Short_t GetFlag() const { return fFlag; };
51 
52  Short_t GetXPad() const;
53  Short_t GetYPad() const;
54 
55  void Position(TVector3& pos) { pos.SetXYZ(fX, fY, fZ); };
56  void Momentum(TVector3& mom) { mom.SetXYZ(fPx, fPy, fPz); };
57  Short_t GetModule() const { return (fDetectorID/100000000);};
58  Short_t GetRow() const { return ((fDetectorID/1000000)%100);};
59  Short_t GetCrystal() const { return (fDetectorID%10000);};
60  Short_t GetCopy() const { return ((fDetectorID/10000)%100);};
62  void SetModule(Short_t mod) { nModule = mod;};
63  void SetRow(Short_t row) { nRow = row;};
64  void SetCrystal(Short_t crys) { nCrystal = crys;};
65  void SetFlag(Short_t flag) { fFlag = flag;};
66 
68  virtual void Print(const Option_t* opt) const;
69 
70 
71  protected:
72  Short_t nModule; // Module number
73  Short_t nRow; // Row number
74  Short_t nCrystal; // Crystal number
75  Short_t nCopy; // Copy number
76  Short_t fFlag; // MC Flag: -1 entering, 0 crossing, 1 exiting,
77 
78  ClassDef(PndEmcApdPoint,1)
79 
80 };
81 
82 #endif
int row
Definition: anaLmdDigi.C:67
TVector3 pos
Short_t GetRow() const
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t GetTheta() const
Double_t mom
Definition: plot_dirc.C:14
Double_t GetPhi() const
void SetFlag(Short_t flag)
Double_t fZ
Definition: PndCaloDraw.cxx:34
void Position(TVector3 &pos)
Double_t
static T ATan2(const T &y, const T &x)
Short_t GetCrystal() const
void SetCrystal(Short_t crys)
Short_t GetCopy() const
Short_t GetYPad() const
virtual ~PndEmcApdPoint()
Double_t fY
Definition: PndCaloDraw.cxx:34
virtual void Print(const Option_t *opt) const
Short_t GetFlag() const
void SetModule(Short_t mod)
void SetRow(Short_t row)
void Momentum(TVector3 &mom)
Short_t GetXPad() const
Short_t GetModule() const
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72