30 int hDpdg0 =0 , hDpdg1 =0;
37 for(
int i=0 ; i<nP ; ++i){
40 if( mcp->getGeneratorStatus() == 3 ){
42 hf_vec = mcp->getDaughters();
46 if( mcp->getParents().empty() ){
55 if (n_parentless > 2) {
59 for(
int i=0 ; i<n_parentless ; ++i){
66 else if (n_parentless == 2) {
71 for(
unsigned i=0 ; i<daughter_vec.size() ; ++i){
72 auto* dmcp = daughter_vec[i] ;
74 if (dmcp->getDaughters().size() > 1) {
77 hf_vec = dmcp->getDaughters();
88 if(icase == 0 || hf_vec.
empty() ) {
97 for(
unsigned i=0 ; i<hf_vec.
size() ; ++i){
99 auto* mcp = hf_vec[i] ;
101 int pdg = std::abs( mcp->getPDG() ) ;
102 pdgFSCount[ pdg ]++ ;
107 while (mcp->getDaughters().size() == 1 && std::abs( mcp->getDaughters()[0]->getPDG() ) == 25) {
110 mcp = mcp->getDaughters()[0] ;
113 hDpdg0 = mcp->getDaughters()[0]->getPDG() ;
114 if( mcp->getDaughters().size() > 1 )
115 hDpdg1 = mcp->getDaughters()[1]->getPDG() ;
122 pdgFSCount[ 22 ] -= 2 ;
130 for(
auto m : pdgFSCount ){
135 if( m.second > 1000000 )
141 if(higgs !=
nullptr){
143 if( std::abs( hDpdg0 ) == std::abs( hDpdg1 ) )
146 if( hDpdg0 == 22 && hDpdg1 == 23 )
149 if( hDpdg0 == 23 && hDpdg1 == 22 )
152 if( (std::abs( hDpdg0 ) > 1000000 ) || (std::abs( hDpdg1 ) > 1000000 ) )
void add(PF bit)
add an individual bit
bool addHiggsDecay(int pdg)
add the bit for the Higgs decaying to a particles with given PDG code - false if not known ...
virtual LCObject * getElementAt(int index) const =0
Returns pointer to element at index - no range check, use getNumberOfEntries().
ProcessFlag decodeMCTruthProcess(const EVENT::LCCollection *mcps, int maxParticle=10)
Helper function that decodes the MC truth process from an LCCollection with MCParticles.
exotic process (SUSY etc)
The LCIO Monte Carlo particle.
bool addFSParticles(int pdg)
add the bit for the final state particles with given PDG code - false if not known ...
virtual int getNumberOfElements() const =0
Returns the number of elements in the collection.
The generic collection used in LCIO.
Helper class for defining the generated Monte Carlo physics process.
virtual const MCParticleVec & getDaughters() const =0
Returns the daughters of this particle.