RecoParticleFlow
PFProducer
plugins
importers
ConversionTrackImporter.cc
Go to the documentation of this file.
1
#include "
TrackFromParentImporter.h
"
2
#include "
DataFormats/ParticleFlowReco/interface/PFConversion.h
"
3
4
namespace
{
5
class
ConversionAdaptor {
6
public
:
7
static
bool
check_importable(
const
reco::PFConversionCollection::value_type
&
t
) {
8
return
(
t
.pfTracks().size() >= 2);
9
}
10
static
const
std::vector<reco::PFRecTrackRef>& get_track_refs(
const
reco::PFConversionCollection::value_type
&
t
) {
11
return
t
.pfTracks();
12
}
13
static
void
set_element_info(
reco::PFBlockElement
* elem,
const
edm::Ref<reco::PFConversionCollection>
& parref) {
14
elem->
setConversionRef
(parref->originalConversion(),
reco::PFBlockElement::T_FROM_GAMMACONV
);
15
}
16
};
17
}
// namespace
18
19
typedef
pflow::importers::TrackFromParentImporter<reco::PFConversionCollection, ConversionAdaptor>
20
ConversionTrackImporter
;
21
22
DEFINE_EDM_PLUGIN
(
BlockElementImporterFactory
,
ConversionTrackImporter
,
"ConversionTrackImporter"
);
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition:
PFBlockElement.h:26
pflow::importers::TrackFromParentImporter
Definition:
TrackFromParentImporter.h:27
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:651
edm::Ref
Definition:
AssociativeIterator.h:58
TrackFromParentImporter.h
reco::PFBlockElement::T_FROM_GAMMACONV
Definition:
PFBlockElement.h:47
ConversionTrackImporter
pflow::importers::TrackFromParentImporter< reco::PFConversionCollection, ConversionAdaptor > ConversionTrackImporter
Definition:
ConversionTrackImporter.cc:20
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
reco::PFBlockElement::setConversionRef
virtual void setConversionRef(const ConversionRef &convRef, TrackType trType)
Definition:
PFBlockElement.h:99
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:123
PFConversion.h
Generated for CMSSW Reference Manual by
1.8.14