PandaRoot
PndDiscTaskDigitization.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: Oliver Merle (Oliver.Merle@exp2.physik.uni-giessen.de)
15 // Changes: Mustafa Schmidt (Mustafa.A.Schmidt@physik.uni-giessen.de)
16 // Date: 30.11.2015
17 // Description: Digitization of Monte Carlo hits
18 //-------------------------------------------------------------------------
19 
20 #ifndef PNDDISCTASKDIGITIZATION_H
21 #define PNDDISCTASKDIGITIZATION_H
22 
23 #define USESENSORGRID
24 
25 // project specific
26 #include "PndDiscNoiseGeneration.h"
27 #include "PndDiscPhotodetector.h"
28 #include "PndDiscSensorGrid.h"
29 
30 // FAIR/PROOT
31 #include <PndPersistencyTask.h>
32 #include "PndDetectorList.h"
33 #include "FairMCEventHeader.h"
34 #include "FairWriteoutBuffer.h"
35 
36 // ROOT
37 #include "TString.h"
38 #include <Math/Interpolator.h> // ROOT imports from GSL -> GPL License !!!
39 
40 // cpp
41 #include <set>
42 
43 // class TClonesArray;
44 
46  public:
48  PndDiscTaskDigitization(const char *name);
49  virtual ~PndDiscTaskDigitization();
50 
51  // Implement FairTask interface:
52  virtual InitStatus Init();
53  virtual InitStatus ReInit();
54  virtual void Exec(Option_t *opt);
55  virtual void FinishEvent();
56  virtual void FinishTask();
57 
58  void RunTimeBased(Bool_t time_based) { is_time_based = time_based; }
59 
60  // Additional functionality
61  void FilterParticleSpecies(Int_t pdg);
62  void SetRunMixed(Bool_t is_mixed = kTRUE)
63  {
64  is_run_mixed = is_mixed;
65  }
66 
67  protected:
71 
73  TClonesArray *tclarr_mc_points;
74  TClonesArray *tclarr_particle_tracks_in;
76  TClonesArray *array;
77  std::set<int> particle_types;
78 
79  FairWriteoutBuffer *writeout_buffer;
80 
81  FairMCEventHeader *fMcEventHeader;
82 
83  Bool_t is_run_mixed;
84  Bool_t is_time_based;
85  Bool_t is_persistent;
86 
87 #ifdef USESENSORGRID
89 #else
90  // ROOT::Math::Interpolator pde_interpolator; //!
91  DiscDIRC_NoiseGeneration noise_generator;
92 #endif
93 
94  ClassDef(PndDiscTaskDigitization, 1)
95 };
96 
97 #endif // PNDDISCTASKDIGITIZATION_H
virtual InitStatus Init()
virtual ~PndDiscTaskDigitization()
DiscDIRC_Photodetector * photo_detector
FairWriteoutBuffer * writeout_buffer
particle types to filter in output
TString branch_name_mc_point
Branch name where mc points were stored.
TString folder_name_digits
Folder name for output in root file.
virtual void Exec(Option_t *opt)
virtual InitStatus ReInit()
void SetRunMixed(Bool_t is_mixed=kTRUE)
virtual void FinishTask()
FairMCEventHeader * fMcEventHeader
Int_t mc_point_branch_id
Cache branch id of the mc point branch for linking with FairLink.
TClonesArray * tclarr_particle_tracks_out
void FilterParticleSpecies(Int_t pdg)
Bool_t is_persistent
Write buffer to disc on/off.
virtual void FinishEvent()
TString branch_name_digits
Branch name where digitized hits shall be stored.
void RunTimeBased(Bool_t time_based)
Bool_t is_time_based
Time based buffering on/off.
TClonesArray * tclarr_particle_tracks_in
to cache the pointer to input TClonesArray returned by IO manager.