FairRoot/PandaRoot
PndSdsMCPoint.h
Go to the documentation of this file.
1 
10 #ifndef PNDSDSMCPOINT_H
11 #define PNDSDSMCPOINT_H
12 
13 
14 #include "TObject.h"
15 #include "TVector3.h"
16 #include "FairMCPoint.h"
17 #include "TString.h"
18 #include "PndDetectorList.h"
19 
20 #include <stdio.h>
21 #include <iostream>
22 
23 using namespace std;
24 
25 
26 
27 class PndSdsMCPoint : public FairMCPoint
28 {
30  out << "-I- PndSdsMCPoint: PndSds Point for track " << point.GetTrackID()
31  << " in detector " << point.GetDetectorID() << " with sensor "
32  << point.GetSensorID() << std::endl;
33  out << " Position in (" << point.GetX() << ", " << point.GetY() << ", " << point.GetZ() << ") cm" << std::endl;
34  out << " Position out (" << point.GetXOut() << ", " << point.GetYOut() << ", " << point.GetZOut() << ") cm" << std::endl;
35  out << " Momentum (" << point.GetPx() << ", " << point.GetPy() << ", " << point.GetPz() << ") GeV" << std::endl;
36  out << " Time " << point.GetTime() << " ns, Length " << point.GetLength() << " cm, Energy loss " << point.GetEnergyLoss()*1.0e06 << " keV" << std::endl;
37  return out;
38  }
39 
40  public:
41 
43  PndSdsMCPoint();
44 
45 
58  PndSdsMCPoint(Int_t trackID, Int_t detID, Int_t sensorID,
59  TVector3 posIn, TVector3 posOut,
60  TVector3 momIn, TVector3 momOut,
61  Double_t tof, Double_t length, Double_t eLoss);
62 
63 
65  PndSdsMCPoint(const PndSdsMCPoint& point) : FairMCPoint(point),
66  fXfOut(point.fXfOut),
67  fYfOut(point.fYfOut),
68  fZfOut(point.fZfOut),
69  fPxfOut(point.fPxfOut),
70  fPyfOut(point.fPyfOut),
71  fPzfOut(point.fPzfOut),
72  fSensorID(point.fSensorID)
73  { *this = point; };
74 
75 
77  virtual ~PndSdsMCPoint();
78 
79 
81  Double_t GetXOut() const { return fXfOut;};
82  Double_t GetYOut() const { return fYfOut;};
83  Double_t GetZOut() const { return fZfOut;};
84 
85  Double_t GetPxOut() const { return fPxfOut; }
86  Double_t GetPyOut() const { return fPyfOut; }
87  Double_t GetPzOut() const { return fPzfOut; }
88  // TString GetDetName() const { return fDetName;}
89  Int_t GetSensorID() const { return fSensorID;}
90  TVector3 GetPosition() const { return TVector3(fX, fY, fZ);}
91  TVector3 GetPositionOut() const { return TVector3(fXfOut, fYfOut, fZfOut);}
92 
93  void PositionOut(TVector3& pos) const { pos.SetXYZ(fXfOut, fYfOut, fZfOut);};
94  void MomentumOut(TVector3& mom) const { mom.SetXYZ(fPxfOut,fPyfOut,fPzfOut); }
95 
96 
98  void SetPositionOut(TVector3 pos);
99  void SetMomentumOut(TVector3 mom);
100  //void SetDetName(TString name) {fDetName = name;};
101  void SetSensorID(Int_t sensorID){fSensorID = sensorID;}
102  virtual void SetTrackID(Int_t id){
103  //SetLink("MCTrack", id);
104  FairMCPoint::SetTrackID(id);
105  };
106 
107 
109  virtual void Print(const Option_t* opt = 0) const;
110 
111 
112  protected:
113 
114  Double32_t fXfOut, fYfOut, fZfOut;
115 
116  Double32_t fPxfOut, fPyfOut, fPzfOut;
117  Int_t fSensorID;
118 
119 
120  ClassDef(PndSdsMCPoint,6);
121 
122 };
123 
124 inline void PndSdsMCPoint::SetPositionOut(TVector3 pos) {
125  fXfOut = pos.X();
126  fYfOut = pos.Y();
127  fZfOut = pos.Z();
128 }
129 
130 
131 inline void PndSdsMCPoint::SetMomentumOut(TVector3 mom) {
132  fPxfOut = mom.Px();
133  fPyfOut = mom.Py();
134  fPzfOut = mom.Pz();
135 }
136 
137 
138 
139 #endif
MechFsc Print()
TVector3 pos
PndSdsMCPoint(const PndSdsMCPoint &point)
Definition: PndSdsMCPoint.h:65
Double_t GetXOut() const
Definition: PndSdsMCPoint.h:81
virtual void SetTrackID(Int_t id)
Double_t GetPyOut() const
Definition: PndSdsMCPoint.h:86
Double_t GetZOut() const
Definition: PndSdsMCPoint.h:83
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t GetPxOut() const
Definition: PndSdsMCPoint.h:85
TVector3 GetPositionOut() const
Definition: PndSdsMCPoint.h:91
std::ostream & operator<<(std::ostream &o, const PndEventInfo &a)
Double_t mom
Definition: plot_dirc.C:14
Int_t GetSensorID() const
Definition: PndSdsMCPoint.h:89
Double_t fZ
Definition: PndCaloDraw.cxx:34
Double_t GetPzOut() const
Definition: PndSdsMCPoint.h:87
Double_t
Double32_t fZfOut
void MomentumOut(TVector3 &mom) const
Definition: PndSdsMCPoint.h:94
Double32_t fPzfOut
TFile * out
Definition: reco_muo.C:20
TVector3 GetPosition() const
Definition: PndSdsMCPoint.h:90
Double_t GetYOut() const
Definition: PndSdsMCPoint.h:82
Double_t fY
Definition: PndCaloDraw.cxx:34
void SetMomentumOut(TVector3 mom)
void SetSensorID(Int_t sensorID)
void PositionOut(TVector3 &pos) const
Definition: PndSdsMCPoint.h:93
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72
void SetPositionOut(TVector3 pos)