ATLAS Offline Software
RpcPatFinder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGL2MUONSA_RPAPATFINDER_H
6 #define TRIGL2MUONSA_RPAPATFINDER_H
7 
8 #include <string>
9 #include <list>
10 
12 
13 // Original author: Massimo Corradi
14 
15 namespace TrigL2MuonSA {
16 
17 // --------------------------------------------------------------------------------
18 // --------------------------------------------------------------------------------
20 {
21  std::vector<std::vector<double>> hits_in_layer_eta;
22  std::vector<std::vector<double>> hits_in_layer_phi;
23  std::vector<std::vector<double>> hits_in_layer_Z;
24  std::vector<std::vector<double>> hits_in_layer_R;
25  void clear() {
26  hits_in_layer_eta.assign(8,std::vector<double> {});
27  hits_in_layer_phi.assign(8,std::vector<double> {});
28  hits_in_layer_R.assign(8,std::vector<double> {});
29  hits_in_layer_Z.assign(8,std::vector<double> {});
30  }
31 };
32 
33 // --------------------------------------------------------------------------------
34 // --------------------------------------------------------------------------------
35 
36 
37 class RpcPatFinder: public AthAlgTool
38 {
39 
40  public:
41 
43 
44  public:
45 
46  void addHit(const std::string& stationName,
47  int stationEta,
48  bool measuresPhi,
49  unsigned int gasGap,
50  unsigned int doubletR,
51  double gPosX, double gPosY, double gPosZ,
52  TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
53  bool findPatternEta(
54  std::array<std::reference_wrapper<double>, 3>& result_aw,
55  std::array<std::reference_wrapper<double>, 3>& result_bw,
56  const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
57 
58  bool findPatternPhi(double &phi_middle, double &phi_outer, const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
59 
60  private:
61  bool deltaOK(int l1, int l2, double x1, double x2, int isphi, double &delta) const;
62  double calibR(const std::string& stationName, double R, double Phi) const;
63  void abcal(const std::bitset<8>& result_pat,
64  const std::array<size_t, 8>& index,
65  std::array<std::reference_wrapper<double>, 3>& aw,
66  std::array<std::reference_wrapper<double>, 3>& bw,
67  const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
68 };
69 
70 }
71 #endif
72 
TrigL2MuonSA::RpcLayerHits::hits_in_layer_phi
std::vector< std::vector< double > > hits_in_layer_phi
Definition: RpcPatFinder.h:22
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:215
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
TrigL2MuonSA::RpcPatFinder
Definition: RpcPatFinder.h:38
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
index
Definition: index.py:1
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:217
createCablingJSON.doubletR
int doubletR
Definition: createCablingJSON.py:15
TrigL2MuonSA::RpcPatFinder::addHit
void addHit(const std::string &stationName, int stationEta, bool measuresPhi, unsigned int gasGap, unsigned int doubletR, double gPosX, double gPosY, double gPosZ, TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:22
Phi
@ Phi
Definition: RPCdef.h:8
TrigL2MuonSA::RpcLayerHits::hits_in_layer_Z
std::vector< std::vector< double > > hits_in_layer_Z
Definition: RpcPatFinder.h:23
TrigL2MuonSA::RpcPatFinder::findPatternEta
bool findPatternEta(std::array< std::reference_wrapper< double >, 3 > &result_aw, std::array< std::reference_wrapper< double >, 3 > &result_bw, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:61
TrigL2MuonSA::RpcPatFinder::abcal
void abcal(const std::bitset< 8 > &result_pat, const std::array< size_t, 8 > &index, std::array< std::reference_wrapper< double >, 3 > &aw, std::array< std::reference_wrapper< double >, 3 > &bw, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:355
skel.l2
l2
Definition: skel.GENtoEVGEN.py:410
TrigL2MuonSA::RpcLayerHits::hits_in_layer_eta
std::vector< std::vector< double > > hits_in_layer_eta
Definition: RpcPatFinder.h:21
AthAlgTool.h
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TrigL2MuonSA::RpcLayerHits::clear
void clear()
Definition: RpcPatFinder.h:25
TrigL2MuonSA::RpcPatFinder::calibR
double calibR(const std::string &stationName, double R, double Phi) const
Definition: RpcPatFinder.cxx:326
lumiFormat.array
array
Definition: lumiFormat.py:91
TrigL2MuonSA::RpcLayerHits
Definition: RpcPatFinder.h:20
TrigL2MuonSA::RpcPatFinder::findPatternPhi
bool findPatternPhi(double &phi_middle, double &phi_outer, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:169
TrigL2MuonSA::RpcPatFinder::deltaOK
bool deltaOK(int l1, int l2, double x1, double x2, int isphi, double &delta) const
Definition: RpcPatFinder.cxx:253
skel.l1
l1
Definition: skel.GENtoEVGEN.py:409
AthAlgTool
Definition: AthAlgTool.h:26
TrigL2MuonSA::RpcLayerHits::hits_in_layer_R
std::vector< std::vector< double > > hits_in_layer_R
Definition: RpcPatFinder.h:24
TrigL2MuonSA
Definition: AlignmentBarrelLUT.h:13