BOSS
7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
IsGenType.cxx
Go to the documentation of this file.
1
#include <vector>
2
3
#include "
TruthHelper/IsGenType.h
"
4
#include "HepMC/GenParticle.h"
5
using
std::vector;
6
using
std::abs;
7
8
//****************************************************************
9
//* IsGenType *
10
//****************************************************************
11
IsGenType::IsGenType
(
int
ParticleType){
12
m_TypeList.push_back(ParticleType);
13
}
14
IsGenType::IsGenType
(std::vector<int> ParticleTypeList){
15
vector<int>::const_iterator itype = ParticleTypeList.begin();
16
for
(; itype !=ParticleTypeList.end(); ++itype ){
17
m_TypeList.push_back((*itype));
18
}
19
}
20
IsGenType::IsGenType
(
const
IsGenType
& rhs):
GenIMCselector
(),m_TypeList(rhs.m_TypeList){}
21
22
bool
IsGenType::operator()
(
const
Particle
*
const
p )
const
{
23
vector<int>::const_iterator itype = m_TypeList.begin();
24
for
(; itype != m_TypeList.end(); ++itype ){
25
if
(
abs
(p->pdg_id()) == (*itype) )
return
true
;
26
}
27
return
false
;
28
}
29
30
bool
IsGenType::operator()
(
const
Particle
& p )
const
{
31
return
this->
operator()
(&p);
32
}
33
GenIMCselector
*
IsGenType::create
()
const
{
return
new
IsGenType
(*
this
);}
true
#define true
Definition
BesCxxPolicy/BesCxxPolicy-00-02-00/CxxFeatures/config.h:19
abs
#define abs(x)
Definition
Eepipi/Eepipi-00-01-00/src/ee2eepp/basesv5.1/f2c.h:151
Particle
HepMC::GenParticle Particle
Definition
GenIMCselector.h:16
IsGenType.h
GenIMCselector
Definition
GenIMCselector.h:19
IsGenType
Definition
IsGenType.h:18
IsGenType::operator()
virtual bool operator()(const Particle *const p) const
Definition
IsGenType.cxx:22
IsGenType::IsGenType
IsGenType(int ParticleType)
Definition
IsGenType.cxx:11
IsGenType::create
GenIMCselector * create() const
Definition
IsGenType.cxx:33
7.1.2
Generator
GenAnalysisTools
TruthHelper
TruthHelper-00-00-01
src
IsGenType.cxx
Generated by
1.12.0