ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::FourMuonTool Class Reference

#include <FourMuonTool.h>

Inheritance diagram for DerivationFramework::FourMuonTool:
Collaboration diagram for DerivationFramework::FourMuonTool:

Public Member Functions

 FourMuonTool (const std::string &t, const std::string &n, const IInterface *p)
 ~FourMuonTool ()
StatusCode initialize ()
StatusCode performSearch (xAOD::VertexContainer *pairVxContainer, xAOD::VertexContainer *quadVxContainer, bool &acceptEvent, const EventContext &ctx) const
std::unique_ptr< xAOD::Vertex > fit (const EventContext &ctx, const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection, const Amg::Vector3D &beamSpot) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static std::vector< std::vector< unsigned int > > getQuadIndices (unsigned int length)
static std::vector< std::pair< unsigned int, unsigned int > > getPairIndices (unsigned int length)
static std::vector< std::vector< unsigned int > > mFromN (unsigned int m, unsigned int n)
static void combinatorics (unsigned int offset, unsigned int k, std::vector< unsigned int > &combination, std::vector< unsigned int > &mainList, std::vector< std::vector< unsigned int > > &allCombinations)
static void buildCombinations (const std::vector< const xAOD::Muon * > &muonsIn, std::vector< Combination > &pairs, std::vector< Combination > &quadruplets, unsigned int nSelectedMuons)
static bool passesQuadSelection (const std::vector< const xAOD::Muon * > &muonsIn)

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< double > m_ptCut {this, "ptCut", 0.0}
Gaudi::Property< double > m_etaCut {this, "etaCut", 0.0}
SG::ReadHandleKey< xAOD::MuonContainer > m_muonCollectionKey {this, "muonCollectionKey", "Muons"}
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection {this, "TrackParticleCollection", "TrackParticleCandidate"}
PublicToolHandle< Trk::IVertexFitter > m_iVertexFitter {this, "TrkVertexFitterTool", "Trk::TrkVKalVrtFitter"}
PublicToolHandle< Trk::ITrackSelectorTool > m_trkSelector {this, "TrackSelectorTool", "InDet::TrackSelectorTool"}
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key {this, "EventInfo", "EventInfo", "Input event information"}
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonIndex {this, "muonIndexDec", m_muonCollectionKey, "BPHY4MuonIndex"}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 131 of file FourMuonTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FourMuonTool()

DerivationFramework::FourMuonTool::FourMuonTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 54 of file FourMuonTool.cxx.

54 : AthAlgTool(t,n,p)
55 {
56 }
AthAlgTool()
Default constructor:

◆ ~FourMuonTool()

DerivationFramework::FourMuonTool::~FourMuonTool ( )

Definition at line 58 of file FourMuonTool.cxx.

58{ }

Member Function Documentation

◆ buildCombinations()

void DerivationFramework::FourMuonTool::buildCombinations ( const std::vector< const xAOD::Muon * > & muonsIn,
std::vector< Combination > & pairs,
std::vector< Combination > & quadruplets,
unsigned int nSelectedMuons )
static

Definition at line 291 of file FourMuonTool.cxx.

294 {
295
296 std::vector<std::vector<unsigned int> > quadrupletIndices = getQuadIndices(nSelectedMuons);
297 std::vector<std::pair<unsigned int, unsigned int> > pairIndices = getPairIndices(nSelectedMuons);
298
299 // Quadruplets
300 std::vector<std::vector<unsigned int> >::iterator quadItr;
301 for (quadItr=quadrupletIndices.begin(); quadItr!=quadrupletIndices.end(); ++quadItr) {
302 const std::vector<unsigned int> &quad = (*quadItr);
303 std::vector<const xAOD::Muon*> theMuons = {muonsIn[quad[0]],muonsIn[quad[1]],muonsIn[quad[2]],muonsIn[quad[3]]};
304 if (!passesQuadSelection(theMuons)) continue;
305 Combination tmpQuad;
306 tmpQuad.muons = std::move(theMuons);
307 tmpQuad.quadIndices = quad;
308 quadruplets.emplace_back(std::move(tmpQuad));
309 }
310 if (quadruplets.size() == 0) return;
311
312 // pairs
313 std::vector<std::pair<unsigned int, unsigned int> >::iterator pairItr;
314 for (pairItr=pairIndices.begin(); pairItr!=pairIndices.end(); ++pairItr) {
315 std::pair<unsigned int, unsigned int> pair = (*pairItr);
316 Combination tmpPair;
317 std::vector<const xAOD::Muon*> theMuons = {muonsIn[pair.first],muonsIn[pair.second]};
318 tmpPair.muons = std::move(theMuons);
319 tmpPair.pairIndices = pair;
320 pairs.emplace_back(std::move(tmpPair));
321 }
322
323 return;
324
325 }
static bool passesQuadSelection(const std::vector< const xAOD::Muon * > &muonsIn)
static std::vector< std::vector< unsigned int > > getQuadIndices(unsigned int length)
static std::vector< std::pair< unsigned int, unsigned int > > getPairIndices(unsigned int length)

◆ combinatorics()

void DerivationFramework::FourMuonTool::combinatorics ( unsigned int offset,
unsigned int k,
std::vector< unsigned int > & combination,
std::vector< unsigned int > & mainList,
std::vector< std::vector< unsigned int > > & allCombinations )
static

Definition at line 249 of file FourMuonTool.cxx.

253 {
254 if (k==0) {
255 allCombinations.push_back(combination);
256 return;
257 }
258 if (k>0) {
259 for (unsigned int i=offset; i<=mainList.size()-k; ++i) {
260 combination.push_back(mainList[i]);
261 combinatorics(i+1,k-1,combination,mainList,allCombinations);
262 combination.pop_back();
263 }
264 }
265 }
static void combinatorics(unsigned int offset, unsigned int k, std::vector< unsigned int > &combination, std::vector< unsigned int > &mainList, std::vector< std::vector< unsigned int > > &allCombinations)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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

◆ fit()

std::unique_ptr< xAOD::Vertex > DerivationFramework::FourMuonTool::fit ( const EventContext & ctx,
const std::vector< const xAOD::TrackParticle * > & inputTracks,
const xAOD::TrackParticleContainer * importedTrackCollection,
const Amg::Vector3D & beamSpot ) const

Definition at line 206 of file FourMuonTool.cxx.

209 {
210
211
212 std::unique_ptr<xAOD::Vertex> myVxCandidate = m_iVertexFitter->fit(ctx, inputTracks, beamSpot /*vertex startingPoint*/ );
213
214 if(myVxCandidate) BPhysPVTools::PrepareVertexLinks(myVxCandidate.get(), importedTrackCollection);
215
216 return myVxCandidate;
217
218 } // End of fit method
static void PrepareVertexLinks(xAOD::Vertex *theResult, const xAOD::TrackParticleContainer *importedTrackCollection)
PublicToolHandle< Trk::IVertexFitter > m_iVertexFitter

◆ getPairIndices()

std::vector< std::pair< unsigned int, unsigned int > > DerivationFramework::FourMuonTool::getPairIndices ( unsigned int length)
static

Definition at line 271 of file FourMuonTool.cxx.

271 {
272
273 std::vector<std::pair<unsigned int, unsigned int> > uniquePairs;
274 std::vector<std::vector<unsigned int> > doublets = mFromN(2,length);
275 for (std::vector<std::vector<unsigned int> >::iterator it=doublets.begin(); it!=doublets.end(); ++it) {
276 std::pair<unsigned int, unsigned int> tmpPair = std::make_pair((*it).at(0),(*it).at(1));
277 uniquePairs.push_back(tmpPair);
278 }
279
280 return(uniquePairs);
281 }
double length(const pvec &v)
static std::vector< std::vector< unsigned int > > mFromN(unsigned int m, unsigned int n)

◆ getQuadIndices()

std::vector< std::vector< unsigned int > > DerivationFramework::FourMuonTool::getQuadIndices ( unsigned int length)
static

Definition at line 227 of file FourMuonTool.cxx.

227 {
228
229 std::vector<std::vector<unsigned int> > quadIndices = mFromN(4,length);
230 return(quadIndices);
231 }

◆ initialize()

StatusCode DerivationFramework::FourMuonTool::initialize ( )

Definition at line 32 of file FourMuonTool.cxx.

32 {
33
34 // retrieving vertex Fitter
35 ATH_CHECK( m_iVertexFitter.retrieve() );
36 ATH_MSG_DEBUG("Retrieved tool " << m_iVertexFitter);
37
38
39 // Get the track selector tool from ToolSvc
40 ATH_CHECK ( m_trkSelector.retrieve() );
41 ATH_MSG_DEBUG("Retrieved tool " << m_trkSelector);
42
43 // Get the beam spot service
44 ATH_CHECK( m_eventInfo_key.initialize() );
45 ATH_CHECK(m_muonCollectionKey.initialize());
47 ATH_CHECK(m_muonIndex.initialize());
48 ATH_MSG_DEBUG("Initialize successful");
49
50 return StatusCode::SUCCESS;
51
52 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
PublicToolHandle< Trk::ITrackSelectorTool > m_trkSelector
SG::ReadHandleKey< xAOD::MuonContainer > m_muonCollectionKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonIndex

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ mFromN()

std::vector< std::vector< unsigned int > > DerivationFramework::FourMuonTool::mFromN ( unsigned int m,
unsigned int n )
static

Definition at line 239 of file FourMuonTool.cxx.

239 {
240
241 std::vector<std::vector<unsigned int> > allCombinations;
242 std::vector<unsigned int> mainList;
243 std::vector<unsigned int> combination;
244 for (unsigned int i=0; i<N; ++i) mainList.push_back(i);
245 combinatorics(0,m,combination,mainList,allCombinations);
246 return allCombinations;
247 }
constexpr std::size_t N

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ passesQuadSelection()

bool DerivationFramework::FourMuonTool::passesQuadSelection ( const std::vector< const xAOD::Muon * > & muonsIn)
static

Definition at line 333 of file FourMuonTool.cxx.

333 {
334 bool accept(false);
335 bool charges(true);
336 bool quality(false);
337 if (( muons.at(0)->muonType() == xAOD::Muon::MuonType::Combined ) ||
338 ( muons.at(1)->muonType() == xAOD::Muon::MuonType::Combined ) ||
339 ( muons.at(2)->muonType() == xAOD::Muon::MuonType::Combined ) ||
340 ( muons.at(3)->muonType() == xAOD::Muon::MuonType::Combined )
341 ) quality = true;
342 if (charges && quality) accept = true;
343 return accept;
344 }
StatusCode accept(const xAOD::Muon *mu)

◆ performSearch()

StatusCode DerivationFramework::FourMuonTool::performSearch ( xAOD::VertexContainer * pairVxContainer,
xAOD::VertexContainer * quadVxContainer,
bool & acceptEvent,
const EventContext & ctx ) const

Definition at line 63 of file FourMuonTool.cxx.

64 {
65 ATH_MSG_DEBUG( "FourMuonTool::performSearch" );
66 selectEvent = false;
67
68 // Get the muons from StoreGate
69 SG::ReadHandle<xAOD::MuonContainer> importedMuonCollection(m_muonCollectionKey, ctx);
70 ATH_CHECK(importedMuonCollection.isValid());
71 ATH_MSG_DEBUG("Muon container size "<<importedMuonCollection->size());
72
73 // Get ID tracks
74 SG::ReadHandle<xAOD::TrackParticleContainer> importedTrackCollection(m_TrkParticleCollection, ctx);
75 ATH_CHECK(importedTrackCollection.isValid());
76 ATH_MSG_DEBUG("ID TrackParticle container size "<< importedTrackCollection->size());
77
78 // Select the muons
79 std::vector<const xAOD::Muon*> theMuonsAfterSelection;
80 SG::WriteDecorHandle<xAOD::MuonContainer, int> muonDecorator(m_muonIndex, ctx);
81 unsigned int nCombMuons = 0;
82 unsigned int nSegmentTaggedMuons = 0;
83
84 for (const auto * muon : *importedMuonCollection) {
85 if ( !muon ) continue;
86 muonDecorator(*muon) = -1; // all muons must be decorated
87 if ( (muon->muonType() != xAOD::Muon::MuonType::Combined ) && (muon->muonType() != xAOD::Muon::MuonType::SegmentTagged ) ) continue;
88 const xAOD::TrackParticle* muonTrk = muon->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
89 if ( !muonTrk ) continue;
90 const xAOD::Vertex* vx{};
91 if ( !m_trkSelector->decision(*muonTrk, vx) ) continue; // all ID tracks must pass basic tracking cuts
92 if ( fabs(muonTrk->pt())<m_ptCut ) continue; // pt cut
93 if ( fabs(muonTrk->eta())>m_etaCut ) continue; // eta cut
94 if ( muon->muonType() == xAOD::Muon::MuonType::Combined ) ++nCombMuons;
95 if ( muon->muonType() == xAOD::Muon::MuonType::SegmentTagged ) ++nSegmentTaggedMuons;
96 theMuonsAfterSelection.push_back(muon);
97 }
98 unsigned int nSelectedMuons = theMuonsAfterSelection.size();
99 ATH_MSG_DEBUG("Number of muons after selection: " << nSelectedMuons);
100 ATH_MSG_DEBUG("of which " << nCombMuons << " are combined");
101 ATH_MSG_DEBUG("and " << nSegmentTaggedMuons << " are segment tagged");
102 if ( (nSelectedMuons < 4) || (nCombMuons < 1) ) {
103 ATH_MSG_DEBUG("Muon criteria not met. Skipping event.");
104 return StatusCode::SUCCESS;
105 }
106 selectEvent = true; // if we got this far we should definitively accept the event
107
108 // Decorators
109 SG::Decorator< std::string > indexDecorator("CombinationCode");
110 SG::Decorator< std::string > chargeDecorator("ChargeCode");
111
112 // Order by pT
113 std::sort(theMuonsAfterSelection.begin(), theMuonsAfterSelection.end(), [](const xAOD::Muon *a, const xAOD::Muon *b) {
114 return b->pt() < a->pt();
115 });
116
117 // Decorate the selected muons (now pT ordered) with their index
118 unsigned int muonIndex(0);
119 for (auto selMuon : theMuonsAfterSelection) {
120 muonDecorator(*selMuon) = muonIndex;
121 ++muonIndex;
122 }
123
124 // Quadruplet combinatorics
125 std::vector<Combination> quadruplets;
126 std::vector<Combination> pairs;
127 buildCombinations(theMuonsAfterSelection,pairs,quadruplets,nSelectedMuons);
128 if (quadruplets.size()==0) {
129 ATH_MSG_DEBUG("No acceptable quadruplets");
130 return StatusCode::SUCCESS;
131 }
132
133 // Get the beam spot (for the vertexing starting point)
134 SG::ReadHandle<xAOD::EventInfo> evt(m_eventInfo_key, ctx);
135 ATH_CHECK(evt.isValid());
136 const Amg::Vector3D beamSpot(evt->beamPosX(), evt->beamPosY(), evt->beamPosZ());
137
138 // fit pairs
139 ATH_MSG_DEBUG("Successful pairs.....");
140 const std::string pairStr{"pair1"};
141 for (std::vector<Combination>::iterator pairItr = pairs.begin(); pairItr!=pairs.end(); ++pairItr) {
142 std::vector<const xAOD::TrackParticle*> theTracks = (*pairItr).trackParticles(pairStr);
143 std::unique_ptr<xAOD::Vertex> pairVxCandidate = fit(ctx,theTracks,importedTrackCollection.get(),beamSpot); // This line actually does the fitting and object making
144 if (pairVxCandidate) {
145 // decorate the candidate with its codes
146 indexDecorator(*pairVxCandidate) = (*pairItr).combinationIndices();
147 chargeDecorator(*pairVxCandidate) = (*pairItr).combinationCharges();
148 // decorate the candidate with refitted tracks and muons via the BPhysHelper
149 xAOD::BPhysHelper helper(pairVxCandidate.get());
150 helper.setRefTrks();
151 std::vector<const xAOD::Muon*> theStoredMuons;
152 theStoredMuons = (*pairItr).muons;
153 helper.setMuons(theStoredMuons,importedMuonCollection.get());
154 ATH_MSG_DEBUG("..... indices: " << (*pairItr).combinationIndices() <<
155 " charges: " << (*pairItr).combinationCharges() <<
156 " chi2: " << pairVxCandidate->chiSquared());
157 // Retain the vertex
158 pairVxContainer->push_back(std::move(pairVxCandidate));
159 } else { // fit failed
160 ATH_MSG_DEBUG("Fitter failed!");
161 }
162 }
163 ATH_MSG_DEBUG("pairContainer size " << pairVxContainer->size());
164
165 // fit quadruplets
166 ATH_MSG_DEBUG("Successful quadruplets.....");
167 const std::string dcStr{"DC"};
168 for (std::vector<Combination>::iterator quadItr = quadruplets.begin(); quadItr!=quadruplets.end(); ++quadItr) {
169 std::vector<const xAOD::TrackParticle*> theDCTracks; theDCTracks.clear();
170 theDCTracks = (*quadItr).trackParticles(dcStr);
171 std::unique_ptr<xAOD::Vertex> dcVxCandidate = fit(ctx,theDCTracks,importedTrackCollection.get(), beamSpot);
172 if (dcVxCandidate != 0) {
173 // decorate the candidate with its codes
174 indexDecorator(*dcVxCandidate) = (*quadItr).combinationIndices();
175 chargeDecorator(*dcVxCandidate) = (*quadItr).combinationCharges();
176 // Decorate the DC candidate with the differences between its chi2 and the other
177 double dcChi2 = dcVxCandidate->chiSquared();
178 // decorate the candidate with refitted tracks and muons via the BPhysHelper
179 xAOD::BPhysHelper helper(dcVxCandidate.get());
180 helper.setRefTrks();
181 const std::vector<const xAOD::Muon*> &theStoredMuons = (*quadItr).muons;
182 helper.setMuons(theStoredMuons,importedMuonCollection.get());
183 // Retain the vertex
184 quadVxContainer->push_back(std::move(dcVxCandidate));
185 ATH_MSG_DEBUG("..... indices: " << (*quadItr).combinationIndices() <<
186 " charges: " << (*quadItr).combinationCharges() <<
187 " chi2(DC): " << dcChi2);
188 } else { // fit failed
189 ATH_MSG_DEBUG("Fitter failed!");
190 }
191 }
192 ATH_MSG_DEBUG("quadruplet container size " << quadVxContainer->size());
193 if(quadVxContainer->size() > 500){
194 ATH_MSG_WARNING("Event Run: " << evt->runNumber() << " Event: " << evt->eventNumber() << " quadruplet container size " << quadVxContainer->size());
195 }
196
197 return StatusCode::SUCCESS;;
198 }
#define ATH_MSG_WARNING(x,...)
static Double_t a
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
static void buildCombinations(const std::vector< const xAOD::Muon * > &muonsIn, std::vector< Combination > &pairs, std::vector< Combination > &quadruplets, unsigned int nSelectedMuons)
Gaudi::Property< double > m_etaCut
Gaudi::Property< double > m_ptCut
std::unique_ptr< xAOD::Vertex > fit(const EventContext &ctx, const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection, const Amg::Vector3D &beamSpot) const
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Eigen::Matrix< double, 3, 1 > Vector3D
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition AuxElement.h:576
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_etaCut

Gaudi::Property<double> DerivationFramework::FourMuonTool::m_etaCut {this, "etaCut", 0.0}
private

Definition at line 160 of file FourMuonTool.h.

160{this, "etaCut", 0.0};

◆ m_eventInfo_key

SG::ReadHandleKey<xAOD::EventInfo> DerivationFramework::FourMuonTool::m_eventInfo_key {this, "EventInfo", "EventInfo", "Input event information"}
private

Definition at line 165 of file FourMuonTool.h.

165{this, "EventInfo", "EventInfo", "Input event information"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_iVertexFitter

PublicToolHandle< Trk::IVertexFitter > DerivationFramework::FourMuonTool::m_iVertexFitter {this, "TrkVertexFitterTool", "Trk::TrkVKalVrtFitter"}
private

Definition at line 163 of file FourMuonTool.h.

163{this, "TrkVertexFitterTool", "Trk::TrkVKalVrtFitter"};

◆ m_muonCollectionKey

SG::ReadHandleKey<xAOD::MuonContainer> DerivationFramework::FourMuonTool::m_muonCollectionKey {this, "muonCollectionKey", "Muons"}
private

Definition at line 161 of file FourMuonTool.h.

161{this, "muonCollectionKey", "Muons"};

◆ m_muonIndex

SG::WriteDecorHandleKey<xAOD::MuonContainer> DerivationFramework::FourMuonTool::m_muonIndex {this, "muonIndexDec", m_muonCollectionKey, "BPHY4MuonIndex"}
private

Definition at line 166 of file FourMuonTool.h.

166{this, "muonIndexDec", m_muonCollectionKey, "BPHY4MuonIndex"};

◆ m_ptCut

Gaudi::Property<double> DerivationFramework::FourMuonTool::m_ptCut {this, "ptCut", 0.0}
private

Definition at line 159 of file FourMuonTool.h.

159{this, "ptCut", 0.0};

◆ m_TrkParticleCollection

SG::ReadHandleKey<xAOD::TrackParticleContainer> DerivationFramework::FourMuonTool::m_TrkParticleCollection {this, "TrackParticleCollection", "TrackParticleCandidate"}
private

Definition at line 162 of file FourMuonTool.h.

162{this, "TrackParticleCollection", "TrackParticleCandidate"};

◆ m_trkSelector

PublicToolHandle< Trk::ITrackSelectorTool > DerivationFramework::FourMuonTool::m_trkSelector {this, "TrackSelectorTool", "InDet::TrackSelectorTool"}
private

Definition at line 164 of file FourMuonTool.h.

164{this, "TrackSelectorTool", "InDet::TrackSelectorTool"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: