MCFlux.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file MCFlux.h
3 /// \brief object containing MC flux information
4 ///
5 /// \version $Id: MCFlux.h,v 1.2 2012-10-15 20:36:27 brebel Exp $
6 /// \author brebel@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 #ifndef SIMB_MCFLUX_H
9 #define SIMB_MCFLUX_H
10 
11 #include <iostream>
12 #include <vector>
13 
14 namespace simb{
15 
16  /// Which flux was used to generate this event?
17  enum flux_code_{
18  kHistPlusFocus = +1, ///< Flux for positive horn focus
19  kHistMinusFocus = -1, ///< Flux for negative horn focus
20  kGenerator = 0, ///< A bogus flux assumed by the generator
21  kNtuple = 2, ///< Full flux simulation ntuple
22  kSimple_Flux = 3, ///< A simplified flux ntuple for quick running
23  kDk2Nu = 4 ///< Unified ntuple flux format (replaces 2)
24  };
25 
26  class MCFlux {
27 
28  public:
29 
30  MCFlux();
31 
32  // maintained variable names from gnumi ntuples
33  // see http://www.hep.utexas.edu/~zarko/wwwgnumi/v19/[/v19/output_gnumi.html]
34 
35  int frun;
36  int fevtno;
37  double fndxdz;
38  double fndydz;
39  double fnpz;
40  double fnenergy;
41  double fndxdznea;
42  double fndydznea;
43  double fnenergyn;
44  double fnwtnear;
45  double fndxdzfar;
46  double fndydzfar;
47  double fnenergyf;
48  double fnwtfar;
49  int fnorig;
50  int fndecay;
51  int fntype;
52  double fvx;
53  double fvy;
54  double fvz;
55  double fpdpx;
56  double fpdpy;
57  double fpdpz;
58  double fppdxdz;
59  double fppdydz;
60  double fpppz;
61  double fppenergy;
62  int fppmedium;
63  int fptype; // converted to PDG
64  double fppvx;
65  double fppvy;
66  double fppvz;
67  double fmuparpx;
68  double fmuparpy;
69  double fmuparpz;
70  double fmupare;
71  double fnecm;
72  double fnimpwt;
73  double fxpoint;
74  double fypoint;
75  double fzpoint;
76  double ftvx;
77  double ftvy;
78  double ftvz;
79  double ftpx;
80  double ftpy;
81  double ftpz;
82  int ftptype; // converted to PDG
83  int ftgen;
84  int ftgptype; // converted to PDG
85  double ftgppx;
86  double ftgppy;
87  double ftgppz;
88  double ftprivx;
89  double ftprivy;
90  double ftprivz;
91  double fbeamx;
92  double fbeamy;
93  double fbeamz;
94  double fbeampx;
95  double fbeampy;
96  double fbeampz;
97 
99 
100  double fgenx; ///< origin of ray from flux generator
101  double fgeny;
102  double fgenz;
103  double fdk2gen; ///< distance from decay to ray origin
104  double fgen2vtx; ///< distance from ray origin to event vtx
105 
106  private:
107 
108  float fFluxPos[6]; ///< e,ebar,mu,mubar,tau,taubar flux, +horn focus
109  float fFluxNeg[6]; ///< Fluxes as aboce, for negative horn focus
110  float fFluxGen[6]; ///< Fluxes as above, assumed by generator
111 
112  public:
113 
114  void Reset();
115  double Flux(int pdgcode,
116  int which=0) const;
117  void SetFluxPos(double nue, double nuebar,
118  double numu, double numubar,
119  double nutau,double nutaubar);
120  void SetFluxNeg(double nue, double nuebar,
121  double numu, double numubar,
122  double nutau,double nutaubar);
123  void SetFluxGen(double nue, double nuebar,
124  double numu, double numubar,
125  double nutau,double nutaubar);
126 
127  void ReDecay(double &newE,
128  double &newW,
129  double x,
130  double y,
131  double z);
132 
133  friend std::ostream& operator<< (std::ostream& output, const simb::MCFlux &mcflux);
134  };
135 }
136 
137 #endif //SIMB_MCFLUX_H
double fgenz
Definition: MCFlux.h:102
Unified ntuple flux format (replaces 2)
Definition: MCFlux.h:23
int frun
Definition: MCFlux.h:35
double fnenergy
Definition: MCFlux.h:40
double ftgppy
Definition: MCFlux.h:86
double fpdpx
Definition: MCFlux.h:55
double ftpx
Definition: MCFlux.h:79
double Flux(int pdgcode, int which=0) const
Definition: MCFlux.cxx:176
double fgeny
Definition: MCFlux.h:101
double ftprivy
Definition: MCFlux.h:89
Full flux simulation ntuple.
Definition: MCFlux.h:21
int fppmedium
Definition: MCFlux.h:62
double fgen2vtx
distance from ray origin to event vtx
Definition: MCFlux.h:104
Flux for negative horn focus.
Definition: MCFlux.h:19
double fbeamx
Definition: MCFlux.h:91
double fbeampy
Definition: MCFlux.h:95
int ftptype
Definition: MCFlux.h:82
double fgenx
origin of ray from flux generator
Definition: MCFlux.h:100
simb::flux_code_ fFluxType
Definition: MCFlux.h:98
double fvx
Definition: MCFlux.h:52
double fnwtfar
Definition: MCFlux.h:48
float fFluxNeg[6]
Fluxes as aboce, for negative horn focus.
Definition: MCFlux.h:109
double fppdxdz
Definition: MCFlux.h:58
A bogus flux assumed by the generator.
Definition: MCFlux.h:20
int ftgen
Definition: MCFlux.h:83
double fdk2gen
distance from decay to ray origin
Definition: MCFlux.h:103
double ftprivx
Definition: MCFlux.h:88
Flux for positive horn focus.
Definition: MCFlux.h:18
double fndydzfar
Definition: MCFlux.h:46
int ftgptype
Definition: MCFlux.h:84
void SetFluxNeg(double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
Definition: MCFlux.cxx:204
double fnenergyf
Definition: MCFlux.h:47
void Reset()
Definition: MCFlux.cxx:94
double ftprivz
Definition: MCFlux.h:90
double fbeamz
Definition: MCFlux.h:93
double fnwtnear
Definition: MCFlux.h:44
int fptype
Definition: MCFlux.h:63
double ftvx
Definition: MCFlux.h:76
int fndecay
Definition: MCFlux.h:50
double fndydz
Definition: MCFlux.h:38
int fnorig
Definition: MCFlux.h:49
double fbeamy
Definition: MCFlux.h:92
double ftgppz
Definition: MCFlux.h:87
double fpdpz
Definition: MCFlux.h:57
double fmuparpz
Definition: MCFlux.h:69
double ftgppx
Definition: MCFlux.h:85
int fevtno
Definition: MCFlux.h:36
double fppdydz
Definition: MCFlux.h:59
double ftpz
Definition: MCFlux.h:81
double ftvy
Definition: MCFlux.h:77
double fbeampz
Definition: MCFlux.h:96
Base utilities and modules for event generation and detector simulation.
double fndxdzfar
Definition: MCFlux.h:45
double fpdpy
Definition: MCFlux.h:56
double fnpz
Definition: MCFlux.h:39
double fzpoint
Definition: MCFlux.h:75
double fvy
Definition: MCFlux.h:53
double fmupare
Definition: MCFlux.h:70
double fxpoint
Definition: MCFlux.h:73
void SetFluxGen(double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
Definition: MCFlux.cxx:214
double fndxdznea
Definition: MCFlux.h:41
double fppenergy
Definition: MCFlux.h:61
int fntype
Definition: MCFlux.h:51
double fnecm
Definition: MCFlux.h:71
double fndydznea
Definition: MCFlux.h:42
double fypoint
Definition: MCFlux.h:74
double fmuparpy
Definition: MCFlux.h:68
double fppvx
Definition: MCFlux.h:64
double fpppz
Definition: MCFlux.h:60
double fppvy
Definition: MCFlux.h:65
float fFluxGen[6]
Fluxes as above, assumed by generator.
Definition: MCFlux.h:110
double fbeampx
Definition: MCFlux.h:94
list x
Definition: train.py:276
double fppvz
Definition: MCFlux.h:66
double ftpy
Definition: MCFlux.h:80
double fndxdz
Definition: MCFlux.h:37
double fvz
Definition: MCFlux.h:54
void SetFluxPos(double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
Definition: MCFlux.cxx:193
flux_code_
Which flux was used to generate this event?
Definition: MCFlux.h:17
friend std::ostream & operator<<(std::ostream &output, const simb::MCFlux &mcflux)
Definition: MCFlux.cxx:384
float fFluxPos[6]
e,ebar,mu,mubar,tau,taubar flux, +horn focus
Definition: MCFlux.h:108
double fmuparpx
Definition: MCFlux.h:67
A simplified flux ntuple for quick running.
Definition: MCFlux.h:22
void ReDecay(double &newE, double &newW, double x, double y, double z)
Definition: MCFlux.cxx:224
double fnenergyn
Definition: MCFlux.h:43
double ftvz
Definition: MCFlux.h:78
double fnimpwt
Definition: MCFlux.h:72