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