Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-29 23:13:10

0001 #ifndef SimDataFormats_Associations_TracksterToSimTracksterHitLCAssociatorBaseImpl_h
0002 #define SimDataFormats_Associations_TracksterToSimTracksterHitLCAssociatorBaseImpl_h
0003 
0004 #include "DataFormats/Common/interface/Handle.h"
0005 #include "DataFormats/Common/interface/AssociationMap.h"
0006 #include "DataFormats/HGCalReco/interface/Trackster.h"
0007 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
0008 
0009 #include "SimDataFormats/CaloAnalysis/interface/SimCluster.h"
0010 typedef std::vector<SimCluster> SimClusterCollection;
0011 #include "SimDataFormats/CaloAnalysis/interface/CaloParticleFwd.h"
0012 
0013 namespace ticl {
0014 
0015   enum validationType { Linking = 0, PatternRecognition, PatternRecognition_CP };
0016 
0017   typedef std::vector<std::vector<std::pair<float, float>>> sharedEnergyAndScore_t;
0018   // This is used to save the simTracksterOnLayer structure for all simTracksters.
0019   // It is not exactly what is returned outside, but out of its entries, the output object is build.
0020   typedef std::tuple<sharedEnergyAndScore_t, sharedEnergyAndScore_t> association_t;
0021 
0022   typedef edm::AssociationMap<
0023       edm::OneToManyWithQualityGeneric<ticl::TracksterCollection, ticl::TracksterCollection, std::pair<float, float>>>
0024       SimToRecoCollectionSimTracksters;
0025   typedef SimToRecoCollectionSimTracksters RecoToSimCollectionSimTracksters;
0026 
0027   class TracksterToSimTracksterHitLCAssociatorBaseImpl {
0028   public:
0029     /// Constructor
0030     TracksterToSimTracksterHitLCAssociatorBaseImpl();
0031     /// Destructor
0032     virtual ~TracksterToSimTracksterHitLCAssociatorBaseImpl();
0033 
0034     ticl::association_t makeConnections(const edm::Handle<ticl::TracksterCollection> &tCH,
0035                                         const edm::Handle<reco::CaloClusterCollection> &lCCH,
0036                                         const edm::Handle<SimClusterCollection> &sCCH,
0037                                         const edm::Handle<CaloParticleCollection> &cPCH,
0038                                         const edm::Handle<ticl::TracksterCollection> &sTCH) const;
0039 
0040     /// Associate a Trackster to SimClusters
0041     virtual ticl::RecoToSimCollectionSimTracksters associateRecoToSim(
0042         const edm::Handle<ticl::TracksterCollection> &tCH,
0043         const edm::Handle<reco::CaloClusterCollection> &lCCH,
0044         const edm::Handle<SimClusterCollection> &sCCH,
0045         const edm::Handle<CaloParticleCollection> &cPCH,
0046         const edm::Handle<ticl::TracksterCollection> &sTCH) const;
0047 
0048     /// Associate a SimCluster to Tracksters
0049     virtual ticl::SimToRecoCollectionSimTracksters associateSimToReco(
0050         const edm::Handle<ticl::TracksterCollection> &tCH,
0051         const edm::Handle<reco::CaloClusterCollection> &lCCH,
0052         const edm::Handle<SimClusterCollection> &sCCH,
0053         const edm::Handle<CaloParticleCollection> &cPCH,
0054         const edm::Handle<ticl::TracksterCollection> &sTCH) const;
0055   };
0056 }  // namespace ticl
0057 
0058 #endif