VMC
Version 2.2
Toggle main menu visibility
Loading...
Searching...
No Matches
source
include
TMCParticleStatus.h
Go to the documentation of this file.
1
// -----------------------------------------------------------------------
2
// Copyright (C) 2019 CERN and copyright holders of VMC Project.
3
// This software is distributed under the terms of the GNU General Public
4
// License v3 (GPL Version 3), copied verbatim in the file "LICENSE".
5
//
6
// See https://github.com/vmc-project/vmc for full licensing information.
7
// -----------------------------------------------------------------------
8
9
// Authors: Benedikt Volkel 07/03/2019
10
11
/*************************************************************************
12
* Copyright (C) 2019, Rene Brun and Fons Rademakers. *
13
* Copyright (C) 2019, ALICE Experiment at CERN. *
14
* All rights reserved. *
15
* *
16
* For the licensing terms see $ROOTSYS/LICENSE. *
17
* For the list of contributors see $ROOTSYS/README/CREDITS. *
18
*************************************************************************/
19
20
#ifndef ROOT_TMCParticleStatus
21
#define ROOT_TMCParticleStatus
22
23
// Class TMCParticleStatus
24
// ---------------------
25
// additional information on the current status of a TParticle
26
//
27
28
#include <iostream>
29
30
#include "TVector3.h"
31
#include "TLorentzVector.h"
32
#include "TParticle.h"
33
#include "TError.h"
34
35
struct
TMCParticleStatus
{
36
38
TMCParticleStatus
() =
default
;
39
41
void
InitFromParticle
(
const
TParticle *particle)
42
{
43
particle->ProductionVertex(
fPosition
);
44
particle->Momentum(
fMomentum
);
45
particle->GetPolarisation(
fPolarization
);
46
fWeight
= particle->GetWeight();
47
}
48
49
virtual
~TMCParticleStatus
() =
default
;
50
51
//
52
// verbosity
53
//
54
56
void
Print
()
const
57
{
58
::Info(
"Print"
,
"Status of track"
);
59
std::cout <<
"\t"
60
<<
"ID: "
<<
fId
<<
"\n"
61
<<
"\t"
62
<<
"parentID: "
<<
fParentId
<<
"\n"
63
<<
"\t"
64
<<
"weight: "
<<
fWeight
<<
"\n"
65
<<
"\t"
66
<<
"geo state index: "
<<
fGeoStateIndex
<<
"\n"
67
<<
"\t"
68
<<
"step number: "
<<
fStepNumber
<<
"\n"
69
<<
"\t"
70
<<
"track length: "
<<
fTrackLength
<<
"\n"
71
<<
"\t"
72
<<
"position"
<< std::endl;
73
fPosition
.Print();
74
std::cout <<
"\t"
75
<<
"momentum"
<< std::endl;
76
fMomentum
.Print();
77
std::cout <<
"\t"
78
<<
"polarization"
<< std::endl;
79
fPolarization
.Print();
80
}
81
83
Int_t
fStepNumber
= 0;
85
Double_t
fTrackLength
= 0.;
87
TLorentzVector
fPosition
;
89
TLorentzVector
fMomentum
;
91
TVector3
fPolarization
;
93
Double_t
fWeight
= 1.;
95
UInt_t
fGeoStateIndex
= 0;
97
Int_t
fId
= -1;
99
Int_t
fParentId
= -1;
101
Bool_t
fIsOutside
;
102
103
private
:
105
TMCParticleStatus
(
const
TMCParticleStatus
&);
107
TMCParticleStatus
&
operator=
(
const
TMCParticleStatus
&);
108
109
ClassDef(
TMCParticleStatus
, 1)
110
};
111
112
#endif
/* ROOT_TMCParticleStatus */
TMCParticleStatus::InitFromParticle
void InitFromParticle(const TParticle *particle)
Use TParticle information as a starting point.
Definition
TMCParticleStatus.h:41
TMCParticleStatus::~TMCParticleStatus
virtual ~TMCParticleStatus()=default
TMCParticleStatus::fPosition
TLorentzVector fPosition
position
Definition
TMCParticleStatus.h:87
TMCParticleStatus::TMCParticleStatus
TMCParticleStatus(const TMCParticleStatus &)
Copying kept private.
TMCParticleStatus::fIsOutside
Bool_t fIsOutside
Flags to (re)set for TGeoNavigator's fIsOutside state.
Definition
TMCParticleStatus.h:101
TMCParticleStatus::fGeoStateIndex
UInt_t fGeoStateIndex
geo state cache
Definition
TMCParticleStatus.h:95
TMCParticleStatus::TMCParticleStatus
TMCParticleStatus()=default
Default constructor.
TMCParticleStatus::fTrackLength
Double_t fTrackLength
Track length.
Definition
TMCParticleStatus.h:85
TMCParticleStatus::Print
void Print() const
Print all info at once.
Definition
TMCParticleStatus.h:56
TMCParticleStatus::fPolarization
TVector3 fPolarization
polarization
Definition
TMCParticleStatus.h:91
TMCParticleStatus::operator=
TMCParticleStatus & operator=(const TMCParticleStatus &)
Assignement kept private.
TMCParticleStatus::fMomentum
TLorentzVector fMomentum
momentum
Definition
TMCParticleStatus.h:89
TMCParticleStatus::fWeight
Double_t fWeight
weight
Definition
TMCParticleStatus.h:93
TMCParticleStatus::fParentId
Int_t fParentId
Unique ID assigned by the user.
Definition
TMCParticleStatus.h:99
TMCParticleStatus::fStepNumber
Int_t fStepNumber
Number of steps.
Definition
TMCParticleStatus.h:83
TMCParticleStatus::fId
Int_t fId
Unique ID assigned by the user.
Definition
TMCParticleStatus.h:97
Generated on
for VMC by
1.17.0