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  CALayer(const std::string &layerName, std::size_t numberOfHits) : theName(layerName) {
10  isOuterHitOfCell.resize(numberOfHits);
11  }
12 
13  bool operator==(const std::string &otherString) { return otherString == theName; }
14 
15  const std::string &name() const { return theName; }
16 
17  std::vector<int> theOuterLayerPairs;
18  std::vector<int> theInnerLayerPairs;
19 
20  std::vector<int> theOuterLayers;
21  std::vector<int> theInnerLayers;
22  std::vector<std::vector<unsigned int>> isOuterHitOfCell;
23 
24 private:
26 };
27 
28 struct CALayerPair {
29  CALayerPair(int a, int b)
30 
31  {
32  theLayers[0] = a;
33  theLayers[1] = b;
34  }
35 
36  bool operator==(const CALayerPair &otherLayerPair) {
37  return (theLayers[0] == otherLayerPair.theLayers[0]) && (theLayers[1] == otherLayerPair.theLayers[1]);
38  }
39 
40  std::array<int, 2> theLayers;
41  std::array<unsigned int, 2> theFoundCells = {{0, 0}};
42 };
43 
44 struct CAGraph {
45  std::vector<CALayer> theLayers;
46  std::vector<CALayerPair> theLayerPairs;
47  std::vector<int> theRootLayers;
48 };
49 
50 #endif // RecoPixelVertexing_PixelTriplets_src_CAGraph_h
CALayer::operator==
bool operator==(const std::string &otherString)
Definition: CAGraph.h:13
CALayerPair::theLayers
std::array< int, 2 > theLayers
Definition: CAGraph.h:40
CALayer::theName
std::string theName
Definition: CAGraph.h:25
CALayerPair::theFoundCells
std::array< unsigned int, 2 > theFoundCells
Definition: CAGraph.h:41
CAGraph::theRootLayers
std::vector< int > theRootLayers
Definition: CAGraph.h:47
CALayer::isOuterHitOfCell
std::vector< std::vector< unsigned int > > isOuterHitOfCell
Definition: CAGraph.h:22
CALayer::theInnerLayers
std::vector< int > theInnerLayers
Definition: CAGraph.h:21
CAGraph::theLayerPairs
std::vector< CALayerPair > theLayerPairs
Definition: CAGraph.h:46
CALayer::theOuterLayers
std::vector< int > theOuterLayers
Definition: CAGraph.h:20
CALayerPair::CALayerPair
CALayerPair(int a, int b)
Definition: CAGraph.h:29
CALayer::name
const std::string & name() const
Definition: CAGraph.h:15
b
double b
Definition: hdecay.h:118
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
a
double a
Definition: hdecay.h:119
CALayer
Definition: CAGraph.h:8
CAGraph
Definition: CAGraph.h:44
CALayerPair
Definition: CAGraph.h:28
CALayer::CALayer
CALayer(const std::string &layerName, std::size_t numberOfHits)
Definition: CAGraph.h:9
CAGraph::theLayers
std::vector< CALayer > theLayers
Definition: CAGraph.h:45
CALayerPair::operator==
bool operator==(const CALayerPair &otherLayerPair)
Definition: CAGraph.h:36
CALayer::theInnerLayerPairs
std::vector< int > theInnerLayerPairs
Definition: CAGraph.h:18
CALayer::theOuterLayerPairs
std::vector< int > theOuterLayerPairs
Definition: CAGraph.h:17