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