CMS 3D CMS Logo

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:
16  ~KDTreeLinkerPSEcal() override;
17 
18  // With this method, we create the list of psCluster that we want to link.
19  void insertTargetElt(reco::PFBlockElement *psCluster) override;
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) override;
25 
26  // The KDTree building from rechits list.
27  void buildTree() override;
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() override;
33 
34  // Here, we will store all PS/ECAL founded links in the PFBlockElement class
35  // of each psCluster in the PFmultilinks field.
36  void updatePFBlockEltWithLinks() override;
37 
38  // Here we free all allocated structures.
39  void clear() override;
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_
std::set< reco::PFBlockElement * > BlockEltSet
Abstract base class for a PFBlock element (track, cluster...)
KDTreeLinkerAlgo< reco::PFRecHit const * > treePos_
void buildTree() override
std::map< const reco::PFRecHit *, BlockEltSet > RecHit2BlockEltMap
std::map< reco::PFBlockElement *, BlockEltSet > BlockElt2BlockEltMap
BlockElt2BlockEltMap target2ClusterLinks_
const double resPSpitch_
void insertFieldClusterElt(reco::PFBlockElement *ecalCluster) override
void insertTargetElt(reco::PFBlockElement *psCluster) override
std::set< const reco::PFRecHit * > RecHitSet
BlockEltSet fieldClusterSet_
void updatePFBlockEltWithLinks() override
void searchLinks() override
KDTreeLinkerAlgo< reco::PFRecHit const * > treeNeg_
Definition: tree.py:1
~KDTreeLinkerPSEcal() override
RecHit2BlockEltMap rechit2ClusterLinks_