00001 #ifndef KDTreeLinkerTrackHcal_h 00002 #define KDTreeLinkerTrackHcal_h 00003 00004 #include "RecoParticleFlow/PFProducer/interface/KDTreeLinkerBase.h" 00005 #include "RecoParticleFlow/PFProducer/interface/KDTreeLinkerTools.h" 00006 #include "RecoParticleFlow/PFProducer/interface/KDTreeLinkerAlgo.h" 00007 00008 00009 // This class is used to find all links between Tracks and HCAL clusters 00010 // using a KDTree algorithm. 00011 // It is used in PFBlockAlgo.cc in the function links(). 00012 class KDTreeLinkerTrackHcal : public KDTreeLinkerBase 00013 { 00014 public: 00015 KDTreeLinkerTrackHcal(); 00016 ~KDTreeLinkerTrackHcal(); 00017 00018 // With this method, we create the list of psCluster that we want to link. 00019 void insertTargetElt(reco::PFBlockElement *track); 00020 00021 // Here, we create the list of hcalCluster that we want to link. From hcalCluster 00022 // and fraction, we will create a second list of rechits that will be used to 00023 // build the KDTree. 00024 void insertFieldClusterElt(reco::PFBlockElement *hcalCluster); 00025 00026 // The KDTree building from rechits list. 00027 void buildTree(); 00028 00029 // Here we will iterate over all tracks. For each track intersection point with HCAL, 00030 // we will search the closest rechits in the KDTree, from rechits we will find the 00031 // hcalClusters and after that we will check the links between the track and 00032 // all closest hcalClusters. 00033 void searchLinks(); 00034 00035 // Here, we will store all PS/HCAL founded links in the PFBlockElement class 00036 // of each psCluster in the PFmultilinks field. 00037 void updatePFBlockEltWithLinks(); 00038 00039 // Here we free all allocated structures. 00040 void clear(); 00041 00042 private: 00043 // Data used by the KDTree algorithm : sets of Tracks and HCAL clusters. 00044 BlockEltSet targetSet_; 00045 BlockEltSet fieldClusterSet_; 00046 00047 // Sets of rechits that compose the HCAL clusters. 00048 RecHitSet rechitsSet_; 00049 00050 // Map of linked Track/HCAL clusters. 00051 BlockElt2BlockEltMap cluster2TargetLinks_; 00052 00053 // Map of the HCAL clusters associated to a rechit. 00054 RecHit2BlockEltMap rechit2ClusterLinks_; 00055 00056 // KD trees 00057 KDTreeLinkerAlgo tree_; 00058 00059 }; 00060 00061 00062 #endif /* !KDTreeLinkerTrackHcal_h */