Classes | Functions | Variables
SelectionDefinitions.h File Reference

Go to the source code of this file.

Classes

class  new_interaction_topology
 
class  leading_costheta
 
class  truncatedMean_pos
 
class  shower_dists
 
class  has_shower_dist_energy
 
class  isBeamType
 
class  endAPA3
 
class  secondary_noPion
 
class  data_BI_quality
 
class  beam_cut_BI
 
class  beam_cut_TPC
 

Functions

auto daughter_PDG_types (const std::vector< int > bt_PDGs)
 

Variables

auto selection_ID
 
auto categorize_daughters
 
auto leading_p_costheta
 
auto backtrack_beam
 
auto data_beam_PID
 

Function Documentation

auto daughter_PDG_types ( const std::vector< int >  bt_PDGs)

Definition at line 89 of file SelectionDefinitions.h.

89  {
90  std::vector<int> results;
91  for (const int PDG : bt_PDGs) {
92  if (abs(PDG) == 211) {
93  results.push_back(1);
94  }
95  else if (abs(PDG) == 13) {
96  results.push_back(2);
97  }
98  else if (abs(PDG) == 2212) {
99  results.push_back(3);
100  }
101  else if (abs(PDG) == 22) {
102  results.push_back(4);
103  }
104  else if (abs(PDG) > 2212) {
105  results.push_back(5);
106  }
107  else if (abs(PDG) == 11) {
108  results.push_back(6);
109  }
110  else {
111  results.push_back(7);
112  }
113  }
114  return results;
115 }
const uint PDG
Definition: qregexp.cpp:140
T abs(T value)

Variable Documentation

auto backtrack_beam
Initial value:
= [](const std::string process,
const bool matched,
const int origin, const int PDG) {
if (process == "primary" && matched && origin == 4 && PDG == 211) {
return 1;
}
else if (process == "primary" && matched && origin == 4 && PDG == -13) {
return 2;
}
else if (origin == 2) {
return 3;
}
else if (process == "primaryBackground") {
return 4;
}
else if (process.find("Inelastic") != std::string::npos) {
return 5;
}
else if (process == "Decay") {
return 6;
}
else {
return 7;
}
}
std::string string
Definition: nybbler.cc:12
const uint PDG
Definition: qregexp.cpp:140
def process(f, kind)
Definition: search.py:254
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:227

Definition at line 227 of file SelectionDefinitions.h.

auto categorize_daughters

Definition at line 117 of file SelectionDefinitions.h.

auto data_beam_PID
Initial value:
= [](const std::vector<int>& pidCandidates){
auto pid_search = std::find(pidCandidates.begin(), pidCandidates.end(), 211);
return (pid_search != pidCandidates.end());
}

Definition at line 458 of file SelectionDefinitions.h.

auto leading_p_costheta
Initial value:
= [](const double & Px,
const double & Py, const double & Pz,
const std::vector<int> & dPDGs,
const std::vector<double> & dPx,
const std::vector<double> & dPy,
const std::vector<double> & dPz) {
double costheta = -999.;
double max_p = -999.;
double P = sqrt(Px*Px + Py*Py + Pz*Pz);
for (size_t i = 0; i < dPDGs.size(); ++i) {
if (dPDGs[i] != 2212) continue;
double dP = sqrt(dPx[i]*dPx[i] + dPy[i]*dPy[i] + dPz[i]*dPz[i]);
if (dP > max_p) {
costheta = (dPx[i]*Px + dPy[i]*Py + dPz[i]*Pz)/(dP*P);
}
}
return costheta;
}
std::pair< float, std::string > P

Definition at line 180 of file SelectionDefinitions.h.

auto selection_ID
Initial value:
= [](bool beam_is_track, bool ends_in_APA3,
bool no_pion_daughter,
bool beam_cuts, bool has_shower) {
if (!beam_is_track) {
return 6;
}
if (!beam_cuts) {
return 5;
}
if (!ends_in_APA3) {
return 4;
}
if (!no_pion_daughter) {
return 3;
}
if (has_shower) {
return 2;
}
else {
return 1;
}
}

Definition at line 62 of file SelectionDefinitions.h.