FairRoot/PandaRoot
PndMcCloner2.h
Go to the documentation of this file.
1 #ifndef PndMcCloner2_H
2 #define PndMcCloner2_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 PndMcCloner2 : public FairTask
14 {
15 
16  public:
17 
19  PndMcCloner2();
20 
21 
23  ~PndMcCloner2();
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[5];
49 
51  TClonesArray* fPidNeutralArray[5];
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 
61  TString fPidHypoStr[5];
62  Bool_t fHypoFlagCharged[5];
63  Bool_t fHypoFlagNeutral[5];
64 
66 
67  ClassDef(PndMcCloner2,2);
68 
69 };
70 
71 #endif
TString fTrackBranchNamePidHypo
Flag to check which hypotheses are present.
Definition: PndMcCloner2.h:65
TClonesArray * fOutputArray
Definition: PndMcCloner2.h:55
void SetCleanMc(Bool_t opt=kTRUE)
Definition: PndMcCloner2.h:33
Bool_t fCleanMC
Definition: PndMcCloner2.h:59
fRun Init()
Definition: NHitsPerEvent.C:20
void SetOutputBranch(TString branch)
Definition: PndMcCloner2.h:34
map< Int_t, Int_t > mapMCIndex
Definition: PndMcCloner2.h:57
TClonesArray * fInputArray
Definition: PndMcCloner2.h:45