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); }
191 fPx = mom3 / std::sqrt(3.0);
fPy = mom3 / std::sqrt(3.0);
fPz = mom3 / std::sqrt(3.0);
202 double oldmom =
fPmag;
203 fPmag = std::sqrt(
fE*
fE - fMass*fMass );
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 ) ); }
376 #endif // #ifndef _SIMPLEHNL_H_
void SetPolarisationDirection(const double plx, const double ply, const double plz)
genie::hnl::HNLDecayMode_t fDecayMode
double GetPolarisationMag()
std::vector< genie::hnl::HNLDecayMode_t > fInterestingChannelsVec
genie::hnl::HNLDecayMode_t GetDecayMode()
std::vector< double > GetBeam2UserTranslation()
void SetPolMag(const double pm)
void SetBeam2UserRotation(const double r1, const double r2, const double r3)
std::vector< genie::hnl::HNLDecayMode_t > GetInterestingChannelsVec()
std::map< genie::hnl::HNLDecayMode_t, double > fValidChannels
void Set4Momentum(const std::vector< double > fourP)
std::vector< double > * fPolDir
double CalcBeta(const double E, const double P3)
std::vector< double > * GetPolarisationDir()
void SetDecayVtx(const std::vector< double > fourV)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
std::vector< double > GetOrigin4VX()
void SetMomentumAngles(double theta, double phi)
SimpleHNL(std::string name, int index)
void SetMomentumDirection(double ux, double uy, double uz)
double CalcLifetime(const double gam)
std::vector< double > GetCouplings()
static constexpr double GeV
void SetInterestingChannelsVec(const std::vector< genie::hnl::HNLDecayMode_t > decVec)
void SetName(const std::string name)
void SetBeta(const double bet)
void SetIndex(const int idx)
std::map< genie::hnl::HNLDecayMode_t, double > GetValidChannels()
enum genie::hnl::EHNLDecayMode HNLDecayMode_t
void SetInterestingChannels(const std::map< genie::hnl::HNLDecayMode_t, double > gammaMap)
void SetParentPDG(const int parPDG)
void SetAngularDeviation(const double adev)
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
void SetEnergy(const double E)
void SetType(const int type)
double GetAngularDeviation()
std::vector< double > GetDecay4VX()
static __attribute__((unused)) double fDecayGammas[]
void SetBeam2UserTranslation(const double tx, const double ty, const double tz)
std::map< genie::hnl::HNLDecayMode_t, double > fInterestingChannels
std::vector< double > GetBetaVec()
void SetDecayMode(const genie::hnl::HNLDecayMode_t decayMode)
double CalcCoMLifetime(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)
~SimpleHNL()
normal constructor
std::map< genie::hnl::HNLDecayMode_t, double > GetValidChannelWidths(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)
double CalcGamma(const double bet)
std::vector< double > GetBeam2UserRotation()
void SetProdVtx(const std::vector< double > fourV)
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
void SetPDG(const int PDG)
std::vector< double > Get4VP()
std::map< genie::hnl::HNLDecayMode_t, double > GetInterestingChannels()