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"
);
pflow::importers::TrackFromParentImporter
Definition:
TrackFromParentImporter.h:25
TrackFromParentImporter.h
reco::PFBlockElement::setConversionRef
virtual void setConversionRef(const ConversionRef &convRef, TrackType trType)
Definition:
PFBlockElement.h:99
edm::Ref
Definition:
AssociativeIterator.h:58
PFConversion.h
OrderedSet.t
t
Definition:
OrderedSet.py:90
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
reco::PFBlockElement::T_FROM_GAMMACONV
Definition:
PFBlockElement.h:47
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition:
PFBlockElement.h:26
ConversionTrackImporter
pflow::importers::TrackFromParentImporter< reco::PFConversionCollection, ConversionAdaptor > ConversionTrackImporter
Definition:
ConversionTrackImporter.cc:20
Generated for CMSSW Reference Manual by
1.8.16