CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoParticleFlow/PFProducer/interface/KDTreeLinkerTrackEcal.h

Go to the documentation of this file.
00001 #ifndef KDTreeLinkerTrackEcal_h
00002 #define KDTreeLinkerTrackEcal_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 ECAL clusters
00010 // using a KDTree algorithm.
00011 // It is used in PFBlockAlgo.cc in the function links().
00012 class KDTreeLinkerTrackEcal : public KDTreeLinkerBase
00013 {
00014  public:
00015   KDTreeLinkerTrackEcal();
00016   ~KDTreeLinkerTrackEcal();
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 ecalCluster that we want to link. From ecalCluster
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       *ecalCluster);  
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 ECAL, 
00030   // we will search the closest rechits in the KDTree, from rechits we will find the 
00031   // ecalClusters and after that we will check the links between the track and 
00032   // all closest ecalClusters.  
00033   void searchLinks();
00034     
00035   // Here, we will store all PS/ECAL 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 ECAL clusters.
00044   BlockEltSet           targetSet_;
00045   BlockEltSet           fieldClusterSet_;
00046 
00047   // Sets of rechits that compose the ECAL clusters. 
00048   RecHitSet             rechitsSet_;
00049   
00050   // Map of linked Track/ECAL clusters.
00051   BlockElt2BlockEltMap  target2ClusterLinks_;
00052 
00053   // Map of the ECAL clusters associated to a rechit.
00054   RecHit2BlockEltMap    rechit2ClusterLinks_;
00055     
00056   // KD trees
00057   KDTreeLinkerAlgo      tree_;
00058 
00059 };
00060 
00061 
00062 #endif /* !KDTreeLinkerTrackEcal_h */