12#ifndef ALICEO2_BASE_TRACKREFERENCE_H_
13#define ALICEO2_BASE_TRACKREFERENCE_H_
15#include <TVirtualMC.h>
40 if (vmc.IsTrackEntering()) {
43 if (vmc.IsTrackExiting()) {
46 if (vmc.IsTrackInside()) {
49 if (vmc.IsTrackOut()) {
52 if (vmc.IsTrackStop()) {
55 if (vmc.IsNewTrack()) {
58 if (vmc.IsTrackAlive()) {
74 unsigned char mStatus = 0;
110 float R()
const {
return TMath::Sqrt(mX * mX + mY * mY); }
112 float Pt()
const {
return TMath::Sqrt(mPX * mPX + mPY * mPY); }
113 float PhiPos()
const {
return TMath::ATan2(mY, mX); }
114 float Phi()
const {
return TMath::ATan2(mPY, mPX); }
115 float Theta()
const {
return TMath::ACos(mPZ /
P()); }
116 float X()
const {
return mX; }
117 float Y()
const {
return mY; }
118 float Z()
const {
return mZ; }
119 float Px()
const {
return mPX; }
120 float Py()
const {
return mPY; }
121 float Pz()
const {
return mPZ; }
122 float P()
const {
return TMath::Sqrt(mPX * mPX + mPY * mPY + mPZ * mPZ); }
145 float phiPosition()
const {
return TMath::Pi() + TMath::ATan2(-mY, -mX); }
147 float Alpha()
const {
return TMath::Pi() * (20 * ((((Int_t)(
phiPosition() * 180 / TMath::Pi())) / 20)) + 10) / 180.; }
152 return mX * TMath::Cos(-
alpha) - mY * TMath::Sin(-
alpha);
158 return mX * TMath::Sin(-
alpha) + mY * TMath::Cos(-
alpha);
164 Int_t mTrackNumber = 0;
171 float mTrackLength = 0;
174 Int_t mDetectorId = -1;
185 int trackID,
int detlabel)
186 : mTrackNumber(trackID),
195 mDetectorId(detlabel)
207 vmc.TrackPosition(
x,
y,
z);
208 vmc.TrackMomentum(px, py, pz,
e);
215 mTrackLength = vmc.TrackLength();
216 mTof = vmc.TrackTime();
217 mDetectorId = detlabel;
218 mTrackNumber = vmc.GetStack()->GetCurrentTrackNumber();
223 os <<
"TrackRef (" <<
a.mTrackNumber <<
"): X[" <<
a.mX <<
" , " <<
a.mY <<
" , " <<
a.mZ <<
"]"
224 <<
"; P[ " <<
a.mPX <<
" , " <<
a.mPY <<
" , " <<
a.mPZ <<
" ] "
225 <<
"; Length = " <<
a.mTrackLength <<
" ; TOF = " <<
a.mTof <<
" ; DetID = " <<
a.mDetectorId
226 <<
"; Status = " <<
a.mStatus;
232 os << status.mStatus;
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
const SimTrackStatus & getTrackStatus() const
float phiPosition() const
void setUserId(Int_t userId)
void setDetectorId(Int_t id)
~TrackReference()=default
Default Destructor.
Int_t getDetectorId() const
TrackReference()=default
Default Constructor.
friend std::ostream & operator<<(std::ostream &, const TrackReference &)
void setPosition(float x, float y, float z)
void setMomentum(float px, float py, float pz)
void setTrackID(Int_t track)
void setLength(float length)
GLfloat GLfloat GLfloat alpha
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
GLdouble GLdouble GLdouble z
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)
SimTrackStatus(const TVirtualMC &vmc)
unsigned char getStatusWord() const
friend std::ostream & operator<<(std::ostream &, const SimTrackStatus &)