10 double sharedTrackFraction,
13 productGetter_(productGetter),
17 sharedTrackFraction_(sharedTrackFraction),
18 trackRecoToSimAssociation_(trackRecoToSimAssociation),
19 trackSimToRecoAssociation_(trackSimToRecoAssociation)
31 LogDebug(
"VertexAssociation") <<
"VertexAssociatorByPositionAndTracks::associateRecoToSim(): associating "
32 << recoVertices.
size() <<
" reco::Vertices to" << simVertices.size() <<
" TrackingVertices";
34 for(
size_t iReco=0; iReco != recoVertices.
size(); ++iReco) {
41 LogTrace(
"VertexAssociation") <<
" reco::Vertex at Z " << recoVertex.
z();
43 int current_event = -1;
44 for(
size_t iSim=0; iSim != simVertices.size(); ++iSim) {
57 LogTrace(
"VertexAssociation") <<
" Considering TrackingVertex at Z " << simVertex.
position().z();
64 LogTrace(
"VertexAssociation") <<
" Matched with significance " << zdiff/recoVertex.
zError()
65 <<
" shared tracks " << sharedTracks <<
" reco Tracks " << recoVertex.
tracksSize() <<
" TrackingParticles " << simVertex.
nDaughterTracks();
75 LogDebug(
"VertexAssociation") <<
"VertexAssociatorByPositionAndTracks::associateRecoToSim(): finished";
87 LogDebug(
"VertexAssociation") <<
"VertexAssociatorByPositionAndTracks::associateSimToReco(): associating "
88 << simVertices.size() <<
" TrackingVertices to " << recoVertices.
size() <<
" reco::Vertices";
90 int current_event = -1;
91 for(
size_t iSim=0; iSim != simVertices.size(); ++iSim) {
104 LogTrace(
"VertexAssociation") <<
" TrackingVertex at Z " << simVertex.
position().z();
106 for(
size_t iReco=0; iReco != recoVertices.
size(); ++iReco) {
113 LogTrace(
"VertexAssociation") <<
" Considering reco::Vertex at Z " << recoVertex.
z();
120 LogTrace(
"VertexAssociation") <<
" Matched with significance " << zdiff/recoVertex.
zError()
121 <<
" shared tracks " << sharedTracks <<
" reco Tracks " << recoVertex.
tracksSize() <<
" TrackingParticles " << simVertex.
nDaughterTracks();
131 LogDebug(
"VertexAssociation") <<
"VertexAssociatorByPositionAndTracks::associateSimToReco(): finished";
int event() const
get the contents of the subdetector field (should be protected?)
double zError() const
error on z
bool isValid() const
Tells whether the vertex is valid.
const reco::RecoToSimCollection * trackRecoToSimAssociation_
const edm::EDProductGetter * productGetter_
EDProductGetter const * productGetter(std::atomic< void const * > const &iCache)
virtual reco::VertexSimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Vertex > > &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
compare reco to sim the handle of reco::Vertex and TrackingVertex collections
VertexAssociatorByPositionAndTracks(const edm::EDProductGetter *productGetter, double absZ, double sigmaZ, double maxRecoZ, double sharedTrackFraction, const reco::RecoToSimCollection *trackRecoToSimAssociation, const reco::SimToRecoCollection *trackSimToRecoAssociation)
void post_insert()
post insert action
int bunchCrossing() const
get the detector field from this detid
Abs< T >::type abs(const T &t)
double z() const
y coordinate
const double sharedTrackFraction_
virtual reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Vertex > > &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
compare reco to sim the handle of reco::Vertex and TrackingVertex collections
edm::Ref< TrackingVertexCollection > TrackingVertexRef
unsigned int nDaughterTracks() const
void insert(const key_type &k, const data_type &v)
insert an association
std::vector< TrackingVertex > TrackingVertexCollection
const EncodedEventId & eventId() const
virtual ~VertexAssociatorByPositionAndTracks()
unsigned int calculateVertexSharedTracks(const reco::Vertex &recoV, const TrackingVertex &simV, const reco::RecoToSimCollection &trackRecoToSimAssociation)
const reco::SimToRecoCollection * trackSimToRecoAssociation_
size_t tracksSize() const
number of tracks
const LorentzVector & position() const