FairRoot/PandaRoot
PndFtsPoint.cxx
Go to the documentation of this file.
1 #include "PndFtsPoint.h"
2 #include "PndDetectorList.h"
3 
4 #include <iostream>
5 #include "math.h"
6 
7 using std::cout;
8 using std::endl;
9 
10 // ----- Default constructor -------------------------------------------
11 PndFtsPoint::PndFtsPoint() : FairMCPoint(),
12  fX_out_local(0), fY_out_local(0), fZ_out_local(0),
13  fX_in_local(0.), fY_in_local(0), fZ_in_local(0),
14  fPx_out(0), fPy_out(0), fPz_out(0),
15  fPx_in(0), fPy_in(0), fPz_in(0),
16  fMass(0), fTubeID(0), fChamberID(0), fLayerID(0)
17 {
18 }
19 // -------------------------------------------------------------------------
20 
21 
22 
23 // ----- Standard constructor ------------------------------------------
24 PndFtsPoint::PndFtsPoint(Int_t trackID, Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID,
25  TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal,
26  TVector3 momIn, TVector3 momOut,
27  Double_t tof, Double_t length, Double_t eLoss, Double_t mass)
28  : FairMCPoint(trackID, detID, pos, momIn, tof, length, eLoss),
29  fX_out_local(posOutLocal.X()), fY_out_local(posOutLocal.Y()), fZ_out_local(posOutLocal.Z()),
30  fX_in_local(posInLocal.X()), fY_in_local(posInLocal.Y()), fZ_in_local(posInLocal.Z()),
31  fPx_out(momOut.Px()), fPy_out(momOut.Py()), fPz_out(momOut.Pz()),
32  fPx_in(momIn.Px()), fPy_in(momIn.Py()), fPz_in(momIn.Pz()),
33  fMass(mass), fTubeID(tubeID), fChamberID(chamberID), fLayerID(layerID)
34 {
35  // reset MC momentum
36  fPx = (momIn.Px() + momOut.Px()) / 2.;
37  fPy = (momIn.Py() + momOut.Py()) / 2.;
38  fPz = (momIn.Pz() + momOut.Pz()) / 2.;
39  SetLink(FairLink("MCTrack", trackID));
40 }
41 // -------------------------------------------------------------------------
42 
43 
44 
45 // ----- Destructor ----------------------------------------------------
47 // -------------------------------------------------------------------------
48 
49 // ----- Copy constructor ------------------------------------------
51  FairMCPoint(point.fTrackID, point.fDetectorID, TVector3(point.fX, point.fY, point.fZ), TVector3(point.fPx, point.fPy, point.fPz), point.fTime, point.fLength, point.fELoss, point.fEventId),
52  fX_out_local(point.fX_out_local), fY_out_local(point.fY_out_local), fZ_out_local(point.fZ_out_local),
53  fX_in_local(point.fX_in_local), fY_in_local(point.fY_in_local), fZ_in_local(point.fZ_in_local),
54  fPx_out(point.fPx_out), fPy_out(point. fPy_out), fPz_out(point.fPz_out),
55  fPx_in(point.fPx_in), fPy_in(point.fPy_in), fPz_in(point.fPz_in),
56  fMass(point.fMass), fTubeID(point.fTubeID), fChamberID(point.fChamberID), fLayerID(point.fLayerID)
57 {
58 
59 }
60 // -------------------------------------------------------------------------
61 
62 // ----- Public method Print -------------------------------------------
63 void PndFtsPoint::Print(const Option_t* opt) const {
64  cout << "-I- PndFtsPoint: FTS Point for track " << fTrackID
65  << " in detector " << fDetectorID << endl;
66  cout << " Position (" << fX << ", " << fY << ", " << fZ
67  << ") cm" << endl;
68  cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz
69  << ") GeV" << endl;
70  cout << " Time " << fTime << " ns, Length " << fLength
71  << " cm, Energy loss " << fELoss*1.0e06 << " keV" << " opt="<<opt<<endl;
72 }
73 // -------------------------------------------------------------------------
74 
75 
76 
TVector3 pos
virtual ~PndFtsPoint()
Definition: PndFtsPoint.cxx:46
Double_t fX
Definition: PndCaloDraw.cxx:34
double Y
Definition: anaLmdDigi.C:68
Double_t fZ
Definition: PndCaloDraw.cxx:34
Double_t
TClonesArray * point
Definition: anaLmdDigi.C:29
double X
Definition: anaLmdDigi.C:68
Double_t fY
Definition: PndCaloDraw.cxx:34
ClassImp(PndAnaContFact)
double Z
Definition: anaLmdDigi.C:68
virtual void Print(const Option_t *opt) const
Definition: PndFtsPoint.cxx:63