#include <vector>
#include <string>
#include "Samples/SampleStructs.h"
Go to the source code of this file.
|
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.
|
|
◆ 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
-
OscChannel | The vector of available oscillation channels |
InitFlav | Initial flavour PDG code |
FinalFlav | Final 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);
37}
Custom exception class for MaCh3 errors.