SND@LHC Software
Loading...
Searching...
No Matches
NuageGenerator.h
Go to the documentation of this file.
1#ifndef NUAGEGENERATOR_H
2#define NUAGEGENERATOR_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 "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN
9#include "vector"
10#include "TVector3.h"
11
12class FairPrimaryGenerator;
13
14class NuageGenerator : public FairGenerator
15{
16public:
17
20
22 virtual ~NuageGenerator();
23
25 Bool_t ReadEvent(FairPrimaryGenerator*);
26 virtual Bool_t Init(const char*, int);
27 virtual Bool_t Init(const char*);
28 Int_t GetNevents();
29 void NuOnly(){fNuOnly = true;}
30 void SetPositions(Double_t zTa, Double_t zS=-3400., Double_t zE=2650., Double_t xS = 0, Double_t xE = 0, Double_t yS = 0, Double_t yE=0 ){
31 ztarget = zTa;
32 startZ = zS;
33 endZ = zE;
34 startX = xS;
35 endX = xE;
36 startY = yS;
37 endY = yE;
38 }
39 void AddBox(TVector3 dVec, TVector3 box);
40 void EnableExternalDecayer(Bool_t value){fExtDecayer=value;}
41
42
43private:
44 std::vector<double> Rotate(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz);
45 Double_t MeanMaterialBudget(const Double_t *start, const Double_t *end, Double_t *mparam);
46
47protected:
48 Bool_t fExtDecayer;//1=YES external Decayer, 0=Read 2ry vtx from Nuage produced beamfile
51 Float_t vtxx2, vtxy2,vtxz2,vtxt2; // position of secondary vtx
52 Float_t vtxx4, vtxy3,vtxz3,vtxt3; // position of possible 3rd vtx
53 Float_t vtxx3, vtxy4,vtxz4,vtxt4; // position of possible 4th vtx
54 Float_t pxf[500], pyf[500], pzf[500];
55 Float_t pdgf[500];
56 Float_t pxf2[500], pyf2[500], pzf2[500];
57 Float_t pdgf2[500];
58 Float_t pxf3[500], pyf3[500], pzf3[500];
59 Float_t pdgf3[500];
60 Float_t pxf4[500], pyf4[500], pzf4[500];
61 Float_t pdgf4[500];
62 std::vector<TVector3> dVecs;
63 std::vector<TVector3> boxs;
64 Int_t cc;
65 Int_t nf, nf2,nf3, nf4,neu;
67 Int_t fNvtx;
68 FairLogger* fLogger;
69 TFile* fInputFile;
70 TTree* fTree;
72 Int_t fn;
74 // Double_t fznu0,fznu11,fXnu11,fYnu11;
75 Double_t fznu,fXnu,fYnu;
78};
79
80#endif /* !PNDGeGENERATOR_H */
Float_t pdgf4[500]
Float_t pyf3[500]
virtual Bool_t Init(const char *, int)
Float_t pzf2[500]
Float_t pyf[500]
Bool_t ReadEvent(FairPrimaryGenerator *)
void EnableExternalDecayer(Bool_t value)
Float_t pdgf3[500]
std::vector< TVector3 > dVecs
Float_t pzf4[500]
Float_t pxf3[500]
TFile * fInputFile
don't make it persistent, magic ROOT command
Float_t pxf[500]
ClassDef(NuageGenerator, 2)
void AddBox(TVector3 dVec, TVector3 box)
Double_t fEntrDz_inner
Float_t pdgf[500]
void SetPositions(Double_t zTa, Double_t zS=-3400., Double_t zE=2650., Double_t xS=0, Double_t xE=0, Double_t yS=0, Double_t yE=0)
Double_t fEntrDz_outer
virtual ~NuageGenerator()
Float_t pzf3[500]
FairLogger * fLogger
Float_t pyf2[500]
Float_t pxf2[500]
Double_t fEntrZ_outer
Float_t pxf4[500]
std::vector< TVector3 > boxs
Float_t pzf[500]
Double_t MeanMaterialBudget(const Double_t *start, const Double_t *end, Double_t *mparam)
std::vector< double > Rotate(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz)
Float_t pyf4[500]
Double_t fEntrZ_inner
Float_t pdgf2[500]