CMS 3D CMS Logo

HGCDoublet.h
Go to the documentation of this file.
1 // Author: Felice Pantaleo,Marco Rovere - felice.pantaleo@cern.ch, marco.rovere@cern.ch
2 // Date: 11/2018
3 
4 #ifndef __RecoHGCal_TICL_HGCDoublet_H__
5 #define __RecoHGCal_TICL_HGCDoublet_H__
6 
7 #include <cmath>
8 #include <vector>
9 
13 
14 class HGCDoublet {
15 public:
16  using HGCntuplet = std::vector<unsigned int>;
17 
19  const int outerClusterId,
20  const int doubletId,
21  const std::vector<reco::CaloCluster> *layerClusters,
22  const int seedIndex,
23  bool areSiblingClusters = false)
25  theDoubletId_(doubletId),
39 
40  double innerX() const { return innerX_; }
41 
42  double outerX() const { return outerX_; }
43 
44  double innerY() const { return innerY_; }
45 
46  double outerY() const { return outerY_; }
47 
48  double innerZ() const { return innerZ_; }
49 
50  double outerZ() const { return outerZ_; }
51 
52  double innerR() const { return innerR_; }
53 
54  double outerR() const { return outerR_; }
55 
56  int seedIndex() const { return seedIndex_; }
57 
58  int innerClusterId() const { return innerClusterId_; }
59 
60  int outerClusterId() const { return outerClusterId_; }
61 
62  bool areSiblingClusters() const { return areSiblingClusters_; }
63 
64  void tagAsOuterNeighbor(unsigned int otherDoublet) { outerNeighbors_.push_back(otherDoublet); }
65 
66  void tagAsInnerNeighbor(unsigned int otherDoublet) { innerNeighbors_.push_back(otherDoublet); }
67 
68  bool checkCompatibilityAndTag(std::vector<HGCDoublet> &allDoublets,
69  const std::vector<int> &innerDoublets,
70  const GlobalVector &refDir,
71  float minCosTheta,
72  float minCosPointing = 1.,
73  bool debug = false);
74 
75  int areAligned(double xi,
76  double yi,
77  double zi,
78  double xo,
79  double yo,
80  double zo,
81  float minCosTheta,
82  float minCosPointing,
83  const GlobalVector &refDir,
84  bool debug = false) const;
85 
86  void findNtuplets(std::vector<HGCDoublet> &allDoublets,
87  HGCntuplet &tmpNtuplet,
88  int seedIndex,
89  const bool outInDFS,
90  const unsigned int outInHops,
91  const unsigned int maxOutInHops,
92  std::vector<std::pair<unsigned int, unsigned int> > &outInToVisit);
93 
95 
96 private:
97  const std::vector<reco::CaloCluster> *layerClusters_;
98  std::vector<int> outerNeighbors_;
99  std::vector<int> innerNeighbors_;
100 
101  const int theDoubletId_;
102  const int innerClusterId_;
103  const int outerClusterId_;
104 
105  const double innerR_;
106  const double outerR_;
107  const double innerX_;
108  const double outerX_;
109  const double innerY_;
110  const double outerY_;
111  const double innerZ_;
112  const double outerZ_;
116 };
117 
118 #endif /*HGCDoublet_H_ */
HGCDoublet(const int innerClusterId, const int outerClusterId, const int doubletId, const std::vector< reco::CaloCluster > *layerClusters, const int seedIndex, bool areSiblingClusters=false)
Definition: HGCDoublet.h:18
const double outerR_
Definition: HGCDoublet.h:106
std::vector< unsigned int > HGCntuplet
Definition: HGCDoublet.h:16
double innerR() const
Definition: HGCDoublet.h:52
double outerR() const
Definition: HGCDoublet.h:54
std::vector< int > outerNeighbors_
Definition: HGCDoublet.h:98
int seedIndex_
Definition: HGCDoublet.h:113
const double innerY_
Definition: HGCDoublet.h:109
int innerClusterId() const
Definition: HGCDoublet.h:58
bool alreadyVisited_
Definition: HGCDoublet.h:114
double outerX() const
Definition: HGCDoublet.h:42
double innerZ() const
Definition: HGCDoublet.h:48
const std::vector< reco::CaloCluster > * layerClusters_
Definition: HGCDoublet.h:97
double innerX() const
Definition: HGCDoublet.h:40
const double innerZ_
Definition: HGCDoublet.h:111
int areAligned(double xi, double yi, double zi, double xo, double yo, double zo, float minCosTheta, float minCosPointing, const GlobalVector &refDir, bool debug=false) const
Definition: HGCDoublet.cc:70
const double outerY_
Definition: HGCDoublet.h:110
const double innerR_
Definition: HGCDoublet.h:105
const int theDoubletId_
Definition: HGCDoublet.h:101
std::vector< int > innerNeighbors_
Definition: HGCDoublet.h:99
bool areSiblingClusters() const
Definition: HGCDoublet.h:62
const int outerClusterId_
Definition: HGCDoublet.h:103
void setVisited(bool visited)
Definition: HGCDoublet.h:94
void findNtuplets(std::vector< HGCDoublet > &allDoublets, HGCntuplet &tmpNtuplet, int seedIndex, const bool outInDFS, const unsigned int outInHops, const unsigned int maxOutInHops, std::vector< std::pair< unsigned int, unsigned int > > &outInToVisit)
Definition: HGCDoublet.cc:129
const double outerZ_
Definition: HGCDoublet.h:112
const double innerX_
Definition: HGCDoublet.h:107
#define debug
Definition: HDRShower.cc:19
double outerZ() const
Definition: HGCDoublet.h:50
void tagAsInnerNeighbor(unsigned int otherDoublet)
Definition: HGCDoublet.h:66
void tagAsOuterNeighbor(unsigned int otherDoublet)
Definition: HGCDoublet.h:64
int seedIndex() const
Definition: HGCDoublet.h:56
double outerY() const
Definition: HGCDoublet.h:46
static int position[264][3]
Definition: ReadPGInfo.cc:289
bool areSiblingClusters_
Definition: HGCDoublet.h:115
bool checkCompatibilityAndTag(std::vector< HGCDoublet > &allDoublets, const std::vector< int > &innerDoublets, const GlobalVector &refDir, float minCosTheta, float minCosPointing=1., bool debug=false)
Definition: HGCDoublet.cc:3
double innerY() const
Definition: HGCDoublet.h:44
int outerClusterId() const
Definition: HGCDoublet.h:60
const double outerX_
Definition: HGCDoublet.h:108
const int innerClusterId_
Definition: HGCDoublet.h:102