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  public:
19 
32  PndEmcApdPoint(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys,
33  Short_t copy, Short_t flag);
34 
36  PndEmcApdPoint(const PndEmcApdPoint &point);
37 
39  virtual ~PndEmcApdPoint();
40 
42  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(); };
43  Double_t GetPhi() const { return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY, fX) * TMath::RadToDeg(); };
44  Short_t GetFlag() const { return fFlag; };
45 
46  Short_t GetXPad() const;
47  Short_t GetYPad() const;
48 
49  void Position(TVector3 &pos) { pos.SetXYZ(fX, fY, fZ); };
50  void Momentum(TVector3 &mom) { mom.SetXYZ(fPx, fPy, fPz); };
51  Short_t GetModule() const { return (fDetectorID / 100000000); };
52  Short_t GetRow() const { return ((fDetectorID / 1000000) % 100); };
53  Short_t GetCrystal() const { return (fDetectorID % 10000); };
54  Short_t GetCopy() const { return ((fDetectorID / 10000) % 100); };
56  void SetModule(Short_t mod) { nModule = mod; };
57  void SetRow(Short_t row) { nRow = row; };
58  void SetCrystal(Short_t crys) { nCrystal = crys; };
59  void SetFlag(Short_t flag) { fFlag = flag; };
60 
62  virtual void Print(const Option_t *opt) const;
63 
64  protected:
65  Short_t nModule; // Module number
66  Short_t nRow; // Row number
67  Short_t nCrystal; // Crystal number
68  Short_t nCopy; // Copy number
69  Short_t fFlag; // MC Flag: -1 entering, 0 crossing, 1 exiting,
70 
71  ClassDef(PndEmcApdPoint, 1)
72 };
73 
74 #endif
Short_t GetCrystal() const
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:28
virtual ~PndEmcApdPoint()
void SetFlag(Short_t flag)
void Position(TVector3 &pos)
Short_t GetCopy() const
Short_t GetRow() const
static T ATan2(const T &y, const T &x)
Double_t GetTheta() const
void SetCrystal(Short_t crys)
Short_t GetXPad() const
Double_t GetPhi() const
void SetModule(Short_t mod)
void SetRow(Short_t row)
void Momentum(TVector3 &mom)
virtual void Print(const Option_t *opt) const
Short_t GetYPad() const
Short_t GetModule() const
Short_t GetFlag() const