ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtMCPoint.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 version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #include "AtMCPoint.h"
9 
10 #include <FairMCPoint.h>
11 
12 #include <TVector3.h>
13 
14 #include <iostream>
15 #include <utility>
16 
17 using std::cout;
18 using std::endl;
19 
20 AtMCPoint::AtMCPoint() : FairMCPoint() {}
21 
22 AtMCPoint::AtMCPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length,
23  Double_t eLoss)
24  : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss)
25 {
26 }
27 
28 AtMCPoint::AtMCPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length,
29  Double_t eLoss, TString VolName, Int_t detCopyID, Double_t EIni, Double_t AIni, Int_t A, Int_t Z)
30  : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss), fDetCopyID(detCopyID), fVolName(std::move(VolName)),
31  fEnergyIni(EIni), fAngleIni(AIni), fAiso(A), fZiso(Z)
32 {
33 }
34 
35 AtMCPoint::AtMCPoint(Int_t trackID, Int_t detID, XYZPoint pos, XYZVector mom, Double_t tof, Double_t length,
36  Double_t eLoss)
37  : AtMCPoint(trackID, detID, TVector3(pos.X(), pos.Y(), pos.Z()), TVector3(mom.X(), mom.Y(), mom.Z()), 0, length,
38  eLoss)
39 {
40 }
41 
42 void AtMCPoint::Print(const Option_t *opt) const
43 {
44  cout << "-I- AtMCPoint: AtMC point for track " << fTrackID << " in detector " << fDetectorID << endl;
45  cout << " Position (" << fX << ", " << fY << ", " << fZ << ") cm" << endl;
46  cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV" << endl;
47  cout << " Time " << fTime << " ns, Length " << fLength << " cm, Energy loss " << fELoss * 1.0e06 << " keV"
48  << endl;
49 }
50 
51 void AtMCPoint::Clear(Option_t *)
52 {
53  // Clear FairMCPoint
54  fTrackID = 0;
55  fEventId = 0;
56  fPx = 0;
57  fPy = 0;
58  fPz = 0;
59  fTime = 0;
60  fLength = 0;
61  fELoss = 0;
62  fDetectorID = 0;
63  fX = 0;
64  fY = 0;
65  fZ = 0;
66 
67  // Clear AtMCPoint
68  fDetCopyID = 0;
69  fVolName = "";
70  fEnergyIni = 0;
71  fAngleIni = 0;
72  fAiso = 0;
73  fZiso = 0;
74 }
75 
AtMCPoint::AtMCPoint
AtMCPoint()
Definition: AtMCPoint.cxx:20
AtMCPoint::Print
virtual void Print(const Option_t *opt) const override
Definition: AtMCPoint.cxx:42
AtMCPoint::fEnergyIni
Double_t fEnergyIni
Definition: AtMCPoint.h:34
ClassImp
ClassImp(AtFindVertex)
AtMCPoint::fDetCopyID
Int_t fDetCopyID
Definition: AtMCPoint.h:32
AtMCPoint::XYZPoint
ROOT::Math::XYZPoint XYZPoint
Definition: AtMCPoint.h:29
AtMCPoint::fAiso
Int_t fAiso
Definition: AtMCPoint.h:36
AtMCPoint::fZiso
Int_t fZiso
Definition: AtMCPoint.h:37
AtMCPoint::fVolName
TString fVolName
Definition: AtMCPoint.h:33
AtMCPoint.h
AtMCPoint
Definition: AtMCPoint.h:26
AtMCPoint::Clear
virtual void Clear(Option_t *) override
Definition: AtMCPoint.cxx:51
AtMCPoint::fAngleIni
Double_t fAngleIni
Definition: AtMCPoint.h:35
AtMCPoint::XYZVector
ROOT::Math::XYZVector XYZVector
Definition: AtMCPoint.h:30