ATLAS Offline Software
PixeldEdxTrackParticleThinning.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackParticleThinning.h, (c) ATLAS Detector software
8 
9 /*
10  The low pT track thinning tool for the dE/dx calibration.
11 */
12 
13 #ifndef DERIVATIONFRAMEWORK_PIXELDEDXTRACKPARTICLETHINNING_H
14 #define DERIVATIONFRAMEWORK_PIXELDEDXTRACKPARTICLETHINNING_H
15 
18 
24 
25 #include "GaudiKernel/ToolHandle.h"
26 
27 #include <string>
28 #include <atomic>
29 #include <vector>
30 #include <mutex>
31 
33 
34 namespace DerivationFramework {
35 
36  class PixeldEdxTrackParticleThinning : public extends<ExpressionParserUser<AthAlgTool>, IThinningTool> {
37  public:
38  PixeldEdxTrackParticleThinning(const std::string& t, const std::string& n, const IInterface* p);
39  virtual ~PixeldEdxTrackParticleThinning() = default;
40  virtual StatusCode initialize() override;
41  virtual StatusCode finalize() override;
42  virtual StatusCode doThinning() const override;
43 
44  private:
45 
46  StringProperty m_selectionString {
47  this, "SelectionString", "", "track selections"};
48 
49  //Counters and keys for xAOD::TrackParticle container
50 
51  mutable std::atomic<unsigned int> m_ntot{0}, m_npass{0};
52 
53  StringProperty m_streamName {
54  this, "StreamName", "", "Name of the stream being thinned" };
56  this, "InDetTrackParticlesKey", "InDetTrackParticles", "" };
58  this, "VertexContainerKey", "PrimaryVertices"};
59 
60 
61  DoubleProperty m_unprescalePtCut {
62  this, "UnprescalePtCut", 10.e3};
63  DoubleProperty m_globalScale {
64  this, "GlobalScale", 1.};
65  DoubleProperty m_d0SignifCut {
66  this, "d0SignifCut", 5.};
67  DoubleProperty m_z0Cut {
68  this, "z0Cut", 3.};
69  DoubleProperty m_etaCut {
70  this, "EtaCut", 2.};
71 
72  std::vector<double> m_pTbins;
73  static const std::vector<double> m_preScales;
74 
75  //logic
76  mutable std::vector<unsigned long long> m_counter ATLAS_THREAD_SAFE;
77  mutable std::vector<unsigned long long> m_counter_picked ATLAS_THREAD_SAFE;
79 
80  };
81 }
82 
83 #endif // DERIVATIONFRAMEWORK_PIXELDEDXTRACKPARTICLETHINNING_H
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition: ThinningHandleKey.h:38
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
ExpressionParserUser.h
DerivationFramework::PixeldEdxTrackParticleThinning::initialize
virtual StatusCode initialize() override
Definition: PixeldEdxTrackParticleThinning.cxx:33
IThinningTool.h
DerivationFramework::PixeldEdxTrackParticleThinning::m_npass
std::atomic< unsigned int > m_npass
Definition: PixeldEdxTrackParticleThinning.h:51
DerivationFramework::PixeldEdxTrackParticleThinning::m_preScales
static const std::vector< double > m_preScales
Definition: PixeldEdxTrackParticleThinning.h:73
DerivationFramework::PixeldEdxTrackParticleThinning::~PixeldEdxTrackParticleThinning
virtual ~PixeldEdxTrackParticleThinning()=default
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::PixeldEdxTrackParticleThinning::m_unprescalePtCut
DoubleProperty m_unprescalePtCut
Definition: PixeldEdxTrackParticleThinning.h:61
DerivationFramework::PixeldEdxTrackParticleThinning::m_globalScale
DoubleProperty m_globalScale
Definition: PixeldEdxTrackParticleThinning.h:63
DerivationFramework::PixeldEdxTrackParticleThinning::m_z0Cut
DoubleProperty m_z0Cut
Definition: PixeldEdxTrackParticleThinning.h:67
DerivationFramework::PixeldEdxTrackParticleThinning::m_d0SignifCut
DoubleProperty m_d0SignifCut
Definition: PixeldEdxTrackParticleThinning.h:65
DerivationFramework::PixeldEdxTrackParticleThinning::finalize
virtual StatusCode finalize() override
Definition: PixeldEdxTrackParticleThinning.cxx:62
DerivationFramework::PixeldEdxTrackParticleThinning::m_etaCut
DoubleProperty m_etaCut
Definition: PixeldEdxTrackParticleThinning.h:69
DerivationFramework::PixeldEdxTrackParticleThinning::ATLAS_THREAD_SAFE
std::vector< unsigned long long > m_counter_picked ATLAS_THREAD_SAFE
Definition: PixeldEdxTrackParticleThinning.h:77
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::PixeldEdxTrackParticleThinning::m_selectionString
StringProperty m_selectionString
Definition: PixeldEdxTrackParticleThinning.h:46
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
DerivationFramework::PixeldEdxTrackParticleThinning::m_ntot
std::atomic< unsigned int > m_ntot
Definition: PixeldEdxTrackParticleThinning.h:51
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::PixeldEdxTrackParticleThinning::m_inDetParticlesKey
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetParticlesKey
Definition: PixeldEdxTrackParticleThinning.h:55
DerivationFramework::PixeldEdxTrackParticleThinning::m_pTbins
std::vector< double > m_pTbins
Definition: PixeldEdxTrackParticleThinning.h:72
ReadCondHandleKey.h
DerivationFramework::PixeldEdxTrackParticleThinning::m_streamName
StringProperty m_streamName
Definition: PixeldEdxTrackParticleThinning.h:53
SiDetectorElementCollection.h
DerivationFramework::PixeldEdxTrackParticleThinning::ATLAS_THREAD_SAFE
std::vector< unsigned long long > m_counter ATLAS_THREAD_SAFE
Definition: PixeldEdxTrackParticleThinning.h:76
VertexContainer.h
DerivationFramework::PixeldEdxTrackParticleThinning::PixeldEdxTrackParticleThinning
PixeldEdxTrackParticleThinning(const std::string &t, const std::string &n, const IInterface *p)
Definition: PixeldEdxTrackParticleThinning.cxx:26
DerivationFramework::PixeldEdxTrackParticleThinning
Definition: PixeldEdxTrackParticleThinning.h:36
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
DerivationFramework::PixeldEdxTrackParticleThinning::m_mutex
std::mutex m_mutex
Definition: PixeldEdxTrackParticleThinning.h:78
DerivationFramework::PixeldEdxTrackParticleThinning::doThinning
virtual StatusCode doThinning() const override
Definition: PixeldEdxTrackParticleThinning.cxx:71
DerivationFramework::PixeldEdxTrackParticleThinning::m_vertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Definition: PixeldEdxTrackParticleThinning.h:57
TrackParticleContainer.h