FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NewDetectorPoint.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 "NewDetectorPoint.h"
9 
10 #include <iostream>
11 using std::cout;
12 using std::endl;
13 
14 // ----- Default constructor -------------------------------------------
16  : fTrackID(0)
17  , fEventId(0)
18  , fPx(0.)
19  , fPy(0.)
20  , fPz(0.)
21  , fTime(0.)
22  , fLength(0.)
23  , fELoss(0.)
24  , fDetectorID(0)
25  , fX(0.)
26  , fY(0.)
27  , fZ(0.)
28 {}
29 // -------------------------------------------------------------------------
30 
31 // ----- Standard constructor ------------------------------------------
33  uint32_t evtId,
34  Int_t detID,
35  TVector3 pos,
36  TVector3 mom,
37  Double_t tof,
38  Double_t length,
39  Double_t eLoss)
40  : fTrackID(trackID)
41  , fEventId(evtId)
42  , fPx(mom.X())
43  , fPy(mom.Y())
44  , fPz(mom.Z())
45  , fTime(tof)
46  , fLength(length)
47  , fELoss(eLoss)
48  , fDetectorID(detID)
49  , fX(pos.X())
50  , fY(pos.Y())
51  , fZ(pos.Z())
52 {}
53 // -------------------------------------------------------------------------
54 
55 // ----- Destructor ----------------------------------------------------
57 // -------------------------------------------------------------------------
58 
59 // ----- Public method Print -------------------------------------------
60 void NewDetectorPoint::Print(const Option_t* /*opt*/) const
61 {
62  cout << "-I- NewDetectorPoint: NewDetector point for track " << fTrackID << " in detector " << fDetectorID << endl;
63  cout << " Position (" << fX << ", " << fY << ", " << fZ << ") cm" << endl;
64  cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV" << endl;
65  cout << " Time " << fTime << " ns, Length " << fLength << " cm, Energy loss " << fELoss * 1.0e06 << " keV"
66  << endl;
67 }
68 // -------------------------------------------------------------------------
69 
double fELoss
Energy loss at this point [GeV].
ClassImp(FairEventBuilder)
virtual void Print(const Option_t *opt) const
Double_t fZ
virtual ~NewDetectorPoint()
int fTrackID
Track index.
double fTime
Time since event start [ns].
Double_t fY
double fPz
Momentum components [GeV].
double fZ
Position of hit [cm].
unsigned int uint32_t
Double_t fX
double fLength
Track length since creation [cm].
int fDetectorID
Detector unique identifier.