FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMCPoint.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #include "FairMCPoint.h"
9 
10 #include "FairLogger.h"
11 
14  , fTrackID(-1)
15  , fEventId(0)
16  , fPx(0.)
17  , fPy(0.)
18  , fPz(0.)
19  , fTime(0.)
20  , fLength(0.)
21  , fELoss(0.)
22  , fDetectorID(-1)
23  , fX(0)
24  , fY(0)
25  , fZ(0)
26 {}
27 
29  Int_t detID,
30  TVector3 pos,
31  TVector3 mom,
32  Double_t tof,
33  Double_t length,
34  Double_t eLoss,
35  UInt_t EventId)
37  , fTrackID(trackID)
38  , fEventId(EventId)
39  , fPx(mom.Px())
40  , fPy(mom.Py())
41  , fPz(mom.Pz())
42  , fTime(tof)
43  , fLength(length)
44  , fELoss(eLoss)
45  , fDetectorID(detID)
46  , fX(pos.X())
47  , fY(pos.Y())
48  , fZ(pos.Z())
49 {}
50 
52 
53 void FairMCPoint::Print(const Option_t*) const
54 {
55  LOG(debug) << "FairMC point for track " << fTrackID << " in detector " << fDetectorID;
56  LOG(debug) << "Position (" << fX << ", " << fY << ", " << fZ << ") cm";
57  LOG(debug) << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV";
58  LOG(debug) << " Time " << fTime << " ns, Length " << fLength << " cm, Energy loss " << fELoss * 1.0e06
59  << " keV";
60 }
61 
Double32_t fPy
Definition: FairMCPoint.h:112
Double32_t fZ
Position of hit [cm].
Definition: FairMCPoint.h:117
virtual ~FairMCPoint()
Definition: FairMCPoint.cxx:51
Double32_t fLength
Track length since creation [cm].
Definition: FairMCPoint.h:114
Double32_t fELoss
Energy loss at this point [GeV].
Definition: FairMCPoint.h:115
Int_t fTrackID
Track index.
Definition: FairMCPoint.h:110
ClassImp(FairEventBuilder)
Double_t fZ
Double32_t fX
Definition: FairMCPoint.h:117
Double32_t fPx
Definition: FairMCPoint.h:112
Double_t fY
Double32_t fPz
Momentum components [GeV].
Definition: FairMCPoint.h:112
virtual void Print(const Option_t *opt=0) const
Definition: FairMCPoint.cxx:53
Double32_t fTime
Time since event start [ns].
Definition: FairMCPoint.h:113
Double_t fX
Int_t fDetectorID
Detector unique identifier.
Definition: FairMCPoint.h:116
Double32_t fY
Definition: FairMCPoint.h:117