FairRoot/PandaRoot
PndGemMCPoint.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndGemPoint header file -----
3 // ----- Created 27/10/08 by R. Kliemt -----
4 // -------------------------------------------------------------------------
5 
6 
16 #ifndef PNDGEMMCPOINT_H
17 #define PNDGEMMCPOINT_H
18 
19 
20 #include "TObject.h"
21 #include "TVector3.h"
22 #include "FairMCPoint.h"
23 #include "TString.h"
24 
25 #include <stdio.h>
26 #include <iostream>
27 
28 using namespace std;
29 
30 
31 
32 class PndGemMCPoint : public FairMCPoint
33 {
35  out << "-I- PndGemMCPoint: PndGem Point for track " << point.GetTrackID()
36  << " in detector " << point.GetDetectorID() << " with sensorID "
37  << point.GetSensorId() << std::endl;
38  out << " Position in (" << point.GetX() << ", " << point.GetY() << ", " << point.GetZ() << ") cm" << std::endl;
39  out << " Position out (" << point.GetXOut() << ", " << point.GetYOut() << ", " << point.GetZOut() << ") cm" << std::endl;
40  out << " Momentum (" << point.GetPx() << ", " << point.GetPy() << ", " << point.GetPz()
41  << ") GeV" << std::endl;
42  out << " Time " << point.GetTime() << " ns, Length " << point.GetLength()
43  << " cm, Energy loss " << point.GetEnergyLoss()*1.0e06 << " keV" << std::endl;
44  return out;
45  }
46 
47  public:
48 
50  PndGemMCPoint();
51 
64  PndGemMCPoint(Int_t trackID, Int_t detID, Int_t sensID,
65  TVector3 posIn, TVector3 posOut,
66  TVector3 momIn, TVector3 momOut,
67  Double_t tof, Double_t length, Double_t eLoss);
68 
69 
71  PndGemMCPoint(const PndGemMCPoint& point) : FairMCPoint(point),
72  fXfOut(0.), fYfOut(0.), fZfOut(0.),
73  fPxfOut(0.), fPyfOut(0.), fPzfOut(0.),
74  fSensorId(0)
75  { *this = point; };
76 
77 
79  virtual ~PndGemMCPoint();
80 
81 
83  Double_t GetXOut() const { return fXfOut;};
84  Double_t GetYOut() const { return fYfOut;};
85  Double_t GetZOut() const { return fZfOut;};
86 
87  Double_t GetPxOut() const { return fPxfOut; }
88  Double_t GetPyOut() const { return fPyfOut; }
89  Double_t GetPzOut() const { return fPzfOut; }
90  Int_t GetSensorId() const { return fSensorId;}
91  TVector3 GetPosition() const { return TVector3(fX, fY, fZ);}
92  TVector3 GetPositionOut() const { return TVector3(fXfOut, fYfOut, fZfOut);}
93 
94  void PositionOut(TVector3& pos) const { pos.SetXYZ(fXfOut, fYfOut, fZfOut);};
95  void MomentumOut(TVector3& mom) const { mom.SetXYZ(fPxfOut,fPyfOut,fPzfOut); }
96 
97 
99  void SetPositionOut(TVector3 pos);
100  void SetMomentumOut(TVector3 mom);
101  void SetSensorId (Int_t sensId) { fSensorId = sensId; };
102 
103 
105  virtual void Print(const Option_t* opt = 0) const;
106 
107 
108  protected:
109 
110  Double32_t fXfOut, fYfOut, fZfOut;
111 
112  Double32_t fPxfOut, fPyfOut, fPzfOut;
113  Int_t fSensorId;
114 
115 
116  ClassDef(PndGemMCPoint,1);
117 
118 };
119 
120 inline void PndGemMCPoint::SetPositionOut(TVector3 pos) {
121  fXfOut = pos.X();
122  fYfOut = pos.Y();
123  fZfOut = pos.Z();
124 }
125 
126 
127 inline void PndGemMCPoint::SetMomentumOut(TVector3 mom) {
128  fPxfOut = mom.Px();
129  fPyfOut = mom.Py();
130  fPzfOut = mom.Pz();
131 }
132 
133 
134 
135 #endif
MechFsc Print()
TVector3 pos
Double32_t fZfOut
void SetPositionOut(TVector3 pos)
Double_t fX
Definition: PndCaloDraw.cxx:34
Double32_t fPzfOut
Double_t GetZOut() const
Definition: PndGemMCPoint.h:85
std::ostream & operator<<(std::ostream &o, const PndEventInfo &a)
Double_t mom
Definition: plot_dirc.C:14
Double_t fZ
Definition: PndCaloDraw.cxx:34
Double_t GetPxOut() const
Definition: PndGemMCPoint.h:87
void SetSensorId(Int_t sensId)
TVector3 GetPosition() const
Definition: PndGemMCPoint.h:91
Double_t GetPzOut() const
Definition: PndGemMCPoint.h:89
Int_t GetSensorId() const
Definition: PndGemMCPoint.h:90
Double_t GetPyOut() const
Definition: PndGemMCPoint.h:88
Double_t
TClonesArray * point
Definition: anaLmdDigi.C:29
TFile * out
Definition: reco_muo.C:20
PndGemMCPoint(const PndGemMCPoint &point)
Definition: PndGemMCPoint.h:71
void PositionOut(TVector3 &pos) const
Definition: PndGemMCPoint.h:94
void SetMomentumOut(TVector3 mom)
Double_t fY
Definition: PndCaloDraw.cxx:34
Double_t GetYOut() const
Definition: PndGemMCPoint.h:84
Double_t GetXOut() const
Definition: PndGemMCPoint.h:83
void MomentumOut(TVector3 &mom) const
Definition: PndGemMCPoint.h:95
TVector3 GetPositionOut() const
Definition: PndGemMCPoint.h:92