GENIEGenerator
Loading...
Searching...
No Matches
HNLDecayer.h
Go to the documentation of this file.
1//____________________________________________________________________________
2/*!
3
4\class genie::hnl::Decayer
5
6\brief Heavy Neutral Lepton final-state product generator
7
8\author Costas Andreopoulos <c.andreopoulos \at cern.ch>
9 University of Liverpool
10 John Plows <komninos-john.plows \at physics.ox.ac.uk>
11
12\created February 10, 2020
13
14\cpright Copyright (c) 2003-2025, The GENIE Collaboration
15 For the full text of the license visit http://copyright.genie-mc.org
16*/
17//____________________________________________________________________________
18
19#ifndef _HNL_DECAYER_H_
20#define _HNL_DECAYER_H_
21
22#include <cassert>
23
24#include <TGenPhaseSpace.h>
25#include <TH3.h>
26
29
31
33
36
37namespace genie {
38
39namespace hnl {
40
42
43public:
44 Decayer();
45 Decayer(string config);
46 ~Decayer();
47
48 // implement the DecayRecordVisitorI interface
49 void ProcessEventRecord (GHepRecord * event) const;
50
51 // overload the Algorithm::Configure() methods to load private data
52 // members from configuration options
53 void Configure(const Registry & config);
54 void Configure(string config);
55
56 double GetHNLLifetime() const;
57 double GetHNLMass() const;
58 std::vector< double > GetHNLCouplings() const;
59 bool IsHNLMajorana() const;
60
61 // string consists of 10 bits, mass increasing from least significant to most significant bit
62 // 0 if uninteresting, 1 if interesting
63 std::string GetHNLInterestingChannels() const;
64
65 // additional particle-gun config
66 std::vector< double > GetPGunOrigin() const;
67 std::vector< double > GetPGunDOrigin() const;
68 double GetPGunEnergy() const;
69 std::vector< double > GetPGunDirection() const; // returns 3 directional cosines -- Cartesian coords
70 std::vector< double > GetPGunDeviation() const; // returns (dtheta, dphi) -- spherical coords
71
72private:
73
74 void LoadConfig (void);
75 void AddInitialState (GHepRecord * event) const;
76 void GenerateDecayProducts (GHepRecord * event) const;
77 void UpdateEventRecord (GHepRecord * event) const;
78 void SetHNLCouplings (double Ue42, double Um42, double Ut42) const;
79 void SetBeam2User (std::vector<double> translation, std::vector<double> rotation) const;
80 void SetProdVtxPosition (const TLorentzVector & v4) const; // in detector coordinates
81
82 // get information about parent and polarisation from HNLFluxCreator
83 void ReadCreationInfo( GHepRecord * event ) const;
84
85 // Construct a SimpleHNL to get information about lifetime, interesting channels
87
88 // these 2 are legacy methods. Not to be used anymore
89 std::vector< double > * GenerateDecayPosition (GHepRecord * event) const;
90 std::vector< double > * GenerateMomentum (GHepRecord * event) const;
91
92 // PolMag is a bit of a misnomer. It is a polarisation modulus, i.e. not positive semidefinite.
93 double CalcPolMag (int parPdg, int lepPdg, double M) const;
94 double CalcPolMod (double polMag, int lepPdg, int hadPdg, double M) const;
95
96 bool UnpolarisedDecay (TGenPhaseSpace & fPSG, PDGCodeList pdgv, double wm) const;
97 bool PolarisedDecay (TGenPhaseSpace & fPSG, PDGCodeList pdgv, double wm, TVector3 vPolDir) const;
98
99 mutable int fCurrInitStatePdg;
101
103 mutable std::vector<double> fPolDir;
104
105 mutable bool fIsConfigLoaded = false;
106
107 mutable double fMass;
108 mutable double fUe42 = -1.0, fUm42 = -1.0, fUt42 = -1.0;
109 mutable bool fIsMajorana = false;
110 //mutable int fType = 2;
111
112 mutable bool fDoPol = false;
113
114 mutable std::vector< genie::hnl::HNLDecayMode_t > fIntChannels;
115 mutable int fChanBits[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
116
117 //mutable double fAngularDeviation = -1.0;
118 mutable std::vector< double > fB2UTranslation;
119 mutable double fTx = -1.0, fTy = -1.0, fTz = -1.0;
120 mutable std::vector< double > fB2URotation;
121 mutable double fR1 = -1.0, fR2 = -1.0, fR3 = -1.0;
122
123 mutable TH3D * fProdVtxHist = 0;
124 mutable TLorentzVector * fProdVtx = 0;
125 mutable TLorentzVector * fISMom = 0;
126
127 mutable double fPGOx = 0.0, fPGOy = 0.0, fPGOz = 0.0;
128 mutable double fPGDx = 0.0, fPGDy = 0.0, fPGDz = 0.0;
129 mutable double fPGE = 0.0;
130 mutable double fPGCx = 0.0, fPGCy = 0.0, fPGCz = 0.0;
131 mutable double fPGDTheta = 0.0, fPGDPhi = 0.0;
132
133 mutable bool fGetCMFrameInstead = false;
134};
135
136} // hnl namespace
137
138} // genie namespace
139
140#endif // _HNL_DECAYER_H_
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
GENIE's GHEP MC event record.
Definition GHepRecord.h:45
A list of PDG codes.
Definition PDGCodeList.h:32
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
std::vector< double > GetPGunDirection() const
bool PolarisedDecay(TGenPhaseSpace &fPSG, PDGCodeList pdgv, double wm, TVector3 vPolDir) const
std::vector< double > GetPGunDeviation() const
TLorentzVector * fProdVtx
Definition HNLDecayer.h:124
std::vector< double > * GenerateMomentum(GHepRecord *event) const
std::string GetHNLInterestingChannels() const
double GetHNLMass() const
genie::hnl::HNLDecayMode_t fCurrDecayMode
Definition HNLDecayer.h:100
void UpdateEventRecord(GHepRecord *event) const
void ProcessEventRecord(GHepRecord *event) const
double CalcPolMag(int parPdg, int lepPdg, double M) const
void SetHNLCouplings(double Ue42, double Um42, double Ut42) const
std::vector< double > fB2URotation
Definition HNLDecayer.h:120
std::vector< genie::hnl::HNLDecayMode_t > fIntChannels
Definition HNLDecayer.h:114
double GetHNLLifetime() const
double CalcPolMod(double polMag, int lepPdg, int hadPdg, double M) const
void Configure(const Registry &config)
void SetProdVtxPosition(const TLorentzVector &v4) const
void AddInitialState(GHepRecord *event) const
bool IsHNLMajorana() const
TLorentzVector * fISMom
Definition HNLDecayer.h:125
std::vector< double > fB2UTranslation
Definition HNLDecayer.h:118
double GetPGunEnergy() const
std::vector< double > * GenerateDecayPosition(GHepRecord *event) const
std::vector< double > GetPGunDOrigin() const
genie::hnl::SimpleHNL GetHNLInstance() const
std::vector< double > GetPGunOrigin() const
void GenerateDecayProducts(GHepRecord *event) const
std::vector< double > fPolDir
Definition HNLDecayer.h:103
void SetBeam2User(std::vector< double > translation, std::vector< double > rotation) const
void ReadCreationInfo(GHepRecord *event) const
std::vector< double > GetHNLCouplings() const
bool UnpolarisedDecay(TGenPhaseSpace &fPSG, PDGCodeList pdgv, double wm) const
enum genie::hnl::EHNLDecayMode HNLDecayMode_t
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25