55 std::string name,
int index,
56 const int PDG,
const int parPDG,
const double mass,
57 const double Ue42,
const double Umu42,
const double Ut42,
71 {
LOG(
"HNL",
pDEBUG) <<
"SimpleHNL built"; }
84 std::vector< double > coupVec;
85 coupVec.emplace_back(
fUe42 );
86 coupVec.emplace_back(
fUmu42 );
87 coupVec.emplace_back(
fUt42 );
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);
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);
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);
136 std::vector< double > betaVec;
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 );
168 std::vector<double> tVec = {
fTx,
fTy,
fTz };
173 std::vector<double> rVec = {
fR1,
fR2,
fR3 };
186 "genie::hnl::SimpleHNL:: Set E too low." <<
187 "\nE = " << E <<
", M = " <<
fMass; exit(3); }
189 __attribute__((unused))
double oldmom =
GetMomentum( );
191 fPx = mom3 / std::sqrt(3.0);
fPy = mom3 / std::sqrt(3.0);
fPz = mom3 / std::sqrt(3.0);
202 double oldmom =
fPmag;
223 theta *= -1.0; phi += ap;
226 fPx =
fPmag * std::sin( theta ) * std::cos( phi );
227 fPy =
fPmag * std::sin( theta ) * std::sin( phi );
233 if( ux == 0.0 && uy == 0.0 && uz == 0.0 ){
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;
248 if( pm < -1.0 || pm > 1.0 ){
250 "genie::hnl::SimpleHNL::SetPolMag:: " <<
251 "Pol.vec. magnitude must be in [-1,1]. Exiting."; exit(3); }
255 const double ply,
const double plz ){
256 if( plx == 0.0 && ply == 0.0 && plz == 0.0 ){
258 "genie::hnl::SimpleHNL::SetPolarisationDirection:: " <<
259 "Zero vector entered. Exiting."; exit(1); }
260 const double PM = std::sqrt( plx*plx + ply*ply * plz*plz );
268 fT0 = fourV.at(0);
fX0 = fourV.at(1);
269 fY0 = fourV.at(2);
fZ0 = fourV.at(3); }
272 fT = fourV.at(0);
fX = fourV.at(1);
273 fY = fourV.at(2);
fZ = fourV.at(3);
277 const std::map< genie::hnl::HNLDecayMode_t, double > gammaMap ){
282 const std::vector< genie::hnl::HNLDecayMode_t > decVec ){
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 );
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 );
327 inline double CalcBeta(
const double E,
const double P3 ) {
331 return std::sqrt( 1.0 / ( 1.0 - bet*bet ) ); }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
std::vector< genie::hnl::HNLDecayMode_t > fInterestingChannelsVec
void SetPDG(const int PDG)
void SetBeam2UserTranslation(const double tx, const double ty, const double tz)
SimpleHNL(std::string name, int index)
void SetInterestingChannels(const std::map< genie::hnl::HNLDecayMode_t, double > gammaMap)
void SetDecayMode(const genie::hnl::HNLDecayMode_t decayMode)
void SetBeam2UserRotation(const double r1, const double r2, const double r3)
double CalcGamma(const double bet)
void SetParentPDG(const int parPDG)
void SetMomentumDirection(double ux, double uy, double uz)
void SetDecayVtx(const std::vector< double > fourV)
double CalcLifetime(const double gam)
std::vector< double > GetBeam2UserTranslation()
std::map< genie::hnl::HNLDecayMode_t, double > fValidChannels
void SetName(const std::string name)
std::map< genie::hnl::HNLDecayMode_t, double > GetInterestingChannels()
std::map< genie::hnl::HNLDecayMode_t, double > GetValidChannels()
std::vector< double > * fPolDir
std::vector< double > Get4VP()
void SetInterestingChannelsVec(const std::vector< genie::hnl::HNLDecayMode_t > decVec)
std::vector< double > GetBeam2UserRotation()
std::vector< double > GetOrigin4VX()
std::vector< double > GetBetaVec()
double GetPolarisationMag()
void SetMomentumAngles(double theta, double phi)
void SetEnergy(const double E)
double GetAngularDeviation()
std::vector< genie::hnl::HNLDecayMode_t > GetInterestingChannelsVec()
~SimpleHNL()
normal constructor
genie::hnl::HNLDecayMode_t GetDecayMode()
void SetPolMag(const double pm)
void SetProdVtx(const std::vector< double > fourV)
std::vector< double > GetCouplings()
std::map< genie::hnl::HNLDecayMode_t, double > fInterestingChannels
std::vector< double > * GetPolarisationDir()
void SetIndex(const int idx)
genie::hnl::HNLDecayMode_t fDecayMode
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
std::vector< double > GetDecay4VX()
void Set4Momentum(const std::vector< double > fourP)
void SetPolarisationDirection(const double plx, const double ply, const double plz)
void SetAngularDeviation(const double adev)
void SetBeta(const double bet)
double CalcBeta(const double E, const double P3)
void SetType(const int type)
Form factor lookup tables.
enum genie::hnl::EHNLDecayMode HNLDecayMode_t
static constexpr double GeV
THE MAIN GENIE PROJECT NAMESPACE