CMS 3D CMS Logo

CAGraph.h
Go to the documentation of this file.
1 #ifndef RecoPixelVertexing_PixelTriplets_src_CAGraph_h
2 #define RecoPixelVertexing_PixelTriplets_src_CAGraph_h
3 
4 #include <array>
5 #include <string>
6 #include <vector>
7 
8 struct CALayer
9 {
10  CALayer(const std::string &layerName, std::size_t numberOfHits)
11  : theName(layerName)
12  {
13  isOuterHitOfCell.resize(numberOfHits);
14  }
15 
16  bool operator==(const std::string &otherString) {
17  return otherString == theName;
18  }
19 
20  const std::string& name() const { return theName; }
21 
22  std::vector<int> theOuterLayerPairs;
23  std::vector<int> theInnerLayerPairs;
24 
25  std::vector<int> theOuterLayers;
26  std::vector<int> theInnerLayers;
27  std::vector<std::vector<unsigned int>> isOuterHitOfCell;
28 
29 private:
31 };
32 
34 {
35  CALayerPair(int a, int b)
36 
37  {
38  theLayers[0] = a;
39  theLayers[1] = b;
40  }
41 
42  bool operator==(const CALayerPair &otherLayerPair) {
43  return (theLayers[0] == otherLayerPair.theLayers[0]) &&
44  (theLayers[1] == otherLayerPair.theLayers[1]);
45  }
46 
47  std::array<int, 2> theLayers;
48  std::array<unsigned int, 2> theFoundCells = {{0, 0}};
49 };
50 
51 struct CAGraph
52 {
53  std::vector<CALayer> theLayers;
54  std::vector<CALayerPair> theLayerPairs;
55  std::vector<int> theRootLayers;
56 };
57 
58 #endif // RecoPixelVertexing_PixelTriplets_src_CAGraph_h
CALayerPair(int a, int b)
Definition: CAGraph.h:35
CALayer(const std::string &layerName, std::size_t numberOfHits)
Definition: CAGraph.h:10
bool operator==(const std::string &otherString)
Definition: CAGraph.h:16
std::array< int, 2 > theLayers
Definition: CAGraph.h:47
std::vector< int > theOuterLayerPairs
Definition: CAGraph.h:22
std::string theName
Definition: CAGraph.h:30
bool operator==(const CALayerPair &otherLayerPair)
Definition: CAGraph.h:42
std::vector< CALayer > theLayers
Definition: CAGraph.h:53
std::vector< CALayerPair > theLayerPairs
Definition: CAGraph.h:54
Definition: CAGraph.h:8
const std::string & name() const
Definition: CAGraph.h:20
double b
Definition: hdecay.h:120
std::vector< int > theInnerLayers
Definition: CAGraph.h:26
double a
Definition: hdecay.h:121
std::vector< int > theRootLayers
Definition: CAGraph.h:55
std::vector< int > theInnerLayerPairs
Definition: CAGraph.h:23
std::vector< std::vector< unsigned int > > isOuterHitOfCell
Definition: CAGraph.h:27
std::vector< int > theOuterLayers
Definition: CAGraph.h:25