1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef GenJetParticleSelector_h
#define GenJetParticleSelector_h
/* \class GenJetParticleSelector
*
* \author Luca Lista, INFN
*
* \version $Id: GenJetParticleSelector.h,v 1.1 2008/02/07 14:37:04 llista Exp $
*
*/
#include "SimGeneral/HepPDTRecord/interface/PdtEntry.h"
#include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include <set>
namespace edm {
class ParameterSet;
class EventSetup;
class Event;
class ConsumesCollector;
} // namespace edm
namespace reco {
class Candidate;
}
class GenJetParticleSelector {
public:
GenJetParticleSelector(const edm::ParameterSet&, edm::ConsumesCollector& iC);
bool operator()(const reco::Candidate&);
void init(const edm::EventSetup&);
static void fillPSetDescription(edm::ParameterSetDescription& desc);
private:
typedef std::vector<PdtEntry> vpdt;
bool stableOnly_;
bool partons_;
vpdt pdtList_;
bool bInclude_;
std::set<int> pIds_;
const edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> tableToken_;
};
#include "CommonTools/UtilAlgos/interface/EventSetupInitTrait.h"
namespace reco {
namespace modules {
struct GenJetParticleSelectorEventSetupInit {
static void init(GenJetParticleSelector& selector, const edm::Event& evt, const edm::EventSetup& es) {
selector.init(es);
}
static void fillPSetDescription(edm::ParameterSetDescription& desc) {
GenJetParticleSelector::fillPSetDescription(desc);
}
};
template <>
struct EventSetupInit<GenJetParticleSelectorEventSetupInit> {
typedef GenJetParticleSelectorEventSetupInit type;
};
} // namespace modules
} // namespace reco
#endif
|