MaCh3 2.2.1
Reference Guide
Loading...
Searching...
No Matches
Classes | Functions
FarDetectorCoreInfoStruct.h File Reference
#include <vector>
#include <string>
#include "Samples/SampleStructs.h"
Include dependency graph for FarDetectorCoreInfoStruct.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  OscChannelInfo
 KS: Store info about used osc channels. More...
 
struct  FarDetectorCoreInfo
 constructors are same for all three so put in here More...
 

Functions

int GetOscChannel (const std::vector< OscChannelInfo > &OscChannel, const int InitFlav, const int FinalFlav)
 KS: Get Osc Channel Index based on initial and final PDG codes.
 

Function Documentation

◆ GetOscChannel()

int GetOscChannel ( const std::vector< OscChannelInfo > &  OscChannel,
const int  InitFlav,
const int  FinalFlav 
)
inline

KS: Get Osc Channel Index based on initial and final PDG codes.

Parameters
OscChannelThe vector of available oscillation channels
InitFlavInitial flavour PDG code
FinalFlavFinal flavour PDG code
Returns
Index in OscChannel vector

Definition at line 28 of file FarDetectorCoreInfoStruct.h.

28 {
29 for (size_t i = 0; i < OscChannel.size(); ++i) {
30 if (InitFlav == OscChannel[i].InitPDG && FinalFlav == OscChannel[i].FinalPDG) {
31 return static_cast<int>(OscChannel[i].ChannelIndex);
32 }
33 }
34
35 MACH3LOG_ERROR("Didn't find Osc channel for InitFlav = {}, FinalFlav = {}", InitFlav, FinalFlav);
36 throw MaCh3Exception(__FILE__, __LINE__);
37}
#define MACH3LOG_ERROR
Definition: MaCh3Logger.h:25
Custom exception class for MaCh3 errors.