GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HNLDecaySelector.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 /*!
3 
4  Handles the inclusive-type transformation selection
5 
6 \namespace genie::hnl::selector
7 
8 \brief Transformation inclusive-method channel selector
9 
10 \author John Plows <komninos-john.plows@physics.ox.ac.uk>
11 
12 \created December 9th, 2021
13 
14 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
15  For the full text of the license visit http://copyright.genie-mc.org
16 
17 */
18 //----------------------------------------------------------------------------
19 
20 #ifndef _HNL_DECAYSELECTOR_H_
21 #define _HNL_DECAYSELECTOR_H_
22 
23 // -- C++ includes
24 #include <map>
25 
26 // -- GENIE includes
28 
31 
32 namespace genie {
33 namespace hnl {
34 
35  namespace selector {
36 
37  // only need to calculate decay widths once! Store them in this array
38  static __attribute__((unused)) double fDecayGammas[] = {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0};
39 
40  // valid channels with widths
41  std::map< genie::hnl::HNLDecayMode_t, double > GetValidChannelWidths( const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana = false );
42  // derived
43  double GetTotalDecayWidth( std::map< genie::hnl::HNLDecayMode_t, double > gammaMap );
44  double CalcCoMLifetime( const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana = false );
45 
46  // now choose channels you're interested in seeing
47  std::map< genie::hnl::HNLDecayMode_t, double > SetInterestingChannels( std::vector< genie::hnl::HNLDecayMode_t > intChannels, std::map< genie::hnl::HNLDecayMode_t, double > gammaMap );
48 
49  // transform widths to probabilities (marginalised over all interesting!)
50  std::map< genie::hnl::HNLDecayMode_t, double > GetProbabilities( std::map< genie::hnl::HNLDecayMode_t, double > gammaMap );
51 
52  // make a choice from interesting channels
53  // This is the inclusive method - see messages to Xianguo, Dec 9th 2021
54  genie::hnl::HNLDecayMode_t SelectChannelInclusive( std::map< genie::hnl::HNLDecayMode_t, double > Pmap, double ranThrow );
55 
56  } // namespace selector
57 
58 } // namespace hnl
59 } // namespace genie
60 
61 #endif // #ifndef _HNL_DEDCAYSELECTOR_H_
double GetTotalDecayWidth(std::map< genie::hnl::HNLDecayMode_t, double > gammaMap)
std::map< genie::hnl::HNLDecayMode_t, double > SetInterestingChannels(std::vector< genie::hnl::HNLDecayMode_t > intChannels, std::map< genie::hnl::HNLDecayMode_t, double > gammaMap)
enum genie::hnl::EHNLDecayMode HNLDecayMode_t
static __attribute__((unused)) double fDecayGammas[]
std::map< genie::hnl::HNLDecayMode_t, double > GetProbabilities(std::map< genie::hnl::HNLDecayMode_t, double > gammaMap)
double CalcCoMLifetime(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)
genie::hnl::HNLDecayMode_t SelectChannelInclusive(std::map< genie::hnl::HNLDecayMode_t, double > Pmap, double ranThrow)
std::map< genie::hnl::HNLDecayMode_t, double > GetValidChannelWidths(const double M, const double Ue42, const double Umu42, const double Ut42, const bool IsMajorana=false)