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

The default pid tasks. More...

#include <PndMasterPidTask.h>

Inheritance diagram for PndMasterPidTask:
PndMasterTask PndBlackBoxTask PndPersistencyTask

Classes

struct  pidTaskList
 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. "kPndPidCorrelator" for the class PndPidCorrelator. The function PrintTaskList() can be used to check the list of the tasks and the corresponding number. More...
 

Public Member Functions

 PndMasterPidTask (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 "filtered" -> the option filtered was used in the reco stage to remove tracks with wrong Pz Example: "day1+gem+fts1256" means day1 setup + GEM planes + fst1256. More...
 
virtual ~PndMasterPidTask ()
 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
PndMasterPidTask::pidTaskList 
pid
 
TString fOptions
 Options parsed to the pid. More...
 

Detailed Description

The default pid tasks.

Master Pid Task Class

This class includes all the pid tasks which need to be used in the default pid 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 PndMasterPidTask.h.

Constructor & Destructor Documentation

PndMasterPidTask::PndMasterPidTask ( 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 "filtered" -> the option filtered was used in the reco stage to remove tracks with wrong Pz Example: "day1+gem+fts1256" means day1 setup + GEM planes + fst1256.

Default Constructor.

Pid task list

Here all the pid 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 31 of file PndMasterPidTask.cxx.

References Add(), corr, fOptions, PndMasterPidTask::pidTaskList::kPndMcCloner, PndMasterPidTask::pidTaskList::kPndPidBremCorrector, PndMasterPidTask::pidTaskList::kPndPidCorrelator, PndMasterPidTask::pidTaskList::kPndPidDiscAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidDrcAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidEmcBayesAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidFtofAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidIdealAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidMdtHCAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidMvdAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidRichAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidSciTAssociatorTask, PndMasterPidTask::pidTaskList::kPndPidSttAssociatorTask, pid, PndPidCorrelator::SetBackPropagate(), PndPidCorrelator::SetBarrelTrackBranch(), PndMcCloner::SetCleanMc(), PndPidCorrelator::SetDebugMode(), PndPidCorrelator::SetFast(), PndPidCorrelator::SetForwardTrackBranch(), PndMasterTask::SetVerbose(), and TString.

31  :
32  PndMasterTask("Master Pid Task"), fOptions(options)
33 {
34  pid = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
35 
36  // ----- Correlation ---------------------------------
37  PndPidCorrelator* corr = NULL;
38  this->Add(corr = new PndPidCorrelator()); // 1
39  pid.kPndPidCorrelator = GetListOfTasks()->GetSize()-1;
40  TString barrelbranchname="SttMvdGemGenTrack";
41  if (fOptions.Contains("nogem")||fOptions.Contains("gem0")) {
42  barrelbranchname="SttMvdGenTrack";
43  }
44  if (fOptions.Contains("filtered")) barrelbranchname+="_filtered";
45  if (fOptions.Contains("fakeonline")) barrelbranchname+="_fakeonline";
46  corr->SetBarrelTrackBranch(barrelbranchname);
47 
48  TString fwdbranchname="FtsIdealGenTrack";
49  if (fOptions.Contains("fakeonline")) fwdbranchname+="_fakeonline";
50  corr->SetForwardTrackBranch(fwdbranchname);
51 
52  if (fOptions.Contains("piddebug")) corr->SetDebugMode(kTRUE);
53  if (fOptions.Contains("pidfast")) corr->SetFast(kTRUE);
54  if (fOptions.Contains("pidnoswim")) corr->SetBackPropagate(kFALSE);
55 
56  // ----- Bremsstrahlung Correction ----------------------
57  this->Add(new PndPidBremCorrector()); // 2
58  pid.kPndPidBremCorrector = GetListOfTasks()->GetSize()-1;
59 
60  // ----- MC Cloner ------------------------------------
61  PndMcCloner *clone = NULL;
62  this->Add(clone = new PndMcCloner()); // 3
63  pid.kPndMcCloner = GetListOfTasks()->GetSize()-1;
64  // Option to clean the MCTrack TClonesArray from particles which were not interacting with sensitive detectors
65  clone->SetCleanMc();
66 
67  // ----- Classifiers ----------------------------------
68  this->Add(new PndPidIdealAssociatorTask()); // 4
69  pid.kPndPidIdealAssociatorTask = GetListOfTasks()->GetSize()-1;
70 
71  this->Add(new PndPidMvdAssociatorTask()); // 5
72  pid.kPndPidMvdAssociatorTask = GetListOfTasks()->GetSize()-1;
73 
74  this->Add(new PndPidMdtHCAssociatorTask()); // 6
75  pid.kPndPidMdtHCAssociatorTask = GetListOfTasks()->GetSize()-1;
76 
77  this->Add(new PndPidDrcAssociatorTask()); // 7
78  pid.kPndPidDrcAssociatorTask = GetListOfTasks()->GetSize()-1;
79 
80  if ( !fOptions.Contains("day1") && !fOptions.Contains("phase1") )
81  {
82  this->Add(new PndPidDiscAssociatorTask()); // 8
83  pid.kPndPidDiscAssociatorTask = GetListOfTasks()->GetSize()-1;
84  }
85 
86  this->Add(new PndPidSttAssociatorTask()); // 9
87  pid.kPndPidSttAssociatorTask = GetListOfTasks()->GetSize()-1;
88 
89  this->Add(new PndPidEmcBayesAssociatorTask()); // 10
90  pid.kPndPidEmcBayesAssociatorTask = GetListOfTasks()->GetSize()-1;
91 
92  this->Add(new PndPidSciTAssociatorTask()); // 11
93  pid.kPndPidSciTAssociatorTask = GetListOfTasks()->GetSize()-1;
94 
95  this->Add(new PndPidFtofAssociatorTask()); // 12
96  pid.kPndPidFtofAssociatorTask = GetListOfTasks()->GetSize()-1;
97 
98  if ( !fOptions.Contains("day1") && !fOptions.Contains("phase1") )
99  {
100  this->Add(new PndPidRichAssociatorTask()); // 13
101  pid.kPndPidRichAssociatorTask = GetListOfTasks()->GetSize()-1;
102  }
103 
104  SetVerbose(0);
105 
106 }
mychain Add("run.root")
PndPidCorrelator * corr
void SetVerbose(Int_t iVerbose=1)
Set the Verbosity to all the tasks.
void SetBarrelTrackBranch(TString branch)
void SetCleanMc(Bool_t opt=kTRUE)
Definition: PndMcCloner.h:33
TString fOptions
Options parsed to the pid.
struct PndMasterPidTask::pidTaskList pid
void SetDebugMode(Bool_t debug)
void SetBackPropagate(Bool_t opt=kTRUE)
void SetForwardTrackBranch(TString branch)
PndMasterTask()
Default constructor.
void SetFast(Bool_t fast)
PndMasterPidTask::~PndMasterPidTask ( )
virtual

Destructor.

Definition at line 119 of file PndMasterPidTask.cxx.

120 {
121 }

Member Function Documentation

void PndBlackBoxTask::Exec ( Option_t *  opt)
virtualinherited

Reimplemented in 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(), PndSttHitProducerRealFast::Init(), PndDiscTaskReconstruction::Init(), PndRichHitProducer::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(), PndRecoMultiKalmanTask2::Init(), PndEmcHitProducer::Init(), PndDrcHitProducerReal::Init(), PndDskFLGHitProducerIdeal::Init(), PndEmcTmpWaveformToDigi::Init(), PndDrcDigiTask::Init(), PndEmcWaveformToDigi::Init(), PndSttMatchTracks::Init(), PndEmcWaveformToCalibratedDigi::Init(), PndTrkTracking2::Init(), PndSttFindTracks::Init(), PndEmcMultiWaveformToCalibratedDigi::Init(), PndRecoKalmanTask2::Init(), PndDrcTimeDigiTask::Init(), PndEmcExpClusterSplitter::Init(), PndFtsHoughTrackerTask::Init(), PndSdsNoiseProducer::Init(), PndEmcPhiBumpSplitter::Init(), PndSdsIdealRecoTask::Init(), PndSdsHybridHitProducer::Init(), PndRecoMultiKalmanTask::Init(), PndSdsIdealClusterTask::Init(), PndRecoKalmanTask::Init(), PndSdsStripHitProducerDif::Init(), PndGemDigitize::Init(), PndSdsStripHitProducer::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 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

Definition at line 21 of file PndBlackBoxTask.cxx.

22 {
23 }
void PndMasterPidTask::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 110 of file PndMasterPidTask.cxx.

Referenced by PndMasterRunAna::AddPidTasks().

111 {
112  if (!pers) LOG(INFO) << "It makes no sense to have pid persistency switched OFF!" << FairLogger::endl;
113  if (!pers) LOG(INFO) << "Or, if you prefer... this functionality has not been implemented yet" << FairLogger::endl;
114 
115  return;
116 }
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(), PndMasterRecoIdealTask::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 PndMasterPidTask::fOptions
private

Options parsed to the pid.

Definition at line 70 of file PndMasterPidTask.h.

Referenced by PndMasterPidTask().

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

Definition at line 81 of file PndMasterTask.h.

struct PndMasterPidTask::pidTaskList PndMasterPidTask::pid
private

Referenced by PndMasterPidTask().


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