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