PandaRoot
PndPhoGunShort.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 // ----- PndPhoGunShort header file -----
15 // ----- Created 12/10/10 by Maria Patsyuk -----
16 // ----- -----
17 // ----- -----
18 // -------------------------------------------------------------------------
19 
28 #ifndef PNDPHOGUNSHORT_H
29 #define PNDPHOGUNSHORT_H
30 
31 #include "FairTask.h"
32 #include "TClonesArray.h"
33 #include "PndMCTrack.h"
34 #include "PndDrcHit.h"
35 #include "PndDrcPDHit.h"
36 #include "PndStack.h"
37 #include "FairBaseParSet.h"
38 #include "PndGeoDrcPar.h"
39 #include "TString.h"
40 #include <string>
41 
42 #include "PndDrcBarPoint.h"
43 #include "PndDrcPDPoint.h"
44 #include "PndDrcEVPoint.h"
45 #include "PndDrcHit.h"
46 #include "PndDrcPDHit.h"
47 #include "PndDrcDigi.h"
48 #include "PndGeoHandling.h"
49 
50 #include "PndDrcLutNode.h"
51 
52 #ifndef ROOT_TParticlePDG
53 #include "TParticlePDG.h"
54 #endif
55 #ifndef ROOT_TDatabasePDG
56 #include "TDatabasePDG.h"
57 #endif
58 
59 class PndPhoGunShort : public FairTask {
60 
61  public:
64 
66  PndPhoGunShort(Int_t verbose);
67 
69  virtual ~PndPhoGunShort();
70 
71  virtual InitStatus Init();
72 
74  virtual void Exec(Option_t *option);
75 
77  virtual void Finish();
78 
79  void SetOutputFile(TString outName = "lutnode.root") { fOutputName = outName; }
80 
81  void SetEVDepth(Float_t EVdepth = 30.) { fEVdz = EVdepth; }
82  void SetNmcp(Float_t nmcp = 5.) { fNmcp = nmcp; }
83  void SetShiftedPix(Bool_t spix = kFALSE) { fShiftPix = spix; }
84 
85  private:
86  void ProcessPhotonHit();
87  void InitLut();
88 
89  Int_t fDetectorID;
90 
91  TClonesArray *fBarPointArray; // DRC MC points in the bars
92  TClonesArray *fPDPointArray; // DRC points in the photon detector
93  TClonesArray *fPDHitArray; // DRC Hits in the photon detector
94  TClonesArray *fMCArray; // DRC MCPoints in the photon detector
95  TClonesArray *fEVPointArray; // DRC MCPoints in the photon detector
96  TClonesArray *fDigiArray;
97 
98  // TClonesArray* fChPhoArray; // output array of PndChPho
99 
100  TList *fHistoList;
101  TFile *froot;
102 
103  PndDrcDigi *fDigi;
104  PndGeoDrc *fGeo;
105  PndGeoHandling *fGeoH;
106 
108  void SetDefaultParameters();
109 
110  Double_t InBarCoordSyst(TVector3, TVector3 *, TVector3 *, TVector3 *, TVector3 *);
111  Double_t FindReflectionType(Double_t, Double_t, Double_t, TString);
112 
114  Int_t fVerbose;
115 
116  Int_t nevents;
117  Int_t ambiguity;
118 
119  TString fOutputName;
120  TString fTableName;
121  Double_t ftilt;
122  Int_t fBarId;
123 
124  // parameters:
125  Double_t fR;
126  Double_t fRBottom;
127  Double_t fHThick;
128  Double_t fBboxNum;
129  Double_t fPipehAngle;
130  Double_t fBarBoxGap;
131  Double_t fLength;
132  Double_t fDphi;
133  Double_t fEVlen;
134  Double_t fEVdz;
135  Double_t fpi;
136  Double_t fEVdrop;
137  Double_t fPixelSize;
138  Float_t fNmcp;
139  Bool_t fShiftPix;
140 
141  Double_t fNoDD;
142  Double_t fNoU0, fNoU1, fNoU2, fNoU3;
143  Double_t fNoB;
144  Double_t fNoUB;
145  Double_t fNoBU0, fNoBU1, fNoBU2;
146  Double_t fNoUU0, fNoUU1, fNoUU2, fNoUU3;
147  Double_t fNoUUU0, fNoUUU1, fNoUUU2, fNoUUU3, fNoUUU4;
148  Double_t fNoBUU0, fNoBUU1, fNoBUU2;
149  Double_t fNoBUB;
150  Double_t fNoUBU;
151  Double_t fNoTotal;
152  Double_t fNweirdPhotons;
153 
154  Double_t flambdah;
155  Double_t fPixIndex;
156  Double_t ftime;
157  Double_t fPhiRot;
158  TVector3 fPphoInit;
159  TVector3 fStartVertex;
160  TVector3 fPDSec, fEVSec, fEvSec;
161  Double_t fPDPhi, fEVPhi, fPhiRotEV;
162  Double_t Ang_pipe, Rout1, Rin1, Rin2, PlanB[9], PlanU[9], PlanR[6];
163  Double_t determint1, determint2, determint3, determint4;
164  TString ReflectionType, ReflName;
165  TArrayD fmatrixdata;
166  Double_t fZin;
167  Double_t fLowZ;
168 
169  Double_t fkxBar, fkyBar, fkzBar;
170  TVector3 fPphoB; // kBar
171 
172  // vertices of hit BarBox
173  TVector3 fBBver1;
174  TVector3 fBBver2;
175  TVector3 fBBver3;
176  TVector3 fBBver4;
177 
178  PndDrcEVPoint *EVpt;
179  PndDrcEVPoint *EVt;
180  PndDrcPDPoint *Ppt;
181  PndDrcPDHit *pdhit;
182  PndMCTrack *tr;
183 
184  TClonesArray *fLut[5];
185  TFile *fFile;
186  TTree *fTree;
187 
188  ClassDef(PndPhoGunShort, 1)
189 };
190 
191 #endif
void SetOutputFile(TString outName="lutnode.root")
virtual void Finish()
void SetEVDepth(Float_t EVdepth=30.)
virtual ~PndPhoGunShort()
virtual InitStatus Init()
Class to access the naming information of the MVD.
virtual void Exec(Option_t *option)
void SetShiftedPix(Bool_t spix=kFALSE)
void SetNmcp(Float_t nmcp=5.)