CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  : layerClusters_(layerClusters),
24  theDoubletId_(doubletId),
25  innerClusterId_(innerClusterId),
26  outerClusterId_(outerClusterId),
27  innerR_((*layerClusters)[innerClusterId].position().r()),
28  outerR_((*layerClusters)[outerClusterId].position().r()),
29  innerX_((*layerClusters)[innerClusterId].x()),
30  outerX_((*layerClusters)[outerClusterId].x()),
31  innerY_((*layerClusters)[innerClusterId].y()),
32  outerY_((*layerClusters)[outerClusterId].y()),
33  innerZ_((*layerClusters)[innerClusterId].z()),
34  outerZ_((*layerClusters)[outerClusterId].z()),
35  seedIndex_(seedIndex),
37 
38  double innerX() const { return innerX_; }
39 
40  double outerX() const { return outerX_; }
41 
42  double innerY() const { return innerY_; }
43 
44  double outerY() const { return outerY_; }
45 
46  double innerZ() const { return innerZ_; }
47 
48  double outerZ() const { return outerZ_; }
49 
50  double innerR() const { return innerR_; }
51 
52  double outerR() const { return outerZ_; }
53 
54  int seedIndex() const { return seedIndex_; }
55 
56  int innerClusterId() const { return innerClusterId_; }
57 
58  int outerClusterId() const { return outerClusterId_; }
59 
60  void tagAsOuterNeighbor(unsigned int otherDoublet) { outerNeighbors_.push_back(otherDoublet); }
61 
62  void tagAsInnerNeighbor(unsigned int otherDoublet) { innerNeighbors_.push_back(otherDoublet); }
63 
64  bool checkCompatibilityAndTag(std::vector<HGCDoublet> &allDoublets,
65  const std::vector<int> &innerDoublets,
66  const GlobalVector &refDir,
67  float minCosTheta,
68  float minCosPointing = 1.,
69  bool debug = false);
70 
71  int areAligned(double xi,
72  double yi,
73  double zi,
74  double xo,
75  double yo,
76  double zo,
77  float minCosTheta,
78  float minCosPointing,
79  const GlobalVector &refDir,
80  bool debug = false) const;
81 
82  void findNtuplets(std::vector<HGCDoublet> &allDoublets,
83  HGCntuplet &tmpNtuplet,
84  int seedIndex,
85  const bool outInDFS,
86  const unsigned int outInHops,
87  const unsigned int maxOutInHops,
88  std::vector<std::pair<unsigned int, unsigned int> > &outInToVisit);
89 
91 
92 private:
93  const std::vector<reco::CaloCluster> *layerClusters_;
94  std::vector<int> outerNeighbors_;
95  std::vector<int> innerNeighbors_;
96 
97  const int theDoubletId_;
98  const int innerClusterId_;
99  const int outerClusterId_;
100 
101  const double innerR_;
102  const double outerR_;
103  const double innerX_;
104  const double outerX_;
105  const double innerY_;
106  const double outerY_;
107  const double innerZ_;
108  const double outerZ_;
111 };
112 
113 #endif /*HGCDoublet_H_ */
const double outerR_
Definition: HGCDoublet.h:102
double innerR() const
Definition: HGCDoublet.h:50
std::vector< unsigned int > HGCntuplet
Definition: HGCDoublet.h:16
int outerClusterId() const
Definition: HGCDoublet.h:58
std::vector< int > outerNeighbors_
Definition: HGCDoublet.h:94
int seedIndex_
Definition: HGCDoublet.h:109
const double innerY_
Definition: HGCDoublet.h:105
int innerClusterId() const
Definition: HGCDoublet.h:56
double outerZ() const
Definition: HGCDoublet.h:48
bool alreadyVisited_
Definition: HGCDoublet.h:110
double outerX() const
Definition: HGCDoublet.h:40
double outerR() const
Definition: HGCDoublet.h:52
const std::vector< reco::CaloCluster > * layerClusters_
Definition: HGCDoublet.h:93
const double innerZ_
Definition: HGCDoublet.h:107
const double outerY_
Definition: HGCDoublet.h:106
const double innerR_
Definition: HGCDoublet.h:101
const int theDoubletId_
Definition: HGCDoublet.h:97
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:64
double innerX() const
Definition: HGCDoublet.h:38
std::vector< int > innerNeighbors_
Definition: HGCDoublet.h:95
double innerY() const
Definition: HGCDoublet.h:42
HGCDoublet(const int innerClusterId, const int outerClusterId, const int doubletId, const std::vector< reco::CaloCluster > *layerClusters, const int seedIndex)
Definition: HGCDoublet.h:18
const int outerClusterId_
Definition: HGCDoublet.h:99
void setVisited(bool visited)
Definition: HGCDoublet.h:90
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:123
const double outerZ_
Definition: HGCDoublet.h:108
const double innerX_
Definition: HGCDoublet.h:103
#define debug
Definition: HDRShower.cc:19
void tagAsInnerNeighbor(unsigned int otherDoublet)
Definition: HGCDoublet.h:62
void tagAsOuterNeighbor(unsigned int otherDoublet)
Definition: HGCDoublet.h:60
double outerY() const
Definition: HGCDoublet.h:44
int seedIndex() const
Definition: HGCDoublet.h:54
double innerZ() const
Definition: HGCDoublet.h:46
static int position[264][3]
Definition: ReadPGInfo.cc:289
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
const double outerX_
Definition: HGCDoublet.h:104
const int innerClusterId_
Definition: HGCDoublet.h:98