FairRoot/PandaRoot
PndMcCloner.h
Go to the documentation of this file.
1 #ifndef PNDMCCLONER_H
2 #define PNDMCCLONER_H 1
3 
4 
5 #include "FairTask.h"
6 #include "PndMCTrack.h"
7 #include <map>
8 
9 using namespace std;
10 
11 class TClonesArray;
12 
13 class PndMcCloner : public FairTask
14 {
15 
16  public:
17 
19  PndMcCloner();
20 
21 
23  ~PndMcCloner();
24 
25 
27  virtual InitStatus Init();
28 
29 
31  virtual void Exec(Option_t*);
32 
33  void SetCleanMc(Bool_t opt = kTRUE) { fCleanMC = opt; };
34  void SetOutputBranch(TString branch) { fTrackBranchNamePidHypo = branch; };
35 
36  protected:
37 
38  void FindUsedMCIndices();
39  void CloneMCTrack();
40  void CloneAndCleanMCTrack();
41  void CorrectMotherIndices();
42  void CorrectPidIndices();
43 
45  TClonesArray* fInputArray;
46 
48  TClonesArray* fPidChargedArray;
49 
51  TClonesArray* fPidNeutralArray;
52 
53 
55  TClonesArray* fOutputArray;
56 
57  map<Int_t, Int_t> mapMCIndex; // Map <old mc index, new mc index>
58 
59  Bool_t fCleanMC; // Flag to clean the MCTrack from unused indices
60 
62 
63  ClassDef(PndMcCloner,2);
64 
65 };
66 
67 #endif
TClonesArray * fPidNeutralArray
Definition: PndMcCloner.h:51
TString fTrackBranchNamePidHypo
Definition: PndMcCloner.h:61
Bool_t fCleanMC
Definition: PndMcCloner.h:59
void SetCleanMc(Bool_t opt=kTRUE)
Definition: PndMcCloner.h:33
TClonesArray * fOutputArray
Definition: PndMcCloner.h:55
void SetOutputBranch(TString branch)
Definition: PndMcCloner.h:34
map< Int_t, Int_t > mapMCIndex
Definition: PndMcCloner.h:57
fRun Init()
Definition: NHitsPerEvent.C:20
TClonesArray * fPidChargedArray
Definition: PndMcCloner.h:48
TClonesArray * fInputArray
Definition: PndMcCloner.h:45