PandaRoot
PndDiscTaskPID.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: Particle Identification
18 //-------------------------------------------------------------------------
19 
20 #ifndef PNDDISCTASKPID_H
21 #define PNDDISCTASKPID_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  PndDiscTaskPID(const char *name);
36  virtual ~PndDiscTaskPID();
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 
47  protected:
50 
51  TClonesArray *tclarr_digits;
52  TClonesArray *tclarr_recon_results;
53  TClonesArray *tclarr_particles_in;
54  // TClonesArray * tclarr_particles; ///< to cache the pointer to particle MC TClonesArray returned by IO manager.
55  TClonesArray *tclarr_pid_results;
56 
57  // FairMCEventHeader * fMcEventHeader; //!
58  Bool_t is_time_based;
59 
60  double gauss(int x, double mean, double rms);
61  double mean(std::vector<double> values);
62  double deviation(double mean, std::vector<double> values);
63 
64  ClassDef(PndDiscTaskPID, 1)
65 };
66 
67 #endif // PNDDISCTASKPID_H
virtual void Exec(Option_t *opt)
TClonesArray * tclarr_recon_results
TClonesArray * tclarr_pid_results
results of reconstruction (pattern matching)
TClonesArray * tclarr_digits
Bool_t is_time_based
Time based buffering on/off.
TClonesArray * tclarr_particles_in
double deviation(double mean, std::vector< double > values)
virtual void FinishTask()
virtual InitStatus Init()
TString folder_name_digits
Folder name for digits.
double gauss(int x, double mean, double rms)
TString branch_name_digits
Branch name where digitized hits are stored.
void RunTimeBased(Bool_t time_based)
virtual ~PndDiscTaskPID()
double mean(std::vector< double > values)
virtual void FinishEvent()
virtual InitStatus ReInit()