PandaRoot
PndDiscTaskReconstruction.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------
2 // Author: Mustafa Schmidt (Mustafa.A.Schmidt@physik.uni-giessen.de)
3 // Changes:
4 // Date: 30.11.2015
5 // Description: Track Reconstruction
6 //-------------------------------------------------------------------------
7 
8 #ifndef PNDDISCTASKRECONSTRUCTION_H
9 #define PNDDISCTASKRECONSTRUCTION_H
10 
11 #include <PndPersistencyTask.h>
12 #include "PndDetectorList.h"
13 #include "FairMCEventHeader.h"
14 #include "FairTSBufferFunctional.h"
15 
16 #include "TString.h"
17 
18 class TClonesArray;
19 
21  public:
23  PndDiscTaskReconstruction(const char *name);
25 
26  // Implement FairTask interface:
27  virtual InitStatus Init();
28  virtual InitStatus ReInit();
29  virtual void Exec(Option_t *opt);
30  virtual void FinishEvent();
31  virtual void FinishTask();
32 
33  void RunTimeBased(Bool_t time_based) { is_time_based = time_based; }
34  void SetFlag_ExportPatterns(Bool_t flag) { flag_export_patterns = flag; }
35 
36  void SetAvgWavelength(Double_t const &val) { average_wl = val; }
37  Double_t const &GetAvgWavelength() const { return average_wl; }
38 
39  void SetMinWavelength(Double_t const &val) { minimum_wl = val; }
40  Double_t const &GetMinWavelength() const { return minimum_wl; }
41 
42  double gauss(int x, double mean, double rms);
43  double mean(std::vector<double> values);
44  double deviation(double mean, std::vector<double> values);
45 
46  protected:
49 
50  TClonesArray *tclarr_digits;
51  TClonesArray *tclarr_digits_out;
52  TClonesArray *tclarr_particles_out;
53  TClonesArray *tclarr_particles;
54  TClonesArray *tclarr_tracks;
55  TClonesArray *tclarr_recon_results;
56 
57  // FairMCEventHeader * fMcEventHeader; //!
58  Bool_t is_time_based;
59  // Bool_t is_persistent; ///< Write buffer to disc on/off
61 
62  StopTime start_functor; // do I really need two of them, I doubt it.
63  StopTime stop_functor;
64 
65  Double_t average_wl;
66  Double_t minimum_wl;
67 
68  ClassDef(PndDiscTaskReconstruction, 1)
69 };
70 
71 #endif // PNDDISCTASKRECONSTRUCTION_H
virtual InitStatus Init()
virtual void FinishTask()
double gauss(int x, double mean, double rms)
virtual ~PndDiscTaskReconstruction()
Double_t const & GetAvgWavelength() const
TString branch_name_digits
Branch name where digitized hits are stored.
virtual void FinishEvent()
TString folder_name_digits
Folder name for digits.
virtual void Exec(Option_t *opt)
void RunTimeBased(Bool_t time_based)
double mean(std::vector< double > values)
TClonesArray * tclarr_particles
to cache the pointer to particle MC TClonesArray returned by IO manager.
TClonesArray * tclarr_tracks
to cache the pointer to fitted tracks TClonesArray returned by IO manager.
Double_t const & GetMinWavelength() const
virtual InitStatus ReInit()
Bool_t flag_export_patterns
Write the pattern hypothesis and measured patterns to file.
double deviation(double mean, std::vector< double > values)
TClonesArray * tclarr_recon_results
results of reconstruction (pattern matching)
void SetAvgWavelength(Double_t const &val)
void SetMinWavelength(Double_t const &val)
Bool_t is_time_based
Time based buffering on/off.