Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:07

0001 #ifndef SimTracker_VertexAssociation_VertexAssociatorByPositionAndTracks_h
0002 #define SimTracker_VertexAssociation_VertexAssociatorByPositionAndTracks_h
0003 
0004 #include "SimDataFormats/Associations/interface/TrackAssociation.h"
0005 #include "SimDataFormats/Associations/interface/VertexToTrackingVertexAssociatorBaseImpl.h"
0006 
0007 /**
0008  * This class associates reco::Vertices and TrackingVertices by their
0009  * position (maximum distance in Z should be smaller than absZ and
0010  * sigmaZ*zError of reco::Vertex), and (optionally) by the fraction of
0011  * tracks shared by reco::Vertex and TrackingVertex divided by the
0012  * number of tracks in reco::Vertex. This fraction is always used as
0013  * the quality in the association, i.e. multiple associations are
0014  * sorted by it in descending order.
0015  */
0016 class VertexAssociatorByPositionAndTracks : public reco::VertexToTrackingVertexAssociatorBaseImpl {
0017 public:
0018   VertexAssociatorByPositionAndTracks(const edm::EDProductGetter *productGetter,
0019                                       double absZ,
0020                                       double sigmaZ,
0021                                       double maxRecoZ,
0022                                       double absT,
0023                                       double sigmaT,
0024                                       double maxRecoT,
0025                                       double sharedTrackFraction,
0026                                       const reco::RecoToSimCollection *trackRecoToSimAssociation,
0027                                       const reco::SimToRecoCollection *trackSimToRecoAssociation);
0028 
0029   VertexAssociatorByPositionAndTracks(const edm::EDProductGetter *productGetter,
0030                                       double absZ,
0031                                       double sigmaZ,
0032                                       double maxRecoZ,
0033                                       double sharedTrackFraction,
0034                                       const reco::RecoToSimCollection *trackRecoToSimAssociation,
0035                                       const reco::SimToRecoCollection *trackSimToRecoAssociation);
0036 
0037   ~VertexAssociatorByPositionAndTracks() override;
0038 
0039   /* Associate TrackingVertex to RecoVertex By Hits */
0040   reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle<edm::View<reco::Vertex>> &vCH,
0041                                                      const edm::Handle<TrackingVertexCollection> &tVCH) const override;
0042 
0043   reco::VertexSimToRecoCollection associateSimToReco(const edm::Handle<edm::View<reco::Vertex>> &vCH,
0044                                                      const edm::Handle<TrackingVertexCollection> &tVCH) const override;
0045 
0046 private:
0047   // ----- member data
0048   const edm::EDProductGetter *productGetter_;
0049 
0050   const double absZ_;
0051   const double sigmaZ_;
0052   const double maxRecoZ_;
0053   const double absT_;
0054   const double sigmaT_;
0055   const double maxRecoT_;
0056   const double sharedTrackFraction_;
0057 
0058   const reco::RecoToSimCollection *trackRecoToSimAssociation_;
0059   const reco::SimToRecoCollection *trackSimToRecoAssociation_;
0060 };
0061 
0062 #endif