ant
A2 ant: class-based analysis framework
ant::analysis::utils::ParticleTools Struct Reference

#include <ParticleTools.h>

Static Public Member Functions

static std::string GetPlutoProduction (const ParticleTypeTree &particletypetree)
 GetPlutoProduction builds Pluto-compatible string of produced particles. More...
 
static std::string GetDecayString (const TParticleTree_t &particletree, bool usePrintName=true)
 Construct a string describing the particle dacay tree using the particle::PrintName()s. More...
 
static std::string GetDecayString (const ParticleTypeTree &particletypetree, bool usePrintName=true)
 
static std::string SanitizeDecayString (std::string decaystring)
 SanitizeDecayString replaces all special characters by _. More...
 
static std::string GetProductionChannelString (const TParticleTree_t &particletree)
 Construct a string describing the production channel (e.g. gamma p -> p pi0 for pion production) More...
 
static ParticleTypeTree GetProducedParticle (const ParticleTypeTree &particletypetree)
 
static const TParticlePtr FindParticle (const ParticleTypeDatabase::Type &type, const TParticleList &particles)
 Find the first Particle of given type in particle list. More...
 
static const TParticlePtr FindParticle (const ParticleTypeDatabase::Type &type, const TParticleTree_t &particletree, size_t maxlevel=std::numeric_limits< size_t >::max())
 
static const TParticleList FindParticles (const ParticleTypeDatabase::Type &type, const TParticleTree_t &particletree, size_t maxlevel=std::numeric_limits< size_t >::max())
 
template<typename T >
static void FillIMCombinations (TH1 *h, unsigned n, const std::vector< T > &particles, double weight=1.0)
 FillIMCombinations loops over all n tuples of given particle types, builds sum and fills invariant mass. More...
 
template<typename T >
static void FillIMCombinations (std::function< void(double)> filler, unsigned n, const std::vector< T > &particles)
 
template<typename T >
static void FillIMCombinations (std::vector< double >::iterator it, unsigned n, const std::vector< T > &particles)
 
static bool SortParticleByName (const TParticlePtr &a, const TParticlePtr &b)
 
static bool MatchByParticleName (const TParticlePtr &a, const ParticleTypeDatabase::Type &b)
 
static bool TryFindParticleDatabaseChannel (const TParticleTree_t &ptree, ParticleTypeTreeDatabase::Channel &channel)
 

Member Function Documentation

◆ FillIMCombinations() [1/3]

template<typename T >
static void ant::analysis::utils::ParticleTools::FillIMCombinations ( TH1 *  h,
unsigned  n,
const std::vector< T > &  particles,
double  weight = 1.0 
)
inlinestatic

FillIMCombinations loops over all n tuples of given particle types, builds sum and fills invariant mass.

Parameters
hhistogram to be filled with Fill(invariant mass)
nmultiplicity or number of particles drawn from particles
particleslist of particle types

◆ FillIMCombinations() [2/3]

template<typename T >
static void ant::analysis::utils::ParticleTools::FillIMCombinations ( std::function< void(double)>  filler,
unsigned  n,
const std::vector< T > &  particles 
)
inlinestatic

◆ FillIMCombinations() [3/3]

template<typename T >
static void ant::analysis::utils::ParticleTools::FillIMCombinations ( std::vector< double >::iterator  it,
unsigned  n,
const std::vector< T > &  particles 
)
inlinestatic

◆ FindParticle() [1/2]

const TParticlePtr ParticleTools::FindParticle ( const ParticleTypeDatabase::Type type,
const TParticleList particles 
)
static

Find the first Particle of given type in particle list.

Parameters
typeType to search for
particlesList to search in
Returns
The Particle found

◆ FindParticle() [2/2]

const TParticlePtr ParticleTools::FindParticle ( const ParticleTypeDatabase::Type type,
const TParticleTree_t particletree,
size_t  maxlevel = std::numeric_limits<size_t>::max() 
)
static

◆ FindParticles()

const TParticleList ParticleTools::FindParticles ( const ParticleTypeDatabase::Type type,
const TParticleTree_t particletree,
size_t  maxlevel = std::numeric_limits<size_t>::max() 
)
static

◆ GetDecayString() [1/2]

string ParticleTools::GetDecayString ( const TParticleTree_t particletree,
bool  usePrintName = true 
)
static

Construct a string describing the particle dacay tree using the particle::PrintName()s.

Parameters
particles
Returns

◆ GetDecayString() [2/2]

string ParticleTools::GetDecayString ( const ParticleTypeTree particletypetree,
bool  usePrintName = true 
)
static

◆ GetPlutoProduction()

string ParticleTools::GetPlutoProduction ( const ParticleTypeTree particletypetree)
static

GetPlutoProduction builds Pluto-compatible string of produced particles.

Parameters
particletypetree
Returns
representation suitable for Pluto's PReaction

◆ GetProducedParticle()

ParticleTypeTree ParticleTools::GetProducedParticle ( const ParticleTypeTree particletypetree)
static

◆ GetProductionChannelString()

string ParticleTools::GetProductionChannelString ( const TParticleTree_t particletree)
static

Construct a string describing the production channel (e.g. gamma p -> p pi0 for pion production)

Parameters
particle
Returns

◆ MatchByParticleName()

bool ParticleTools::MatchByParticleName ( const TParticlePtr a,
const ParticleTypeDatabase::Type b 
)
static

◆ SanitizeDecayString()

string ParticleTools::SanitizeDecayString ( std::string  decaystring)
static

SanitizeDecayString replaces all special characters by _.

Parameters
decaystringinput decaystring
Returns
string suitable to be used as histogram name prefix

◆ SortParticleByName()

bool ParticleTools::SortParticleByName ( const TParticlePtr a,
const TParticlePtr b 
)
static

◆ TryFindParticleDatabaseChannel()

bool ParticleTools::TryFindParticleDatabaseChannel ( const TParticleTree_t ptree,
ParticleTypeTreeDatabase::Channel channel 
)
static

The documentation for this struct was generated from the following files: