17 #include "fastjet/contrib/SoftKiller.hh" 30 std::unique_ptr<reco::PFCandidateCollection> &
pfcands);
32 std::unique_ptr<reco::PFCandidateCollection> &
pfcands);
45 std::vector<float>
dz_;
61 : input_scoutingparticle_token_(consumes(iConfig.getParameter<
edm::
InputTag>(
"scoutingparticle"))),
63 use_softKiller_(iConfig.getParameter<
bool>(
"softKiller")),
64 use_CHS_(iConfig.getParameter<
bool>(
"CHS")) {
66 produces<reco::PFCandidateCollection>();
67 produces<edm::ValueMap<int>>(
"vertexIndex");
68 produces<edm::ValueMap<float>>(
"normchi2");
69 produces<edm::ValueMap<float>>(
"dz");
70 produces<edm::ValueMap<float>>(
"dxy");
71 produces<edm::ValueMap<float>>(
"dzsig");
72 produces<edm::ValueMap<float>>(
"dxysig");
73 produces<edm::ValueMap<int>>(
"lostInnerHits");
74 produces<edm::ValueMap<int>>(
"quality");
75 produces<edm::ValueMap<float>>(
"trkPt");
76 produces<edm::ValueMap<float>>(
"trkEta");
77 produces<edm::ValueMap<float>>(
"trkPhi");
89 if (
m < -90
or q < -90) {
90 LogDebug(
"createPFCand") <<
"<Run3ScoutingParticleToRecoPFCandidateProducer::createPFCand>:" << std::endl
91 <<
"Unrecognisable pdgId - skipping particle" << std::endl;
124 edm::Handle<std::vector<Run3ScoutingParticle>> scoutingparticleHandle,
125 std::unique_ptr<reco::PFCandidateCollection> &
pfcands) {
126 for (
unsigned int icand = 0; icand < scoutingparticleHandle->size(); ++icand) {
139 edm::Handle<std::vector<Run3ScoutingParticle>> scoutingparticleHandle,
140 std::unique_ptr<reco::PFCandidateCollection> &
pfcands) {
141 std::vector<fastjet::PseudoJet> fj;
143 for (
auto iter = scoutingparticleHandle->begin(),
144 ibegin = scoutingparticleHandle->begin(),
145 iend = scoutingparticleHandle->end();
152 LogDebug(
"createPFCandidatesSK") <<
"<Run3ScoutingParticleToRecoPFCandidateProducer::createPFCandidatesSK>:" 154 <<
"Unrecognisable pdgId - skipping particle" << std::endl;
158 fj.push_back(fastjet::PseudoJet(p4.px(), p4.py(), p4.pz(), p4.energy()));
159 fj.back().set_user_index(iter - ibegin);
162 fastjet::contrib::SoftKiller soft_killer(5, 0.4);
163 std::vector<fastjet::PseudoJet> soft_killed_particles = soft_killer(fj);
165 for (
auto &particle : soft_killed_particles) {
183 auto pfcands = std::make_unique<reco::PFCandidateCollection>();
196 filler_vertexIndex.
fill();
202 filler_normchi2.
fill();
226 filler_dxysig.
fill();
232 filler_lostInnerHits.
fill();
238 filler_quality.
fill();
250 filler_trkEta.
fill();
256 filler_trkPhi.
fill();
280 desc.add<
bool>(
"softKiller",
false);
281 desc.add<
bool>(
"CHS",
false);
std::vector< float > trkPhi_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void beginStream(edm::StreamID) override
~Run3ScoutingParticleToRecoPFCandidateProducer() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HepPDT::ParticleDataTable ParticleDataTable
void createPFCandidates(edm::Handle< std::vector< Run3ScoutingParticle >> scoutingparticleHandle, std::unique_ptr< reco::PFCandidateCollection > &pfcands)
void createPFCandidatesSK(edm::Handle< std::vector< Run3ScoutingParticle >> scoutingparticleHandle, std::unique_ptr< reco::PFCandidateCollection > &pfcands)
Sin< T >::type sin(const T &t)
void insert(const H &h, I begin, I end)
std::vector< int8_t > vertexIndex_
void endStream() override
reco::PFCandidate createPFCand(Run3ScoutingParticle scoutingparticle)
std::vector< float > trkEta_
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
std::vector< float > dzsig_
std::vector< float > dxy_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Cos< T >::type cos(const T &t)
std::vector< int > lostInnerHits_
#define DEFINE_FWK_MODULE(type)
const HepPDT::ParticleDataTable * pdTable_
const edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > particletable_token_
Run3ScoutingParticleToRecoPFCandidateProducer(const edm::ParameterSet &)
std::vector< float > normchi2_
const edm::EDGetTokenT< std::vector< Run3ScoutingParticle > > input_scoutingparticle_token_
Particle reconstructed by the particle flow algorithm.
std::vector< float > trkPt_
std::vector< float > dxysig_
std::vector< int > quality_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void produce(edm::Event &iEvent, edm::EventSetup const &setup) override