PandaRoot
PndDrcLutFill.h
Go to the documentation of this file.
1 // -----------------------------------------
2 // PndDrcLutFill.h
3 //
4 // Created on: 08.07.2013
5 // Author: R.Dzhygadlo at gsi.de
6 // -----------------------------------------
7 // Class allows to fill look-up tables for reconstruction in DIRC
8 
9 #ifndef PNDDRCLUTFILL_H
10 #define PNDDRCLUTFILL_H
11 
12 #include "FairTask.h"
13 #include "TClonesArray.h"
14 #include "PndMCTrack.h"
15 #include "PndDrcBarPoint.h"
16 #include "PndDrcPDPoint.h"
17 #include "PndDrcEVPoint.h"
18 #include "PndDrcHit.h"
19 #include "PndDrcPDHit.h"
20 #include "PndDrcDigi.h"
21 #include "PndGeoDrc.h"
22 
23 #include "TString.h"
24 #include "TFile.h"
25 #include "TTree.h"
26 
27 class PndDrcLutFill : public FairTask {
28 
29  public:
30  // Default constructor
31  PndDrcLutFill();
32 
33  // Standard constructors
34  PndDrcLutFill(int verbose);
35  PndDrcLutFill(int verbose, TString outfilename);
36 
37  // Destructor
38  virtual ~PndDrcLutFill();
39 
40  virtual InitStatus Init();
41 
42  // Executed task
43  virtual void Exec(Option_t *option);
44 
45  // Finish task
46  virtual void Finish();
47 
48  // Look-up table initialization
49  void InitLut();
50 
51  void SetOutputFile(TString outfilename = "luttab.root") { fOutputFile = outfilename; }
52 
53  private:
54  void ProcessPhotonHit();
55 
56  PndGeoDrc *fGeo;
57  int fDetectorID;
58  double fBboxNum, fPipehAngle, fDphi;
59 
60  TClonesArray *fMCArray; // DRC MCPoints in the photon detector
61  TClonesArray *fBarPointArray;
62  TClonesArray *fPDPointArray; // DRC points in the photon detector
63  TClonesArray *fEVPointArray;
64  TClonesArray *fDigiArray;
65  TClonesArray *fPDHitArray; // DRC Hits in the photon detector
66  std::array<TClonesArray *, 5> fLut;
67 
68  TFile *fFile;
69  TTree *fTree;
70 
71  PndMCTrack *fMCTrack;
72  PndDrcBarPoint *fBarPoint;
73  PndDrcPDPoint *fPDPoint;
74  PndDrcDigi *fDigi;
75  PndDrcPDHit *fPDHit;
76  PndDrcEVPoint *fEVPoint;
77 
78  // Set the parameters to the default values.
79  void SetDefaultParameters();
80 
81  // Verbosity level
82  int fVerbose;
83  int nevents;
84  TString fOutputFile;
85 
86  ClassDef(PndDrcLutFill, 1)
87 };
88 
89 #endif
void SetOutputFile(TString outfilename="luttab.root")
Definition: PndDrcLutFill.h:51
virtual void Exec(Option_t *option)
virtual ~PndDrcLutFill()
virtual void Finish()
virtual InitStatus Init()