CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KDTreeLinkerPSEcal.h
Go to the documentation of this file.
1 #ifndef KDTreeLinkerPSEcal_h
2 #define KDTreeLinkerPSEcal_h
3 
7 
8 
9 // This class is used to find all links between PreShower clusters and ECAL clusters
10 // using a KDTree algorithm.
11 // It is used in PFBlockAlgo.cc in the function links().
13 {
14  public:
17 
18  // With this method, we create the list of psCluster that we want to link.
19  void insertTargetElt(reco::PFBlockElement *psCluster);
20 
21  // Here, we create the list of ecalCluster that we want to link. From ecalCluster
22  // and fraction, we will create a second list of rechits that will be used to
23  // build the KDTree.
24  void insertFieldClusterElt(reco::PFBlockElement *ecalCluster);
25 
26  // The KDTree building from rechits list.
27  void buildTree();
28 
29  // Here we will iterate over all psCluster. For each one, we will search the closest
30  // rechits in the KDTree, from rechits we will find the ecalClusters and after that
31  // we will check the links between the psCluster and all closest ecalClusters.
32  void searchLinks();
33 
34  // Here, we will store all PS/ECAL founded links in the PFBlockElement class
35  // of each psCluster in the PFmultilinks field.
37 
38  // Here we free all allocated structures.
39  void clear();
40 
41 
42  private:
43  // This method allows us to build the "tree" from the "rechitsSet".
44  void buildTree(const RecHitSet &rechitsSet,
46 
47  private:
48  // Some const values.
49  const double resPSpitch_;
50  const double resPSlength_;
51  const double ps1ToEcal_; // ratio : zEcal / zPS1
52  const double ps2ToEcal_; // ration : zEcal / zPS2
53 
54  // Data used by the KDTree algorithm : sets of PS and ECAL clusters.
57 
58  // Sets of rechits that compose the ECAL clusters. We differenctiate
59  // the rechits by their Z value.
62 
63  // Map of linked PS/ECAL clusters.
65 
66  // Map of the ECAL clusters associated to a rechit.
68 
69  // KD trees
72 };
73 
74 #endif /* !KDTreeLinkerPSEcal_h */
const double resPSlength_
Abstract base class for a PFBlock element (track, cluster...)
BlockElt2BlockEltMap target2ClusterLinks_
void insertFieldClusterElt(reco::PFBlockElement *ecalCluster)
const double resPSpitch_
std::map< const reco::PFRecHit *, BlockEltSet > RecHit2BlockEltMap
KDTreeLinkerAlgo treePos_
BlockEltSet fieldClusterSet_
void insertTargetElt(reco::PFBlockElement *psCluster)
std::map< reco::PFBlockElement *, BlockEltSet > BlockElt2BlockEltMap
std::set< const reco::PFRecHit * > RecHitSet
KDTreeLinkerAlgo treeNeg_
std::set< reco::PFBlockElement * > BlockEltSet
RecHit2BlockEltMap rechit2ClusterLinks_