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::list<double>> hits_in_layer_eta;
22  std::vector<std::list<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  std::list<double> z;
27  z.clear();
28  hits_in_layer_eta.assign(8,z);
29  hits_in_layer_phi.assign(8,z);
30  std::vector<double> zz;
31  zz.clear();
32  hits_in_layer_R.assign(8,zz);
33  hits_in_layer_Z.assign(8,zz);
34  }
35 };
36 
37 // --------------------------------------------------------------------------------
38 // --------------------------------------------------------------------------------
39 
40 
41 class RpcPatFinder: public AthAlgTool
42 {
43 
44  public:
45 
46  RpcPatFinder(const std::string& type,
47  const std::string& name,
48  const IInterface* parent);
49 
50  public:
51 
52  void addHit(const std::string& stationName,
53  int stationEta,
54  bool measuresPhi,
55  unsigned int gasGap,
56  unsigned int doubletR,
57  double gPosX, double gPosY, double gPosZ,
58  TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
59  bool findPatternEta(double aw[], double bw[], unsigned int &pattern, const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
60  bool findPatternPhi(double &phi_middle, double &phi_outer, unsigned int &pattern, const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
61 
62  private:
63  int patfinder(bool iphi,
64  unsigned int &result_pat,
65  double &result_x,
66  double &result_x1,
67  double &result_dMO,
68  const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
69 
70  int patfinder_forEta(bool iphi,
71  unsigned int &result_pat,
72  double result_aw[],
73  double result_bw[],
74  double result_dist[],
75  const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
76 
77  bool deltaOK(int l1, int l2, double x1, double x2, int isphi, double &delta) const;
78  double calibR(const std::string& stationName, double R, double Phi) const;
79  void abcal(unsigned int result_pat,
80  size_t index[],
81  double aw[],
82  double bw[],
83  const TrigL2MuonSA::RpcLayerHits& rpcLayerHits) const;
84 };
85 
86 }
87 #endif
88 
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
TrigL2MuonSA::RpcPatFinder::findPatternPhi
bool findPatternPhi(double &phi_middle, double &phi_outer, unsigned int &pattern, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:67
TrigL2MuonSA::RpcPatFinder::patfinder_forEta
int patfinder_forEta(bool iphi, unsigned int &result_pat, double result_aw[], double result_bw[], double result_dist[], const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:91
TrigL2MuonSA::RpcPatFinder
Definition: RpcPatFinder.h:42
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
index
Definition: index.py:1
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
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:28
Phi
@ Phi
Definition: RPCdef.h:8
TrigL2MuonSA::RpcPatFinder::abcal
void abcal(unsigned int result_pat, size_t index[], double aw[], double bw[], const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:411
TrigL2MuonSA::RpcLayerHits::hits_in_layer_Z
std::vector< std::vector< double > > hits_in_layer_Z
Definition: RpcPatFinder.h:23
TrigL2MuonSA::RpcPatFinder::RpcPatFinder
RpcPatFinder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: RpcPatFinder.cxx:18
skel.l2
l2
Definition: skel.GENtoEVGEN.py:399
TrigL2MuonSA::RpcPatFinder::patfinder
int patfinder(bool iphi, unsigned int &result_pat, double &result_x, double &result_x1, double &result_dMO, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:200
z
#define z
TrigL2MuonSA::RpcLayerHits::hits_in_layer_eta
std::vector< std::list< double > > hits_in_layer_eta
Definition: RpcPatFinder.h:21
TrigL2MuonSA::RpcPatFinder::findPatternEta
bool findPatternEta(double aw[], double bw[], unsigned int &pattern, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits) const
Definition: RpcPatFinder.cxx:79
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
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:382
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigL2MuonSA::RpcLayerHits
Definition: RpcPatFinder.h:20
TrigL2MuonSA::RpcPatFinder::deltaOK
bool deltaOK(int l1, int l2, double x1, double x2, int isphi, double &delta) const
Definition: RpcPatFinder.cxx:309
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigL2MuonSA::RpcLayerHits::hits_in_layer_phi
std::vector< std::list< double > > hits_in_layer_phi
Definition: RpcPatFinder.h:22
skel.l1
l1
Definition: skel.GENtoEVGEN.py:398
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