PandaRoot
KFMCParticle.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 /*
14  *=====================================================
15  *
16  * CBM Level 1 Reconstruction
17  *
18  * Authors: M.Zyzak
19  *
20  * e-mail :
21  *
22  *=====================================================
23  *
24  * Finds Particles: Lambdas, K0
25  *
26  */
27 
28 #ifndef _KFMCParticle_h_
29 #define _KFMCParticle_h_
30 
31 #include <vector>
32 using std::vector;
33 
34 class KFMCParticle {
35  public:
36  KFMCParticle();
37  ~KFMCParticle();
38 
39  void AddDaughter(int i);
40  int NDaughters() const { return fDaughterIds.size(); };
41  const vector<int> &GetDaughterIds() const { return fDaughterIds; };
42  void FindCommonMC();
43 
44  void SetPDG(int pdg) { fPDG = pdg; }
45  void SetMCTrackID(int id) { fMCTrackID = id; }
46  void SetMotherId(int id) { fMotherId = id; }
47 
48  int GetMCTrackID() const { return fMCTrackID; }
49  int GetMotherId() const { return fMotherId; }
50  int GetPDG() const { return fPDG; }
51  bool IsReconstructable() const { return fIsReconstructable; }
52  void SetAsReconstructable() { fIsReconstructable = 1; }
53 
54  void CalculateIsReconstructable(unsigned int NDaughters = 2);
55  void CalculateIsRecRec(unsigned int NDaughters = 2);
56 
57  private: // data
58  vector<int> fDaughterIds;
59  int fMCTrackID; // sim id of MC track, which corresponds to the particle
60  int fMotherId; // index in L1 array of mother particle
61  int fPDG;
62 
63  bool fIsReconstructable;
64 };
65 
66 #endif
void FindCommonMC()
bool IsReconstructable() const
Definition: KFMCParticle.h:51
const vector< int > & GetDaughterIds() const
Definition: KFMCParticle.h:41
void SetPDG(int pdg)
Definition: KFMCParticle.h:44
int NDaughters() const
Definition: KFMCParticle.h:40
unsigned int i
Definition: P4_F32vec4.h:33
void AddDaughter(int i)
int GetMotherId() const
Definition: KFMCParticle.h:49
void CalculateIsReconstructable(unsigned int NDaughters=2)
int GetPDG() const
Definition: KFMCParticle.h:50
void CalculateIsRecRec(unsigned int NDaughters=2)
void SetMCTrackID(int id)
Definition: KFMCParticle.h:45
void SetAsReconstructable()
Definition: KFMCParticle.h:52
int GetMCTrackID() const
Definition: KFMCParticle.h:48
void SetMotherId(int id)
Definition: KFMCParticle.h:46