GENIEGenerator
Loading...
Searching...
No Matches
genie::hnl::FluxContainer Class Reference

A GENIE flux container specific for HNL containers. Based on the dk2nu flux paradigm and genie::flux::GNuMIFluxPassThroughInfo. More...

#include <HNLFluxContainer.h>

Inheritance diagram for genie::hnl::FluxContainer:
[legend]
Collaboration diagram for genie::hnl::FluxContainer:
[legend]

Public Member Functions

 FluxContainer ()
virtual ~FluxContainer ()
void ResetCopy () const
void Print (const Option_t *) const

Public Attributes

int evtno
 Event number.
int pdg
 HNL PDG code.
int parPdg
 parent PDG code
int lepPdg
 PDG code of lepton produced with HNL on parent decay.
int nuPdg
 PDG code of SM neutrino that would have been produced.
int prodChan
 Decay mode that produced HNL.
int nuProdChan
 Decay mode that would have produced SM neutrino.
TVector3 startPoint
 parent decay vertex in NEAR coords [m]
TVector3 targetPoint
 point in detector HNL is forced towards in NEAR coords [m]
TVector3 startPointUser
 parent decay vertex in USER coords [m]
TVector3 targetPointUser
 point in detector HNL is forced towards in USER coords [m]
double delay
 delay HNL would have wrt SMv [ns]
TVector3 polz
 HNL polarisation vector, in HNL rest frame, in NEAR coords.
TLorentzVector p4
 HNL momentum in NEAR coords [GeV/c].
TLorentzVector parp4
 parent momentum at HNL production in NEAR coords [GeV/c]
TLorentzVector p4User
 HNL momentum in USER coords [GeV/c].
TLorentzVector parp4User
 parent momentum at HNL production in USER coords [GeV/c]
double Ecm
 Parent rest-frame energy of HNL [GeV].
double nuEcm
 Parent rest-frame energy of equivalent SM neutrino [GeV].
double XYWgt
 geometric acceptance (angular size of detector in parent rest frame)
double boostCorr
 boost correction wrt parent rest-frame (ELAB = ECM * boostCorr)
double accCorr
 acceptance correction (collimation effect. SM v == 1)
double zetaMinus
 minimum angular deviation from parent momentum to reach detector [deg]
double zetaPlus
 maximum angular deviation from parent momentum to reach detector [deg]
double acceptance
 full acceptance == XYWgt * boostCorr^2 * accCorr
double nimpwt
 Weight of parent.

Friends

ostream & operator<< (ostream &stream, const FluxContainer &gnmf)

Detailed Description

A GENIE flux container specific for HNL containers. Based on the dk2nu flux paradigm and genie::flux::GNuMIFluxPassThroughInfo.

FluxContainer:

A C-struct that is based on the flux::GNuMIFluxPassThroughInfo struct, but which is not GNuMI specific. Accepts enough information about the HNL fluxes and the base flux to pass all the necessary

information to the hnl::FluxCreator class for flux calculations.

Also see $GENIE/src/contrib/beamhnl/write_dk2nus.C for an example of expected flux-input structure

Author
John Plows
Created:\n Feb 16, 2023
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 62 of file HNLFluxContainer.h.

Constructor & Destructor Documentation

◆ FluxContainer()

FluxContainer::FluxContainer ( )

Definition at line 61 of file HNLFluxContainer.cxx.

62 : TObject()
63{
64 this->ResetCopy();
65}

References ResetCopy().

Referenced by operator<<.

◆ ~FluxContainer()

virtual genie::hnl::FluxContainer::~FluxContainer ( )
inlinevirtual

Definition at line 66 of file HNLFluxContainer.h.

66{};

Member Function Documentation

◆ Print()

void FluxContainer::Print ( const Option_t * ) const

Definition at line 107 of file HNLFluxContainer.cxx.

108{
109 std::cout << *this << std::endl;
110}

◆ ResetCopy()

void FluxContainer::ResetCopy ( ) const

Definition at line 68 of file HNLFluxContainer.cxx.

69{
70 evtno = 0;
71
72 pdg = 0;
73 parPdg = 0;
74 lepPdg = 0;
75 nuPdg = 0;
76
77 prodChan = 0;
78 nuProdChan = 0;
79
80 startPoint.SetXYZ(0.0, 0.0, 0.0);
81 targetPoint.SetXYZ(0.0, 0.0, 0.0);
82 startPointUser.SetXYZ(0.0, 0.0, 0.0);
83 targetPointUser.SetXYZ(0.0, 0.0, 0.0);
84 delay = 0.0;
85
86 polz.SetXYZ(0.0, 0.0, 0.0);
87
88 p4.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
89 parp4.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
90 p4User.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
91 parp4User.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
92
93 Ecm = 0.0;
94 nuEcm = 0.0;
95
96 XYWgt = 0.0;
97 boostCorr = 0.0;
98 accCorr = 0.0;
99 zetaMinus = 0.0;
100 zetaPlus = 0.0;
101 acceptance = 0.0;
102
103 nimpwt = 0.0;
104}
double nimpwt
Weight of parent.
double zetaPlus
maximum angular deviation from parent momentum to reach detector [deg]
double Ecm
Parent rest-frame energy of HNL [GeV].
double delay
delay HNL would have wrt SMv [ns]
int nuPdg
PDG code of SM neutrino that would have been produced.
int prodChan
Decay mode that produced HNL.
TVector3 polz
HNL polarisation vector, in HNL rest frame, in NEAR coords.
TLorentzVector parp4
parent momentum at HNL production in NEAR coords [GeV/c]
double zetaMinus
minimum angular deviation from parent momentum to reach detector [deg]
TVector3 targetPoint
point in detector HNL is forced towards in NEAR coords [m]
int nuProdChan
Decay mode that would have produced SM neutrino.
int parPdg
parent PDG code
TLorentzVector parp4User
parent momentum at HNL production in USER coords [GeV/c]
TLorentzVector p4User
HNL momentum in USER coords [GeV/c].
double accCorr
acceptance correction (collimation effect. SM v == 1)
TVector3 startPointUser
parent decay vertex in USER coords [m]
double nuEcm
Parent rest-frame energy of equivalent SM neutrino [GeV].
double XYWgt
geometric acceptance (angular size of detector in parent rest frame)
double boostCorr
boost correction wrt parent rest-frame (ELAB = ECM * boostCorr)
TVector3 startPoint
parent decay vertex in NEAR coords [m]
TLorentzVector p4
HNL momentum in NEAR coords [GeV/c].
TVector3 targetPointUser
point in detector HNL is forced towards in USER coords [m]
double acceptance
full acceptance == XYWgt * boostCorr^2 * accCorr
int lepPdg
PDG code of lepton produced with HNL on parent decay.

References accCorr, acceptance, boostCorr, delay, Ecm, evtno, lepPdg, nimpwt, nuEcm, nuPdg, nuProdChan, p4, p4User, parp4, parp4User, parPdg, pdg, polz, prodChan, startPoint, startPointUser, targetPoint, targetPointUser, XYWgt, zetaMinus, and zetaPlus.

Referenced by FluxContainer().

◆ operator<<

ostream & operator<< ( ostream & stream,
const FluxContainer & gnmf )
friend

Definition at line 115 of file HNLFluxContainer.cxx.

117 {
118 // convert some stuff to string
119 HNLProd_t hProdChan = static_cast<HNLProd_t>(info.prodChan);
120
121 std::string sNuProdChan;
122 int typeMod = (info.pdg > 0) ? 1 : -1;
123 int switchChan = typeMod * info.nuProdChan;
124 switch(switchChan){
125 case 1: sNuProdChan = std::string("K0L -> nue + pi- + e+"); break;
126 case -1: sNuProdChan = std::string("K0L -> nuebar + pi+ + e-"); break;
127 case 2: sNuProdChan = std::string("K0L -> numu + pi- + mu"); break;
128 case -2: sNuProdChan = std::string("K0L -> numubar + pi+ + mu-"); break;
129 case 3: sNuProdChan = std::string("K+ -> numu + mu+"); break;
130 case -3: sNuProdChan = std::string("K- -> numubar + mu-"); break;
131 case 4: sNuProdChan = std::string("K+ -> nue + e+"); break;
132 case -4: sNuProdChan = std::string("K- -> nuebar + e-"); break;
133 case 5: sNuProdChan = std::string("K+ -> numu + pi0 + mu+"); break;
134 case -5: sNuProdChan = std::string("K- -> numubar + pi0 + mu-"); break;
135 case 6: sNuProdChan = std::string("K+ -> nue + pi0 + e+"); break;
136 case -6: sNuProdChan = std::string("K- -> nuebar + pi0 + e-"); break;
137 case 7: sNuProdChan = std::string("pi+ -> numu + mu+"); break;
138 case -7: sNuProdChan = std::string("pi- -> numubar + mu-"); break;
139 case 8: sNuProdChan = std::string("pi+ -> nue + e+"); break;
140 case -8: sNuProdChan = std::string("pi- -> nuebar + e-"); break;
141 case 9: sNuProdChan = std::string("mu- -> numu + nuebar + e-"); break;
142 case -9: sNuProdChan = std::string("mu+ -> numubar + nue + e+"); break;
143 default: sNuProdChan = std::string("Unknown!"); break;
144 }
145
146 stream << "\nEvent number: " << info.evtno
147 << "\nHNL PDG code: " << info.pdg
148 << "\nParent PDG code: " << info.parPdg
149 << "\nCo-produced lepton PDG code: " << info.lepPdg
150 << "\nParent weight: " << info.nimpwt
151 << "\nHNL polarisation vector [HNL rest frame, NEAR coords]: " << utils::print::Vec3AsString(&info.polz)
152 << "\nPDG code of equivalent SM neutrino: " << info.nuPdg
153 << "\nProduction channel: " << utils::hnl::ProdAsString(hProdChan)
154 << " ; code " << info.prodChan
155 << "\nEquivalent neutrino production channel: " << sNuProdChan
156 << " ; code " << info.nuProdChan
157 << "\nHNL parent rest-frame energy [GeV]: " << info.Ecm
158 << "\nEquivalent neutrino parent rest-frame energy [GeV]: " << info.nuEcm
159 << "\nStart point [NEAR, m]: " << utils::print::Vec3AsString(&info.startPoint)
160 << "\nStart point [USER, m]: " << utils::print::Vec3AsString(&info.startPointUser)
161 << "\nFlux passes through point [NEAR, m]: " << utils::print::Vec3AsString(&info.targetPoint)
162 << "\nFlux passes through point [USER, m]: " << utils::print::Vec3AsString(&info.targetPointUser)
163 << "\nHNL momentum [NEAR, GeV]: " << utils::print::P4AsString(&info.p4)
164 << "\nHNL momentum [USER, GeV]: " << utils::print::P4AsString(&info.p4User)
165 << "\nHNL delay wrt SM neutrino [ns]: " << info.delay
166 << "\nParent momentum [NEAR, GeV]: " << utils::print::P4AsString(&info.parp4)
167 << "\nParent momentum [USER, GeV]: " << utils::print::P4AsString(&info.parp4User)
168 << "\nDeviation angles zeta- = " << info.zetaMinus << ", zeta+ = " << info.zetaPlus
169 << "\nGeometric acceptance: " << info.XYWgt
170 << "\nBoost correction: " << info.boostCorr
171 << "\nAcceptance correction: " << info.accCorr
172 << "\nFull acceptance: " << info.acceptance;
173
174 return stream;
175 }
enum genie::hnl::t_HNLProd HNLProd_t
string ProdAsString(genie::hnl::HNLProd_t hnlprod)
string Vec3AsString(const TVector3 *vec)
string P4AsString(const TLorentzVector *p)

References accCorr, acceptance, boostCorr, delay, Ecm, evtno, FluxContainer(), lepPdg, nimpwt, nuEcm, nuPdg, nuProdChan, p4, genie::utils::print::P4AsString(), p4User, parp4, parp4User, parPdg, pdg, polz, genie::utils::hnl::ProdAsString(), prodChan, startPoint, startPointUser, targetPoint, targetPointUser, genie::utils::print::Vec3AsString(), XYWgt, zetaMinus, and zetaPlus.

Member Data Documentation

◆ accCorr

double genie::hnl::FluxContainer::accCorr
mutable

acceptance correction (collimation effect. SM v == 1)

Definition at line 104 of file HNLFluxContainer.h.

Referenced by ConvertToGRooTracker(), genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ acceptance

double genie::hnl::FluxContainer::acceptance
mutable

full acceptance == XYWgt * boostCorr^2 * accCorr

Definition at line 108 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ boostCorr

double genie::hnl::FluxContainer::boostCorr
mutable

boost correction wrt parent rest-frame (ELAB = ECM * boostCorr)

Definition at line 102 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ delay

double genie::hnl::FluxContainer::delay
mutable

delay HNL would have wrt SMv [ns]

Definition at line 89 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ Ecm

double genie::hnl::FluxContainer::Ecm
mutable

Parent rest-frame energy of HNL [GeV].

Definition at line 98 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ evtno

int genie::hnl::FluxContainer::evtno
mutable

◆ lepPdg

int genie::hnl::FluxContainer::lepPdg
mutable

PDG code of lepton produced with HNL on parent decay.

Definition at line 79 of file HNLFluxContainer.h.

Referenced by ConvertToGRooTracker(), genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ nimpwt

double genie::hnl::FluxContainer::nimpwt
mutable

◆ nuEcm

double genie::hnl::FluxContainer::nuEcm
mutable

Parent rest-frame energy of equivalent SM neutrino [GeV].

Definition at line 99 of file HNLFluxContainer.h.

Referenced by ConvertToGRooTracker(), genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ nuPdg

int genie::hnl::FluxContainer::nuPdg
mutable

PDG code of SM neutrino that would have been produced.

Definition at line 80 of file HNLFluxContainer.h.

Referenced by ConvertToGRooTracker(), genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ nuProdChan

int genie::hnl::FluxContainer::nuProdChan
mutable

Decay mode that would have produced SM neutrino.

Definition at line 83 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ p4

TLorentzVector genie::hnl::FluxContainer::p4
mutable

HNL momentum in NEAR coords [GeV/c].

Definition at line 93 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ p4User

TLorentzVector genie::hnl::FluxContainer::p4User
mutable

◆ parp4

TLorentzVector genie::hnl::FluxContainer::parp4
mutable

parent momentum at HNL production in NEAR coords [GeV/c]

Definition at line 94 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ parp4User

TLorentzVector genie::hnl::FluxContainer::parp4User
mutable

parent momentum at HNL production in USER coords [GeV/c]

Definition at line 96 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ parPdg

int genie::hnl::FluxContainer::parPdg
mutable

◆ pdg

int genie::hnl::FluxContainer::pdg
mutable

◆ polz

TVector3 genie::hnl::FluxContainer::polz
mutable

HNL polarisation vector, in HNL rest frame, in NEAR coords.

Definition at line 91 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ prodChan

int genie::hnl::FluxContainer::prodChan
mutable

◆ startPoint

TVector3 genie::hnl::FluxContainer::startPoint
mutable

parent decay vertex in NEAR coords [m]

Definition at line 85 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ startPointUser

TVector3 genie::hnl::FluxContainer::startPointUser
mutable

parent decay vertex in USER coords [m]

Definition at line 87 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ targetPoint

TVector3 genie::hnl::FluxContainer::targetPoint
mutable

point in detector HNL is forced towards in NEAR coords [m]

Definition at line 86 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ targetPointUser

TVector3 genie::hnl::FluxContainer::targetPointUser
mutable

point in detector HNL is forced towards in USER coords [m]

Definition at line 88 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ XYWgt

double genie::hnl::FluxContainer::XYWgt
mutable

geometric acceptance (angular size of detector in parent rest frame)

Definition at line 101 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ zetaMinus

double genie::hnl::FluxContainer::zetaMinus
mutable

minimum angular deviation from parent momentum to reach detector [deg]

Definition at line 105 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().

◆ zetaPlus

double genie::hnl::FluxContainer::zetaPlus
mutable

maximum angular deviation from parent momentum to reach detector [deg]

Definition at line 106 of file HNLFluxContainer.h.

Referenced by genie::hnl::FluxCreator::FillNonsense(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), operator<<, and ResetCopy().


The documentation for this class was generated from the following files: