SND@LHC Software
Loading...
Searching...
No Matches
GenieGenerator.h
Go to the documentation of this file.
1#ifndef PNDGeGENERATOR_H
2#define PNDGeGENERATOR_H 1
3
4#include "TROOT.h"
5#include "FairGenerator.h"
6#include "TTree.h" // for TTree
7#include "TF1.h" // for TF1
8#include "TH1.h" // for TH1
9#include "TH2.h" // for TH2
10#include "TVector3.h"
11#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN
12#include "vector"
13
14class FairPrimaryGenerator;
15
16class GenieGenerator : public FairGenerator
17{
18 public:
19
22
24 virtual ~GenieGenerator();
25
27 Bool_t OldReadEvent(FairPrimaryGenerator*);
28 Bool_t ReadEvent(FairPrimaryGenerator*);
29 virtual Bool_t Init(const char*, int);
30 virtual Bool_t Init(const char*);
31 Int_t GetNevents();
32 void NuOnly(){fNuOnly = true;}
33 void SetPositions(Double_t zTa, Double_t zS=-3400., Double_t zE=2650.){
34 ztarget = zTa;
35 startZ = zS;
36 endZ = zE;
37 }
38 void AddBox(TVector3 dVec, TVector3 box);
39 Double_t MeanMaterialBudget(const Double_t *start, const Double_t *end, Double_t *mparam);
40 void SetDeltaE_Matching_FLUKAGenie(Double_t DeltaE){
41 fDeltaE_GenieFLUKA_nu = DeltaE;
42 }
43 void SetGenerationOption(Int_t GenOption){
44 fGenOption = GenOption;
45 }
46 void SetCrossingAngle(Double_t crossingangle){
47 fcrossingangle = crossingangle;
48 }
49 private:
50 std::vector<double> Rotate(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz);
51 Int_t ExtractEvent_Ekin(Double_t Ekin, Double_t DeltaE);
52 private:
53
54 protected:
59 Double_t fcrossingangle; //crossing angle of the beam protons in LHC
60 Bool_t cc, nuel;
61 Int_t nf,neu;
64 int fn;
68
69 FairLogger* fLogger;
70 Double_t Ef[500], pxf[500], pyf[500], pzf[500];
71 Int_t pdgf[500];
72 TFile* fInputFile;
73 TTree* fTree;
75 std::vector<TVector3> dVecs;
76 std::vector<TVector3> boxs;
77 TH1D* pxhist[3000];
78 TH1D* pyslice[3000][500];
79 TClonesArray *ancstr;
80
82};
83
84#endif /* !PNDGeGENERATOR_H */
Double_t pzf[500]
TClonesArray * ancstr
void SetCrossingAngle(Double_t crossingangle)
Double_t fDeltaE_GenieFLUKA_nu
ClassDef(GenieGenerator, 2)
Double_t fEntrZ_inner
std::vector< double > Rotate(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz)
virtual ~GenieGenerator()
Double_t fEntrDz_outer
Double_t fEntrZ_outer
void SetDeltaE_Matching_FLUKAGenie(Double_t DeltaE)
Int_t pdgf[500]
virtual Bool_t Init(const char *, int)
FairLogger * fLogger
TH1D * pyslice[3000][500]
std::vector< TVector3 > dVecs
TH1D * pxhist[3000]
Double_t pxf[500]
Bool_t ReadEvent(FairPrimaryGenerator *)
Double_t MeanMaterialBudget(const Double_t *start, const Double_t *end, Double_t *mparam)
void SetPositions(Double_t zTa, Double_t zS=-3400., Double_t zE=2650.)
Bool_t OldReadEvent(FairPrimaryGenerator *)
Double_t FLUKA_y_cos
Double_t pyf[500]
void AddBox(TVector3 dVec, TVector3 box)
std::vector< TVector3 > boxs
Double_t fcrossingangle
void SetGenerationOption(Int_t GenOption)
Int_t ExtractEvent_Ekin(Double_t Ekin, Double_t DeltaE)
Double_t fEntrDz_inner
Double_t Ef[500]
don't make it persistent, magic ROOT command
Double_t FLUKA_x_cos