Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFMCTrack.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file KFMCTrack.h
1 /*
2  * This file is part of KFParticle package
3  * Copyright (C) 2007-2019 FIAS Frankfurt Institute for Advanced Studies
4  * 2007-2019 Goethe University of Frankfurt
5  * 2007-2019 Ivan Kisel <I.Kisel@compeng.uni-frankfurt.de>
6  * 2007-2019 Maksym Zyzak
7  *
8  * KFParticle is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * KFParticle is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef KFMCTRACK_H
23 #define KFMCTRACK_H
24 
25 #include <cmath>
26 
41 class KFMCTrack
42 {
43  public:
45 
46  int MotherId() const { return fMotherId; }
47  int PDG() const { return fPDG;}
48  float Par( int i ) const { return fPar[i]; }
49  float X() const { return fPar[0]; }
50  float Y() const { return fPar[1]; }
51  float Z() const { return fPar[2]; }
52  float L() const { return sqrt(X()*X() + Y()*Y() + Z()*Z()); }
53  float Px() const { return fPar[3]; }
54  float Py() const { return fPar[4]; }
55  float Pz() const { return fPar[5]; }
56  float P() const { return sqrt(fPar[3]*fPar[3] + fPar[4]*fPar[4] + fPar[5]*fPar[5]); }
57  float Pt() const { return sqrt(fPar[3]*fPar[3] + fPar[4]*fPar[4]); }
58  const float *Par() const { return fPar; }
59  int NMCPoints() const { return fNMCPoints; }
60  int NMCPixelPoints() const { return fNMCPixelPoints; }
61  bool IsReconstructed() const { return fIsReconstructed; }
62  bool IsOutOfDetector() const { return fIsOutOfDetector; }
63 
64  void SetPar( int i, float v ) { fPar[i] = v; }
65  void SetX( float v ) { fPar[0] = v; }
66  void SetY( float v ) { fPar[1] = v; }
67  void SetZ( float v ) { fPar[2] = v; }
68  void SetPx( float v ) { fPar[3] = v; }
69  void SetPy( float v ) { fPar[4] = v; }
70  void SetPz( float v ) { fPar[5] = v; }
71  void SetQP( float v ) { fPar[6] = v; }
72  void SetMotherId( int v ) { fMotherId = v; }
73  void SetPDG( int v ) { fPDG = v; }
74  void SetNMCPoints( int v ) { fNMCPoints = v; }
75  void SetNMCPixelPoints( int v ){ fNMCPixelPoints = v; }
79 
80  protected:
81 
82  int fMotherId;
83  int fPDG;
84  float fPar[7];
85  int fNMCPoints;
87 
90 };
91 
92 #endif