ATLAS Offline Software
Loading...
Searching...
No Matches
CscSegmentMaker.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGL2MUONSA_CSCSEGMENTMAKER_H
6#define TRIGL2MUONSA_CSCSEGMENTMAKER_H
7
8
10#include "GaudiKernel/ServiceHandle.h"
11
16
17#include "TrackData.h"
18#include "TgcFitResult.h"
19#include "MuonRoad.h"
20#include "CscData.h"
21#include "CscRegUtils.h"
22
23#include <string>
24#include <vector>
25
26namespace TrigL2MuonSA{
27
28 class CscSegment;
29
31
32
33 public:
34
35
36 typedef struct{
37 double loc_x;
38 double loc_y;
39 double loc_z;
40 double error;
41 double residual;
43 bool enabled;
45 bool isIP;
47
48 typedef struct{
49 double a;
50 double b;
51 double zshift;
52 double chi2;
53 int nhit;
55 double residual;
56 std::vector<localCscHit> localHits;
58
59 public:
60 CscSegmentMaker(const std::string& type, const std::string &name, const IInterface* parent);
61
62
63 virtual StatusCode initialize() override;
64
65
67 std::vector<TrigL2MuonSA::TrackPattern> &v_trackPatterns,
68 const TrigL2MuonSA::TgcFitResult &tgcFitResult,
69 const TrigL2MuonSA::MuonRoad &muroad) const;
70
71
72 ReturnCode make_segment(int mod_hash, TrigL2MuonSA::CscHits clusters[8], CscSegment &cscsegment, CscSegment &cscsegment_noip, const MuonGM::MuonDetectorManager* muDetMgr) const;
73
74 ReturnCode make_2dsegment(int measphi, const localCscHit &ip_loc,const std::vector<localCscHit> hits_loc[4], local2dSegment &seg2d_eta,local2dSegment &local2d_noip, int &nhite) const;
75
76 ReturnCode make_2dseg4hit(int measphi, const localCscHit &ip_loc,std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhite) const;
77
78 ReturnCode make_2dseg3hit(int measphi, const localCscHit &ip_loc, const std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhit) const;
79 ReturnCode fit_clusters(int measphi, const std::vector<localCscHit> &hits_fit, local2dSegment &seg2d) const;
80
81 ReturnCode make_4dsegment(const local2dSegment &seg2d_eta, const local2dSegment &seg2d_phi,
82 Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir) const;
83
84 ReturnCode getModuleSP(int mod_hash[2], const TrigL2MuonSA::TgcFitResult &tgcFitResult, int phibin, const TrigL2MuonSA::MuonRoad &muroad, const int exist_clusters[32]) const;
85
86 ReturnCode display_hits(const std::vector<localCscHit> localHits[4]) const;
87
88 CscSegment segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::CscSegment *mu_seg) const;
89
90 private:
92 ToolHandle<CscRegDict> m_cscregdict {
93 this, "CscRegDict", "TrigL2MuonSA::CscRegDict", ""};
94 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
95 SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"};
96
97 //properties
98 Gaudi::Property< bool > m_use_geometry {
99 this, "UseGeometry", false, ""};
100 Gaudi::Property< double > m_max_chisquare {
101 this, "max_chisquare", 25., ""};
102 Gaudi::Property< double > m_max_residual_eta {
103 this, "max_residual_eta", 100., ""};
104 Gaudi::Property< double > m_max_residual_phi {
105 this, "max_residual_phi", 250., ""};
106 Gaudi::Property< double > m_err_eta {
107 this, "err_eta", 3., ""};
108 Gaudi::Property< double > m_err_phi {
109 this, "err_phi", 6., ""};
110 Gaudi::Property< double > m_err_ip {
111 this, "err_ip", 250., ""};
112
113
114 };
115
117
118 public:
119
120 CscSegment();
121
122 double x(){ return m_x; }
123 double y(){ return m_y; }
124 double z(){ return m_z; }
125 double px(){ return m_px; }
126 double py(){ return m_py; }
127 double pz(){ return m_pz; }
128 double slopeRZ(){ return m_slopeRZ; }
129 double interceptRZ(){ return m_interceptRZ; }
130 double chiSquare(){ return m_chisquare; }
131 double chiSquarePhi(){ return m_chisquare_phi; }
132
133 int nHitEta(){ return m_nhit_eta; }
134 void setNHitEta( int nhite){ m_nhit_eta = nhite; }
135 int nHitPhi(){ return m_nhit_phi; }
136 void setNHitPhi( int nhitp){ m_nhit_phi = nhitp; }
137 bool isClean();
138
139 ReturnCode set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi);
140 ReturnCode set(Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir, double chisquare, double chisquare_phi);
141
142 private:
143 double m_x, m_y, m_z, m_px, m_py, m_pz;
146 double m_chisquare;
148
149 };
150
151
152}//namespace TrigL2MuonSA
153
154
155#endif /* TRIGL2MUONSA_CSCSEGMENTMAKER_H */
#define y
#define x
#define z
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
ReturnCode make_2dsegment(int measphi, const localCscHit &ip_loc, const std::vector< localCscHit > hits_loc[4], local2dSegment &seg2d_eta, local2dSegment &local2d_noip, int &nhite) const
ReturnCode make_2dseg3hit(int measphi, const localCscHit &ip_loc, const std::vector< localCscHit > hits_loc[4], std::vector< local2dSegment > &seg2d_4hitCollection, int &nhit) const
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
ReturnCode display_hits(const std::vector< localCscHit > localHits[4]) const
virtual StatusCode initialize() override
ReturnCode fit_clusters(int measphi, const std::vector< localCscHit > &hits_fit, local2dSegment &seg2d) const
ReturnCode FindSuperPointCsc(const TrigL2MuonSA::CscHits &cscHits, std::vector< TrigL2MuonSA::TrackPattern > &v_trackPatterns, const TrigL2MuonSA::TgcFitResult &tgcFitResult, const TrigL2MuonSA::MuonRoad &muroad) const
Gaudi::Property< double > m_max_residual_phi
Gaudi::Property< double > m_max_residual_eta
ToolHandle< CscRegDict > m_cscregdict
CscSegment segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::CscSegment *mu_seg) const
Gaudi::Property< double > m_max_chisquare
CscSegmentMaker(const std::string &type, const std::string &name, const IInterface *parent)
ReturnCode make_2dseg4hit(int measphi, const localCscHit &ip_loc, std::vector< localCscHit > hits_loc[4], std::vector< local2dSegment > &seg2d_4hitCollection, int &nhite) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< bool > m_use_geometry
Gaudi::Property< double > m_err_ip
ReturnCode make_segment(int mod_hash, TrigL2MuonSA::CscHits clusters[8], CscSegment &cscsegment, CscSegment &cscsegment_noip, const MuonGM::MuonDetectorManager *muDetMgr) const
Gaudi::Property< double > m_err_phi
ReturnCode make_4dsegment(const local2dSegment &seg2d_eta, const local2dSegment &seg2d_phi, Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir) const
Gaudi::Property< double > m_err_eta
ReturnCode getModuleSP(int mod_hash[2], const TrigL2MuonSA::TgcFitResult &tgcFitResult, int phibin, const TrigL2MuonSA::MuonRoad &muroad, const int exist_clusters[32]) const
ReturnCode set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi)
Eigen::Matrix< double, 3, 1 > Vector3D
std::vector< CscHitData > CscHits
Definition CscData.h:40