GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
genie::hnl::SimpleHNL Class Reference

HNL object. More...

#include <SimpleHNL.h>

Collaboration diagram for genie::hnl::SimpleHNL:
Collaboration graph
[legend]

Public Member Functions

 SimpleHNL (std::string name, int index)
 
 SimpleHNL (std::string name, int index, const int PDG, const int parPDG, const double mass, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana)
 default c'tor More...
 
 ~SimpleHNL ()
 normal constructor More...
 
std::string GetName ()
 
int GetIndex ()
 
double GetMass ()
 
std::vector< double > GetCouplings ()
 
bool GetIsMajorana ()
 
double GetBeta ()
 
double GetGamma ()
 
double GetCoMLifetime ()
 
double GetLifetime ()
 
int GetPDG ()
 
int GetParentPDG ()
 
double GetDecayThrow ()
 
double GetSelectThrow ()
 
genie::hnl::HNLDecayMode_t GetDecayMode ()
 
std::vector< double > GetDecay4VX ()
 
std::vector< double > GetOrigin4VX ()
 
std::vector< double > Get4VP ()
 
std::vector< double > GetBetaVec ()
 
double GetMomentum ()
 
double GetPolarisationMag ()
 
std::vector< double > * GetPolarisationDir ()
 
std::map
< genie::hnl::HNLDecayMode_t,
double > 
GetValidChannels ()
 
std::map
< genie::hnl::HNLDecayMode_t,
double > 
GetInterestingChannels ()
 
std::vector
< genie::hnl::HNLDecayMode_t
GetInterestingChannelsVec ()
 
int GetType ()
 
double GetAngularDeviation ()
 
std::vector< double > GetBeam2UserTranslation ()
 
std::vector< double > GetBeam2UserRotation ()
 
void SetName (const std::string name)
 
void SetIndex (const int idx)
 
void SetEnergy (const double E)
 
void SetBeta (const double bet)
 
void SetMomentumAngles (double theta, double phi)
 
void SetMomentumDirection (double ux, double uy, double uz)
 
void Set4Momentum (const std::vector< double > fourP)
 
void SetPolMag (const double pm)
 
void SetPolarisationDirection (const double plx, const double ply, const double plz)
 
void SetProdVtx (const std::vector< double > fourV)
 
void SetDecayVtx (const std::vector< double > fourV)
 
void SetInterestingChannels (const std::map< genie::hnl::HNLDecayMode_t, double > gammaMap)
 
void SetInterestingChannelsVec (const std::vector< genie::hnl::HNLDecayMode_t > decVec)
 
void SetDecayMode (const genie::hnl::HNLDecayMode_t decayMode)
 
void SetParentPDG (const int parPDG)
 
void SetPDG (const int PDG)
 
void SetType (const int type)
 
void SetAngularDeviation (const double adev)
 
void SetBeam2UserTranslation (const double tx, const double ty, const double tz)
 
void SetBeam2UserRotation (const double r1, const double r2, const double r3)
 

Protected Member Functions

double CalcBeta (const double E, const double P3)
 
double CalcGamma (const double bet)
 
double CalcLifetime (const double gam)
 

Protected Attributes

int defPDG = 2000020000
 
int defParPDG = genie::kPdgKP
 
double defMass = 0.250 * genie::units::GeV
 
double defUe42 = 1.0e-4
 
double defUmu42 = 1.0e-4
 
double defUt42 = 0.0
 

Private Attributes

std::string fName
 
int fIndex
 
int fPDG
 
int fParentPDG
 
double fMass
 
double fUe42
 
double fUmu42
 
double fUt42
 
bool fIsMajorana
 
int fType
 
std::map
< genie::hnl::HNLDecayMode_t,
double > 
fValidChannels
 
double fCoMLifetime
 
double fDecayThrow
 
double fSelectThrow
 
genie::hnl::HNLDecayMode_t fDecayMode
 
std::map
< genie::hnl::HNLDecayMode_t,
double > 
fInterestingChannels
 
std::vector
< genie::hnl::HNLDecayMode_t
fInterestingChannelsVec
 
double fBeta
 
double fGamma
 
double fLifetime
 
double fT
 
double fX
 
double fY
 
double fZ
 
double fT0
 
double fX0
 
double fY0
 
double fZ0
 
double fE
 
double fPmag
 
double fPx
 
double fPy
 
double fPz
 
double fPol
 
double fPolUx
 
double fPolUy
 
double fPolUz
 
std::vector< double > * fPolDir
 
double fAngularDeviation
 
double fTx
 
double fTy
 
double fTz
 
double fR1
 
double fR2
 
double fR3
 
double fRM11
 
double fRM12
 
double fRM13
 
double fRM21
 
double fRM22
 
double fRM23
 
double fRM31
 
double fRM32
 
double fRM33
 

Detailed Description

HNL object.

Author
John Plows komni.nosp@m.nos-.nosp@m.john..nosp@m.plow.nosp@m.s@phy.nosp@m.sics.nosp@m..ox.a.nosp@m.c.uk
Created:
December 10th, 2021
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 36 of file SimpleHNL.h.

Constructor & Destructor Documentation

genie::hnl::SimpleHNL::SimpleHNL ( std::string  name,
int  index 
)
inline

Definition at line 39 of file SimpleHNL.h.

39  :
40  fName( name ), fIndex( index ),
43  fIsMajorana( false ),
47  false ) ),
51  false ) )
52  { } /// default c'tor
std::map< genie::hnl::HNLDecayMode_t, double > fValidChannels
Definition: SimpleHNL.h:346
std::string fName
Definition: SimpleHNL.h:338
const char * name
double CalcCoMLifetime(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)
std::map< genie::hnl::HNLDecayMode_t, double > GetValidChannelWidths(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)
genie::hnl::SimpleHNL::SimpleHNL ( std::string  name,
int  index,
const int  PDG,
const int  parPDG,
const double  mass,
const double  Ue42,
const double  Umu42,
const double  Ut42,
const bool  IsMajorana 
)
inline

default c'tor

Definition at line 54 of file SimpleHNL.h.

References LOG, and pDEBUG.

59  : fName( name ), fIndex( index ),
60  fPDG( PDG ), fParentPDG( parPDG ), fMass( mass ),
61  fUe42( Ue42 ), fUmu42( Umu42 ), fUt42( Ut42 ),
62  fIsMajorana( IsMajorana ),
65  Ue42, Umu42, Ut42,
66  IsMajorana ) ),
69  Ue42, Umu42, Ut42,
70  IsMajorana ) )
71  { LOG("HNL", pDEBUG) << "SimpleHNL built"; } /// normal constructor
std::map< genie::hnl::HNLDecayMode_t, double > fValidChannels
Definition: SimpleHNL.h:346
std::string fName
Definition: SimpleHNL.h:338
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
const char * name
double CalcCoMLifetime(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)
std::map< genie::hnl::HNLDecayMode_t, double > GetValidChannelWidths(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)
#define pDEBUG
Definition: Messenger.h:63
genie::hnl::SimpleHNL::~SimpleHNL ( )
inline

normal constructor

Definition at line 73 of file SimpleHNL.h.

73 { }

Member Function Documentation

double genie::hnl::SimpleHNL::CalcBeta ( const double  E,
const double  P3 
)
inlineprotected

Definition at line 327 of file SimpleHNL.h.

Referenced by SetEnergy().

327  {
328  return P3 / E; }
double genie::hnl::SimpleHNL::CalcGamma ( const double  bet)
inlineprotected

Definition at line 330 of file SimpleHNL.h.

Referenced by SetBeta(), and SetEnergy().

330  {
331  return std::sqrt( 1.0 / ( 1.0 - bet*bet ) ); }
double genie::hnl::SimpleHNL::CalcLifetime ( const double  gam)
inlineprotected

Definition at line 333 of file SimpleHNL.h.

References fCoMLifetime.

Referenced by GetLifetime().

333  {
334  return fCoMLifetime * gam; } // rest-to-lab transf
std::vector< double > genie::hnl::SimpleHNL::Get4VP ( )
inline

Definition at line 127 of file SimpleHNL.h.

References fE, fPx, fPy, and fPz.

127  {
128  std::vector< double > momVec;
129  momVec.emplace_back(fE);
130  momVec.emplace_back(fPx);
131  momVec.emplace_back(fPy);
132  momVec.emplace_back(fPz);
133  return momVec; }
double genie::hnl::SimpleHNL::GetAngularDeviation ( )
inline

Definition at line 165 of file SimpleHNL.h.

References fAngularDeviation.

165 { return fAngularDeviation; }
std::vector<double> genie::hnl::SimpleHNL::GetBeam2UserRotation ( )
inline

Definition at line 172 of file SimpleHNL.h.

References fR1, fR2, and fR3.

172  {
173  std::vector<double> rVec = { fR1, fR2, fR3 };
174  return rVec;
175  }
std::vector<double> genie::hnl::SimpleHNL::GetBeam2UserTranslation ( )
inline

Definition at line 167 of file SimpleHNL.h.

References fTx, fTy, and fTz.

167  {
168  std::vector<double> tVec = { fTx, fTy, fTz };
169  return tVec;
170  }
double genie::hnl::SimpleHNL::GetBeta ( )
inline

Definition at line 92 of file SimpleHNL.h.

References fBeta.

92 { return fBeta; }
std::vector< double > genie::hnl::SimpleHNL::GetBetaVec ( )
inline

Definition at line 135 of file SimpleHNL.h.

References fE, fPx, fPy, fPz, and GetMomentum().

135  {
136  std::vector< double > betaVec;
137  const double mom = GetMomentum( );
138  const int pxMod = ( fPx < 0.0 ) ? -1 : 1;
139  const int pyMod = ( fPy < 0.0 ) ? -1 : 1;
140  const int pzMod = ( fPz < 0.0 ) ? -1 : 1;
141  betaVec.emplace_back( pxMod * fPx / fE * fPx / mom );
142  betaVec.emplace_back( pyMod * fPy / fE * fPy / mom );
143  betaVec.emplace_back( pzMod * fPz / fE * fPz / mom );
144  return betaVec; }
double genie::hnl::SimpleHNL::GetCoMLifetime ( )
inline

Definition at line 96 of file SimpleHNL.h.

References fCoMLifetime.

Referenced by genie::hnl::Decayer::LoadConfig(), main(), and SelectDecayMode().

96 { return fCoMLifetime; }
std::vector< double > genie::hnl::SimpleHNL::GetCouplings ( )
inline

Definition at line 83 of file SimpleHNL.h.

References fUe42, fUmu42, and fUt42.

83  {
84  std::vector< double > coupVec;
85  coupVec.emplace_back( fUe42 );
86  coupVec.emplace_back( fUmu42 );
87  coupVec.emplace_back( fUt42 );
88  return coupVec; }
std::vector< double > genie::hnl::SimpleHNL::GetDecay4VX ( )
inline

Definition at line 111 of file SimpleHNL.h.

References fT, fX, fY, and fZ.

111  {
112  std::vector< double > decVec;
113  decVec.emplace_back(fT);
114  decVec.emplace_back(fX);
115  decVec.emplace_back(fY);
116  decVec.emplace_back(fZ);
117  return decVec; }
genie::hnl::HNLDecayMode_t genie::hnl::SimpleHNL::GetDecayMode ( )
inline

Definition at line 109 of file SimpleHNL.h.

References fDecayMode.

109 { return fDecayMode; }
genie::hnl::HNLDecayMode_t fDecayMode
Definition: SimpleHNL.h:351
double genie::hnl::SimpleHNL::GetDecayThrow ( )
inline

Definition at line 105 of file SimpleHNL.h.

References fDecayThrow.

105 { return fDecayThrow; }
double genie::hnl::SimpleHNL::GetGamma ( )
inline

Definition at line 94 of file SimpleHNL.h.

References fGamma.

94 { return fGamma; }
int genie::hnl::SimpleHNL::GetIndex ( )
inline

Definition at line 79 of file SimpleHNL.h.

References fIndex.

79 { return fIndex; }
std::map< genie::hnl::HNLDecayMode_t, double > genie::hnl::SimpleHNL::GetInterestingChannels ( )
inline

Definition at line 157 of file SimpleHNL.h.

References fInterestingChannels.

157  {
158  return fInterestingChannels; }
std::map< genie::hnl::HNLDecayMode_t, double > fInterestingChannels
Definition: SimpleHNL.h:353
std::vector< genie::hnl::HNLDecayMode_t > genie::hnl::SimpleHNL::GetInterestingChannelsVec ( )
inline

Definition at line 160 of file SimpleHNL.h.

References fInterestingChannelsVec.

160  {
161  return fInterestingChannelsVec; }
std::vector< genie::hnl::HNLDecayMode_t > fInterestingChannelsVec
Definition: SimpleHNL.h:354
bool genie::hnl::SimpleHNL::GetIsMajorana ( )
inline

Definition at line 90 of file SimpleHNL.h.

References fIsMajorana.

90 { return fIsMajorana; }
double genie::hnl::SimpleHNL::GetLifetime ( )
inline

Definition at line 98 of file SimpleHNL.h.

References CalcLifetime(), and fGamma.

98  { /* return fLifetime; */
99  return CalcLifetime( fGamma ); }
double CalcLifetime(const double gam)
Definition: SimpleHNL.h:333
double genie::hnl::SimpleHNL::GetMass ( )
inline

Definition at line 81 of file SimpleHNL.h.

References fMass.

81 { return fMass; }
double genie::hnl::SimpleHNL::GetMomentum ( )
inline

Definition at line 146 of file SimpleHNL.h.

References fPmag.

Referenced by GetBetaVec(), and SetEnergy().

146  {
147  return fPmag;
148  }
std::string genie::hnl::SimpleHNL::GetName ( )
inline

Definition at line 77 of file SimpleHNL.h.

References fName.

77 { return fName; }
std::string fName
Definition: SimpleHNL.h:338
std::vector< double > genie::hnl::SimpleHNL::GetOrigin4VX ( )
inline

Definition at line 119 of file SimpleHNL.h.

References fT0, fX0, fY0, and fZ0.

119  {
120  std::vector< double > oriVec;
121  oriVec.emplace_back(fT0);
122  oriVec.emplace_back(fX0);
123  oriVec.emplace_back(fY0);
124  oriVec.emplace_back(fZ0);
125  return oriVec; }
int genie::hnl::SimpleHNL::GetParentPDG ( )
inline

Definition at line 103 of file SimpleHNL.h.

References fParentPDG.

103 { return fParentPDG; }
int genie::hnl::SimpleHNL::GetPDG ( )
inline

Definition at line 101 of file SimpleHNL.h.

References fPDG.

101 { return fPDG; }
std::vector< double >* genie::hnl::SimpleHNL::GetPolarisationDir ( )
inline

Definition at line 151 of file SimpleHNL.h.

References fPolDir.

151  {
152  return fPolDir; }
std::vector< double > * fPolDir
Definition: SimpleHNL.h:363
double genie::hnl::SimpleHNL::GetPolarisationMag ( )
inline

Definition at line 150 of file SimpleHNL.h.

References fPol.

150 { return fPol; }
double genie::hnl::SimpleHNL::GetSelectThrow ( )
inline

Definition at line 107 of file SimpleHNL.h.

References fSelectThrow.

107 { return fSelectThrow; }
int genie::hnl::SimpleHNL::GetType ( )
inline

Definition at line 163 of file SimpleHNL.h.

References fType.

163 { return fType; }
std::map< genie::hnl::HNLDecayMode_t, double > genie::hnl::SimpleHNL::GetValidChannels ( )
inline

Definition at line 154 of file SimpleHNL.h.

References fValidChannels.

Referenced by main(), SelectDecayMode(), and TestDecay().

154  {
155  return fValidChannels; }
std::map< genie::hnl::HNLDecayMode_t, double > fValidChannels
Definition: SimpleHNL.h:346
void genie::hnl::SimpleHNL::Set4Momentum ( const std::vector< double >  fourP)
inline

Definition at line 243 of file SimpleHNL.h.

References SetEnergy(), and SetMomentumDirection().

243  {
244  SetEnergy( fourP.at(0) ); // also takes care of Pmag
245  SetMomentumDirection( fourP.at(1), fourP.at(2), fourP.at(3) ); }
void SetMomentumDirection(double ux, double uy, double uz)
Definition: SimpleHNL.h:231
void SetEnergy(const double E)
Definition: SimpleHNL.h:183
void genie::hnl::SimpleHNL::SetAngularDeviation ( const double  adev)
inline

Definition at line 296 of file SimpleHNL.h.

References fAngularDeviation.

Referenced by genie::hnl::Decayer::GetHNLInstance().

296 { fAngularDeviation = adev; }
void genie::hnl::SimpleHNL::SetBeam2UserRotation ( const double  r1,
const double  r2,
const double  r3 
)
inline

Definition at line 302 of file SimpleHNL.h.

References fR1, fR2, fR3, fRM11, fRM12, fRM13, fRM21, fRM22, fRM23, fRM31, fRM32, and fRM33.

Referenced by genie::hnl::Decayer::GetHNLInstance().

302  {
303  fR1 = r1; fR2 = r2; fR3 = r3;
304  // and the rotation matrix
305  fRM11 = std::cos( fR2 );
306  fRM12 = -std::cos( fR3 ) * std::sin( fR2 );
307  fRM13 = std::sin( fR2 ) * std::sin( fR3 );
308  fRM21 = std::cos( fR1 ) * std::sin( fR2 );
309  fRM22 = std::cos( fR1 ) * std::cos( fR2 ) * std::cos( fR3 ) - std::sin( fR1 ) * std::sin( fR3 );
310  fRM23 = -std::cos( fR3 ) * std::sin( fR1 ) - std::cos( fR1 ) * std::cos( fR2 ) * std::sin( fR3 );
311  fRM31 = std::sin( fR1 ) * std::sin( fR2 );
312  fRM32 = std::cos( fR1 ) * std::sin( fR3 ) + std::cos( fR2 ) * std::cos( fR3 ) * std::sin( fR1 );
313  fRM33 = std::cos( fR1 ) * std::cos( fR3 ) - std::cos( fR2 ) * std::sin( fR1 ) * std::sin( fR3 );
314  }
void genie::hnl::SimpleHNL::SetBeam2UserTranslation ( const double  tx,
const double  ty,
const double  tz 
)
inline

Definition at line 298 of file SimpleHNL.h.

References fTx, fTy, and fTz.

Referenced by genie::hnl::Decayer::GetHNLInstance().

298  {
299  fTx = tx; fTy = ty; fTz = tz;
300  }
void genie::hnl::SimpleHNL::SetBeta ( const double  bet)
inline

Definition at line 198 of file SimpleHNL.h.

References CalcGamma(), fBeta, fCoMLifetime, fE, fGamma, fLifetime, fMass, fPmag, fPx, fPy, and fPz.

198  {
199  fBeta = bet;
200  fGamma = CalcGamma( bet );
201  fE = fGamma * fMass;
202  double oldmom = fPmag;
203  fPmag = std::sqrt( fE*fE - fMass*fMass );
204 
205  fPx *= fPmag / oldmom; fPy *= fPmag / oldmom; fPz *= fPmag / oldmom;
206 
207  fLifetime = fCoMLifetime / ( fGamma * ( 1.0 + bet ) );
208  }
double CalcGamma(const double bet)
Definition: SimpleHNL.h:330
void genie::hnl::SimpleHNL::SetDecayMode ( const genie::hnl::HNLDecayMode_t  decayMode)
inline

Definition at line 285 of file SimpleHNL.h.

References fDecayMode.

285  {
286  fDecayMode = decayMode; }
genie::hnl::HNLDecayMode_t fDecayMode
Definition: SimpleHNL.h:351
void genie::hnl::SimpleHNL::SetDecayVtx ( const std::vector< double >  fourV)
inline

Definition at line 271 of file SimpleHNL.h.

References fT, fX, fY, and fZ.

271  {
272  fT = fourV.at(0); fX = fourV.at(1);
273  fY = fourV.at(2); fZ = fourV.at(3);
274  }
void genie::hnl::SimpleHNL::SetEnergy ( const double  E)
inline

Definition at line 183 of file SimpleHNL.h.

References genie::hnl::selector::__attribute__(), CalcBeta(), CalcGamma(), fBeta, fCoMLifetime, fE, fGamma, fLifetime, fMass, fPmag, fPx, fPy, fPz, GetMomentum(), LOG, and pERROR.

Referenced by Set4Momentum(), and TestDecay().

183  {
184  // updates beta, gamma, 4P, lifetime. Doesn't change angles.
185  if( E < fMass ) { LOG( "HNL", pERROR ) <<
186  "genie::hnl::SimpleHNL:: Set E too low." <<
187  "\nE = " << E << ", M = " << fMass; exit(3); }
188  double mom3 = std::sqrt( E*E - fMass*fMass );
189  __attribute__((unused)) double oldmom = GetMomentum( );
190  fPmag = mom3;
191  fPx = mom3 / std::sqrt(3.0); fPy = mom3 / std::sqrt(3.0); fPz = mom3 / std::sqrt(3.0);
192  fE = E;
193  fBeta = CalcBeta( E, mom3 );
194  fGamma = CalcGamma( fBeta );
195  fLifetime = fCoMLifetime / ( fGamma * ( 1.0 + fBeta ) );
196  }
#define pERROR
Definition: Messenger.h:59
double CalcBeta(const double E, const double P3)
Definition: SimpleHNL.h:327
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static __attribute__((unused)) double fDecayGammas[]
double CalcGamma(const double bet)
Definition: SimpleHNL.h:330
void genie::hnl::SimpleHNL::SetIndex ( const int  idx)
inline

Definition at line 181 of file SimpleHNL.h.

References fIndex.

181 { fIndex = idx; }
void genie::hnl::SimpleHNL::SetInterestingChannels ( const std::map< genie::hnl::HNLDecayMode_t, double >  gammaMap)
inline

Definition at line 276 of file SimpleHNL.h.

References fInterestingChannels.

Referenced by SelectDecayMode().

277  {
278  fInterestingChannels = gammaMap; }
std::map< genie::hnl::HNLDecayMode_t, double > fInterestingChannels
Definition: SimpleHNL.h:353
void genie::hnl::SimpleHNL::SetInterestingChannelsVec ( const std::vector< genie::hnl::HNLDecayMode_t decVec)
inline

Definition at line 281 of file SimpleHNL.h.

References fInterestingChannelsVec.

Referenced by genie::hnl::Decayer::GetHNLInstance().

282  {
283  fInterestingChannelsVec = decVec; }
std::vector< genie::hnl::HNLDecayMode_t > fInterestingChannelsVec
Definition: SimpleHNL.h:354
void genie::hnl::SimpleHNL::SetMomentumAngles ( double  theta,
double  phi 
)
inline

does not change magnitude

Definition at line 210 of file SimpleHNL.h.

References fPmag, fPx, fPy, fPz, and genie::constants::kPi.

210  {
211  /// does not change magnitude
212  // bring angles into [0,\pi]*[0,2\pi)
213  if( std::abs( theta ) > genie::constants::kPi ) {
214  const int nabs = std::floor( std::abs( theta ) / genie::constants::kPi );
215  theta += ( theta < 0 ) ? nabs * genie::constants::kPi : -nabs * genie::constants::kPi; }
216  if( std::abs( phi ) > 2.0 * genie::constants::kPi ) {
217  const int nabs = std::floor( std::abs( phi ) / ( 2.0 * genie::constants::kPi ) );
218  phi += ( phi < 0 ) ? nabs * 2.0 * genie::constants::kPi : -nabs * 2.0 * genie::constants::kPi; }
219  phi += ( phi < 0 ) ? 2.0 * genie::constants::kPi : 0.0;
220 
221  if( theta < 0 ){
223  theta *= -1.0; phi += ap;
224  }
225 
226  fPx = fPmag * std::sin( theta ) * std::cos( phi );
227  fPy = fPmag * std::sin( theta ) * std::sin( phi );
228  fPz = fPmag * std::cos( theta );
229  }
void genie::hnl::SimpleHNL::SetMomentumDirection ( double  ux,
double  uy,
double  uz 
)
inline

does not change magnitude

Definition at line 231 of file SimpleHNL.h.

References fPmag, fPx, fPy, fPz, LOG, and pERROR.

Referenced by Set4Momentum(), and TestDecay().

231  {
232  /// does not change magnitude
233  if( ux == 0.0 && uy == 0.0 && uz == 0.0 ){
234  LOG( "HNL", pERROR ) <<
235  "genie::hnl::SimpleHNL::SetMomentumDirection:: " <<
236  "Zero vector entered. Exiting."; exit(3); }
237  const double umag = std::sqrt( ( ux*ux + uy*uy + uz*uz ) );
238  const double invu = 1.0 / umag;
239  ux *= invu; uy *= invu; uz *= invu;
240  fPx = fPmag * ux; fPy = fPmag * uy; fPz = fPmag * uz;
241  }
#define pERROR
Definition: Messenger.h:59
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
void genie::hnl::SimpleHNL::SetName ( const std::string  name)
inline

Definition at line 179 of file SimpleHNL.h.

References fName.

179 { fName = name; }
std::string fName
Definition: SimpleHNL.h:338
const char * name
void genie::hnl::SimpleHNL::SetParentPDG ( const int  parPDG)
inline

Definition at line 288 of file SimpleHNL.h.

References fParentPDG.

288  {
289  fParentPDG = parPDG; }
void genie::hnl::SimpleHNL::SetPDG ( const int  PDG)
inline

Definition at line 291 of file SimpleHNL.h.

References fPDG.

291  {
292  fPDG = PDG; }
void genie::hnl::SimpleHNL::SetPolarisationDirection ( const double  plx,
const double  ply,
const double  plz 
)
inline

Definition at line 254 of file SimpleHNL.h.

References fPolDir, fPolUx, fPolUy, fPolUz, LOG, and pERROR.

255  {
256  if( plx == 0.0 && ply == 0.0 && plz == 0.0 ){
257  LOG( "HNL", pERROR ) <<
258  "genie::hnl::SimpleHNL::SetPolarisationDirection:: " <<
259  "Zero vector entered. Exiting."; exit(1); }
260  const double PM = std::sqrt( plx*plx + ply*ply * plz*plz );
261  fPolUx = plx / PM; fPolUy = ply / PM; fPolUz = plz / PM;
262  if( !fPolDir || fPolDir == 0 ) fPolDir = new std::vector< double >( );
263  else fPolDir->clear();
264  fPolDir->emplace_back( fPolUx ); fPolDir->emplace_back( fPolUy );
265  fPolDir->emplace_back( fPolUz ); }
#define pERROR
Definition: Messenger.h:59
std::vector< double > * fPolDir
Definition: SimpleHNL.h:363
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
void genie::hnl::SimpleHNL::SetPolMag ( const double  pm)
inline

Definition at line 247 of file SimpleHNL.h.

References fPol, LOG, and pERROR.

247  {
248  if( pm < -1.0 || pm > 1.0 ){
249  LOG( "HNL", pERROR ) <<
250  "genie::hnl::SimpleHNL::SetPolMag:: " <<
251  "Pol.vec. magnitude must be in [-1,1]. Exiting."; exit(3); }
252  fPol = pm; }
#define pERROR
Definition: Messenger.h:59
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
void genie::hnl::SimpleHNL::SetProdVtx ( const std::vector< double >  fourV)
inline

Definition at line 267 of file SimpleHNL.h.

References fT0, fX0, fY0, and fZ0.

267  {
268  fT0 = fourV.at(0); fX0 = fourV.at(1);
269  fY0 = fourV.at(2); fZ0 = fourV.at(3); }
void genie::hnl::SimpleHNL::SetType ( const int  type)
inline

Definition at line 294 of file SimpleHNL.h.

References fType.

Referenced by genie::hnl::Decayer::GetHNLInstance().

294 { fType = type; }

Member Data Documentation

double genie::hnl::SimpleHNL::defMass = 0.250 * genie::units::GeV
protected

Definition at line 321 of file SimpleHNL.h.

int genie::hnl::SimpleHNL::defParPDG = genie::kPdgKP
protected

Definition at line 320 of file SimpleHNL.h.

int genie::hnl::SimpleHNL::defPDG = 2000020000
protected

Definition at line 319 of file SimpleHNL.h.

double genie::hnl::SimpleHNL::defUe42 = 1.0e-4
protected

Definition at line 322 of file SimpleHNL.h.

double genie::hnl::SimpleHNL::defUmu42 = 1.0e-4
protected

Definition at line 323 of file SimpleHNL.h.

double genie::hnl::SimpleHNL::defUt42 = 0.0
protected

Definition at line 324 of file SimpleHNL.h.

double genie::hnl::SimpleHNL::fAngularDeviation
mutableprivate

Definition at line 365 of file SimpleHNL.h.

Referenced by GetAngularDeviation(), and SetAngularDeviation().

double genie::hnl::SimpleHNL::fBeta
mutableprivate

Definition at line 356 of file SimpleHNL.h.

Referenced by GetBeta(), SetBeta(), and SetEnergy().

double genie::hnl::SimpleHNL::fCoMLifetime
mutableprivate

Definition at line 347 of file SimpleHNL.h.

Referenced by CalcLifetime(), GetCoMLifetime(), SetBeta(), and SetEnergy().

genie::hnl::HNLDecayMode_t genie::hnl::SimpleHNL::fDecayMode
mutableprivate

Definition at line 351 of file SimpleHNL.h.

Referenced by GetDecayMode(), and SetDecayMode().

double genie::hnl::SimpleHNL::fDecayThrow
mutableprivate

Definition at line 349 of file SimpleHNL.h.

Referenced by GetDecayThrow().

double genie::hnl::SimpleHNL::fE
mutableprivate

Definition at line 360 of file SimpleHNL.h.

Referenced by Get4VP(), GetBetaVec(), SetBeta(), and SetEnergy().

double genie::hnl::SimpleHNL::fGamma
mutableprivate

Definition at line 356 of file SimpleHNL.h.

Referenced by GetGamma(), GetLifetime(), SetBeta(), and SetEnergy().

int genie::hnl::SimpleHNL::fIndex
mutableprivate

Definition at line 339 of file SimpleHNL.h.

Referenced by GetIndex(), and SetIndex().

std::map< genie::hnl::HNLDecayMode_t, double > genie::hnl::SimpleHNL::fInterestingChannels
mutableprivate

Definition at line 353 of file SimpleHNL.h.

Referenced by GetInterestingChannels(), and SetInterestingChannels().

std::vector< genie::hnl::HNLDecayMode_t > genie::hnl::SimpleHNL::fInterestingChannelsVec
mutableprivate

Definition at line 354 of file SimpleHNL.h.

Referenced by GetInterestingChannelsVec(), and SetInterestingChannelsVec().

bool genie::hnl::SimpleHNL::fIsMajorana
mutableprivate

Definition at line 344 of file SimpleHNL.h.

Referenced by GetIsMajorana().

double genie::hnl::SimpleHNL::fLifetime
mutableprivate

Definition at line 357 of file SimpleHNL.h.

Referenced by SetBeta(), and SetEnergy().

double genie::hnl::SimpleHNL::fMass
mutableprivate

Definition at line 342 of file SimpleHNL.h.

Referenced by GetMass(), SetBeta(), and SetEnergy().

std::string genie::hnl::SimpleHNL::fName
mutableprivate

Definition at line 338 of file SimpleHNL.h.

Referenced by GetName(), and SetName().

int genie::hnl::SimpleHNL::fParentPDG
mutableprivate

Definition at line 341 of file SimpleHNL.h.

Referenced by GetParentPDG(), and SetParentPDG().

int genie::hnl::SimpleHNL::fPDG
mutableprivate

Definition at line 340 of file SimpleHNL.h.

Referenced by GetPDG(), and SetPDG().

double genie::hnl::SimpleHNL::fPmag
mutableprivate

Definition at line 360 of file SimpleHNL.h.

Referenced by GetMomentum(), SetBeta(), SetEnergy(), SetMomentumAngles(), and SetMomentumDirection().

double genie::hnl::SimpleHNL::fPol
mutableprivate

Definition at line 361 of file SimpleHNL.h.

Referenced by GetPolarisationMag(), and SetPolMag().

std::vector< double >* genie::hnl::SimpleHNL::fPolDir
mutableprivate

Definition at line 363 of file SimpleHNL.h.

Referenced by GetPolarisationDir(), and SetPolarisationDirection().

double genie::hnl::SimpleHNL::fPolUx
mutableprivate

Definition at line 362 of file SimpleHNL.h.

Referenced by SetPolarisationDirection().

double genie::hnl::SimpleHNL::fPolUy
mutableprivate

Definition at line 362 of file SimpleHNL.h.

Referenced by SetPolarisationDirection().

double genie::hnl::SimpleHNL::fPolUz
mutableprivate

Definition at line 362 of file SimpleHNL.h.

Referenced by SetPolarisationDirection().

double genie::hnl::SimpleHNL::fPx
mutableprivate
double genie::hnl::SimpleHNL::fPy
mutableprivate
double genie::hnl::SimpleHNL::fPz
mutableprivate
double genie::hnl::SimpleHNL::fR1
mutableprivate

Definition at line 367 of file SimpleHNL.h.

Referenced by GetBeam2UserRotation(), and SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fR2
mutableprivate

Definition at line 367 of file SimpleHNL.h.

Referenced by GetBeam2UserRotation(), and SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fR3
mutableprivate

Definition at line 367 of file SimpleHNL.h.

Referenced by GetBeam2UserRotation(), and SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM11
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM12
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM13
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM21
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM22
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM23
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM31
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM32
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fRM33
mutableprivate

Definition at line 368 of file SimpleHNL.h.

Referenced by SetBeam2UserRotation().

double genie::hnl::SimpleHNL::fSelectThrow
mutableprivate

Definition at line 350 of file SimpleHNL.h.

Referenced by GetSelectThrow().

double genie::hnl::SimpleHNL::fT
mutableprivate

Definition at line 358 of file SimpleHNL.h.

Referenced by GetDecay4VX(), and SetDecayVtx().

double genie::hnl::SimpleHNL::fT0
mutableprivate

Definition at line 359 of file SimpleHNL.h.

Referenced by GetOrigin4VX(), and SetProdVtx().

double genie::hnl::SimpleHNL::fTx
mutableprivate

Definition at line 366 of file SimpleHNL.h.

Referenced by GetBeam2UserTranslation(), and SetBeam2UserTranslation().

double genie::hnl::SimpleHNL::fTy
mutableprivate

Definition at line 366 of file SimpleHNL.h.

Referenced by GetBeam2UserTranslation(), and SetBeam2UserTranslation().

int genie::hnl::SimpleHNL::fType
mutableprivate

Definition at line 345 of file SimpleHNL.h.

Referenced by GetType(), and SetType().

double genie::hnl::SimpleHNL::fTz
mutableprivate

Definition at line 366 of file SimpleHNL.h.

Referenced by GetBeam2UserTranslation(), and SetBeam2UserTranslation().

double genie::hnl::SimpleHNL::fUe42
mutableprivate

Definition at line 343 of file SimpleHNL.h.

Referenced by GetCouplings().

double genie::hnl::SimpleHNL::fUmu42
mutableprivate

Definition at line 343 of file SimpleHNL.h.

Referenced by GetCouplings().

double genie::hnl::SimpleHNL::fUt42
mutableprivate

Definition at line 343 of file SimpleHNL.h.

Referenced by GetCouplings().

std::map< genie::hnl::HNLDecayMode_t, double > genie::hnl::SimpleHNL::fValidChannels
mutableprivate

Definition at line 346 of file SimpleHNL.h.

Referenced by GetValidChannels().

double genie::hnl::SimpleHNL::fX
mutableprivate

Definition at line 358 of file SimpleHNL.h.

Referenced by GetDecay4VX(), and SetDecayVtx().

double genie::hnl::SimpleHNL::fX0
mutableprivate

Definition at line 359 of file SimpleHNL.h.

Referenced by GetOrigin4VX(), and SetProdVtx().

double genie::hnl::SimpleHNL::fY
mutableprivate

Definition at line 358 of file SimpleHNL.h.

Referenced by GetDecay4VX(), and SetDecayVtx().

double genie::hnl::SimpleHNL::fY0
mutableprivate

Definition at line 359 of file SimpleHNL.h.

Referenced by GetOrigin4VX(), and SetProdVtx().

double genie::hnl::SimpleHNL::fZ
mutableprivate

Definition at line 358 of file SimpleHNL.h.

Referenced by GetDecay4VX(), and SetDecayVtx().

double genie::hnl::SimpleHNL::fZ0
mutableprivate

Definition at line 359 of file SimpleHNL.h.

Referenced by GetOrigin4VX(), and SetProdVtx().


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