How is the mode set - twongjirad/LArLiteSoftCookBook GitHub Wiki

This can become out of date.p

Information as of 10/2/2017

LArSoft/GENIE interface

  • larsim module: GENIEGen_module. Wrapper around nutools GENIEHelper class.

  • nutools: GENIEHelper has two functions PackMCTruth, which creates MCTruth object (found in nusimdata repo) and PackGTruth

  • portion of GENIEHelper::PackMCTruth where mode and interaction is set

    // what is the interaction type                                                                                                                                                                         
    int mode = simb::kUnknownInteraction;
    
    if     (procInfo.IsQuasiElastic()       ) mode = simb::kQE;
    else if(procInfo.IsDeepInelastic()      ) mode = simb::kDIS;
    else if(procInfo.IsResonant()           ) mode = simb::kRes;
    else if(procInfo.IsCoherent()           ) mode = simb::kCoh;
    else if(procInfo.IsCoherentElas()       ) mode = simb::kCohElastic;
    else if(procInfo.IsElectronScattering() ) mode = simb::kElectronScattering;
    else if(procInfo.IsNuElectronElastic()  ) mode = simb::kNuElectronElastic;
    else if(procInfo.IsInverseMuDecay()     ) mode = simb::kInverseMuDecay;
    else if(procInfo.IsIMDAnnihilation()    ) mode = simb::kIMDAnnihilation;
    else if(procInfo.IsInverseBetaDecay()   ) mode = simb::kInverseBetaDecay;
    else if(procInfo.IsGlashowResonance()   ) mode = simb::kGlashowResonance;
    else if(procInfo.IsAMNuGamma()          ) mode = simb::kAMNuGamma;
    else if(procInfo.IsMEC()                ) mode = simb::kMEC;
    else if(procInfo.IsDiffractive()        ) mode = simb::kDiffractive;
    else if(procInfo.IsEM()                 ) mode = simb::kEM;
    else if(procInfo.IsWeakMix()            ) mode = simb::kWeakMix;
    
    
    int itype = simb::kNuanceOffset + genie::utils::ghep::NuanceReactionCode(record);
    
  • This is what NuanceReactionCode function is (as of GENIE 2.12.2). Method