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