FairRoot/PandaRoot
Functions
reco_complete_newSTT.C File Reference

Go to the source code of this file.

Functions

int reco_complete_newSTT (Int_t nEvents=0)
 

Function Documentation

int reco_complete_newSTT ( Int_t  nEvents = 0)

Definition at line 4 of file reco_complete_newSTT.C.

References PndIdealTrackFinder::AddBranchName(), PndMasterRunAna::AddFriend(), PndMasterRunAna::Finish(), fRun, Geane, nEvents, output, recoKalman, recoKalmanFwd, PndRecoKalmanTask2::SetBusyCut(), PndRecoKalmanTask::SetBusyCut(), PndMasterRunAna::SetInput(), PndMasterRunAna::SetOutput(), PndIdealTrackFinder::SetOutputBranchName(), PndMasterRunAna::SetParamAsciiFile(), PndIdealTrackFinder::SetPersistence(), PndPersistencyTask::SetPersistency(), PndIdealTrackFinder::SetRelativeMomentumSmearing(), PndRecoKalmanTask2::SetTrackInBranchName(), PndRecoKalmanTask::SetTrackInBranchName(), PndIdealTrackFinder::SetTrackingEfficiency(), PndRecoKalmanTask2::SetTrackOutBranchName(), PndRecoKalmanTask::SetTrackOutBranchName(), PndRecoKalmanTask::SetTrackRep(), PndIdealTrackFinder::SetTrackSelector(), PndMasterRunAna::Setup(), PndIdealTrackFinder::SetVertexSmearing(), trackFts, tracking, TString, and PndBarrelTrackFinder::UseMvdSttGem().

5 {
6  //-----User Settings:------------------------------------------------------
7  TString parAsciiFile = "all.par";
8  TString prefix = "evtcomplete";
9  TString input = "psi2s_Jpsi2pi_Jpsi_mumu.dec";
10  TString output = "reco";
11  TString friend1 = "sim";
12  TString friend2 = "digi";
13  TString friend3 = "";
14  TString friend4 = "";
15  TString fOptions = "gf2"; // "gf2" for genfit 2
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 
32  fRun->AddTask(task);
33 
35  tracking->UseMvdSttGem(kTRUE, kTRUE, kTRUE);
36  tracking->SetPersistency(kTRUE);
37  // tracking->DrawDetails();
38  // tracking->DrawHistos();
39  //tracking->SetVerbose(4);
40  fRun->AddTask(tracking);
41 
42 
43  if (!fOptions.Contains("gf2")){
45  fRun->AddTask(recoKalman = new PndRecoKalmanTask());
46  recoKalman->SetTrackInBranchName("BarrelTrack");
47  recoKalman->SetTrackOutBranchName("BarrelGenTrack");
48 
49  recoKalman->SetBusyCut(50); // CHECK to be tuned
50  //recoKalman->SetIdealHyp(kTRUE);
51  //recoKalman->SetNumIterations(3);
52  recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK
53  //recoKalman->SetPropagateToIP(kFALSE);
54  } else {
55  PndRecoKalmanTask2* recoKalman = NULL;
56  fRun->AddTask(recoKalman = new PndRecoKalmanTask2());
57  recoKalman->SetTrackInBranchName("BarrelTrack");
58  recoKalman->SetTrackOutBranchName("BarrelGenTrack");
59 
60  recoKalman->SetBusyCut(50); // CHECK to be tuned
61  //recoKalman->SetIdealHyp(kTRUE);
62  //recoKalman->SetNumIterations(3);
63  //recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK
64  //recoKalman->SetPropagateToIP(kFALSE);
65  }
66 
67 // if (fOptions.Contains("filtered")){
68 // PndMissingPzCleanerTask* cleaner = NULL;
69 // fRun->AddTask(cleaner = new PndMissingPzCleanerTask()); //4
70 // if ( (!fOptions.Contains("day1")) || (fOptions.Contains("gem")) )
71 // {
72 // cleaner->SetInputTrackBranch("SttMvdGemGenTrack");
73 // } else {
74 // cleaner->SetInputTrackBranch("SttMvdGenTrack");
75 // }
76 // cleaner->SetRemoveTrack(kTRUE);
77 // }
78 
80  fRun->AddTask(trackFts = new PndIdealTrackFinder());
81  trackFts->SetTrackSelector("FtsTrackFunctor");
82  trackFts->AddBranchName("FTSHit");
83  trackFts->AddBranchName("MVDHitsPixel");
84  trackFts->AddBranchName("MVDHitsStrip");
85  trackFts->SetRelativeMomentumSmearing(0.05);
86  trackFts->SetVertexSmearing(0.05, 0.05, 0.05);
87  trackFts->SetTrackingEfficiency(1.);
88  trackFts->SetOutputBranchName("FtsIdealTrack");
89  trackFts->SetPersistence(kFALSE);
90 
91  if (!fOptions.Contains("gf2")){
93  fRun->AddTask(recoKalmanFwd = new PndRecoKalmanTask());
94  recoKalmanFwd->SetTrackInBranchName("FtsIdealTrack");
95  //recoKalmanFwd->SetTrackInIDBranchName("FtsIdealTrackID");
96  recoKalmanFwd->SetTrackOutBranchName("FtsIdealGenTrack");
97  recoKalmanFwd->SetBusyCut(50); // CHECK to be tuned
98  //recoKalmanFwd->SetIdealHyp(kTRUE);
99  //recoKalmanFwd->SetNumIterations(3);
100  recoKalmanFwd->SetTrackRep(0); // 0 Geane (default), 1 RK
101  //recoKalmanFwd->SetPropagateToIP(kFALSE);
102  } else {
103  PndRecoKalmanTask2* recoKalmanFwd = NULL;
104  fRun->AddTask(recoKalmanFwd = new PndRecoKalmanTask2());
105  recoKalmanFwd->SetTrackInBranchName("FtsIdealTrack");
106  //recoKalmanFwd->SetTrackInIDBranchName("FtsIdealTrackID");
107  recoKalmanFwd->SetTrackOutBranchName("FtsIdealGenTrack");
108  recoKalmanFwd->SetBusyCut(50); // CHECK to be tuned
109  //recoKalmanFwd->SetIdealHyp(kTRUE);
110  //recoKalmanFwd->SetNumIterations(3);
111  //recoKalmanFwd->SetTrackRep(0); // 0 Geane (default), 1 RK
112  //recoKalmanFwd->SetPropagateToIP(kFALSE);
113  }
114 
115 
116 
117 
118  // ----- Intialise and run --------------------------------------------
119  fRun->Init();
120  fRun->Run(0, nEvents);
121  fRun->Finish();
122  return 0;
123 }
Class for the master reconstruction chain.
Bool_t Setup(TString outprefix="")
Initial setup.
void SetTrackingEfficiency(Double_t eff=1.)
void SetTrackInBranchName(const TString &name)
Ideal track finder for all types of tracking detectors The PndIdealTrackFinder combines all hits in ...
void SetPersistency(Bool_t val=kTRUE)
void SetPersistence(Bool_t persistence)
virtual void SetOutputBranchName(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.
void SetTrackOutBranchName(const TString &name)
void SetTrackSelector(TString selector)
PndRecoKalmanTask * recoKalmanFwd
Int_t nEvents
Definition: hit_dirc.C:11
PndTrkTracking * tracking
PndFtsTrackerIdeal * trackFts
void SetTrackRep(Short_t num)
void SetVertexSmearing(Double_t sigmax=-1., Double_t sigmay=-1., Double_t sigmaz=-1.)
void SetBusyCut(Int_t b)
void SetTrackInBranchName(const TString &name)
void UseMvdSttGem(const Bool_t useMvd, const Bool_t useStt, const Bool_t useGem)
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.
virtual void AddBranchName(TString name)
Search for tracks only in given branches. If no BranchName is given all tracking detectors are taken...
void SetRelativeMomentumSmearing(Double_t dpop=-1.)
void SetBusyCut(Int_t b)