Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
387523a6
Commit
387523a6
authored
Jun 03, 2021
by
Shaun Roe
Committed by
Johannes Elmsheuser
Jun 03, 2021
Browse files
22.0-add_uniqueClone to FitQuality
parent
2efb172c
Changes
4
Hide whitespace changes
Inline
Side-by-side
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegmentQuality.h
View file @
387523a6
/*
Copyright (C) 2002-201
7
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-20
2
1 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
...
...
@@ -11,7 +11,7 @@
#include "Identifier/Identifier.h"
#include "TrkEventPrimitives/FitQuality.h"
#include <memory>
#include <vector>
namespace
Muon
{
...
...
@@ -44,18 +44,25 @@ namespace Muon {
virtual
~
MuonSegmentQuality
()
{}
/** number of holes */
virtual
unsigned
int
numberOfHoles
()
const
;
unsigned
int
numberOfHoles
()
const
;
/** vector of identifiers of channels crossed by the segment but without hit */
const
std
::
vector
<
Identifier
>&
channelsWithoutHit
()
const
;
virtual
MuonSegmentQuality
*
clone
()
const
;
/** bare pointer clone */
virtual
MuonSegmentQuality
*
clone
()
const
override
final
;
/** NVI clone to unique_ptr */
std
::
unique_ptr
<
MuonSegmentQuality
>
uniqueClone
()
const
{
return
std
::
unique_ptr
<
MuonSegmentQuality
>
(
clone
());
}
bool
isStrict
()
const
;
//!< Returns true if the segment was created using strict criteria
private:
std
::
vector
<
Identifier
>
m_channelsWithoutHit
;
bool
m_isStrict
;
std
::
vector
<
Identifier
>
m_channelsWithoutHit
{}
;
bool
m_isStrict
{}
;
};
...
...
Tracking/TrkEvent/TrkEventPrimitives/TrkEventPrimitives/FitQuality.h
View file @
387523a6
...
...
@@ -9,9 +9,10 @@
#ifndef TRKEVENTPRIMITIVES_TRKFITQUALITY_H
#define TRKEVENTPRIMITIVES_TRKFITQUALITY_H
#include <cmath>
#include <iostream>
#include <iosfwd>
#include <cmath> //for std::floor in the included .icc file
#include <memory>
class
MsgStream
;
namespace
Trk
{
...
...
@@ -48,6 +49,9 @@ public:
/**Virtual constructor */
virtual
FitQuality
*
clone
()
const
;
/**NVI uniqueClone */
std
::
unique_ptr
<
FitQuality
>
uniqueClone
()
const
;
/** returns the @f$ \chi^2 @f$ of the overall track fit*/
double
chiSquared
()
const
;
...
...
@@ -68,8 +72,8 @@ public:
private:
double
m_chiSquared
;
double
m_numberDoF
;
double
m_chiSquared
{}
;
double
m_numberDoF
{}
;
};
// end of class definitions
...
...
Tracking/TrkEvent/TrkEventPrimitives/TrkEventPrimitives/FitQuality.icc
View file @
387523a6
...
...
@@ -20,6 +20,13 @@ FitQuality::clone() const
return
new
FitQuality
(
*
this
);
}
inline
std
::
unique_ptr
<
FitQuality
>
FitQuality
::
uniqueClone
()
const
{
return
std
::
unique_ptr
<
FitQuality
>
(
clone
());
}
inline
double
FitQuality
::
chiSquared
()
const
{
...
...
@@ -29,7 +36,7 @@ FitQuality::chiSquared() const
inline
int
FitQuality
::
numberDoF
()
const
{
return
static_cast
<
int
>
(
floor
(
m_numberDoF
+
0.5
));
return
static_cast
<
int
>
(
std
::
floor
(
m_numberDoF
+
0.5
));
}
inline
double
...
...
Tracking/TrkEvent/TrkEventPrimitives/src/FitQuality.cxx
View file @
387523a6
...
...
@@ -9,6 +9,7 @@
#include "TrkEventPrimitives/FitQuality.h"
#include "GaudiKernel/MsgStream.h"
#include <string>
#include <ostream>
/**Overload of << operator for both, MsgStream and std::ostream for debug output*/
MsgStream
&
Trk
::
operator
<<
(
MsgStream
&
sl
,
const
Trk
::
FitQuality
&
fq
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment