FairRoot/PandaRoot
Classes | Public Member Functions | Protected Attributes | Private Attributes | List of all members
PndMasterRecoIdealTask Class Reference

The default reconstruction tasks. More...

#include <PndMasterRecoIdealTask.h>

Inheritance diagram for PndMasterRecoIdealTask:
PndMasterTask PndBlackBoxTask PndPersistencyTask

Classes

struct  recoIdealTaskList
 struct of the task list This struct avoids to retrieve tasks using the integer value (misleading), but uses an easier scheme. The enum is "k" + the class name, i.e. "kPndTrkTracking2" for the class PndTracking2. The function PrintTaskList() can be used to check the list of the tasks and the corresponding number. More...
 

Public Member Functions

 PndMasterRecoIdealTask (TString fOptions="")
 Default constructor with options This string can be: "" -> default settings full setup "day1" -> Setup for day1 experiment: no GEM, FTS1234, NO DISC, NO RICH "gem" (added to "day1") -> Setup for day1 experiment with 3 GEM planes "fts1256" (added to "day1") -> Setup for day1 experiment with FTS1256 insted of FTS1234 Example: "day1+gem+fts1256" means day1 setup + GEM planes + fst1256. More...
 
virtual ~PndMasterRecoIdealTask ()
 Destructor. More...
 
virtual void SetPersistency (Bool_t pers=kTRUE)
 Set the persistency of all the tasks. More...
 
void PrintTaskList ()
 It prints the list of tasks. More...
 
void SetVerbose (Int_t iVerbose=1)
 Set the Verbosity to all the tasks. More...
 
void SetVerbose (Int_t nTask, Int_t iVerbose)
 Set the Verbosity to a single task. More...
 
FairTask * GetTask (Int_t nTask)
 Return the pointer to a single task. More...
 
virtual void SetParContainers ()
 
virtual InitStatus Init ()
 
virtual InitStatus ReInit ()
 
virtual void Exec (Option_t *opt)
 
Bool_t GetPersistency ()
 

Protected Attributes

std::vector< PndPersistencyTask * > fBranchTasks
 
std::vector< FairTask * > fStandardTasks
 
std::map< PndPersistencyTask
*, bool > 
fFixedPersistency
 

Private Attributes

struct
PndMasterRecoIdealTask::recoIdealTaskList 
reco
 
TString fOptions
 Options parsed to the reconstruction. More...
 

Detailed Description

The default reconstruction tasks.

Master Reconstruction Task Class

This class includes all the reconstruction tasks which need to be used in the default reconstruction macros.

Remarks
If you find some obsolete task which needs to be changed, contact the computing coordinator.
Author
Stefano Spataro spata.nosp@m.ro@t.nosp@m.o.inf.nosp@m.n.it, Torino University
Version
1.0
Date
Feb 1, 2016

Definition at line 20 of file PndMasterRecoIdealTask.h.

Constructor & Destructor Documentation

PndMasterRecoIdealTask::PndMasterRecoIdealTask ( TString  options = "")

Default constructor with options This string can be: "" -> default settings full setup "day1" -> Setup for day1 experiment: no GEM, FTS1234, NO DISC, NO RICH "gem" (added to "day1") -> Setup for day1 experiment with 3 GEM planes "fts1256" (added to "day1") -> Setup for day1 experiment with FTS1256 insted of FTS1234 Example: "day1+gem+fts1256" means day1 setup + GEM planes + fst1256.

Default Constructor.

Reconstruction task list

Here all the reconstruction tasks are added to the task, with the standard settings. A check is done after each task if the tasklist enum is broken or not. At the end the event counter is added (each 100 events), and the verbosity is set to 0 to all the tasks (it can be changed afterwards with SetVerbosity() functions.

Definition at line 23 of file PndMasterRecoIdealTask.cxx.

References Add(), fOptions, PndMasterRecoIdealTask::recoIdealTaskList::kPndBarrelIdealTracking, PndMasterRecoIdealTask::recoIdealTaskList::kPndFtsTrackerIdeal, PndMasterRecoIdealTask::recoIdealTaskList::kPndRecoKalmanTask1, PndMasterRecoIdealTask::recoIdealTaskList::kPndRecoKalmanTask2, reco, recoKalman, recoKalmanFwd, PndRecoMultiKalmanTask::SetFitHypotheses(), PndIdealTrackFinder::SetOutputBranchName(), PndIdealTrackFinder::SetPersistence(), PndIdealTrackFinder::SetRelativeMomentumSmearing(), PndRecoKalmanTask::SetTrackInBranchName(), PndRecoMultiKalmanTask::SetTrackInBranchName(), PndIdealTrackFinder::SetTrackingEfficiency(), PndRecoKalmanTask::SetTrackOutBranchName(), PndRecoMultiKalmanTask::SetTrackOutBranchName(), PndIdealTrackFinder::SetTrackSelector(), PndMasterTask::SetVerbose(), PndIdealTrackFinder::SetVertexSmearing(), trackFts, and tracking.

23  :
24 PndMasterTask("Master Reconstruction Task"), fOptions(options)
25 {
26  reco = {-1, -1, -1, -1};
27 
28  // ----- MVD + STT Pattern Recognition -----------------------------------
29  // use the constructor with input :
30  // printout flag (int) , plotting flag (bool), MC comparison flag (bool), SciTil.
31 
33  this->Add(tracking = new PndIdealTrackFinder()); // 1
34  reco.kPndBarrelIdealTracking = GetListOfTasks()->GetSize()-1;
35  tracking->SetTrackSelector("NoFtsTrackFunctor");
36  tracking->SetRelativeMomentumSmearing(0.05);
37  tracking->SetVertexSmearing(0.05, 0.05, 0.05);
38  tracking->SetTrackingEfficiency(1.);
39  tracking->SetOutputBranchName("SttMvdGemTrack");
40  tracking->SetPersistence(kTRUE);
41 
42  // ----- Barrel Kalman Task ----------------------------
43  if (!fOptions.Contains("multikalman")) {
45  this->Add(recoKalman = new PndRecoKalmanTask()); // 2
46  reco.kPndRecoKalmanTask1 = GetListOfTasks()->GetSize()-1;
47  if ((!fOptions.Contains("day1")) || (fOptions.Contains("gem"))) {
48  recoKalman->SetTrackInBranchName("SttMvdGemTrack");
49  // recoKalman->SetTrackInIDBranchName("SttMvdGemTrackID");
50  recoKalman->SetTrackOutBranchName("SttMvdGemGenTrack");
51  } else {
52  recoKalman->SetTrackInBranchName("SttMvdTrack");
53  // recoKalman->SetTrackInIDBranchName("SttMvdTrackID");
54  recoKalman->SetTrackOutBranchName("SttMvdGenTrack");
55  }
56  //recoKalman->SetBusyCut(50); // CHECK to be tuned //comment out to be consistent with multikalman
57  //recoKalman->SetIdealHyp(kTRUE);
58  //recoKalman->SetNumIterations(3);
59  //recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK //comment out to be consistent with multikalman
60  //recoKalman->SetPropagateToIP(kFALSE);
61  } else {
62  PndRecoMultiKalmanTask* recoKalman = NULL;
63  this->Add(recoKalman = new PndRecoMultiKalmanTask()); // 2
64  recoKalman->SetFitHypotheses(fOptions); //Walter added
65  reco.kPndRecoKalmanTask1 = GetListOfTasks()->GetSize()-1;
66  if ((!fOptions.Contains("day1")) || (fOptions.Contains("gem"))) {
67  recoKalman->SetTrackInBranchName("SttMvdGemTrack");
68  // recoKalman->SetTrackInIDBranchName("SttMvdGemTrackID");
69  recoKalman->SetTrackOutBranchName("SttMvdGemGenTrack");
70  } else {
71  recoKalman->SetTrackInBranchName("SttMvdTrack");
72  // recoKalman->SetTrackInIDBranchName("SttMvdTrackID");
73  recoKalman->SetTrackOutBranchName("SttMvdGenTrack");
74  }
75  //recoKalman->SetBusyCut(50); // CHECK to be tuned
76  //recoKalman->SetIdealHyp(kTRUE);
77  //recoKalman->SetNumIterations(3);
78  //recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK
79  //recoKalman->SetPropagateToIP(kFALSE);
80  }
81 
82  /*
83  // ----- Barrel Kalman Task ----------------------------
84  PndRecoKalmanTask* recoKalman = NULL;
85  this->Add(recoKalman = new PndRecoKalmanTask()); // 2
86  reco.kPndRecoKalmanTask1 = GetListOfTasks()->GetSize()-1;
87 
88  recoKalman->SetTrackInBranchName("SttMvdGemTrack");
89  recoKalman->SetTrackOutBranchName("SttMvdGemGenTrack");
90 
91  recoKalman->SetBusyCut(50); // CHECK to be tuned
92  //recoKalman->SetIdealHyp(kTRUE);
93  //recoKalman->SetNumIterations(3);
94  recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK
95  //recoKalman->SetPropagateToIP(kFALSE);
96  */
97 
98  // ----- FTS Ideal Tracking ----------------------------
100  this->Add(trackFts = new PndIdealTrackFinder()); // 3
101  reco.kPndFtsTrackerIdeal = GetListOfTasks()->GetSize()-1;
102  trackFts->SetTrackSelector("FtsTrackFunctor");
103  trackFts->SetRelativeMomentumSmearing(0.05);
104  trackFts->SetVertexSmearing(0.05, 0.05, 0.05);
105  trackFts->SetTrackingEfficiency(1.);
106  trackFts->SetOutputBranchName("FtsIdealTrack");
107  trackFts->SetPersistence(kTRUE);
108 
109 
110  // ----- Forward Kalman Task ----------------------------
111 // if (!fOptions.Contains("multikalman")) {
113  this->Add(recoKalmanFwd = new PndRecoKalmanTask()); // 2
114  reco.kPndRecoKalmanTask2 = GetListOfTasks()->GetSize()-1;
115 
116  recoKalmanFwd->SetTrackInBranchName("FtsIdealTrack");
117  //recoKalmanFwd->SetTrackInIDBranchName("FtsIdealTrackID");
118  recoKalmanFwd->SetTrackOutBranchName("FtsIdealGenTrack");
119 
120  //recoKalman->SetBusyCut(50); // CHECK to be tuned //comment out to be consistent with multikalman
121  //recoKalman->SetIdealHyp(kTRUE);
122  //recoKalman->SetNumIterations(3);
123  //recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK //comment out to be consistent with multikalman
124  //recoKalman->SetPropagateToIP(kFALSE);
125 // } else {
126 // PndRecoMultiKalmanTask* recoKalmanFwd = NULL;
127 // this->Add(recoKalmanFwd = new PndRecoMultiKalmanTask()); // 2
128 // reco.kPndRecoKalmanTask2 = GetListOfTasks()->GetSize()-1;
129 
130 // recoKalmanFwd->SetTrackInBranchName("FtsIdealTrack");
131  //recoKalmanFwd->SetTrackInIDBranchName("FtsIdealTrackID");
132 // recoKalmanFwd->SetTrackOutBranchName("FtsIdealGenTrack");
133 
134  //recoKalman->SetBusyCut(50); // CHECK to be tuned
135  //recoKalman->SetIdealHyp(kTRUE);
136  //recoKalman->SetNumIterations(3);
137  //recoKalman->SetTrackRep(0); // 0 Geane (default), 1 RK
138  //recoKalman->SetPropagateToIP(kFALSE);
139 // }
140 
141 
142  SetVerbose(0);
143 }
mychain Add("run.root")
struct PndMasterRecoIdealTask::recoIdealTaskList reco
void SetVerbose(Int_t iVerbose=1)
Set the Verbosity to all the tasks.
void SetTrackingEfficiency(Double_t eff=1.)
Ideal track finder for all types of tracking detectors The PndIdealTrackFinder combines all hits in ...
void SetPersistence(Bool_t persistence)
virtual void SetOutputBranchName(TString name)
TString fOptions
Options parsed to the reconstruction.
void SetTrackOutBranchName(const TString &name)
void SetTrackOutBranchName(const TString &name)
void SetTrackSelector(TString selector)
PndRecoKalmanTask * recoKalmanFwd
PndTrkTracking * tracking
PndFtsTrackerIdeal * trackFts
void SetTrackInBranchName(const TString &name)
void SetVertexSmearing(Double_t sigmax=-1., Double_t sigmay=-1., Double_t sigmaz=-1.)
void SetTrackInBranchName(const TString &name)
void SetFitHypotheses(const TString &name)
PndRecoKalmanTask * recoKalman
PndMasterTask()
Default constructor.
void SetRelativeMomentumSmearing(Double_t dpop=-1.)
PndMasterRecoIdealTask::~PndMasterRecoIdealTask ( )
virtual

Destructor.

Definition at line 180 of file PndMasterRecoIdealTask.cxx.

181 {
182 }

Member Function Documentation

void PndBlackBoxTask::Exec ( Option_t *  opt)
virtualinherited

Reimplemented in PndMvdQATask, and PndBufferTestTask.

Definition at line 50 of file PndBlackBoxTask.cxx.

51 {
52  return;
53 }
Bool_t PndPersistencyTask::GetPersistency ( )
inlineinherited

Definition at line 32 of file PndPersistencyTask.h.

References PndPersistencyTask::fPersistency.

Referenced by PndLmdPixelHitProducerFast::GetPersistance(), PndMdtDigitization::Init(), PndMdtHitProducerIdeal::Init(), PndMdtClusterTask::Init(), PndFtsHitProducerRealFast::Init(), PndRichHitProducer::Init(), PndSttHitProducerRealFast::Init(), PndDiscTaskReconstruction::Init(), PndSttHelixHitProducer::Init(), PndDiscTaskPID::Init(), PndIdealTrackFinder::Init(), PndSttMvdGemTracking::Init(), PndMdtTrkProducer::Init(), PndFtsHitProducerRealFull::Init(), PndLmdPixelClusterTask::Init(), PndSttHitProducerRealFull::Init(), PndLmdStripClusterTask::Init(), PndEmcApdHitProducer::Init(), PndMissingPzCleanerTask::Init(), PndEmcMakeRecoHit::Init(), PndEmcMakeClusterOnline::Init(), PndTrackSmearTask::Init(), PndEmcFWEndcapTimebasedWaveforms::Init(), PndSttHitProducerIdeal::Init(), PndEmcFWEndcapDigi::Init(), PndFtsHitProducerIdeal::Init(), PndEmcMakeCluster::Init(), PndMdtPointsToWaveform::Init(), PndDiscTaskDigitization::Init(), PndEmcMakeDigi::Init(), PndSdsTimeWalkCorrTask::Init(), PndLmdPixelHitProducerFast::Init(), PndDrcHitFinder::Init(), PndRichHitFinder::Init(), PndEmcMakeCorr::Init(), PndFtofHitProducerIdeal::Init(), PndEmcHitsToWaveform::Init(), PndSciTDigiTask::Init(), PndDrcHitProducerIdeal::Init(), PndSdsHitProducerIdeal::Init(), PndSciTHitProducerIdeal::Init(), PndEmcHitProducer::Init(), PndRecoMultiKalmanTask2::Init(), PndDrcHitProducerReal::Init(), PndDskFLGHitProducerIdeal::Init(), PndEmcTmpWaveformToDigi::Init(), PndDrcDigiTask::Init(), PndEmcWaveformToDigi::Init(), PndSttMatchTracks::Init(), PndEmcWaveformToCalibratedDigi::Init(), PndTrkTracking2::Init(), PndSttFindTracks::Init(), PndEmcMultiWaveformToCalibratedDigi::Init(), PndDrcTimeDigiTask::Init(), PndRecoKalmanTask2::Init(), PndEmcExpClusterSplitter::Init(), PndSdsNoiseProducer::Init(), PndFtsHoughTrackerTask::Init(), PndEmcPhiBumpSplitter::Init(), PndSdsHybridHitProducer::Init(), PndSdsIdealRecoTask::Init(), PndRecoMultiKalmanTask::Init(), PndSdsIdealClusterTask::Init(), PndRecoKalmanTask::Init(), PndSdsStripHitProducerDif::Init(), PndSdsStripHitProducer::Init(), PndGemDigitize::Init(), PndGemFindHits::Init(), PndSdsPixelClusterTask::Init(), PndSdsStripClusterTask::Init(), PndMvdGemTrackFinderOnHits::Init(), PndBarrelTrackFinder::Init(), PndEmcFullDigiTask::PndEmcFullDigiTask(), PndEmcMakeBump::PndEmcMakeBump(), PndUnassignedHitsTask::RegisterBranches(), PndMvdClusterTask::SetPersistance(), PndMvdDigiTask::SetPersistance(), PndEmcMakeBump::SetStorageOfData(), and PndEmcFullDigiTask::StoreDigi().

32 { return fPersistency; }
FairTask * PndMasterTask::GetTask ( Int_t  nTask)
inherited

Return the pointer to a single task.

This function allows to retrieve the pointer of a task inside the task list, when you want to use some particular setter or change someting in the task.

Parameters
nTaskIndex of the task you want to modify. Instead of the integer you can use the enum "k" + task name (i.e. kMvdDigiTask, kSttHitProducerRealFast, etc...)
Returns
A pointer to the corresponding task

Retrieve the pointer to a Task in the list

Definition at line 75 of file PndMasterTask.cxx.

76 {
77  TList* thistasks = this->GetListOfTasks();
78 
79  return ((FairTask*)thistasks->At(nTask));
80 }
InitStatus PndBlackBoxTask::Init ( )
virtualinherited

Reimplemented in PndMvdQATask, and PndBufferTestTask.

Definition at line 43 of file PndBlackBoxTask.cxx.

44 {
45  return kSUCCESS;
46 }
void PndMasterTask::PrintTaskList ( )
inherited

It prints the list of tasks.

Print the list of the task which are included in the list

This function print the task number, its title and its name. This can be important when it is needed to modify a particular task and the task number is needed. In any case, the use of enum should be preferred.

Remarks
The task names are not well defined in the classes, some of them are missing. We should define a better scheme.

Definition at line 24 of file PndMasterTask.cxx.

References counter, and next.

25 {
26  TList* thistasks = this->GetListOfTasks();
27 
28  Int_t counter = 0;
29  TIter next(thistasks->MakeIterator());
30  while (FairTask *task = (FairTask*)next())
31  {
32  if (counter < 10)
33  std::cout << "Task #" << counter << "\tTitle: " << task->GetTitle() << "\tName: " << task->GetName() << std::endl;
34  else
35  std::cout << "Task #" << counter << "\tTitle: " << task->GetTitle() << "\tName: " << task->GetName() << std::endl;
36  counter++;
37  }
38 
39  return;
40 }
int counter
Definition: ZeeAnalysis.C:59
static int next[96]
Definition: ranlxd.cxx:374
InitStatus PndBlackBoxTask::ReInit ( )
virtualinherited

Definition at line 25 of file PndBlackBoxTask.cxx.

26 {
27  return kSUCCESS;
28 }
void PndBlackBoxTask::SetParContainers ( )
virtualinherited

Reimplemented in PndMvdQATask.

Definition at line 21 of file PndBlackBoxTask.cxx.

22 {
23 }
void PndMasterRecoIdealTask::SetPersistency ( Bool_t  pers = kTRUE)
virtual

Set the persistency of all the tasks.

Parameters
persPersistency level: 0 no TCA, 1 all TCA

Set the Persistency of all the tasks in the same way

Reimplemented from PndMasterTask.

Definition at line 147 of file PndMasterRecoIdealTask.cxx.

References fOptions, PndMasterRecoIdealTask::recoIdealTaskList::kPndBarrelIdealTracking, PndMasterRecoIdealTask::recoIdealTaskList::kPndFtsTrackerIdeal, PndMasterRecoIdealTask::recoIdealTaskList::kPndRecoKalmanTask1, PndMasterRecoIdealTask::recoIdealTaskList::kPndRecoKalmanTask2, reco, and SetPersistence().

Referenced by PndMasterRunAna::AddRecoIdealTasks().

148 {
149  // ----- MVD + STT Pattern Recognition -----------------------------------
150  ((PndIdealTrackFinder*)GetListOfTasks()->At(reco.kPndBarrelIdealTracking))->SetPersistence(pers);
151 
152 
153  // ----- Barrel Kalman Task ----------------------------
154  if (!fOptions.Contains("multikalman")) {
155  ((PndRecoKalmanTask*)GetListOfTasks()->At(reco.kPndRecoKalmanTask1))->SetPersistence(pers);
156  } else {
157  //((PndRecoMultiKalmanTask*)GetListOfTasks()->At(reco.kPndRecoKalmanTask1))->SetPersistence(pers); //todo:Implement me!
158  }
159 
160 
161 
162  // ----- FTS Ideal Tracking ----------------------------
163  ((PndIdealTrackFinder*)GetListOfTasks()->At(reco.kPndFtsTrackerIdeal))->SetPersistence(pers);
164 
165 
166  // ----- Forward Kalman Task ---------------------------
167  if (!fOptions.Contains("multikalman")) {
168  ((PndRecoKalmanTask*)GetListOfTasks()->At(reco.kPndRecoKalmanTask2))->SetPersistence(pers);
169  } else {
170  //((PndRecoMultiKalmanTask*)GetListOfTasks()->At(reco.kPndRecoKalmanTask2))->SetPersistence(pers); //todo:implement me!
171  }
172 
173 
174 
175  return;
176 }
struct PndMasterRecoIdealTask::recoIdealTaskList reco
Ideal track finder for all types of tracking detectors The PndIdealTrackFinder combines all hits in ...
TString fOptions
Options parsed to the reconstruction.
DemoPR SetPersistence()
void PndMasterTask::SetVerbose ( Int_t  iVerbose = 1)
inherited

Set the Verbosity to all the tasks.

Parameters
iVerboseVerbosity level: 0 no messages, the higher more messages

Set the Verbosity of all the tasks at the same number

Definition at line 43 of file PndMasterTask.cxx.

References next.

Referenced by PndMasterDigiOnlyTask::PndMasterDigiOnlyTask(), PndMasterDigiTask::PndMasterDigiTask(), PndMasterLocalRecoTask::PndMasterLocalRecoTask(), PndMasterMultiPidTask::PndMasterMultiPidTask(), PndMasterPidTask::PndMasterPidTask(), PndMasterRecoIdealTask(), PndMasterRecoTask::PndMasterRecoTask(), PndMasterSimTask::PndMasterSimTask(), and PndMasterTask::SetVerbose().

44 {
45  TList* thistasks = this->GetListOfTasks();
46 
47  TIter next(thistasks->MakeIterator());
48  while (FairTask *task = (FairTask*)next())
49  {
50  task->SetVerbose(iVerbose);
51  }
52 
53  return;
54 }
Int_t iVerbose
static int next[96]
Definition: ranlxd.cxx:374
void PndMasterTask::SetVerbose ( Int_t  nTask,
Int_t  iVerbose 
)
inherited

Set the Verbosity to a single task.

This function has to be used when you want to change the verbosity to a single task

Parameters
nTaskIndex of the task you want to modify. Instead of the integer you can use the enum k + task name (i.e. kMvdDigiTask, hSttHitProducerRealFast
iVerboseVerbosity. 0 -> no messages; the higher -> more messages

Set the Verbosity of a single task

Definition at line 57 of file PndMasterTask.cxx.

References PndMasterTask::SetVerbose().

58 {
59  TList* thistasks = this->GetListOfTasks();
60  ((FairTask*)thistasks->At(nTask))->SetVerbose(iVerbose);
61 
62  return;
63 }
void SetVerbose(Int_t iVerbose=1)
Set the Verbosity to all the tasks.
Int_t iVerbose

Member Data Documentation

std::vector<PndPersistencyTask*> PndMasterTask::fBranchTasks
protectedinherited
std::map<PndPersistencyTask*, bool> PndMasterTask::fFixedPersistency
protectedinherited
TString PndMasterRecoIdealTask::fOptions
private

Options parsed to the reconstruction.

Definition at line 60 of file PndMasterRecoIdealTask.h.

Referenced by PndMasterRecoIdealTask(), and SetPersistency().

std::vector<FairTask*> PndMasterTask::fStandardTasks
protectedinherited

Definition at line 81 of file PndMasterTask.h.

Referenced by PndMasterPidTask::PndMasterPidTask().

struct PndMasterRecoIdealTask::recoIdealTaskList PndMasterRecoIdealTask::reco
private

The documentation for this class was generated from the following files: