#include <AssignLabels.h>
Definition at line 20 of file AssignLabels.h.
cvn::AssignLabels::AssignLabels |
( |
| ) |
|
cvn::AssignLabels::~AssignLabels |
( |
| ) |
|
|
inline |
Get Interaction_t from pdg, mode and iscc. Setting pdg and mode to zero triggers cosmic ray
Definition at line 26 of file AssignLabels.cxx.
33 int trueMode = truth.
Mode();
46 else if(
abs(pdg) == 12)
55 else if(
abs(pdg) == 16)
Nutau CC, other than above.
neutrino electron elastic scatter
Nutau CC DIS interaction.
const simb::MCParticle & Nu() const
Nutau CC Resonant interaction.
Nue CC Resonant interaction.
Nue CC, other than above.
Numu CC Resonant interaction.
Something else. Tau? Hopefully we don't use this.
Numu CC, other than above.
InteractionType cvn::AssignLabels::GetInteractionTypeFromSlice |
( |
int |
nuPDG, |
|
|
bool |
nuCCNC, |
|
|
int |
nuMode |
|
) |
| |
Definition at line 75 of file AssignLabels.cxx.
Nutau CC, other than above.
neutrino electron elastic scatter
Nutau CC DIS interaction.
Nutau CC Resonant interaction.
Nue CC Resonant interaction.
Nue CC, other than above.
Numu CC Resonant interaction.
Something else. Tau? Hopefully we don't use this.
Numu CC, other than above.
unsigned int cvn::AssignLabels::GetNeutralDaughterHitsRecursive |
( |
const simb::MCParticle & |
particle | ) |
const |
|
private |
Definition at line 414 of file AssignLabels.cxx.
416 unsigned int nSimIDEs = 0;
426 std::cout <<
"Got " << localSimIDEs <<
" hits from " << daughter->
PdgCode() <<
std::endl;
429 nSimIDEs += localSimIDEs;
const simb::MCParticle * TrackIdToParticle_P(int id) const
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps(int const &id) const
unsigned int GetNeutralDaughterHitsRecursive(const simb::MCParticle &particle) const
int NumberDaughters() const
int Daughter(const int i) const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
QTextStream & endl(QTextStream &s)
unsigned short cvn::AssignLabels::GetNNeutrons |
( |
| ) |
|
|
inline |
unsigned short cvn::AssignLabels::GetNPions |
( |
| ) |
|
|
inline |
unsigned short cvn::AssignLabels::GetNPizeros |
( |
| ) |
|
|
inline |
unsigned short cvn::AssignLabels::GetNProtons |
( |
| ) |
|
|
inline |
short cvn::AssignLabels::GetPDG |
( |
| ) |
|
|
inline |
int cvn::AssignLabels::GetProcessKey |
( |
std::string |
process | ) |
const |
|
private |
Definition at line 371 of file AssignLabels.cxx.
373 if(
process.compare(
"primary") == 0)
return 0;
374 else if(
process.compare(
"hadElastic") == 0)
return 1;
375 else if(
process.compare(
"pi-Inelastic") == 0)
return 2;
376 else if(
process.compare(
"pi+Inelastic") == 0)
return 3;
377 else if(
process.compare(
"kaon-Inelastic") == 0)
return 4;
378 else if(
process.compare(
"kaon+Inelastic") == 0)
return 5;
379 else if(
process.compare(
"protonInelastic") == 0)
return 6;
380 else if(
process.compare(
"neutronInelastic") == 0)
return 7;
381 else if(
process.compare(
"kaon0SInelastic") == 0)
return 8;
382 else if(
process.compare(
"kaon0LInelastic") == 0)
return 9;
383 else if(
process.compare(
"lambdaInelastic") == 0)
return 10;
384 else if(
process.compare(
"omega-Inelastic") == 0)
return 11;
385 else if(
process.compare(
"sigma+Inelastic") == 0)
return 12;
386 else if(
process.compare(
"sigma-Inelastic") == 0)
return 13;
387 else if(
process.compare(
"sigma0Inelastic") == 0)
return 14;
388 else if(
process.compare(
"xi-Inelastic") == 0)
return 15;
389 else if(
process.compare(
"xi0Inelastic") == 0)
return 16;
390 else if(
process.compare(
"anti_protonInelastic") == 0)
return 20;
391 else if(
process.compare(
"anti_neutronInelastic") == 0)
return 21;
392 else if(
process.compare(
"anti_lambdaInelastic") == 0)
return 22;
393 else if(
process.compare(
"anti_omega-Inelastic") == 0)
return 23;
394 else if(
process.compare(
"anti_sigma+Inelastic") == 0)
return 24;
395 else if(
process.compare(
"anti_sigma-Inelastic") == 0)
return 25;
396 else if(
process.compare(
"anti_xi-Inelastic") == 0)
return 26;
397 else if(
process.compare(
"anti_xi0Inelastic") == 0)
return 27;
399 else if(
process.compare(
"Decay") == 0)
return 30;
400 else if(
process.compare(
"FastScintillation") == 0)
return 31;
401 else if(
process.compare(
"nKiller") == 0)
return 32;
402 else if(
process.compare(
"nCapture") == 0)
return 33;
404 else if(
process.compare(
"compt") == 0)
return 40;
405 else if(
process.compare(
"rayleigh") == 0)
return 41;
406 else if(
process.compare(
"phot") == 0)
return 42;
407 else if(
process.compare(
"conv") == 0)
return 43;
408 else if(
process.compare(
"CoupledTransportation") == 0)
return 44;
unsigned short cvn::AssignLabels::GetProtoDUNEBeamInteractionType |
( |
const simb::MCParticle & |
particle | ) |
const |
Definition at line 320 of file AssignLabels.cxx.
329 baseProcess =
static_cast<unsigned int>(
GetProcessKey(processName));
332 std::cout <<
"What interaction type, then? " << processName <<
std::endl;
337 unsigned int nPi0 = 0;
338 unsigned int nPiM = 0;
339 unsigned int nPiP = 0;
340 unsigned int nNeu = 0;
341 unsigned int nPro = 0;
342 unsigned int nOth = 0;
347 case 111 : ++nPi0;
break;
348 case -211 : ++nPiM;
break;
349 case 211 : ++nPiP;
break;
350 case 2112 : ++nNeu;
break;
351 case 2212 : ++nPro;
break;
352 default : ++nOth;
break;
356 std::cout <<
"Base process = " << baseProcess <<
std::endl;
357 std::cout <<
"Daughters = " << nPi0 <<
" pi0s, " << nPiM <<
" pi-s, " 358 << nPiP <<
" pi+s, " << nNeu <<
" neutrons, " 359 << nPro <<
" protons and " << nOth <<
" other particles." <<
std::endl;
362 if(
abs(particle.
PdgCode()) == 211 && nPi0 == 1){
const simb::MCParticle * TrackIdToParticle_P(int id) const
int NumberDaughters() const
int Daughter(const int i) const
std::string EndProcess() const
static int max(int a, int b)
int GetProcessKey(std::string process) const
QTextStream & endl(QTextStream &s)
void cvn::AssignLabels::GetTopology |
( |
const art::Ptr< simb::MCTruth > |
truth, |
|
|
unsigned int |
nTopologyHits = 0 |
|
) |
| |
Definition at line 116 of file AssignLabels.cxx.
142 }
else if (pdg == 13) {
185 if(pdg > 2000000000){
204 if(pdg == 111 || pdg == 2112){
215 if(nSimIDE < nTopologyHits){
223 case 211 : ++
nPion;
break;
const simb::MCNeutrino & GetNeutrino() const
const simb::MCParticle & Nu() const
std::vector< const simb::MCParticle * > MCTruthToParticles_Ps(art::Ptr< simb::MCTruth > const &mct) const
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps(int const &id) const
int NumberDaughters() const
int Daughter(const int i) const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
const simb::MCParticle & GetParticle(int i) const
Event generator information.
def parent(G, child, parent_type)
QTextStream & endl(QTextStream &s)
unsigned short cvn::AssignLabels::GetTopologyType |
( |
| ) |
|
Definition at line 293 of file AssignLabels.cxx.
303 throw std::runtime_error(
"Topology type not recognised!");
unsigned short cvn::AssignLabels::GetTopologyTypeAlt |
( |
| ) |
|
Definition at line 306 of file AssignLabels.cxx.
316 throw std::runtime_error(
"Topology type not recognised!");
bool cvn::AssignLabels::IsAntineutrino |
( |
| ) |
|
void cvn::AssignLabels::PrintTopology |
( |
| ) |
|
Definition at line 266 of file AssignLabels.cxx.
268 std::cout <<
"== Topology Information ==" <<
std::endl;
272 std::cout <<
" - Number of protons (3 means >2) = " <<
nProton <<
std::endl;
274 std::cout <<
" - Number of charged pions (3 means >2) = " <<
nPion <<
std::endl;
276 std::cout <<
" - Number of pizeros (3 means >2) = " <<
nPizero <<
std::endl;
unsigned short GetTopologyType()
unsigned short GetTopologyTypeAlt()
QTextStream & endl(QTextStream &s)
unsigned short cvn::AssignLabels::TauMode |
( |
| ) |
|
|
inline |
unsigned short cvn::AssignLabels::nNeutron |
|
private |
unsigned short cvn::AssignLabels::nPion |
|
private |
unsigned short cvn::AssignLabels::nPizero |
|
private |
unsigned short cvn::AssignLabels::nProton |
|
private |
short cvn::AssignLabels::pdgCode |
|
private |
unsigned short cvn::AssignLabels::tauMode |
|
private |
The documentation for this class was generated from the following files: