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