NAIA  1.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Namespaces | Typedefs | Enumerations | Functions | Variables
Utils.h File Reference
#include <algorithm>
#include <array>
#include <limits>
#include <map>
#include "Utility/BitMask/bitmask.h"
#include "Containers/Utils.hpp"

Go to the source code of this file.

Namespaces

 NAIA
 
 NAIA::TrTrack
 
 NAIA::TrdK
 
 NAIA::Ecal
 
 NAIA::Tof
 
 NAIA::MCTruth
 
 NAIA::Rich
 

Typedefs

template<class T >
using NAIA::LayerVariable = std::map< unsigned int, T >
 

Enumerations

enum  NAIA::Category {
  NAIA::Category::None = 0, NAIA::Category::HasTof = 1 << 0, NAIA::Category::HasTrack = 1 << 1, NAIA::Category::HasEcal = 1 << 2,
  NAIA::Category::HasTrd = 1 << 3, NAIA::Category::HasRich = 1 << 4, NAIA::Category::HasTofStandalone = 1 << 5, NAIA::Category::HasTrdStandalone = 1 << 6,
  NAIA::Category::Charge1_Trk = 1 << 7, NAIA::Category::Charge2_Trk = 1 << 8, NAIA::Category::ChargeGT2_Trk = 1 << 9, NAIA::Category::Charge1_Tof = 1 << 10,
  NAIA::Category::Charge2_Tof = 1 << 11, NAIA::Category::ChargeGT2_Tof = 1 << 12, NAIA::Category::Charge1_Trk_St = 1 << 13, NAIA::Category::Charge2_Trk_St = 1 << 14,
  NAIA::Category::ChargeGT2_Trk_St = 1 << 15, NAIA::Category::Charge1_Tof_St = 1 << 16, NAIA::Category::Charge2_Tof_St = 1 << 17, NAIA::Category::ChargeGT2_Tof_St = 1 << 18
}
 
enum  NAIA::TrTrack::ChargeRecoType { NAIA::TrTrack::STD, NAIA::TrTrack::HL, NAIA::TrTrack::YJ }
 
enum  NAIA::TrTrack::FitPositionHeight {
  NAIA::TrTrack::Layer1 = 0, NAIA::TrTrack::Layer2, NAIA::TrTrack::Layer3, NAIA::TrTrack::Layer4,
  NAIA::TrTrack::Layer5, NAIA::TrTrack::Layer6, NAIA::TrTrack::Layer7, NAIA::TrTrack::Layer8,
  NAIA::TrTrack::Layer9, NAIA::TrTrack::TofLayer0, NAIA::TrTrack::TofLayer1, NAIA::TrTrack::TofLayer2,
  NAIA::TrTrack::TofLayer3, NAIA::TrTrack::EcalCOG, NAIA::TrTrack::EcalTop, NAIA::TrTrack::EcalBottom
}
 
enum  NAIA::TrTrack::Span {
  NAIA::TrTrack::NoSpan = -1, NAIA::TrTrack::InnerOnly, NAIA::TrTrack::InnerL1, NAIA::TrTrack::InnerL9,
  NAIA::TrTrack::FullSpan, NAIA::TrTrack::UpperHalfInner, NAIA::TrTrack::LowerHalfInner, NAIA::TrTrack::InnerNoMS
}
 
enum  NAIA::TrTrack::Fit {
  NAIA::TrTrack::NoFit = -1, NAIA::TrTrack::Choutko, NAIA::TrTrack::Kalman, NAIA::TrTrack::GBL,
  NAIA::TrTrack::KalmanElectron
}
 
enum  NAIA::TrTrack::TrGeometry { NAIA::TrTrack::TrGeometry::Default = 0, NAIA::TrTrack::TrGeometry::InnerOnly, NAIA::TrTrack::TrGeometry::InnerL1, NAIA::TrTrack::TrGeometry::FullSpan }
 
enum  NAIA::TrTrack::Side { NAIA::TrTrack::X, NAIA::TrTrack::Y }
 
enum  NAIA::TrTrack::DistanceFromTrack {
  NAIA::TrTrack::OnTrack, NAIA::TrTrack::Onemm, NAIA::TrTrack::Onecm, NAIA::TrTrack::Twocm,
  NAIA::TrTrack::Fivecm, NAIA::TrTrack::Tencm, NAIA::TrTrack::AllLayer
}
 
enum  NAIA::TrdK::ChargeType { NAIA::TrdK::Total, NAIA::TrdK::Upper, NAIA::TrdK::Lower }
 
enum  NAIA::TrdK::LikelihoodType { NAIA::TrdK::Electron, NAIA::TrdK::Proton, NAIA::TrdK::Helium, NAIA::TrdK::Deuterium }
 
enum  NAIA::TrdK::LikelihoodRType { NAIA::TrdK::ep, NAIA::TrdK::eHe, NAIA::TrdK::pHe }
 
enum  NAIA::TrdK::QualType { NAIA::TrdK::OnTrack, NAIA::TrdK::OffTrack }
 
enum  NAIA::Ecal::EnergyRecoType {
  NAIA::Ecal::EnergyD, NAIA::Ecal::EnergyE, NAIA::Ecal::EnergyCorrEneE_E, NAIA::Ecal::EnergyCorrEne2017,
  NAIA::Ecal::EcalKEle
}
 
enum  NAIA::Ecal::LikelihoodType { NAIA::Ecal::Integral, NAIA::Ecal::LayerCombined }
 
enum  NAIA::Ecal::BDTType { NAIA::Ecal::v5std, NAIA::Ecal::v5ada, NAIA::Ecal::v7std, NAIA::Ecal::v7ada }
 
enum  NAIA::Tof::ChargeType { NAIA::Tof::Total, NAIA::Tof::Upper, NAIA::Tof::Lower }
 
enum  NAIA::Tof::BetaType { NAIA::Tof::BetaH, NAIA::Tof::Evgeni }
 
enum  NAIA::Tof::BetaClusterType { NAIA::Tof::OnTime, NAIA::Tof::OffTime }
 
enum  NAIA::MCTruth::MCHeight {
  NAIA::MCTruth::GenerationPoint = 0, NAIA::MCTruth::L1, NAIA::MCTruth::UpperTof, NAIA::MCTruth::L2,
  NAIA::MCTruth::L3, NAIA::MCTruth::L4, NAIA::MCTruth::L5, NAIA::MCTruth::L6,
  NAIA::MCTruth::L7, NAIA::MCTruth::L8, NAIA::MCTruth::LowerTof, NAIA::MCTruth::RichRadiator,
  NAIA::MCTruth::L9, NAIA::MCTruth::Ecal
}
 
enum  NAIA::Rich::RichMeasType { NAIA::Rich::NONE = 0, NAIA::Rich::NaF, NAIA::Rich::Agl }
 
enum  NAIA::Rich::BetaType { NAIA::Rich::CIEMAT, NAIA::Rich::SIMPLE, NAIA::Rich::REFIT, NAIA::Rich::LIP }
 

Functions

std::vector< std::string > NAIA::TokenizeString (const std::string &input, const char separator)
 Utility function that splits a string according to the provided separator. More...
 

Variables

constexpr unsigned int NAIA::TrTrack::numChargeRecos = 3
 
constexpr std::array
< ChargeRecoType,
numChargeRecos > 
NAIA::TrTrack::recoTypes
 
constexpr unsigned int NAIA::TrTrack::numFitPositionHeights = 16
 
constexpr std::array
< FitPositionHeight,
numFitPositionHeights > 
NAIA::TrTrack::fitPositionHeights
 
constexpr std::array< float,
numFitPositionHeights > 
NAIA::TrTrack::fitPositionHeightZ
 
static const std::array
< std::string,
numFitPositionHeights > 
NAIA::TrTrack::fitPositionNames
 
constexpr unsigned int NAIA::TrTrack::numTrLayers = 9
 
constexpr std::array
< FitPositionHeight,
numTrLayers > 
NAIA::TrTrack::layerPositionHeights
 
constexpr unsigned int NAIA::TrTrack::numSpans = 7
 
constexpr std::array< Span,
numSpans > 
NAIA::TrTrack::spanTypes
 
static const std::array
< std::string, numSpans > 
NAIA::TrTrack::spanNames
 
constexpr unsigned int NAIA::TrTrack::numFits = 4
 
constexpr std::array< Fit,
numFits > 
NAIA::TrTrack::fitTypes {Fit::Choutko, Fit::Kalman, Fit::GBL, Fit::KalmanElectron}
 
static const std::array
< std::string, numFits > 
NAIA::TrTrack::fitNames {"Choutko", "Kalman", "GBL", "KalmanElectron"}
 
constexpr unsigned int NAIA::TrTrack::numTrGeos = 4
 
constexpr std::array
< TrGeometry, numTrGeos > 
NAIA::TrTrack::trGeoTypes
 
static const std::array
< std::string, numTrGeos > 
NAIA::TrTrack::trGeoNames {"Default", "InnerOnly", "InnerL1", "FullSpan"}
 
constexpr unsigned int NAIA::TrTrack::numSides = 2
 
constexpr std::array< Side,
numSides > 
NAIA::TrTrack::sides {Side::X, Side::Y}
 
static const std::array
< std::string, numSides > 
NAIA::TrTrack::sideNames {"X", "Y"}
 
constexpr unsigned int NAIA::TrTrack::numTrackDistances = 7
 
constexpr std::array
< DistanceFromTrack,
numTrackDistances > 
NAIA::TrTrack::trackDistances
 
static const std::array
< std::string,
numTrackDistances > 
NAIA::TrTrack::trackDistanceNames
 
constexpr unsigned int NAIA::TrdK::numChargeTypes = 3
 
constexpr std::array
< ChargeType, numChargeTypes > 
NAIA::TrdK::recoTypes {ChargeType::Total, ChargeType::Upper, ChargeType::Lower}
 
static const std::array
< std::string, numChargeTypes > 
NAIA::TrdK::recoNames {"Total", "Upper", "Lower"}
 
constexpr unsigned int NAIA::TrdK::numLikelihoodTypes = 3
 
constexpr std::array
< LikelihoodType,
numLikelihoodTypes > 
NAIA::TrdK::likelihoodTypes
 
static const std::array
< std::string,
numLikelihoodTypes > 
NAIA::TrdK::likelihoodNames {"Electron", "Proton", "Helium"}
 
constexpr unsigned int NAIA::TrdK::numLikelihoodRTypes = 3
 
constexpr std::array
< LikelihoodRType,
numLikelihoodRTypes > 
NAIA::TrdK::likelihoodRTypes
 
static const std::array
< std::string,
numLikelihoodRTypes > 
NAIA::TrdK::likelihoodRNames {"ep", "eHe", "pHe"}
 
constexpr unsigned int NAIA::TrdK::numQualTypes = 2
 
constexpr std::array< QualType,
numQualTypes > 
NAIA::TrdK::qualTypes {QualType::OnTrack, QualType::OffTrack}
 
static const std::array
< std::string, numQualTypes > 
NAIA::TrdK::qualNames {"OnTrack", "OffTrack"}
 
constexpr unsigned int NAIA::Ecal::numEnergyRecos = 5
 
constexpr std::array
< EnergyRecoType,
numEnergyRecos > 
NAIA::Ecal::recoTypes
 
static const std::array
< std::string, numEnergyRecos > 
NAIA::Ecal::recoNames
 
constexpr unsigned int NAIA::Ecal::numLikelihoodTypes = 2
 
constexpr std::array
< LikelihoodType,
numLikelihoodTypes > 
NAIA::Ecal::likelihoodTypeNames
 
constexpr unsigned int NAIA::Ecal::numBDTTypes = 4
 
constexpr std::array< BDTType,
numBDTTypes > 
NAIA::Ecal::BDTTypes {BDTType::v5std, BDTType::v5ada, BDTType::v7std, BDTType::v7ada}
 
static const std::array
< std::string, numBDTTypes > 
NAIA::Ecal::BDTNames {"v5std", "v5ada", "v7std", "v7ada"}
 
const float NAIA::Tof::tofRefZ = 160.
 
constexpr unsigned int NAIA::Tof::numChargeTypes = 3
 
constexpr std::array
< ChargeType, numChargeTypes > 
NAIA::Tof::recoTypes {ChargeType::Total, ChargeType::Upper, ChargeType::Lower}
 
static const std::array
< std::string, numChargeTypes > 
NAIA::Tof::recoNames {"Total", "Upper", "Lower"}
 
constexpr unsigned int NAIA::Tof::numBetaTypes = 2
 
constexpr std::array< BetaType,
numBetaTypes > 
NAIA::Tof::betaTypes {BetaType::BetaH, BetaType::Evgeni}
 
static const std::array
< std::string, numBetaTypes > 
NAIA::Tof::betaNames {"BetaH", "Evgeni"}
 
constexpr unsigned int NAIA::Tof::numBetaClusterTypes = 2
 
constexpr std::array
< BetaClusterType,
numBetaClusterTypes > 
NAIA::Tof::betaClusterTypes
 
static const std::array
< std::string,
numBetaClusterTypes > 
NAIA::Tof::betaClusterTypeNames {"OnTime", "OffTime"}
 
constexpr unsigned int NAIA::MCTruth::numMCHeights = 13
 
constexpr std::array< MCHeight,
numMCHeights > 
NAIA::MCTruth::MCHeights
 
constexpr std::array< float,
numMCHeights > 
NAIA::MCTruth::MCHeightsZ
 
constexpr unsigned int NAIA::Rich::numBetaTypes = 4
 
constexpr std::array< BetaType,
numBetaTypes > 
NAIA::Rich::betaTypes
 
static const std::array
< std::string, numBetaTypes > 
NAIA::Rich::betaNames {"CIEMAT", "SIMPLE", "REFIT", "LIP"}