Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimTracker
TrackHistory
plugins
JetVetoedTracksAssociatorAtVertex.cc
Go to the documentation of this file.
1
// \class JetVetoedTracksAssociatorAtVertex JetTracksAssociatorAtVertex.cc
2
//
3
// Original Author: Andrea Rizzi
4
// Created: Wed Apr 12 11:12:49 CEST 2006
5
// Accommodated for Jet Package by: Fedor Ratnikov Jul. 30, 2007
6
// $Id: JetVetoedTracksAssociatorAtVertex.cc,v 1.4 2010/02/20 21:02:06 wmtan Exp $
7
//
8
//
9
10
#include "
DataFormats/Common/interface/EDProductfwd.h
"
11
#include "
DataFormats/Common/interface/View.h
"
12
#include "
DataFormats/JetReco/interface/Jet.h
"
13
#include "
DataFormats/TrackReco/interface/Track.h
"
14
#include "
DataFormats/JetReco/interface/JetTracksAssociation.h
"
15
16
#include "
FWCore/Framework/interface/Event.h
"
17
#include "
FWCore/Framework/interface/EDProducer.h
"
18
#include "
FWCore/Framework/interface/MakerMacros.h
"
19
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
20
#include "
FWCore/Utilities/interface/InputTag.h
"
21
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
22
23
#include "
SimTracker/TrackHistory/interface/JetVetoedTracksAssociatorDRVertex.h
"
24
25
class
JetVetoedTracksAssociatorAtVertex
:
public
edm::EDProducer
26
{
27
public
:
28
JetVetoedTracksAssociatorAtVertex
(
const
edm::ParameterSet
&);
29
virtual
~JetVetoedTracksAssociatorAtVertex
();
30
virtual
void
produce
(
edm::Event
&,
const
edm::EventSetup
&);
31
private
:
32
edm::InputTag
mJets
;
33
edm::InputTag
mTracks
;
34
JetVetoedTracksAssociationDRVertex
mAssociator
;
35
TrackClassifier
classifier
;
36
};
37
38
JetVetoedTracksAssociatorAtVertex::JetVetoedTracksAssociatorAtVertex
(
const
edm::ParameterSet
& fConfig)
39
: mJets (fConfig.getParameter<edm::InputTag> (
"jets"
)),
40
mTracks (fConfig.getParameter<edm::InputTag> (
"tracks"
)),
41
mAssociator (fConfig.getParameter<double> (
"coneSize"
)),
42
classifier(fConfig)
43
{
44
produces<reco::JetTracksAssociation::Container> ();
45
}
46
47
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex
() {}
48
49
void
JetVetoedTracksAssociatorAtVertex::produce
(
edm::Event
& fEvent,
const
edm::EventSetup
& fSetup)
50
{
51
// Gather contextual information for TrackCategories
52
classifier
.
newEvent
(fEvent, fSetup);
53
54
edm::Handle <edm::View <reco::Jet>
> jets_h;
55
fEvent.
getByLabel
(
mJets
, jets_h);
56
edm::Handle <reco::TrackCollection>
tracks_h;
57
fEvent.
getByLabel
(
mTracks
, tracks_h);
58
59
std::auto_ptr<reco::JetTracksAssociation::Container> jetTracks (
new
reco::JetTracksAssociation::Container
(
reco::JetRefBaseProd
(jets_h)));
60
61
// format inputs
62
std::vector <edm::RefToBase<reco::Jet> >
allJets
;
63
allJets.reserve (jets_h->size());
64
for
(
unsigned
i
= 0;
i
< jets_h->size(); ++
i
) allJets.push_back (jets_h->refAt(
i
));
65
std::vector <reco::TrackRef>
allTracks
;
66
allTracks.reserve (tracks_h->size());
67
for
(
unsigned
i
= 0;
i
< tracks_h->size(); ++
i
) allTracks.push_back (
reco::TrackRef
(tracks_h,
i
));
68
// run algo
69
mAssociator
.
produce
(&*jetTracks, allJets, allTracks,
classifier
);
70
// store output
71
fEvent.
put
(jetTracks);
72
}
73
74
DEFINE_FWK_MODULE
(
JetVetoedTracksAssociatorAtVertex
);
75
reco::JetExtendedAssociation::allJets
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
Definition:
JetExtendedAssociation.cc:62
i
int i
Definition:
DBlmapReader.cc:9
MessageLogger.h
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex
virtual ~JetVetoedTracksAssociatorAtVertex()
Definition:
JetVetoedTracksAssociatorAtVertex.cc:47
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
JetVetoedTracksAssociatorAtVertex::produce
virtual void produce(edm::Event &, const edm::EventSetup &)
Definition:
JetVetoedTracksAssociatorAtVertex.cc:49
JetVetoedTracksAssociatorAtVertex::classifier
TrackClassifier classifier
Definition:
JetVetoedTracksAssociatorAtVertex.cc:35
edm::Handle
Definition:
AssociativeIterator.h:48
edm::EDProducer
Definition:
EDProducer.h:21
ParameterSet.h
JetVetoedTracksAssociatorAtVertex
Definition:
JetVetoedTracksAssociatorAtVertex.cc:25
edm::RefToBaseProd
Definition:
RefToBase.h:62
JetVetoedTracksAssociatorDRVertex.h
edm::Event::put
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition:
Event.h:85
View.h
edm::EventSetup
Definition:
EventSetup.h:44
Jet.h
TrackClassifier::newEvent
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
Definition:
TrackClassifier.cc:39
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:356
JetVetoedTracksAssociationDRVertex
Definition:
JetVetoedTracksAssociatorDRVertex.h:13
EDProducer.h
TrackClassifier
Get track history and classify it in function of their .
Definition:
TrackClassifier.h:26
edm::AssociationVector
Definition:
AssociationVector.h:58
JetVetoedTracksAssociatorAtVertex::mTracks
edm::InputTag mTracks
Definition:
JetVetoedTracksAssociatorAtVertex.cc:33
EDProductfwd.h
muonTagProbeFilters_cff.allTracks
tuple allTracks
Definition:
muonTagProbeFilters_cff.py:22
JetVetoedTracksAssociatorAtVertex::mJets
edm::InputTag mJets
Definition:
JetVetoedTracksAssociatorAtVertex.cc:32
edm::InputTag
Definition:
InputTag.h:12
JetVetoedTracksAssociationDRVertex::produce
void produce(reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet > > &fJets, const std::vector< reco::TrackRef > &fTracks, TrackClassifier &classifier) const
Definition:
JetVetoedTracksAssociatorDRVertex.cc:8
InputTag.h
JetTracksAssociation.h
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:50
Track.h
JetVetoedTracksAssociatorAtVertex::mAssociator
JetVetoedTracksAssociationDRVertex mAssociator
Definition:
JetVetoedTracksAssociatorAtVertex.cc:34
edm::Ref< TrackCollection >
JetVetoedTracksAssociatorAtVertex::JetVetoedTracksAssociatorAtVertex
JetVetoedTracksAssociatorAtVertex(const edm::ParameterSet &)
Definition:
JetVetoedTracksAssociatorAtVertex.cc:38
Generated for CMSSW Reference Manual by
1.8.5