Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
tool to select MDT segments, all CSC segments will be kept Quality levels: Level 0 = remove segments with more mdt holes than mdt hits that have no phi hits remove segments with less than 3 mdt hits Level 1 = remove segments with more than 50% mdt holes and no phi hits with phi hits and more mdt holes than mdt hits Level 2 = remove segments with mdt hits in only one multilayer Level 3 = remove segments with mdt holes or no phi hits in chambers where one would expect phi hits
More...
#include <MuonSegmentSelectionTool.h>
|
| MuonSegmentSelectionTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~MuonSegmentSelectionTool ()=default |
|
StatusCode | initialize () |
|
bool | select (const MuonSegment &seg, bool ignoreHoles=false, int qualityLevel=0, bool useEta=true, bool usePhi=true) const |
| select segment More...
|
|
int | quality (const MuonSegment &seg, bool ignoreHoles=false, bool useEta=true, bool usePhi=true) const |
| segment quality More...
|
|
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 |
|
tool to select MDT segments, all CSC segments will be kept Quality levels: Level 0 = remove segments with more mdt holes than mdt hits that have no phi hits remove segments with less than 3 mdt hits Level 1 = remove segments with more than 50% mdt holes and no phi hits with phi hits and more mdt holes than mdt hits Level 2 = remove segments with mdt hits in only one multilayer Level 3 = remove segments with mdt holes or no phi hits in chambers where one would expect phi hits
Definition at line 33 of file MuonSegmentSelectionTool.h.
◆ StoreGateSvc_t
◆ MuonSegmentSelectionTool()
Muon::MuonSegmentSelectionTool::MuonSegmentSelectionTool |
( |
const std::string & |
ty, |
|
|
const std::string & |
na, |
|
|
const IInterface * |
pa |
|
) |
| |
◆ ~MuonSegmentSelectionTool()
virtual Muon::MuonSegmentSelectionTool::~MuonSegmentSelectionTool |
( |
| ) |
|
|
virtualdefault |
◆ cscSegmentQuality()
int Muon::MuonSegmentSelectionTool::cscSegmentQuality |
( |
const MuonSegment & |
seg, |
|
|
bool |
useEta, |
|
|
bool |
usePhi |
|
) |
| const |
|
private |
calculate segment quality for CSC segments
Definition at line 55 of file MuonSegmentSelectionTool.cxx.
59 IMuonSegmentHitSummaryTool::HitCounts hitCounts =
m_hitSummaryTool->getHitCounts(seg);
66 if (hitCounts.ncscHits() < 4 && useEta && usePhi)
return -1;
73 if (hitCounts.ncscHits.nphiHits != 4 && hitCounts.ncscHits.netaHits != 4)
return 1;
80 if (!hitCounts.ncscHits.hasEtaAndPhi())
return 1;
87 if ((hitCounts.ncscHits.netaHits == 4 && hitCounts.ncscHits.nphiHits != 4)
88 || (hitCounts.ncscHits.netaHits != 4 && hitCounts.ncscHits.nphiHits == 4))
◆ 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
◆ initialize()
StatusCode Muon::MuonSegmentSelectionTool::initialize |
( |
| ) |
|
◆ 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.
◆ interfaceID()
static const InterfaceID& Muon::IMuonSegmentSelectionTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
access to tool interface
Definition at line 21 of file IMuonSegmentSelectionTool.h.
22 static const InterfaceID IID_IMuonSegmentSelectionTool(
"Muon::IMuonSegmentSelectionTool", 1, 0);
24 return IID_IMuonSegmentSelectionTool;
◆ mdtSegmentQuality()
int Muon::MuonSegmentSelectionTool::mdtSegmentQuality |
( |
const MuonSegment & |
seg, |
|
|
bool |
ignoreHoles |
|
) |
| const |
|
private |
calculate segment quality for MDT segments
Definition at line 141 of file MuonSegmentSelectionTool.cxx.
146 IMuonSegmentHitSummaryTool::HitCounts hitCounts =
m_hitSummaryTool->getHitCounts(seg);
152 if (hitCounts.nmdtHits() < 3)
return -1;
155 unsigned int nholes = !ignoreHoles ? hitCounts.nmdtHoles : 0;
158 double holeFraction = (
double)nholes / (
double)hitCounts.nmdtHits();
161 bool triggerHitRegion = hitCounts.nexpectedTrigHitLayers > 0;
164 << hitCounts.print() <<
" Hole frac " << holeFraction);
167 if (triggerHitRegion && hitCounts.nphiTrigHitLayers == 0) {
170 if (holeFraction > 1.1)
return -1;
180 if (!hitCounts.closeToChamberEdge) {
183 if (hitCounts.nphiTrigHitLayers != 0 && holeFraction > 1.1)
return 0;
190 if (hitCounts.nphiTrigHitLayers == 0 && hitCounts.nmdtEnclosedHoles > 2)
return 0;
197 if (hitCounts.nphiTrigHitLayers != 0 && holeFraction > 1.1)
return 1;
200 if (triggerHitRegion && hitCounts.nphiTrigHitLayers == 0 && holeFraction > 0.5)
return 1;
203 if (hitCounts.nmdtEnclosedHoles > 2)
return 0;
206 bool twoMultiLayerSegment = hitCounts.nmdtHitsMl1 > 1 && hitCounts.nmdtHitsMl2 > 1;
207 if (hitCounts.nphiTrigHitLayers == 0 && !twoMultiLayerSegment)
return 1;
210 if (hitCounts.nphiTrigHitLayers == 0) {
216 if ((!twoMultiLayerSegment || hitCounts.nmdtHits() < 5) && hitCounts.segmentQuality > 0.5 *
m_cutSegmentQuality)
221 if (hitCounts.nmdtHoles > 2) {
235 if ((!twoMultiLayerSegment || hitCounts.nmdtHits() < 5) && hitCounts.segmentQuality > 0.5 *
m_cutSegmentQuality) {
236 ATH_MSG_DEBUG(
"Single multi layer or too few hits: quality " << hitCounts.segmentQuality <<
" cut "
242 if (!twoMultiLayerSegment) {
248 if (triggerHitRegion && hitCounts.nphiTrigHitLayers < hitCounts.nexpectedTrigHitLayers) {
249 ATH_MSG_DEBUG(
"Missing trigger hits: phi hits " << hitCounts.nphiTrigHitLayers <<
" expected "
250 << hitCounts.nexpectedTrigHitLayers);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ nswSegmentQuality()
calculate segment quality for NSW segments
For the moment count the micromega hits to precision eta hits
Definition at line 98 of file MuonSegmentSelectionTool.cxx.
102 IMuonSegmentHitSummaryTool::HitCounts hitCounts =
m_hitSummaryTool->getHitCounts(seg);
103 const uint8_t nPrecHits = hitCounts.nnswHits();
105 const uint8_t nPrecEtaHits = hitCounts.nmmHits() + hitCounts.nstgcHits.netaHits;
106 const uint8_t nPrecPhiHits = hitCounts.nstgcHits.nphiHits;
108 const uint8_t nMM_Hits = hitCounts.nmmHits();
109 const uint8_t nSTGC_Hits = hitCounts.nstgcHits();
113 if (nPrecEtaHits < 2)
return -1;
119 if (
std::max(nMM_Hits, nSTGC_Hits) < 4)
return 0;
124 if (nSTGC_Hits && !hitCounts.nstgcHits.hasEtaAndPhi())
return 1;
126 if (nMM_Hits && (!hitCounts.nmmEtaHits || !hitCounts.nmmStereoHits))
return 1;
132 if (nPrecHits < 12 || nPrecPhiHits < 4)
◆ 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.
◆ quality()
int Muon::MuonSegmentSelectionTool::quality |
( |
const MuonSegment & |
seg, |
|
|
bool |
ignoreHoles = false , |
|
|
bool |
useEta = true , |
|
|
bool |
usePhi = true |
|
) |
| const |
|
virtual |
◆ renounce()
◆ renounceArray()
◆ select()
bool Muon::MuonSegmentSelectionTool::select |
( |
const MuonSegment & |
seg, |
|
|
bool |
ignoreHoles = false , |
|
|
int |
qualityLevel = 0 , |
|
|
bool |
useEta = true , |
|
|
bool |
usePhi = true |
|
) |
| const |
|
virtual |
◆ 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_adcFractionCut
Gaudi::Property<double> Muon::MuonSegmentSelectionTool::m_adcFractionCut {this, "GoodADCFractionCut",-1} |
|
private |
◆ m_cutSegmentQuality
Gaudi::Property<double> Muon::MuonSegmentSelectionTool::m_cutSegmentQuality {this, "SegmentQualityCut", 10.} |
|
private |
◆ m_detStore
◆ m_edmHelperSvc
Initial value:{
this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
EDM Helper tool.
Definition at line 61 of file MuonSegmentSelectionTool.h.
◆ m_evtStore
◆ m_hitSummaryTool
Initial value:{
this,
"MuonSegmentHitSummaryTool",
"Muon::MuonSegmentHitSummaryTool/MuonSegmentHitSummaryTool",
}
hit summary tool
Definition at line 71 of file MuonSegmentSelectionTool.h.
◆ m_idHelperSvc
◆ m_minAdcPerSegmentCut
Gaudi::Property<int> Muon::MuonSegmentSelectionTool::m_minAdcPerSegmentCut {this,"MinADCPerSegmentCut",70 } |
|
private |
◆ m_printer
Initial value:{
this,
"Printer",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
}
EDM printer tool.
Definition at line 65 of file MuonSegmentSelectionTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool is_valid() const
Check if id is in a valid state.
virtual void setOwner(IDataHandleHolder *o)=0
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>