ATLAS Offline Software
Loading...
Searching...
No Matches
ClusterPatFinder.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_CLUSTERPATFINDER_H
6#define TRIGL2MUONSA_CLUSTERPATFINDER_H
7
8
9
11#include <string>
12#include <list>
13#include <vector>
14#include <map>
15
16namespace TrigL2MuonSA {
17
19{
20 std::multimap<int, int> groupCand;
21 int group{};
22 double dMM{};
23 double dMO{};
24 double aw[3]{};
25 double bw[3]{};
26 int clustersID[8]{};
27 bool isGoodFit{};
28 double phi_middle{};
29 double phi_outer{};
30 int nclusters{};
31
32 void Clear(){
33 groupCand.clear();
34 group = -1;
35 dMM = 9999;
36 dMO = 9999;
37 isGoodFit = false;
38 phi_middle = 0;
39 phi_outer = 0;
40 nclusters = 0;
41 for(int i=0; i < 3; i++){
42 aw[i] = 0;
43 bw[i] = 0;
44 }
45 for(int i=0; i < 8; i++) clustersID[i] = -1;
46 }
47
48 bool operator==(const ClusterPattern& clp) const {
49 for(int i=0; i < 8; i++){
50 if(clustersID[i] != clp.clustersID[i]) return false;
51 }
52 return true;
53 }
54
55};
56
57// --------------------------------------------------------------------------------
58// --------------------------------------------------------------------------------
60{
61 std::vector<std::list<double>> clusters_in_layer_eta;
62 std::vector<std::list<double>> clusters_in_layer_phi;
63 std::vector<std::vector<double>> clusters_in_layer_Z;
64 std::vector<std::vector<double>> clusters_in_layer_R;
65 void clear() {
66 std::list<double> z;
67 z.clear();
68 clusters_in_layer_eta.assign(8,z);
69 clusters_in_layer_phi.assign(8,z);
70 std::vector<double> zz;
71 zz.clear();
72 clusters_in_layer_R.assign(8,zz);
73 clusters_in_layer_Z.assign(8,zz);
74 }
75};
76
77// --------------------------------------------------------------------------------
78// --------------------------------------------------------------------------------
79
81{
82
83 public:
84 ClusterPatFinder(const std::string& type,
85 const std::string& name,
86 const IInterface* parent);
87
88 public:
89
90 void addCluster(const std::string& stationName,
91 int stationEta,
92 bool measuresPhi,
93 unsigned int gasGap,
94 unsigned int doubletR,
95 double gPosX, double gPosY, double gPosZ,
96 TrigL2MuonSA::RpcLayerClusters& rpcLayerClusters) const;
97
98 bool findPatternEta(std::vector<std::vector<double>>& aw,
99 std::vector<std::vector<double>>& bw,
100 TrigL2MuonSA::RpcLayerClusters& rpcLayerClusters) const;
101
102 bool findPatternPhi(std::vector<double>& phi_middle,
103 std::vector<double>& phi_outer,
104 TrigL2MuonSA::RpcLayerClusters& rpcLayerClusters) const;
105
106 private:
107 bool patfinder_forEta(std::vector<TrigL2MuonSA::ClusterPattern>& crPatterns,
108 TrigL2MuonSA::RpcLayerClusters& rpcLayerClusters) const;
109
110 bool patfinder(std::vector<TrigL2MuonSA::ClusterPattern>& crPattern,
111 TrigL2MuonSA::RpcLayerClusters& rpcLayerClusters) const;
112
113 bool deltaOK(int l1, int l2, double x1, double x2, int isphi, double &delta) const;
114
115 double calibR(const std::string& stationName, double R, double Phi) const;
116
117 void abcal(unsigned int result_pat, size_t index[], double aw[], double bw[], TrigL2MuonSA::RpcLayerClusters& rpcLayerClusters) const;
118
119 void removeSimilarRoad(std::vector<TrigL2MuonSA::ClusterPattern>& crPatterns) const;
120
121 void setGroup(int& nGroup,
122 std::vector<TrigL2MuonSA::ClusterPattern>& crPatterns) const;
123 void selectGoodFit(int nGroup,
124 std::vector<TrigL2MuonSA::ClusterPattern>& crPatterns) const;
125};
126
127}
128#endif
129
#define z
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
double calibR(const std::string &stationName, double R, double Phi) const
void removeSimilarRoad(std::vector< TrigL2MuonSA::ClusterPattern > &crPatterns) const
ClusterPatFinder(const std::string &type, const std::string &name, const IInterface *parent)
bool findPatternPhi(std::vector< double > &phi_middle, std::vector< double > &phi_outer, TrigL2MuonSA::RpcLayerClusters &rpcLayerClusters) const
bool patfinder(std::vector< TrigL2MuonSA::ClusterPattern > &crPattern, TrigL2MuonSA::RpcLayerClusters &rpcLayerClusters) const
bool deltaOK(int l1, int l2, double x1, double x2, int isphi, double &delta) const
void setGroup(int &nGroup, std::vector< TrigL2MuonSA::ClusterPattern > &crPatterns) const
void selectGoodFit(int nGroup, std::vector< TrigL2MuonSA::ClusterPattern > &crPatterns) const
bool findPatternEta(std::vector< std::vector< double > > &aw, std::vector< std::vector< double > > &bw, TrigL2MuonSA::RpcLayerClusters &rpcLayerClusters) const
void abcal(unsigned int result_pat, size_t index[], double aw[], double bw[], TrigL2MuonSA::RpcLayerClusters &rpcLayerClusters) const
bool patfinder_forEta(std::vector< TrigL2MuonSA::ClusterPattern > &crPatterns, TrigL2MuonSA::RpcLayerClusters &rpcLayerClusters) const
void addCluster(const std::string &stationName, int stationEta, bool measuresPhi, unsigned int gasGap, unsigned int doubletR, double gPosX, double gPosY, double gPosZ, TrigL2MuonSA::RpcLayerClusters &rpcLayerClusters) const
Definition index.py:1
bool operator==(const ClusterPattern &clp) const
std::multimap< int, int > groupCand
std::vector< std::vector< double > > clusters_in_layer_Z
std::vector< std::list< double > > clusters_in_layer_phi
std::vector< std::vector< double > > clusters_in_layer_R
std::vector< std::list< double > > clusters_in_layer_eta