PandaRoot
PndDrcLutReco.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 // PndDrcLutReco.h
15 //
16 // Created on: 13.07.2013
17 // Author: R.Dzhygadlo at gsi.de
18 // -----------------------------------------
19 // Class for reconstruction in DIRC using look-up table method
20 
21 #ifndef PNDDRCLUTRECO_H
22 #define PNDDRCLUTRECO_H
23 
24 #include "FairTask.h"
25 
26 #include "PndMCTrack.h"
27 #include "PndDrcBarPoint.h"
28 #include "PndDrcEVPoint.h"
29 #include "PndDrcPDPoint.h"
30 #include "PndDrcHit.h"
31 #include "PndDrcPDHit.h"
32 #include "PndDrcDigi.h"
33 #include "PndGeoDrc.h"
34 #include "PndDrcTrackInfo.h"
35 #include "PndDrcPhotonInfo.h"
36 #include "PndDrcAmbiguityInfo.h"
37 #include "PndPersistencyTask.h"
38 
39 #include "TClonesArray.h"
40 #include "TString.h"
41 #include "TFile.h"
42 #include "TH1.h"
43 #include "TF1.h"
44 #include "TSpectrum.h"
45 #include "TTree.h"
46 
48 
49  public:
50  // Default constructor
51  PndDrcLutReco();
52 
53  // Standard constructors
54  PndDrcLutReco(Int_t verbose);
55  PndDrcLutReco(Int_t verbose, TString infilename);
56 
57  // Destructor
58  virtual ~PndDrcLutReco();
59 
60  virtual InitStatus Init();
61 
62  // Executed task
63  virtual void Exec(Option_t *option);
64 
65  // Finish task
66  virtual void Finish();
67 
68  void SetOutputFile(TString infilename = "luttab.root") { fInputFile = infilename; }
69 
70  private:
71  void LoopOverMcTracks();
72  void FillAmbiguities(PndDrcPhotonInfo *photoninfo, Int_t barId, Int_t recalculatedSensorId, Double_t directz, Double_t barHitTime);
73  void DetermineCherenkov(PndDrcTrackInfo *trackinfo, Int_t boxId);
74  void DetermineBarId(Double_t phi, Double_t &boxPhi, Int_t &boxId, Int_t &barId);
75  Double_t FindPeak();
76  Int_t FindPdg(Double_t mom, Double_t cangle);
77  PndGeoDrc *fGeo;
78  Int_t fDetectorID;
79  Double_t fBboxNum, fPipehAngle, fDphi, fBarPhi;
80 
81  TClonesArray *fMCArray; // DRC MCPoints in the photon detector
82  TClonesArray *fBarPointArray;
83  TClonesArray *fEVPointArray;
84  TClonesArray *fPDPointArray; // DRC points in the photon detector
85  TClonesArray *fDigiArray;
86  TClonesArray *fPDHitArray; // DRC Hits in the photon detector
87  TClonesArray *fLut[5];
88  TClonesArray *fDrcTrackInfoArray;
89 
90  TFile *fFile;
91  TTree *fTree;
92 
93  PndMCTrack *fMCTrack;
94  PndDrcBarPoint *fBarPoint;
95  PndDrcEVPoint *fEVPoint;
96  PndDrcPDPoint *fPDPoint;
97  PndDrcDigi *fDigi;
98  PndDrcPDHit *fPDHit;
99 
100  // Set the parameters to the default values.
101  void SetDefaultParameters();
102 
103  // Verbosity level
104  Int_t fVerbose;
105  Int_t nevents;
106  TString fInputFile;
107  Int_t fEvType, fRadType, fLensType;
108  TH1F *fHist;
109  TH1F *fHist2;
110  TF1 *fFit;
111  TSpectrum *fSpect;
112 
113  ClassDef(PndDrcLutReco, 1)
114 };
115 
116 #endif
virtual void Finish()
virtual void Exec(Option_t *option)
virtual ~PndDrcLutReco()
void SetOutputFile(TString infilename="luttab.root")
Definition: PndDrcLutReco.h:68
virtual InitStatus Init()