PandaRoot
PndMcCloner.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include "FairTask.h"
18 #include "PndMCTrack.h"
19 #include <map>
20 
21 using namespace std;
22 
23 class TClonesArray;
24 
25 class PndMcCloner : public FairTask {
26 
27  public:
29  PndMcCloner();
30 
32  ~PndMcCloner();
33 
35  virtual InitStatus Init();
36 
38  virtual void Exec(Option_t *);
39 
40  void SetCleanMc(Bool_t opt = kTRUE) { fCleanMC = opt; }
41 
42  protected:
43  void FindUsedMCIndices();
44  void CloneMCTrack();
45  void CloneAndCleanMCTrack();
46  void CorrectMotherIndices();
47  void CorrectPidIndices();
48 
50  TClonesArray *fInputArray = nullptr;
51 
53  TClonesArray *fPidChargedArray = nullptr;
54 
56  TClonesArray *fPidNeutralArray = nullptr;
57 
59  TClonesArray *fOutputArray = nullptr;
60 
61  map<Int_t, Int_t> mapMCIndex; // Map <old mc index, new mc index>
62 
63  Bool_t fCleanMC = false; // Flag to clean the MCTrack from unused indices
64 
65  ClassDef(PndMcCloner, 2);
66 };
67 
STL namespace.
void SetCleanMc(Bool_t opt=kTRUE)
Definition: PndMcCloner.h:40
map< Int_t, Int_t > mapMCIndex
Definition: PndMcCloner.h:61