|
ATLAS Offline Software
|
#include <TrigMuonEFHypoTool.h>
|
| TrigMuonEFHypoTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
| ~TrigMuonEFHypoTool () |
|
virtual StatusCode | initialize () override |
|
StatusCode | decide (std::vector< TrigMuonEFHypoTool::MuonEFInfo > &toolInput) const |
|
float | getdphi (float phi1, float phi2) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 17 of file TrigMuonEFHypoTool.h.
◆ StoreGateSvc_t
◆ anonymous enum
◆ TrigMuonEFHypoTool()
TrigMuonEFHypoTool::TrigMuonEFHypoTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~TrigMuonEFHypoTool()
TrigMuonEFHypoTool::~TrigMuonEFHypoTool |
( |
| ) |
|
◆ decide()
◆ decideOnSingleObject()
Definition at line 62 of file TrigMuonEFHypoTool.cxx.
65 std::vector<float> fexPt, fexEta, fexPhi, selPt, selEta, selPhi;
72 auto monitorIt =
Monitored::Group(
m_monTool, muonPtMon, muonEtaMon, muonPhiMon, muonPtSelMon, muonEtaSelMon, muonPhiSelMon);
77 ATH_MSG_DEBUG(
"Accept property is set: taking all the events");
88 if (
muon->primaryTrackParticle()) {
96 fexEta.push_back(tr->
eta());
97 fexPhi.push_back(tr->
phi());
101 for (std::vector<float>::size_type
k=0;
k<
m_bins[cutIndex]; ++
k) {
112 ATH_MSG_DEBUG(
"No numberOfGoodPrecisionLayers variable found; not passing hypo");
115 if(std::abs(
muon->eta()) > 1.3) {
117 if(nGoodPrcLayers < 2){
118 ATH_MSG_DEBUG(
"Muon has less than two GoodPrecisionLayers; not passing hypo (requrement loosend according to absence of NSW)");
122 if(nGoodPrcLayers < 3){
123 ATH_MSG_DEBUG(
"Muon has less than three GoodPrecisionLayers; not passing hypo");
127 }
else if (std::abs(
muon->eta()) > 1.05) {
128 if(nGoodPrcLayers < 3){
129 ATH_MSG_DEBUG(
"Muon has less than three GoodPrecisionLayers; not passing hypo");
141 selEta.push_back(tr->
eta());
142 selPhi.push_back(tr->
phi());
146 <<
" with Charge " << tr->
charge()
148 <<
" so hypothesis is " << (
result?
"true":
"false"));
151 <<
" with Charge " << tr->
charge()
152 <<
" and with d0 " << tr->
d0()
154 <<
" and d0min cut is " <<
m_d0min<<
" mm"
155 <<
" so hypothesis is " << (
result?
"true":
"false"));
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getdphi()
float TrigMuonEFHypoTool::getdphi |
( |
float |
phi1, |
|
|
float |
phi2 |
|
) |
| const |
Definition at line 304 of file TrigMuonEFHypoTool.cxx.
305 float dphi = phi1-phi2;
306 if(dphi > TMath::Pi()) dphi -= TMath::TwoPi();
307 if(dphi < -1*TMath::Pi()) dphi += TMath::TwoPi();
◆ inclusiveSelection()
Definition at line 197 of file TrigMuonEFHypoTool.cxx.
198 for (
uint i=0;
i<toolInput.size();
i++){
199 auto&
tool = toolInput.at(
i);
201 bool overlap =
false;
203 for(
uint j=
i+1; j<toolInput.size();j++){
204 auto& tool2 = toolInput.at(j);
206 if(tool2.muon->p4()==
tool.muon->p4()) overlap=
true;
209 if(overlap)
continue;
218 return StatusCode::SUCCESS;
◆ initialize()
StatusCode TrigMuonEFHypoTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 17 of file TrigMuonEFHypoTool.cxx.
22 return StatusCode::FAILURE;
30 ATH_MSG_ERROR(
"Trying to configure hypo with no pT bins. This is probably a configuration mistake.");
31 return StatusCode::FAILURE;
34 for(
size_t j=0; j<
m_ptBins.size(); j++){
38 return StatusCode::FAILURE;
41 for (std::vector<float>::size_type
i=0;
i<
m_bins[j];++
i) {
57 if(
m_doSA)
m_type = xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle;
58 else m_type = xAOD::Muon::TrackParticleType::CombinedTrackParticle;
60 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ multiplicitySelection()
Definition at line 220 of file TrigMuonEFHypoTool.cxx.
222 bool passingNscan=
false;
223 for(
size_t cutIndex=0; cutIndex <
m_ptBins.size(); ++cutIndex) {
224 size_t elementIndex{0};
225 for(
auto&
tool : toolInput){
228 if(
m_nscan && cutIndex==0 && (!passingNscan)){
231 unsigned int nInCone=0;
232 float muonR = sqrt(
pow(
tool.muon->eta(),2) +
pow(
tool.muon->phi(),2));
234 for (
auto& tooltmp : toolInput){
236 << tooltmp.muon->eta() <<
", phi: " << tooltmp.muon->phi());
237 if (tooltmp.muon->p4() ==
tool.muon->p4()) {
240 deta = std::abs(tooltmp.muon->eta()-
tool.muon->eta());
241 dphi =
getdphi(tooltmp.muon->phi(),
tool.muon->phi());
242 if(deta<coneCheck && dphi<coneCheck){
255 ATH_MSG_DEBUG(
"Passes narrow-scan selection Index["<<elementIndex<<
"]");
257 }
else ATH_MSG_DEBUG(
"Does not pass narrow-scan selection Index["<<elementIndex<<
"]");
260 passingSelection[cutIndex].push_back(elementIndex);
269 if (
m_nscan &&(!passingNscan)){
270 ATH_MSG_DEBUG(
"Narrow-scan is required and no muons passed, all muons will be rejected ");
271 return StatusCode::SUCCESS;
274 if(passingSelection[cutIndex].
empty()){
275 ATH_MSG_DEBUG(
"No muons passed the selection "<<cutIndex<<
" rejecting...");
276 return StatusCode::SUCCESS;
279 std::set<size_t> passingIndices;
282 std::set<const xAOD::Muon*> setOfMuons;
283 for (
auto index : comb){
284 setOfMuons.insert(toolInput[
index].
muon);
286 return setOfMuons.size()==comb.size();
294 if(passingIndices.empty()){
296 return StatusCode::SUCCESS;
298 for(
auto i : passingIndices){
302 return StatusCode::SUCCESS;
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ passedQualityCuts()
bool TrigMuonEFHypoTool::passedQualityCuts |
( |
const xAOD::Muon * |
muon | ) |
const |
|
private |
Definition at line 162 of file TrigMuonEFHypoTool.cxx.
163 bool passCut =
false;
165 const xAOD::TrackParticle* metrack =
muon->trackParticle( xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle );
166 float mePt = -999999., idPt = -999999.;
168 float reducedChi2 = -10, qOverPsignif = -10;
170 if(idtrack && metrack) {
171 mePt = metrack->
pt();
172 idPt = idtrack->
pt();
173 float meP = 1.0 / (
sin(metrack->
theta()) / mePt);
174 float idP = 1.0 / (
sin(idtrack->
theta()) / idPt);
176 reducedChi2 =
muon->primaryTrackParticle()->chiSquared()/
muon->primaryTrackParticle()->numberDoF();
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_acceptAll
Gaudi::Property< bool > TrigMuonEFHypoTool::m_acceptAll |
|
private |
Initial value:{
this, "AcceptAll", false, "Ignore selection" }
Definition at line 58 of file TrigMuonEFHypoTool.h.
◆ m_bins
std::vector<size_t> TrigMuonEFHypoTool::m_bins ={0} |
|
private |
◆ m_checkOvlp
Gaudi::Property< bool > TrigMuonEFHypoTool::m_checkOvlp |
|
private |
Initial value:{
this, "RemoveOverlaps", false, "do overlap removal"}
Definition at line 68 of file TrigMuonEFHypoTool.h.
◆ m_conesize
Gaudi::Property< float > TrigMuonEFHypoTool::m_conesize |
|
private |
Initial value:{
this, "ConeSize", 0.5, "Narrow scan cone size" }
Definition at line 50 of file TrigMuonEFHypoTool.h.
◆ m_d0min
Gaudi::Property< float > TrigMuonEFHypoTool::m_d0min |
|
private |
Initial value:{
this, "MinimumD0", 0., "lower d0 cut (mm)"}
Definition at line 66 of file TrigMuonEFHypoTool.h.
◆ m_decisionId
◆ m_decisionPerRoI
Gaudi::Property<bool> TrigMuonEFHypoTool::m_decisionPerRoI |
|
private |
Initial value:{
this, "DecisionPerRoI", true, "Is multiplicity requirement refering to muons ( false ) or RoIs with muons ( true ), relevant only in when multiplicity > 1" }
Definition at line 60 of file TrigMuonEFHypoTool.h.
◆ m_detStore
◆ m_doSA
Gaudi::Property<bool> TrigMuonEFHypoTool::m_doSA |
|
private |
Initial value:{
this, "RequireSAMuons", false, "Apply cut on SA muons (otherwise require combined muons)"}
Definition at line 64 of file TrigMuonEFHypoTool.h.
◆ m_evtStore
◆ m_monTool
◆ m_muonqualityCut
Gaudi::Property< bool > TrigMuonEFHypoTool::m_muonqualityCut |
|
private |
Initial value:{
this, "MuonQualityCut", false, "Ignore selection" }
Definition at line 52 of file TrigMuonEFHypoTool.h.
◆ m_muonSelTool
◆ m_nscan
Gaudi::Property< bool > TrigMuonEFHypoTool::m_nscan |
|
private |
Initial value:{
this, "NarrowScan", false, "Apply narrow scan" }
Definition at line 48 of file TrigMuonEFHypoTool.h.
◆ m_ptBins
Gaudi::Property< std::vector<std::vector<double> > > TrigMuonEFHypoTool::m_ptBins |
|
private |
Initial value:{
this, "PtBins", { {0, 2.5} }, "Bins range of each pT threshold" }
Definition at line 54 of file TrigMuonEFHypoTool.h.
◆ m_ptThresholds
Gaudi::Property< std::vector<std::vector<double> > > TrigMuonEFHypoTool::m_ptThresholds |
|
private |
◆ m_runCommissioningChain
Gaudi::Property<bool> TrigMuonEFHypoTool::m_runCommissioningChain |
|
private |
Initial value:{
this, "RunCommissioningChain", false, "Apply a looser requirement according to absence of NSW"}
Definition at line 70 of file TrigMuonEFHypoTool.h.
◆ m_threeStationCut
Gaudi::Property<bool> TrigMuonEFHypoTool::m_threeStationCut |
|
private |
Initial value:{
this, "RequireThreeStations", false, "Apply cut on N GoodPrecisionLayers in endcaps"}
Definition at line 62 of file TrigMuonEFHypoTool.h.
◆ m_type
xAOD::Muon::TrackParticleType TrigMuonEFHypoTool::m_type |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Group
Properties of a chain group.
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
TrigCompositeUtils::DecisionID numeric() const
numeric ID
float charge() const
Returns the charge.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
float d0() const
Returns the parameter.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
virtual void setOwner(IDataHandleHolder *o)=0
static HLT::Identifier fromToolName(const std::string &tname)
std::vector< size_t > Index1DVec
Unique combinations for case when one can not repeat the index (i.e.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void elementsInUniqueCombinations(const Index2DVec &indices, std::set< size_t > &participants, std::function< bool(const Index1DVec &)> &&filter)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
bool absEta(const xAOD::TauJet &tau, double &out)
@ numberOfGoodPrecisionLayers
layers with at least 3 hits that are not deweighted [uint8_t]
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< Index1DVec > Index2DVec
Class describing a TrackParticle.
float theta() const
Returns the parameter, which has range 0 to .
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)