Commit 161b7f54 authored by Bruno Lenzi's avatar Bruno Lenzi Committed by Graeme Stewart
Browse files

InDetConversionTrackSelectorTool: flag to check TRT PID only if all hits are...

InDetConversionTrackSelectorTool: flag to check TRT PID only if all hits are Xe (false by default) (InDetTrackSelectorTool-01-00-11)
parent 018a2766
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef InDetTrackSelectorTool_InDetConversionTrackSelectorTool_H
#define InDetTrackSelectorTool_InDetConversionTrackSelectorTool_H
//#include "GaudiKernel/MsgStream.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "GaudiKernel/ServiceHandle.h"
#include "TrkToolInterfaces/ITrackSelectorTool.h"
#include "xAODTracking/TrackParticle.h"
/**
* A tool to be used for track preselection in conversion
* vertex finding.
*
* Thomas Koffas <Thomas.Koffas@cern.ch>
* June 2008
*/
class IBeamCondSvc;
namespace Trk
{
class ITrackSummaryTool;
class Vertex;
class IExtrapolator;
class Track;
class TrackParticleBase;
}
namespace InDet
{
class InDetConversionTrackSelectorTool : virtual public Trk::ITrackSelectorTool, public AthAlgTool
{
public:
StatusCode initialize();
StatusCode finalize();
InDetConversionTrackSelectorTool(const std::string& t, const std::string& n, const IInterface* p);
~InDetConversionTrackSelectorTool();
/** Select a Trk::Track */
bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const;
/** Select a Trk::TrackParticleBase */
bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const;
bool decision(const xAOD::TrackParticle&,const xAOD::Vertex*) const ;
private:
int getCount( const xAOD::TrackParticle& tp, xAOD::SummaryType type ) const {
uint8_t val;
if( !tp.summaryValue(val,type) ) return 0;
return val > 0 ? val : 0;
}
ToolHandle <Trk::ITrackSummaryTool> m_trkSumTool; //!< Track summary tool
ToolHandle<Trk::IExtrapolator> m_extrapolator; //!< Extrapolator tool
ServiceHandle<IBeamCondSvc> m_iBeamCondSvc; //!< pointer to the beam condition service
/** Properties for track selection:all cuts are ANDed */
double m_maxSiD0; //!< Maximal d0 at (0,0,0) for tracks with Si hits
double m_maxTrtD0; //!< Maximal d0 at (0,0,0) for standalone TRT tracks
double m_maxSiZ0; //!< Maximal z0 at (0,0,0)
double m_maxTrtZ0; //!< Maximal z0 at (0,0,0) for standalone TRT tracks
double m_minPt; //!< Minimum Pt of tracks
double m_trRatio1; //!< TR ratio for tracks with 15-20 TRT hits
double m_trRatio2; //!< TR ratio for tracks with 20-25 TRT hits
double m_trRatio3; //!< TR ratio for tracks with >25 TRT hits
double m_trRatioTRT;//!< TR ratio for TRT only tracks
double m_trRatioV0;//!< TR ratio for pion selection during V0 reconstruction
double m_sD0_Si; //!< Cut on D0 significance of Si tracks
double m_sD0_Trt; //!< Cut on D0 significance of TRT tracks
double m_sZ0_Trt; //!< Cut on Z0 significance of TRT tracks
bool m_isConv; //!< Conversion flag
bool m_PIDonlyForXe; //!< Only check TRT PID if all hits are Xe hits
}; //end of class definitions
} //end of namespace definitions
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef InDetTrackSelectorTool_InDetCosmicTrackSelectorTool_H
#define InDetTrackSelectorTool_InDetCosmicTrackSelectorTool_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "GaudiKernel/ServiceHandle.h"
#include "TrkToolInterfaces/ITrackSelectorTool.h"
#include "TrkEventPrimitives/ParticleHypothesis.h"
#include "TrkParameters/TrackParameters.h"
namespace Trk
{
class IMagneticFieldTool;
class ITrackSummaryTool;
class Vertex;
class TrackParticleBase;
class Track;
}
namespace MagField {
class IMagFieldSvc;
}
namespace InDet
{
class InDetCosmicTrackSelectorTool : virtual public Trk::ITrackSelectorTool, public AthAlgTool
{
public:
StatusCode initialize();
StatusCode finalize();
InDetCosmicTrackSelectorTool(const std::string& t, const std::string& n, const IInterface* p);
~InDetCosmicTrackSelectorTool();
bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const;
bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const;
bool decision(const xAOD::TrackParticle&,const xAOD::Vertex*) const {
ATH_MSG_WARNING("xAOD::TrackParticle selection not implemented yet");
return false;
}
private:
int getNSiHits(const Trk::Track* track, bool top) const;
bool decision(const Trk::TrackParameters* track, const Trk::Vertex* vertex, const Trk::ParticleHypothesis) const;
double m_maxZ0; //!< Maximum z0 of tracks
double m_maxD0; //!< Maximum d0 of tracks
double m_minPt; //!< Minimum pT of tracks
int m_numberOfPixelHits; //!< Minimum number of Pixel hits
int m_numberOfSCTHits; //!< Minimum number of SCT hits
int m_numberOfTRTHits; //!< Minimum number of TRT hits
int m_numberOfSiHits; //!< Minimum number of Silicon hits
int m_numberOfSiHitsTop; //!< Minimum number of Silicon hits
int m_numberOfSiHitsBottom; //!< Minimum number of Silicon hits
ToolHandle<Trk::ITrackSummaryTool> m_trackSumTool;
bool m_trackSumToolAvailable;
ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc;
}; //end of class definitions
} //end of namespace definitions
#endif //TrkMultipleVertexSeedFinders_PVFindingTrackSelectoTool_H
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef InDetDetailedTrackSelectorTool_InDetDetailedTrackSelectorTool_H
#define InDetDetailedTrackSelectorTool_InDetDetailedTrackSelectorTool_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "GaudiKernel/ServiceHandle.h"
#include "TrkToolInterfaces/ITrackSelectorTool.h"
#include "TrkParameters/TrackParameters.h"
#include "xAODTracking/TrackParticle.h"
#include "xAODTracking/VertexFwd.h"
/**
* @file InDetDetailedTrackSelectorTool.h
* @class InDetDetailedTrackSelectorTool
*
* @brief TrackSelector for general use
*
* The option for anyDirection:
* Required for cosmic tracks: mixture of tracks with different reo logic.
* Default is the extrapolation oppositeToMomentum, which is required for collision tracks.
*
* @author Giacinto Piacquadio <giacinto.piacquadio@physik.uni-freiburg.de>
* @author Kirill Prokofiev <Kirill.Prokofiev@cern.ch>
* @author Daniel Kollar <daniel.kollar@cern.ch>
*/
class IBeamCondSvc;
namespace MagField {
class IMagFieldSvc;
}
namespace Trk
{
class IMagneticFieldTool;
class ITrackSummaryTool;
class IExtrapolator;
class Vertex;
class RecVertex;
class FitQuality;
class TrackSummary;
class Track;
class TrackParticleBase;
}
namespace InDet
{
class ITrtDriftCircleCutTool;
class IInDetTestBLayerTool;
class InDetDetailedTrackSelectorTool : virtual public Trk::ITrackSelectorTool, public AthAlgTool
{
public:
enum Grade { Undefined, Good, Shared, nbGrades };
StatusCode initialize();
StatusCode finalize();
InDetDetailedTrackSelectorTool(const std::string& t, const std::string& n, const IInterface* p);
~InDetDetailedTrackSelectorTool();
bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const;
bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const;
bool decision(const xAOD::TrackParticle& track,const xAOD::Vertex* vertex) const;
private:
int getCount( const xAOD::TrackParticle& tp, xAOD::SummaryType type ) const {
uint8_t val;
if( !tp.summaryValue(val,type) ) return 0;
return val > 0 ? val : 0;
}
bool decision(const Trk::Perigee* track,const AmgSymMatrix(3)* covariancePosition) const;
bool decision(const Trk::FitQuality* TrkQuality) const;
bool decision(double chi2, int ndf ) const;
bool decision(const Trk::TrackSummary* summary,bool useSharedHitInfo,bool useTrtHitInfo,
const Trk::Perigee* track) const;
bool preselectionBeforeExtrapolation(const Trk::Perigee & myPerigee) const;
double m_pTMin; //<! min. pT: |pT|>pTMin
double m_pMin; //<! min. p = pT/cos(theta): |p| > pMin
double m_IPd0Max; //<! max. d0: |d0|<d0Max
double m_IPz0Max; //<! max. z0: |z0*sin(theta)|<z0Max
double m_z0Max; //<! max. z0: |z0|<z0Max
double m_sigIPd0Max; //<! max sig IP d0:
double m_sigIPz0Max; //<! max sig IP z0 (error only due to z0)*sin(theta)
double m_d0significanceMax; //<! max IP significance d0 (-1 switches it off)
double m_z0significanceMax; //<! max IP significance z0 (-1 switches it off)
double m_etaMax; //<! max. pseudo-rapidity
bool m_useTrackSummaryInfo; //<! if false the following cuts are ignored
int m_nHitBLayer; //<! at least n hits in Blayer
int m_nHitPix; //<! at least n hits in pixels
int m_nHitBLayerPlusPix; //<! at least n hits in blayer+pixel
int m_nHitSct; //<! at least n hits in SCT
int m_nHitSi; //<! at least n hits in pixels+SCT
int m_nHitPixPhysical; //!< at least n physical hits in pixel
int m_nHitSiPhysical; //!< at least n physical hits in pixel+SCT
mutable int m_nHitTrt; //<! at least n hits in TRT
mutable int m_nHitTrtPlusOutliers; //<! at least n hits in TRT (including outliers)
//<! for selecting electrons (soft E-ID)
int m_nHitTrtHighE; //<! at least n high threshold hits in TRT
int m_nHitTrtPlusOutliersHighE; //<! at least n high threshold hits in TRT (including outliers)
//<! for rejecting electrons (tau-ID)
double m_nHitTrtHighEFraction; //<! maximum x fraction of transition hits in TRT
double m_nHitTrtHighEFractionWithOutliers; //<! maximum x fraction of transition hits in TRT (including outliers)
double m_TrtMaxEtaAcceptance;//<! limit of eta regions where trt hits are expected
bool m_useSharedHitInfo; //<! if false the following cuts are ignored
int m_nSharedBLayer;//<! max. number of shared hits in B layer
int m_nSharedPix; //<! max. number of shared hits in pixels
int m_nSharedSct; //<! max. number of shared hits in SCT
int m_nSharedSi; //<! max. number of shared hits in pixels+SCT
int m_nHoles; //<! max. number of holes in pixel+SCT
int m_nDoubleHoles; //<! max number of double-holes in SCT
int m_nHolesPix; //<! max. number of holes in pixels
int m_nHolesSct; //<! max. number of holes in SCT
bool m_useTrackQualityInfo; //<! if false the following cuts are ignored
double m_fitChi2; //<! max. fit chi2
double m_fitProb; //<! min. fit chi2 probability
double m_fitChi2OnNdfMax; //<! max. fitchi2/ndf
double m_scaleMinHitTrt; //<! scale the eta dependent minimum number of TRT hits; scaling is only applied if m_addToMinHitTrt==0
int m_addToMinHitTrt; //<! add to/subtract from eta dependent minimum nimber of TRT hits
double m_scaleMinHitTrtWithOutliers; //<! scale the eta dependent minimum number of TRT hits + outliers; scaling is only applied if m_addToMinHitTrtWithOutliers==0
int m_addToMinHitTrtWithOutliers; //<! add to/subtract from eta dependent minimum nimber of TRT hits + outliers
bool m_usePreselectionCuts;
double m_d0MaxPreselection;
bool m_useEtaDepententMinHitTrt;
bool m_useEtaDepententMinHitTrtWithOutliers;
ToolHandle<Trk::ITrackSummaryTool> m_trackSumTool; //!< Track summary tool
ToolHandle<Trk::IExtrapolator> m_extrapolator; //!< Extrapolator tool
ServiceHandle<IBeamCondSvc> m_iBeamCondSvc; //!< pointer to the beam condition service
ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc;
ToolHandle<ITrtDriftCircleCutTool> m_trtDCTool; //!< Tool to get eta dependent cut on number of TRT hits
ToolHandle< InDet::IInDetTestBLayerTool > m_inDetTestBLayerTool; //Tool to test if the track crosses a dead module on the b-layer
bool m_trackSumToolAvailable;
// chnages for the pt-dependent sct cut
bool m_usePtDependentCuts;
std::vector<float> m_ptBenchmarks;
std::vector<int> m_nSCTValues;
}; //end of class definitions
} //end of namespace definitions
#endif //TrkMultipleVertexSeedFinders_PVFindingTrackSelectoTool_H
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef InDetIsoTrackSelectorTool_InDetIsoTrackSelectorTool_H
#define InDetIsoTrackSelectorTool_InDetIsoTrackSelectorTool_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "TrkToolInterfaces/IIsoTrackSelectorTool.h"
#include "TrkParameters/TrackParameters.h"
/**
* @file InDetIsoTrackSelectorTool.h
* @class InDetIsoTrackSelectorTool
*
* @brief A tool to be used for track preselection in isolation,
* the given AtaLine is the transported lepton to the BeamLine
* tracks can be checkec w.r.t to it
*
* @author Andreas Salzburger
*/
namespace Trk {
class IExtrapolator;
class ITrackSelectorTool;
class Track;
class TrackParticleBase;
}
namespace InDet
{
class InDetIsoTrackSelectorTool : virtual public Trk::IIsoTrackSelectorTool, public AthAlgTool
{
public:
/** Athena AlgTool methods */
StatusCode initialize();
StatusCode finalize();
/** Constructor / Destructor */
InDetIsoTrackSelectorTool(const std::string& t, const std::string& n, const IInterface* p);
~InDetIsoTrackSelectorTool();
/** ESD type interface */
bool decision(const Trk::AtaStraightLine&, const Trk::Track& track) const;
/** AOD type interface */
bool decision(const Trk::AtaStraightLine&, const Trk::TrackParticleBase& trackParticle) const;
/** Work-horse interface - will ignore TrackSelector */
bool decision(const Trk::AtaStraightLine&, const Trk::TrackParameters& trackPars) const;
private:
/** Robust cut window setting */
bool m_robustCuts;
bool m_applySinThetaCorrection;
double m_d0max;
double m_z0stMax;
/** Sophisticated cut window setting : d0/z0 significance - only when robustCuts off*/
double m_d0Significance;
double m_z0Significance;
ToolHandle<Trk::IExtrapolator> m_extrapolator; //<! Extrapolator tool
/** Extra checks on hits & holes */
ToolHandle<Trk::ITrackSelectorTool> m_trackSelector; //!< track selector tool
}; //end of class definitions
} //end of namespace definitions
#endif //TrkMultipleVertexSeedFinders_PVFindingTrackSelectoTool_H
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef InDetTrackSelectorTool_InDetTrackSelectorTool_H
#define InDetTrackSelectorTool_InDetTrackSelectorTool_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "TrkToolInterfaces/ITrackSelectorTool.h"
#include "TrkEventPrimitives/ParticleHypothesis.h"
#include "TrkParameters/TrackParameters.h"
/**
* @file InDetTrackSelectorTool.h
* @class InDetTrackSelectorTool
*
* @brief A tool to be used for track preselection in primary
* vertex finding. One possible implementation of the
* track selector tool. Here all possible cuts used in the
* primary vertex finding will be implemented. The particular
* cuts will be turned on and off by user through the python
* jobOptions.
*
* @author Kirill Prokofiev <Kirill.Prokofiev@cern.ch>
* @date Mai 2007
*
* @author Daniel Kollar <daniel.kollar@cern.ch>
*/
namespace Trk
{
class ITrackSummaryTool;
class Vertex;
class IExtrapolator;
class Track;
class TrackParticleBase;
}
namespace InDet
{
class InDetTrackSelectorTool : virtual public Trk::ITrackSelectorTool, public AthAlgTool
{
public:
StatusCode initialize();
StatusCode finalize();
InDetTrackSelectorTool(const std::string& t, const std::string& n, const IInterface* p);
~InDetTrackSelectorTool();
bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const;
bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const;
bool decision(const xAOD::TrackParticle&,const xAOD::Vertex*) const {
ATH_MSG_WARNING("xAOD::TrackParticle selection not implemented yet");
return false;
}
private:
bool decision(const Trk::TrackParameters* track, const Trk::Vertex* vertex, const Trk::ParticleHypothesis) const;
double m_minPt; //!< Minimum Pt of tracks
double m_IPz0Max; //!< max. z0: |z0*sin(theta)| < z0Max
double m_maxZ0; //!< Maximum z0 of tracks
double m_maxD0; //!< Maximum d0 of tracks
double m_maxD0overSigmaD0; //!< Maximum d0/sigmad0 of tracks
int m_numberOfPixelHits; //!< Check for silicon hits ?
int m_numberOfBLayerHits;
ToolHandle<Trk::ITrackSummaryTool> m_trackSumTool; //<! Track summary tool
bool m_trackSumToolAvailable;
ToolHandle<Trk::IExtrapolator> m_extrapolator; //<! Extrapolator tool
}; //end of class definitions
} //end of namespace definitions
#endif //TrkMultipleVertexSeedFinders_PVFindingTrackSelectoTool_H
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef InDetTrackSelectorTool_InDetTrtDriftCircleCutTool_H
#define InDetTrackSelectorTool_InDetTrtDriftCircleCutTool_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "GaudiKernel/ServiceHandle.h"
#include "InDetRecToolInterfaces/ITrtDriftCircleCutTool.h"
/**
* A tool to be used for trt segment pre-selection
*
* Thomas Koffas <Thomas.Koffas@cern.ch>
* April 2009
*/
class ITRT_ActiveFractionSvc;
namespace InDet{
class InDetTrtDriftCircleCutTool : virtual public ITrtDriftCircleCutTool, public AthAlgTool
{
public:
StatusCode initialize();
StatusCode finalize();
InDetTrtDriftCircleCutTool(const std::string& t, const std::string& n, const IInterface* p);
~InDetTrtDriftCircleCutTool();
/** @brief Minimum number of drift circles using the track scoring tool */
int minNumberDCs(const Trk::TrackParameters*) const;
private:
ServiceHandle<ITRT_ActiveFractionSvc> m_trtCondSvc; //!< TRT active fraction service
/** Properties for track selection:all cuts are ANDed */
int m_minOffset; //!< Minimum number of TRT drit circles required
bool m_param; //!< Use the new or the old parameterization
bool m_useTRT; //!< Use the TRT active fraction services to correct for dead straws
}; //end of class definitions
} //end of namespace
#endif
package InDetTrackSelectorTool
author Kirill Prokofiev <Kirill.Prokofiev@cern.ch>
private