Pluto v6.3.0
Loading...
Searching...
No Matches
PGammaConversion.h
Go to the documentation of this file.
1// Author:
2// Written: 12/01/2014
3// Modified:
4// PGammaConversion Class Header
5
6#ifndef _PGAMMACONVERSION_H_
7#define _PGAMMACONVERSION_H_
8
9#include "PBulkInterface.h"
10
11#include "TH2F.h"
12#include "TH3F.h"
13#include "TH1F.h"
14#include "TString.h"
15
16#include <vector>
17
18using namespace std;
19
20#define MAX_GAMMACONVERSION_DILEPTONS 20
21#define NEFUNCS 250
22
23
25
26 private:
27
28 PParticle ep, em;
29 Float_t Z;
30 Double_t x1, y1, z1;
31 Float_t convpar[6];
32 Float_t ConvProb;
33
34 static Double_t dSde(Double_t *x, Double_t *par); // has to be static to be used by TF1 object
35 Float_t ConversionXS(Float_t E);
36 TF1 *Elepton[NEFUNCS];
37
38 TRandom3 *RGen;
39 TF1 *ulep;
40
41
42 //------------------------------------
43 // histograms
44 Int_t nVertex;
45 Int_t nbinTheta;
46 Int_t nbinR;
47 Int_t nbinZ;
48 TH3F *hdimension; // keep one hist for axis ranges
49 TH1F *hvertexgeom; // keep target positions
50 vector<TH2F*> fhzr;
51 Int_t findVertexBin( Float_t zVertexEvt);
52 Int_t getThetaBin(Double_t thetadeg);
53 TH2F *getHist(Double_t zVertexEvt, Double_t thetadeg);
54 //------------------------------------
55
56
57 protected:
58
59
60 public:
61
63 PGammaConversion(Float_t Z, Float_t p,Int_t run);
65 //void SetAverageCharge(Float_t z) {Z = z;} // set average atomic charge of converter material
66 void SetConvLookupParameters(Float_t c1, Float_t c2, Float_t c3) {convpar[0]=c1; convpar[1]=c2; convpar[2]=c3;};
67 Float_t GetConversionProb(Float_t E, Float_t theta,Int_t run);
68 void SetConversionProb(Float_t p) {ConvProb = (p>0 ? p : 0);} // fix conversion probability
69 Int_t readHist(TString inputroot);
70
71 void SetVertex(Double_t x, Double_t y, Double_t z) {
72 x1 = x; y1 = y; z1 = z;
73 };
74
75 Bool_t Modify(PParticle **stack, int *decay_done, int *num, int stacksize); //bulk interface
76
77 ClassDef(PGammaConversion, 0) // Fast post processing gamma conversion in material
78};
79#endif
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#define NEFUNCS
PParticle * par[11]
void SetConversionProb(Float_t p)
void SetConvLookupParameters(Float_t c1, Float_t c2, Float_t c3)
void SetVertex(Double_t x, Double_t y, Double_t z)
Int_t readHist(TString inputroot)
Float_t GetConversionProb(Float_t E, Float_t theta, Int_t run)
Bool_t Modify(PParticle **stack, int *decay_done, int *num, int stacksize)
PChannel * c2
PChannel * c3
PParticle * p
Definition dp_mult.C:24