Main Page
Namespaces
Classes
Package Documentation
RecoParticleFlow
PFProducer
plugins
importers
LooseNuclearInteractionTrackImporter.cc
Go to the documentation of this file.
1
#include "
TrackFromParentImporter.h
"
2
#include "
DataFormats/ParticleFlowReco/interface/PFDisplacedTrackerVertex.h
"
3
4
namespace
{
5
class
LooseNuclAdaptor {
6
public
:
7
static
bool
check_importable(
const
reco::PFDisplacedTrackerVertexCollection::value_type
&
t
) {
8
const
auto
&
vtx
= t.displacedVertexRef();
9
return
( (
vtx
->isNucl() &&
vtx
->position().rho() > 2.7 ) ||
10
(
vtx
->isNucl_Loose() ));
11
}
12
static
const
reco::PFRecTrackRefVector
&
13
get_track_refs(
const
reco::PFDisplacedTrackerVertexCollection::value_type
& t) {
14
return
t.pfRecTracks();
15
}
16
static
void
set_element_info(
reco::PFBlockElement
*
elem
,
17
const
edm::Ref<reco::PFDisplacedTrackerVertexCollection>
& parref) {
18
const
reco::PFBlockElementTrack
*tkelem =
19
static_cast<
const
reco::PFBlockElementTrack
*
>
(
elem
);
20
const
reco::PFRecTrackRef
& reftrack = tkelem->
trackRefPF
();
21
reco::PFBlockElement::TrackType
tkType =
reco::PFBlockElement::DEFAULT
;
22
if
(parref->isIncomingTrack(reftrack))
23
tkType =
reco::PFBlockElement::T_TO_DISP
;
24
else
if
(parref->isOutgoingTrack(reftrack))
25
tkType =
reco::PFBlockElement::T_FROM_DISP
;
26
elem->
setDisplacedVertexRef
(parref,tkType);
27
}
28
};
29
}
30
31
typedef
pflow::importers::TrackFromParentImporter<reco::PFDisplacedTrackerVertexCollection,LooseNuclAdaptor>
LooseNuclearInteractionTrackImporter
;
32
33
DEFINE_EDM_PLUGIN
(
BlockElementImporterFactory
,
34
LooseNuclearInteractionTrackImporter,
35
"LooseNuclearInteractionTrackImporter"
);
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition:
PFBlockElement.h:28
pflow::importers::TrackFromParentImporter
Definition:
TrackFromParentImporter.h:31
edm::Ref
Definition:
AssociativeIterator.h:51
reco::PFBlockElement::TrackType
TrackType
Definition:
PFBlockElement.h:50
TrackFromParentImporter.h
LooseNuclearInteractionTrackImporter
pflow::importers::TrackFromParentImporter< reco::PFDisplacedTrackerVertexCollection, LooseNuclAdaptor > LooseNuclearInteractionTrackImporter
Definition:
LooseNuclearInteractionTrackImporter.cc:31
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
PFDisplacedTrackerVertex.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:32
reco::PFBlockElement::T_TO_DISP
Definition:
PFBlockElement.h:53
reco::PFBlockElement::setDisplacedVertexRef
virtual void setDisplacedVertexRef(const PFDisplacedTrackerVertexRef &niref, TrackType trType)
Definition:
PFBlockElement.h:111
HTMLExport.elem
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition:
HTMLExport.py:18
edm::RefVector< PFRecTrackCollection >
reco::PFBlockElementTrack::trackRefPF
const PFRecTrackRef & trackRefPF() const override
Definition:
PFBlockElementTrack.h:54
reco::PFBlockElement::T_FROM_DISP
Definition:
PFBlockElement.h:52
lumiQTWidget.t
t
Definition:
lumiQTWidget.py:50
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:102
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition:
badGlobalMuonTaggersAOD_cff.py:5
reco::PFBlockElement::DEFAULT
Definition:
PFBlockElement.h:51
reco::PFBlockElementTrack
Track Element.
Definition:
PFBlockElementTrack.h:17
Generated for CMSSW Reference Manual by
1.8.11