FairRoot/PandaRoot
catracking.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 catracking(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 = "catracking_nokf";
11  TString friend1 = "sim";
12  TString friend2 = "digi";
13  TString friend3 = "";
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 
29  fRun->AddTask(tracking);
30 
31  if (fOptions.Contains("gf1")){
32  FairGeane *Geane = new FairGeane();
33  fRun->AddTask(Geane);
34 
36  fRun->AddTask(recoKalman = new PndRecoKalmanTask());
37  recoKalman->SetTrackInBranchName("SttMvdTrack");
38  recoKalman->SetTrackOutBranchName("SttMvdGenTrack");
39 
40  recoKalman->SetBusyCut(50); // CHECK to be tuned
41  //recoKalman->SetIdealHyp(kTRUE);
42  //recoKalman->SetNumIterations(3);
43  recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK
44  //recoKalman->SetPropagateToIP(kFALSE);
45  } else if (fOptions.Contains("gf2")){
46  FairGeane *Geane = new FairGeane();
47  fRun->AddTask(Geane);
48 
50  fRun->AddTask(recoKalman = new PndRecoKalmanTask2());
51  recoKalman->SetTrackInBranchName("SttMvdTrack");
52  recoKalman->SetTrackOutBranchName("SttMvdGenTrack");
53 
54  recoKalman->SetBusyCut(50); // CHECK to be tuned
55  //recoKalman->SetIdealHyp(kTRUE);
56  //recoKalman->SetNumIterations(3);
57  //recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK
58  //recoKalman->SetPropagateToIP(kFALSE);
59  }
60 
61  // ----- Intialise and run --------------------------------------------
62  fRun->Init();
63  fRun->Run(0, nEvents);
64  fRun->Finish();
65  return 0;
66 }
Class for the master reconstruction chain.
Bool_t Setup(TString outprefix="")
Initial setup.
void SetTrackInBranchName(const TString &name)
void AddFriend(TString par)
Setter of friend root files.
FairParRootFileIo * output
Definition: sim_emc_apd.C:120
void SetTrackOutBranchName(const TString &name)
FairGeane * Geane
FairRunAna * fRun
Definition: hit_dirc.C:58
void SetInput(TString par)
Input of the macro.
int catracking(Int_t nEvents=0)
Definition: catracking.C:4
void SetTrackOutBranchName(const TString &name)
Int_t nEvents
Definition: hit_dirc.C:11
PndTrkTracking * tracking
void SetTrackRep(Short_t num)
void SetBusyCut(Int_t b)
void SetTrackInBranchName(const TString &name)
void Finish()
Final diagnostics.
PndRecoKalmanTask * recoKalman
void SetOutput(TString par)
Tag of the output file of the macro.
void SetParamAsciiFile(TString par)
Setter of the parameter ascii file.
void SetBusyCut(Int_t b)