ATLAS Offline Software
Functions
AnalysisUtils::Classify Namespace Reference

classify More...

Functions

template<class COLL >
void charge (COLL *coll, std::vector< typename COLL::value_type > &pos, std::vector< typename COLL::value_type > &neg)
 classify by charge More...
 

Detailed Description

classify

Function Documentation

◆ charge()

template<class COLL >
void AnalysisUtils::Classify::charge ( COLL *  coll,
std::vector< typename COLL::value_type > &  pos,
std::vector< typename COLL::value_type > &  neg 
)
inline

classify by charge

Parameters
COLL[in] type of collection
coll[in] pointer to collection
pos[out] collection of positives
neg[out] collection of nagatives

Definition at line 518 of file AnalysisMisc.h.

521  {
522  pos.clear();
523  neg.clear();
524 
525  // classify
526  typename COLL::const_iterator it = coll->begin();
527  typename COLL::const_iterator itE = coll->end();
528  for (; it != itE; ++it)
529  {
530  if ((*it)->pdgId() > 0)
531  pos.push_back(*it);
532  else if ((*it)->pdgId() < 0)
533  neg.push_back(*it);
534  }
535  }
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TruthTest.itE
itE
Definition: TruthTest.py:25
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18