PandaRoot
PndDiscTaskReconstruction.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //-------------------------------------------------------------------------
14 // Author: Mustafa Schmidt (Mustafa.A.Schmidt@physik.uni-giessen.de)
15 // Changes:
16 // Date: 30.11.2015
17 // Description: Track Reconstruction
18 //-------------------------------------------------------------------------
19 
20 #ifndef PNDDISCTASKRECONSTRUCTION_H
21 #define PNDDISCTASKRECONSTRUCTION_H
22 
23 #include <PndPersistencyTask.h>
24 #include "PndDetectorList.h"
25 #include "FairMCEventHeader.h"
26 #include "FairTSBufferFunctional.h"
27 
28 #include "TString.h"
29 
30 class TClonesArray;
31 
33  public:
35  PndDiscTaskReconstruction(const char *name);
37 
38  // Implement FairTask interface:
39  virtual InitStatus Init();
40  virtual InitStatus ReInit();
41  virtual void Exec(Option_t *opt);
42  virtual void FinishEvent();
43  virtual void FinishTask();
44 
45  void RunTimeBased(Bool_t time_based) { is_time_based = time_based; }
46  void SetFlag_ExportPatterns(Bool_t flag) { flag_export_patterns = flag; }
47 
48  void SetAvgWavelength(Double_t const &val) { average_wl = val; }
49  Double_t const &GetAvgWavelength() const { return average_wl; }
50 
51  void SetMinWavelength(Double_t const &val) { minimum_wl = val; }
52  Double_t const &GetMinWavelength() const { return minimum_wl; }
53 
54  double gauss(int x, double mean, double rms);
55  double mean(std::vector<double> values);
56  double deviation(double mean, std::vector<double> values);
57 
58  protected:
61 
62  TClonesArray *tclarr_digits;
63  TClonesArray *tclarr_digits_out;
64  TClonesArray *tclarr_particles_out;
65  TClonesArray *tclarr_particles;
66  TClonesArray *tclarr_tracks;
67  TClonesArray *tclarr_recon_results;
68 
69  // FairMCEventHeader * fMcEventHeader; //!
70  Bool_t is_time_based;
71  // Bool_t is_persistent; ///< Write buffer to disc on/off
73 
74  StopTime start_functor; // do I really need two of them, I doubt it.
75  StopTime stop_functor;
76 
77  Double_t average_wl;
78  Double_t minimum_wl;
79 
80  ClassDef(PndDiscTaskReconstruction, 1)
81 };
82 
83 #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.