Skip to content
Snippets Groups Projects
Commit d39bb9d2 authored by Nicolas Koehler's avatar Nicolas Koehler Committed by Frank Winklmeier
Browse files

Remove unused and non thread-safe maxP function

parent b73fc0f3
No related branches found
No related tags found
No related merge requests found
......@@ -15,17 +15,12 @@
#ifndef MUIDCALOISOLATIONTOOLS_MUIDTRACKISOLATION_H
#define MUIDCALOISOLATIONTOOLS_MUIDTRACKISOLATION_H
//<<<<<< INCLUDES >>>>>>
#include "MuidInterfaces/IMuidTrackIsolation.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "MuidInterfaces/IMuidTrackIsolation.h"
#include "TrkTrack/TrackCollection.h"
#include "StoreGate/ReadHandleKey.h"
#include "TrkExInterfaces/IIntersector.h"
#include "GaudiKernel/ConcurrencyFlags.h"
//<<<<<< CLASS DECLARATIONS >>>>>>
namespace Trk
{
......@@ -52,10 +47,6 @@ public:
get the number of tracks and summed momentum
in a cone at the production vertex or around the muon calo intersect*/
std::pair<int,double> trackIsolation(double eta, double phi) const;
/**IMuidTrackIsolation interface:
get the momentum of the most energetic track in the cone*/
double maxP(void) const;
private:
// isolation without extrapolation to calo
......@@ -76,23 +67,12 @@ private:
SG::ReadHandleKey<TrackCollection> m_inDetTracksLocation{this,"InDetTracksLocation","Tracks","ID tracks"};
// FIXME: mutable
ToolHandle<Trk::IIntersector> m_intersector{this,"RungeKuttaIntersector","Trk::RungeKuttaIntersector/RungeKuttaIntersector"};
mutable std::atomic<double> m_maxP;
Gaudi::Property<double> m_minPt{this,"MinPt",1.0*Gaudi::Units::GeV};
Gaudi::Property<double> m_trackCone{this,"TrackCone",0.2};
Gaudi::Property<bool> m_trackExtrapolation{this,"TrackExtrapolation",false};
};
//<<<<<< INLINE PUBLIC MEMBER FUNCTIONS >>>>>>
inline double
MuidTrackIsolation::maxP(void) const
{
if (Gaudi::Concurrency::ConcurrencyFlags::concurrent())
ATH_MSG_WARNING("MuidTrackIsolation::maxP() does not return trustable value in MT");
return m_maxP;
}
} // end of namespace
#endif // MUIDCALOISOLATIONTOOLS_MUIDTRACKISOLATION_H
......
......@@ -10,12 +10,9 @@
// (c) ATLAS Combined Muon software
//////////////////////////////////////////////////////////////////////////////
//<<<<<< INCLUDES >>>>>>
#include "MuidCaloIsolationTools/MuidTrackIsolation.h"
#include <cmath>
#include <iomanip>
#include "GaudiKernel/SystemOfUnits.h"
#include "MuidCaloIsolationTools/MuidTrackIsolation.h"
#include "TrkExUtils/TrackSurfaceIntersection.h"
#include "TrkParameters/TrackParameters.h"
#include "TrkSurfaces/CylinderSurface.h"
......@@ -24,7 +21,8 @@
#include "TrkTrack/Track.h"
#include "TrkTrack/TrackCollection.h"
//<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>>
#include <cmath>
#include <iomanip>
namespace Rec
{
......@@ -115,7 +113,6 @@ MuidTrackIsolation::trackIsolation(double eta, double phi) const
}
// set initial state
m_maxP = 0.;
std::pair<int,double> isolation = std::make_pair(0,0.);
// retrieve track collection
......@@ -143,12 +140,7 @@ MuidTrackIsolation::trackIsolation(double eta, double phi) const
}
// debug result
ATH_MSG_DEBUG(std::endl << " Found "<< isolation.first
<< std::setiosflags(std::ios::fixed)
<< " InDet tracks with total momentum "
<< std::setw(8) << std::setprecision(1) << isolation.second/Gaudi::Units::GeV <<" Gaudi::Units::GeV "
<< "and maximum momentum "
<< std::setw(8) << std::setprecision(1) << m_maxP/Gaudi::Units::GeV);
ATH_MSG_DEBUG("Found "<<isolation.first<<std::setiosflags(std::ios::fixed)<<" InDet tracks with total momentum "<< std::setw(8)<<std::setprecision(1)<<isolation.second/Gaudi::Units::GeV<<" GeV");
return isolation;
}
......@@ -157,7 +149,6 @@ std::pair<int,double>
MuidTrackIsolation::trackVertex(const TrackCollection* inDetTracks, double eta, double phi) const
{
// set initial state
m_maxP = 0.;
double sumP = 0.;
int numberTracks = 0;
......@@ -192,7 +183,6 @@ MuidTrackIsolation::trackVertex(const TrackCollection* inDetTracks, double eta,
if ((diffPhi*diffPhi + diffEta*diffEta) > m_trackCone*m_trackCone) continue;
++numberTracks;
double p = perigee.momentum().mag();
if (p > m_maxP) m_maxP = p;
sumP += p;
if (msgLvl(MSG::VERBOSE)) msg() << " inside cone, track#" << std::setw(3) << numberTracks;
......@@ -205,7 +195,6 @@ std::pair<int,double>
MuidTrackIsolation::trackExtrapolated(const TrackCollection* inDetTracks, double eta, double phi) const
{
// set initial state
m_maxP = 0.;
double sumP = 0.;
int numberTracks = 0;
......@@ -281,7 +270,6 @@ MuidTrackIsolation::trackExtrapolated(const TrackCollection* inDetTracks, double
{
++numberTracks;
double p = perigee.momentum().mag();
if (p > m_maxP) m_maxP = p;
sumP += p;
if (msgLvl(MSG::VERBOSE)) msg() << " inside cone, track#" << std::setw(3) << numberTracks;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
//////////////////////////////////////////////////////////////////////////////
// IMuidTrackIsolation
// tool interface for estimating the number, total charged momentum and most
// energetic inner detector tracks in a cone surrounding a muon
//
// (c) ATLAS Combined Muon software
//////////////////////////////////////////////////////////////////////////////
#ifndef MUIDINTERFACES_IMUIDTRACKISOLATION_H
#define MUIDINTERFACES_IMUIDTRACKISOLATION_H
#include <utility>
#include "GaudiKernel/IAlgTool.h"
namespace Rec
{
/** Interface ID for IMuidTrackIsolation*/
static const InterfaceID IID_IMuidTrackIsolation("IMuidTrackIsolation", 1, 0);
/**@class IMuidTrackIsolation
Base class for MuidTrackIsolation AlgTool
@author Alan.Poppleton@cern.ch
*/
class IMuidTrackIsolation : virtual public IAlgTool
{
public:
/**Virtual destructor*/
virtual ~IMuidTrackIsolation() {}
/** AlgTool and IAlgTool interface methods */
static const InterfaceID& interfaceID() { return IID_IMuidTrackIsolation; }
/**IMuidTrackIsolation interface:
get the number of tracks and summed momentum
in a cone at the production vertex or around the muon calo intersect*/
virtual std::pair<int,double> trackIsolation (double eta, double phi) const = 0;
/**IMuidTrackIsolation interface:
get the momentum of the most energetic track in the cone*/
virtual double maxP (void) const = 0;
};
} // end of namespace
#endif // MUIDINTERFACES_IMUIDTRACKISOLATION_H
//////////////////////////////////////////////////////////////////////////////
// IMuidTrackIsolation
// tool interface for estimating the number, total charged momentum and most
// energetic inner detector tracks in a cone surrounding a muon
//
// (c) ATLAS Combined Muon software
//////////////////////////////////////////////////////////////////////////////
#ifndef MUIDINTERFACES_IMUIDTRACKISOLATION_H
#define MUIDINTERFACES_IMUIDTRACKISOLATION_H
#include <utility>
#include "GaudiKernel/IAlgTool.h"
namespace Rec
{
/** Interface ID for IMuidTrackIsolation*/
static const InterfaceID IID_IMuidTrackIsolation("IMuidTrackIsolation", 1, 0);
/**@class IMuidTrackIsolation
Base class for MuidTrackIsolation AlgTool
@author Alan.Poppleton@cern.ch
*/
class IMuidTrackIsolation : virtual public IAlgTool
{
public:
/**Virtual destructor*/
virtual ~IMuidTrackIsolation() {}
/** AlgTool and IAlgTool interface methods */
static const InterfaceID& interfaceID() { return IID_IMuidTrackIsolation; }
/**IMuidTrackIsolation interface:
get the number of tracks and summed momentum
in a cone at the production vertex or around the muon calo intersect*/
virtual std::pair<int,double> trackIsolation (double eta, double phi) const = 0;
};
} // end of namespace
#endif // MUIDINTERFACES_IMUIDTRACKISOLATION_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment