PandaRoot
PndCAMCTrack.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 PNDCAMCTRACK_H
10 #define PNDCAMCTRACK_H
11 
12 #include "PndCADef.h"
13 #include "TMath.h"
14 
15 #include <iostream>
16 using std::istream;
17 using std::ostream;
18 
19 class TParticle;
20 
25 class PndCAMCTrack {
26  public:
27  PndCAMCTrack();
28  PndCAMCTrack(const TParticle *part);
29 
30  // void SetTPCPar( float X, float Y, float Z, float Px, float Py, float Pz );
31 
32  int MotherId() const { return fMotherId; }
33  int PDG() const { return fPDG; }
34  float Par(int i) const { return fPar[i]; }
35  float TPCPar(int i) const { return fTPCPar[i]; }
36 
37  float X() const { return fPar[0]; }
38  float Y() const { return fPar[1]; }
39  float Z() const { return fPar[2]; }
40  float Px() const { return fPar[3] / fPar[6]; }
41  float Py() const { return fPar[4] / fPar[6]; }
42  float Pz() const { return fPar[5] / fPar[6]; }
43  float P() const { return fP; }
44  float Pt() const { return fPt; }
45  const float *Par() const { return fPar; }
46  const float *TPCPar() const { return fTPCPar; }
47 
48  float DzDs() const { return Pz() / TMath::Sqrt(Px() * Px() + Py() * Py()); }
49 
50  int NHits() const { return fNHits; }
51  int NMCPoints() const { return fNMCPoints; }
52  int FirstMCPointID() const { return fFirstMCPointID; }
53  int NReconstructed() const { return fNReconstructed; }
54  int Set() const { return fSet; }
55  int NTurns() const { return fNTurns; }
56 
57  int NMCRows() const { return fNMCRows; }
58  int NHitRows() const { return fNHitRows; }
59  int NMCContRows() const { return fNMCContRows; }
60  int NHitContRows() const { return fNHitContRows; }
61 
62  void SetMotherId(int v) { fMotherId = v; }
63  void SetP(float v) { fP = v; }
64  void SetPt(float v) { fPt = v; }
65  void SetPDG(int v) { fPDG = v; }
66  void SetPar(int i, float v) { fPar[i] = v; }
67  void SetTPCPar(int i, float v) { fTPCPar[i] = v; }
68  void SetNHits(int v) { fNHits = v; }
69  void SetNMCPoints(int v) { fNMCPoints = v; }
72  void SetSet(int v) { fSet = v; }
73  void SetNTurns(int v) { fNTurns = v; }
74 
75  void SetNMCRows(int v) { fNMCRows = v; }
76  void SetNHitRows(int v) { fNHitRows = v; }
77  void SetNMCContRows(int v) { fNMCContRows = v; }
78  void SetNHitContRows(int v) { fNHitContRows = v; }
79 
80  friend ostream &operator<<(ostream &out, const PndCAMCTrack &a);
81  friend istream &operator>>(istream &in, PndCAMCTrack &a);
82 
83  protected:
84  int fMotherId; //* index of mother track in tracks array. -1 for primary tracks. -2 if a mother track is not in the acceptance
85  int fPDG; //* particle pdg code
86  float fPar[7]; //* x,y,z,ex,ey,ez,q/p
87  float fTPCPar[7]; //* x,y,z,ex,ey,ez,q/p at TPC entrance (x=y=0 means no information)
88  float fP, fPt; //* momentum and transverse momentum
89  int fNHits; //* N TPC clusters
90  int fNMCPoints; //* N MC points
91  int fFirstMCPointID; //* id of the first MC point in the points array
92  int fNReconstructed; //* how many times is reconstructed
93  int fSet; //* set of tracks 0-OutSet, 1-ExtraSet, 2-RefSet, 3-ExtraSecSet, 4-ExtraPrimSet, 5-RefSecSet, 6-RefPrimSet, 7-LongRefPrimSet
94  int fNTurns; //* N of turns in the current sector
95 
96  int fNMCRows; // N rows with MC Points. Calculated after reading all MC info.
97  int fNHitRows;
98  int fNMCContRows; // N rows with MC Points. Calculated after reading all MC info.
100 };
101 
102 #endif
float P() const
Definition: PndCAMCTrack.h:43
int fFirstMCPointID
Definition: PndCAMCTrack.h:91
int NReconstructed() const
Definition: PndCAMCTrack.h:53
basic_istream< char, char_traits< char > > istream
int PDG() const
Definition: PndCAMCTrack.h:33
float DzDs() const
Definition: PndCAMCTrack.h:48
float Y() const
Definition: PndCAMCTrack.h:38
void SetSet(int v)
Definition: PndCAMCTrack.h:72
static T Sqrt(const T &x)
Definition: PndCAMath.h:45
int fNReconstructed
Definition: PndCAMCTrack.h:92
int NHits() const
Definition: PndCAMCTrack.h:50
int FirstMCPointID() const
Definition: PndCAMCTrack.h:52
const float * TPCPar() const
Definition: PndCAMCTrack.h:46
float Par(int i) const
Definition: PndCAMCTrack.h:34
__m128 v
Definition: P4_F32vec4.h:3
unsigned int i
Definition: P4_F32vec4.h:21
void SetPar(int i, float v)
Definition: PndCAMCTrack.h:66
void SetMotherId(int v)
Definition: PndCAMCTrack.h:62
void SetTPCPar(int i, float v)
Definition: PndCAMCTrack.h:67
void SetPDG(int v)
Definition: PndCAMCTrack.h:65
int NMCRows() const
Definition: PndCAMCTrack.h:57
float X() const
Definition: PndCAMCTrack.h:37
void SetNMCRows(int v)
Definition: PndCAMCTrack.h:75
int NMCPoints() const
Definition: PndCAMCTrack.h:51
int MotherId() const
Definition: PndCAMCTrack.h:32
void SetNReconstructed(int v)
Definition: PndCAMCTrack.h:71
void SetNHits(int v)
Definition: PndCAMCTrack.h:68
void SetP(float v)
Definition: PndCAMCTrack.h:63
float Z() const
Definition: PndCAMCTrack.h:39
void SetNMCContRows(int v)
Definition: PndCAMCTrack.h:77
float Py() const
Definition: PndCAMCTrack.h:41
int Set() const
Definition: PndCAMCTrack.h:54
float TPCPar(int i) const
Definition: PndCAMCTrack.h:35
float Px() const
Definition: PndCAMCTrack.h:40
int NHitContRows() const
Definition: PndCAMCTrack.h:60
void SetFirstMCPointID(int v)
Definition: PndCAMCTrack.h:70
void SetNHitRows(int v)
Definition: PndCAMCTrack.h:76
friend istream & operator>>(istream &in, PndCAMCTrack &a)
void SetNHitContRows(int v)
Definition: PndCAMCTrack.h:78
int NTurns() const
Definition: PndCAMCTrack.h:55
friend ostream & operator<<(ostream &out, const PndCAMCTrack &a)
basic_ostream< char, char_traits< char > > ostream
float fTPCPar[7]
Definition: PndCAMCTrack.h:87
void SetNTurns(int v)
Definition: PndCAMCTrack.h:73
float fPar[7]
Definition: PndCAMCTrack.h:86
const float * Par() const
Definition: PndCAMCTrack.h:45
float Pz() const
Definition: PndCAMCTrack.h:42
int NMCContRows() const
Definition: PndCAMCTrack.h:59
void SetNMCPoints(int v)
Definition: PndCAMCTrack.h:69
void SetPt(float v)
Definition: PndCAMCTrack.h:64
float Pt() const
Definition: PndCAMCTrack.h:44
int NHitRows() const
Definition: PndCAMCTrack.h:58