FairShip
Loading...
Searching...
No Matches
ShipMuDIS Namespace Reference

Classes

struct  MuonDISBranches
struct  MuonBranches
struct  CBMSimBranches
struct  MuonDISInBranches
struct  MuonInBranches

Enumerations

enum  MatType {
  MS = 0 , UBT = 1 , SBTsens = 2 , SBTfr = 3 ,
  SSTsens = 4 , SSTfr = 5 , HE = 6 , AIR = 7 ,
  HeBalloon = 8 , REST = 9
}

Functions

template<class T>
bool BindInputBranch (TTree *tree, const TString &name, T *address, bool required=true)

Variables

constexpr double kMuonShieldTailZ = 20.
const std::array< TString, nMats > MatTypeStr

Enumeration Type Documentation

◆ MatType

Enumerator
MS 
UBT 
SBTsens 
SBTfr 
SSTsens 
SSTfr 
HE 
AIR 
HeBalloon 
REST 

Definition at line 32 of file MuDISDefs.h.

32 {
33 MS = 0,
34 UBT = 1,
35 SBTsens = 2,
36 SBTfr = 3,
37 SSTsens = 4,
38 SSTfr = 5,
39 HE = 6,
40 AIR = 7,
41 HeBalloon = 8,
42 REST = 9
43};

Function Documentation

◆ BindInputBranch()

template<class T>
bool ShipMuDIS::BindInputBranch ( TTree * tree,
const TString & name,
T * address,
bool required = true )

Definition at line 143 of file MuDISDefs.h.

144 {
145 auto* branch = tree->GetBranch(name);
146 if (!branch) {
147 if (required) LOG(error) << "Missing required input branch " << name;
148 return !required;
149 }
150 if constexpr (std::is_arithmetic_v<T>) {
151 // Reject object branches before ROOT attempts to bind a scalar address.
152 if (branch->GetClassName()[0] != '\0') {
153 LOG(error) << "Expected scalar input branch " << name;
154 return false;
155 }
156 }
157 branch->SetAutoDelete(false);
158 return tree->SetBranchAddress(name, address) >= 0;
159}

Variable Documentation

◆ kMuonShieldTailZ

double ShipMuDIS::kMuonShieldTailZ = 20.
inlineconstexpr

Definition at line 30 of file MuDISDefs.h.

◆ MatTypeStr

const std::array<TString, nMats> ShipMuDIS::MatTypeStr
inline
Initial value:
= {
"MS", "UBT", "SBTsens", "SBTfr", "SSTsens",
"SSTfr", "HE", "AIR", "HeBalloon", "REST"}

Definition at line 45 of file MuDISDefs.h.

45 {
46 "MS", "UBT", "SBTsens", "SBTfr", "SSTsens",
47 "SSTfr", "HE", "AIR", "HeBalloon", "REST"};