PandaRoot
PndFTSCAMCTrack.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //-*- Mode: C++ -*-
14 // ************************************************************************
15 // This file is property of and copyright by the ALICE HLT Project *
16 // ALICE Experiment at CERN, All rights reserved. *
17 // See cxx source for full Copyright notice *
18 // *
19 //*************************************************************************
20 
21 #ifndef PNDFTSCAMCTRACK_H
22 #define PNDFTSCAMCTRACK_H
23 
24 #include "PndFTSCADef.h"
25 #include "TMath.h"
26 
27 #include <iostream>
28 using std::istream;
29 using std::ostream;
30 
31 class TParticle;
32 class PndMCTrack;
33 
39  public:
41  PndFTSCAMCTrack(const TParticle *part);
42 
43  void SetMCTrack(const PndMCTrack *ttt, Double_t q, unsigned int Nmcpoints, unsigned int FirstmcpointId);
45 
46  // void SetTPCPar( float X, float Y, float Z, float Px, float Py, float Pz );
47 
48  int MotherId() const { return fMotherId; }
49  int PDG() const { return fPDG; }
50  float Par(int i) const { return fPar[i]; }
51  float TPCPar(int i) const { return fTPCPar[i]; }
52 
53  float X() const { return fPar[0]; }
54  float Y() const { return fPar[1]; }
55  float Z() const { return fPar[2]; }
56  float Px() const { return fPar[3] / fPar[6]; }
57  float Py() const { return fPar[4] / fPar[6]; }
58  float Pz() const { return fPar[5] / fPar[6]; }
59  float P() const { return fP; }
60  float Pt() const { return fPt; }
61  const float *Par() const { return fPar; }
62  const float *TPCPar() const { return fTPCPar; }
63 
64  float DzDs() const { return Pz() / TMath::Sqrt(Px() * Px() + Py() * Py()); }
65 
66  int NHits() const { return fNHits; }
67  int NMCPoints() const { return fNMCPoints; }
68  int FirstMCPointID() const { return fFirstMCPointID; }
69  int NReconstructed() const { return fNReconstructed; }
70  int Set() const { return fSet; }
71  int NTurns() const { return fNTurns; }
72 
73  int NMCRows() const { return fNMCRows; }
74  int NHitRows() const { return fNHitRows; }
75  int NMCContRows() const { return fNMCContRows; }
76  int NHitContRows() const { return fNHitContRows; }
77 
78  void SetMotherId(int v) { fMotherId = v; }
79  void SetP(float v) { fP = v; }
80  void SetPt(float v) { fPt = v; }
81  void SetPDG(int v) { fPDG = v; }
82  void SetPar(int i, float v) { fPar[i] = v; }
83  void SetTPCPar(int i, float v) { fTPCPar[i] = v; }
84  void SetNHits(int v) { fNHits = v; }
85  void SetNMCPoints(int v) { fNMCPoints = v; }
88  void SetSet(int v) { fSet = v; }
89  void SetNTurns(int v) { fNTurns = v; }
90 
91  void SetNMCRows(int v) { fNMCRows = v; }
92  void SetNHitRows(int v) { fNHitRows = v; }
93  void SetNMCContRows(int v) { fNMCContRows = v; }
94  void SetNHitContRows(int v) { fNHitContRows = v; }
95 
96  bool IsForwardTrack() const { return fIsForwardTrack; }
98 
99  friend ostream &operator<<(ostream &out, const PndFTSCAMCTrack &a);
100  friend istream &operator>>(istream &in, PndFTSCAMCTrack &a);
101 
102  protected:
103  int fMotherId; //* index of mother track in tracks array. -1 for primary tracks. -2 if a mother track is not in the acceptance
104  int fPDG; //* particle pdg code
105  float fPar[7]; //* x,y,z,ex,ey,ez,q/p
106  float fTPCPar[7]; //* x,y,z,ex,ey,ez,q/p at TPC entrance (x=y=0 means no information)
107  float fP, fPt; //* momentum and transverse momentum
108  int fNHits; //* N TPC clusters
109  int fNMCPoints; //* N MC points
110  int fFirstMCPointID; //* id of the first MC point in the points array
111  int fNReconstructed; //* how many times is reconstructed
112  int fSet; //* set of tracks 0-OutSet, 1-ExtraSet, 2-RefSet, 3-ExtraSecSet, 4-ExtraPrimSet, 5-RefSecSet, 6-RefPrimSet, 7-LongRefPrimSet
113  int fNTurns; //* N of turns in the current sector
114  bool fIsForwardTrack; //* throw out tracks which don't correspond to a forward model
115 
116  int fNMCRows; // N rows with MC Points. Calculated after reading all MC info.
118  int fNMCContRows; // N rows with MC Points. Calculated after reading all MC info.
120 };
121 
122 #endif
friend istream & operator>>(istream &in, PndFTSCAMCTrack &a)
const float * TPCPar() const
basic_istream< char, char_traits< char > > istream
int NReconstructed() const
void SetTPCPar(int i, float v)
float X() const
float Px() const
static T Sqrt(const T &x)
Definition: PndCAMath.h:57
float P() const
float Py() const
int NMCRows() const
void SetNHitContRows(int v)
float TPCPar(int i) const
int NHits() const
int NHitContRows() const
void SetPDG(int v)
void SetNHits(int v)
int Set() const
__m128 v
Definition: P4_F32vec4.h:15
unsigned int i
Definition: P4_F32vec4.h:33
void SetPar(int i, float v)
void SetNHitRows(int v)
void SetFirstMCPointID(int v)
int PDG() const
void SetMotherId(int v)
PndFTSCAMCTrack & operator=(const PndFTSCAMCTrack &rhs)
float Pz() const
friend ostream & operator<<(ostream &out, const PndFTSCAMCTrack &a)
void SetNMCContRows(int v)
float Par(int i) const
void SetNTurns(int v)
void SetPt(float v)
void SetP(float v)
void SetIsForwardTrack(bool v)
void SetMCTrack(const PndMCTrack *ttt, Double_t q, unsigned int Nmcpoints, unsigned int FirstmcpointId)
void SetNMCRows(int v)
float Y() const
const float * Par() const
void SetNMCPoints(int v)
float Z() const
void SetNReconstructed(int v)
int NMCContRows() const
int MotherId() const
int NTurns() const
int NMCPoints() const
basic_ostream< char, char_traits< char > > ostream
void SetSet(int v)
float Pt() const
float DzDs() const
int FirstMCPointID() const
int NHitRows() const
bool IsForwardTrack() const