ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMuonMatching.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGMUONEFFICIENCY_MUONEFFICIENCYTOOL_H
6#define TRIGMUONEFFICIENCY_MUONEFFICIENCYTOOL_H
7
8
10
12#include "AsgTools/AsgTool.h"
13#include "AsgTools/ToolHandle.h"
14#include <iostream>
15
17
18namespace Trig {
19
22 public virtual ITrigMuonMatching
23 {
26
27 public:
28
29 TrigMuonMatching( const std::string& name );
30
31 virtual ~TrigMuonMatching();
32
33 virtual StatusCode initialize(void) override;
34
35 virtual Bool_t match(const xAOD::Muon* mu,
36 const std::string &chain,
37 const double mindelR = 0.1) const override;
38
39 virtual Bool_t matchL1(const xAOD::Muon* mu,
40 const std::string &l1item,
41 const double DelR = 0.2) const override;
42
43 virtual Bool_t matchL2SA(const xAOD::Muon* mu,
44 const std::string &l1item,
45 const std::string & chain,
46 const double DelR = 0.2) const override;
47
48 virtual Bool_t matchL2CB(const xAOD::Muon* mu,
49 const std::string & chain,
50 const double DelR = 0.2) const override;
51
52 virtual Double_t minDelR(const xAOD::Muon* mu,
53 const std::string &chain,
54 const double mindelR = 0.1) const override;
55
56 virtual Double_t minDelRL1(const xAOD::Muon* mu,
57 const std::string &l1item,
58 const double DelR = 0.2) const override;
59
60 virtual Bool_t matchDimuon(const xAOD::Muon* mu1,
61 const xAOD::Muon* mu2,
62 const std::string& chain,
63 std::pair<Bool_t, Bool_t>& result1,
64 std::pair<Bool_t, Bool_t>& result2,
65 const Double_t& mindelR = 0.1) override;
66
67 virtual Bool_t match(const double eta,
68 const double phi,
69 const std::string &chain,
70 const double mindelR = 0.1) const override;
71
72 virtual Bool_t matchL1(const double eta,
73 const double phi,
74 const std::string &l1item,
75 const double DelR = 0.2) const override;
76
77 virtual Bool_t matchDimuon(const TLorentzVector& muon1,
78 const TLorentzVector& muon2,
79 const std::string& chain,
80 std::pair<Bool_t, Bool_t>& result1,
81 std::pair<Bool_t, Bool_t>& result2,
82 const Double_t& mindelR = 0.1) override;
83
84 virtual Bool_t isPassedRerun(const std::string& trigger) const override;
85
86 struct EFmuon {
87 bool valid;
88 float pt;
89 float eta;
90 float phi;
91
92 EFmuon() : valid(false), pt(-1.e30), eta(-1.e30), phi(-1.e30) {}
93 };
94
95 private:
96
97 ToolHandle<Trig::TrigDecisionTool> m_trigDecTool;
98
99 std::map<std::string, DimuonChainInfo> m_DimuonChainMap;
100
101 std::pair<bool,bool> matchDimuon(const TLorentzVector& muon1,
102 const TLorentzVector& muon2,
103 const DimuonChainInfo& chainInfo,
104 const double mindelR);
105
106 double dR(const double eta1,
107 const double phi1,
108 const double eta2,
109 const double phi2) const;
110
111 int getL1pt(const std::string& l1item) const;
112
113 void tokenize(const std::string& str,
114 std::vector<std::string>& tokens,
115 const std::string& delimiters) const;
116
117 /*
118 double matchedTrackDetail(const double eta,
119 const double phi,
120 const std::string chain,
121 const std::string l1item);
122 */
123
124 Double_t matchedTrackDetail(EFmuon& efMuonId,
125 const EFmuon& usedEFMuonId,
126 const double eta,
127 const double phi,
128 const double mindelR,
129 const std::string& chainEventTrigger) const;
130
131 bool decodeDimuonChain(DimuonChainInfo& chainInfo);
132
133 bool isEqual(const double x,
134 const double y) const;
135
136
137 };
138}
139
140#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
#define ASG_TOOL_INTERFACE(CLASSNAME)
#define y
#define x
Double_t matchedTrackDetail(EFmuon &efMuonId, const EFmuon &usedEFMuonId, const double eta, const double phi, const double mindelR, const std::string &chainEventTrigger) const
TrigMuonMatching(const std::string &name)
void tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters) const
std::map< std::string, DimuonChainInfo > m_DimuonChainMap
bool isEqual(const double x, const double y) const
virtual Double_t minDelR(const xAOD::Muon *mu, const std::string &chain, const double mindelR=0.1) const override
virtual Bool_t match(const xAOD::Muon *mu, const std::string &chain, const double mindelR=0.1) const override
ToolHandle< Trig::TrigDecisionTool > m_trigDecTool
virtual Double_t minDelRL1(const xAOD::Muon *mu, const std::string &l1item, const double DelR=0.2) const override
virtual Bool_t matchL2SA(const xAOD::Muon *mu, const std::string &l1item, const std::string &chain, const double DelR=0.2) const override
bool decodeDimuonChain(DimuonChainInfo &chainInfo)
virtual StatusCode initialize(void) override
Dummy implementation of the initialisation function.
virtual Bool_t matchL2CB(const xAOD::Muon *mu, const std::string &chain, const double DelR=0.2) const override
virtual Bool_t matchDimuon(const xAOD::Muon *mu1, const xAOD::Muon *mu2, const std::string &chain, std::pair< Bool_t, Bool_t > &result1, std::pair< Bool_t, Bool_t > &result2, const Double_t &mindelR=0.1) override
double dR(const double eta1, const double phi1, const double eta2, const double phi2) const
virtual Bool_t isPassedRerun(const std::string &trigger) const override
int getL1pt(const std::string &l1item) const
virtual Bool_t matchL1(const xAOD::Muon *mu, const std::string &l1item, const double DelR=0.2) const override
Base class for dual-use tools that provide file metadata access.
The common trigger namespace for trigger analysis tools.
Muon_v1 Muon
Reference the current persistent version: