FairRoot/PandaRoot
run/pid_complete.C
Go to the documentation of this file.
1 // Macro for running Panda digitization tasks
2 // to run the macro:
3 // root digi_complete.C or in root session root>.x digi_complete.C
4 int pid_complete(Int_t nEvents = 0)
5 {
6  //-----User Settings:------------------------------------------------------
7  TString parAsciiFile = "all.par";
8  TString prefix = "evtcomplete";
9  TString input = "psi2s_Jpsi2pi_Jpsi_mumu.dec";
10  TString output = "pid";
11  TString friend1 = "sim";
12  TString friend2 = "reco";
13  TString friend3 = "digi";
14  TString friend4 = "";
15  TString fOptions = "";
16 
17  // ----- Initial Settings --------------------------------------------
19  fRun->SetInput(input);
20  fRun->SetOutput(output);
21  fRun->AddFriend(friend1);
22  fRun->AddFriend(friend2);
23  fRun->AddFriend(friend3);
24  fRun->AddFriend(friend4);
25  fRun->SetParamAsciiFile(parAsciiFile);
26  fRun->Setup(prefix);
27 
28  FairGeane *Geane = new FairGeane();
29  fRun->AddTask(Geane);
30 
31  PndPidCorrelator* corr = NULL;
32  fRun->AddTask(corr = new PndPidCorrelator());
33  if ( (!fOptions.Contains("day1")) || (fOptions.Contains("gem")) )
34  {
35  if (fOptions.Contains("filtered")){
36  corr->SetBarrelTrackBranch("SttMvdGemGenTrack_filtered");
37  } else {
38  corr->SetBarrelTrackBranch("SttMvdGemGenTrack");
39  }
40  // corr->SetInputIDBranch("SttMvdGemGenTrackID");
41  }
42  else
43  {
44  if (fOptions.Contains("filtered")){
45  corr->SetBarrelTrackBranch("SttMvdGenTrack_filtered");
46  } else {
47  corr->SetBarrelTrackBranch("SttMvdGenTrack");
48  }
49  // corr->SetInputIDBranch("SttMvdGenTrackID");
50  }
51  corr->SetForwardTrackBranch("FtsIdealGenTrack");
52  // corr->SetInputIDBranch2("FtsIdealGenTrackID");
53  corr->SetDebugMode(kTRUE);
54  //corr->SetFast(kTRUE);
55  //corr->SetBackPropagate(kFALSE);
56 
57  // ----- Bremsstrahlung Correction ----------------------
58  fRun->AddTask(new PndPidBremCorrector());
59 
60  // ----- MC Cloner ------------------------------------
61  // PndMcCloner *clone = NULL;
62  // fRun->AddTask(clone = new PndMcCloner());
63  // Option to clean the MCTrack TClonesArray from particles which were not interacting with sensitive detectors
64  //clone->SetCleanMc();
65 
66  // ----- Classifiers ----------------------------------
67  fRun->AddTask(new PndPidIdealAssociatorTask());
68  fRun->AddTask(new PndPidMvdAssociatorTask());
69  fRun->AddTask(new PndPidMdtHCAssociatorTask());
70  fRun->AddTask(new PndPidDrcAssociatorTask());
71 
72  if ( (!fOptions.Contains("day1")) || (fOptions.Contains("gem")) )
73  {
74  fRun->AddTask(new PndPidDiscAssociatorTask());
75  }
76 
77  fRun->AddTask(new PndPidSttAssociatorTask());
78 
79  fRun->AddTask(new PndPidEmcBayesAssociatorTask());
80 
81  fRun->AddTask(new PndPidSciTAssociatorTask());
82 
83  fRun->AddTask(new PndPidFtofAssociatorTask());
84 
85  if ( (!fOptions.Contains("day1")) )
86  {
87  fRun->AddTask(new PndPidRichAssociatorTask());
88  }
89 
90 
91  // ----- Intialise and run --------------------------------------------
93  fRun->Init();
94  fRun->Run(0, nEvents);
95  fRun->Finish();
96  return 0;
97 }
Class for the master reconstruction chain.
PndPidCorrelator * corr
Bool_t Setup(TString outprefix="")
Initial setup.
void SetBarrelTrackBranch(TString branch)
void AddFriend(TString par)
Setter of friend root files.
FairParRootFileIo * output
Definition: sim_emc_apd.C:120
FairGeane * Geane
FairRunAna * fRun
Definition: hit_dirc.C:58
void SetInput(TString par)
Input of the macro.
void SetDebugMode(Bool_t debug)
Int_t nEvents
Definition: hit_dirc.C:11
static void Init(Int_t MapVersion)
int pid_complete()
void Finish()
Final diagnostics.
void SetForwardTrackBranch(TString branch)
void SetOutput(TString par)
Tag of the output file of the macro.
void SetParamAsciiFile(TString par)
Setter of the parameter ascii file.