ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DerivationFramework::BPhysConversionFinder Class Reference

#include <BPhysConversionFinder.h>

Inheritance diagram for DerivationFramework::BPhysConversionFinder:
Collaboration diagram for DerivationFramework::BPhysConversionFinder:

Public Member Functions

 BPhysConversionFinder (const std::string &t, const std::string &n, const IInterface *p)
 
StatusCode initialize () override
 
StatusCode finalize () override
 
virtual StatusCode addBranches () const override
 Pass the thinning service
More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode doCascadeFit (const xAOD::Vertex *diMuonVertex, const xAOD::Vertex *convVertex, const double diMuonMassConstraint, TLorentzVector &fitMom, float &chiSq) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::string m_diMuonCollectionToCheck
 
std::vector< std::string > m_passFlagsToCheck
 
ToolHandle< Trk::V0Toolsm_v0Tools
 
ToolHandle< Trk::IVertexFitterm_vertexFitter
 
ToolHandle< InDet::VertexPointEstimatorm_vertexEstimator
 
ToolHandle< Trk::ITrkDistanceFinderm_distanceTool
 
ToolHandle< InDet::ConversionPostSelectorm_postSelector
 
ToolHandle< Trk::TrkVKalVrtFitterm_cascadeFitter
 
std::string m_inputTrackParticleContainerName
 
std::string m_conversionContainerName
 
float m_maxDistBetweenTracks
 
float m_maxDeltaCotTheta
 
bool m_requireDeltaM
 
float m_maxDeltaM
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 33 of file BPhysConversionFinder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ BPhysConversionFinder()

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

Definition at line 22 of file BPhysConversionFinder.cxx.

24  :
25  AthAlgTool(t,n,p),
26  m_v0Tools("Trk::V0Tools"),
27  m_vertexFitter("Trk::TrkVKalVrtFitter"),
28  m_vertexEstimator("InDet::VertexPointEstimator"),
29  m_distanceTool("Trk::SeedNewtonTrkDistanceFinder/InDetConversionTrkDistanceFinder"),
30  m_postSelector("InDet::ConversionPostSelector"),
31  m_cascadeFitter("Trk::TrkVKalVrtFitter"),
32  m_inputTrackParticleContainerName("InDetTrackParticles"),
33  m_conversionContainerName("BPhysConversionCandidates"),
35  m_maxDeltaCotTheta(0.3),
36  m_requireDeltaM(true),
37  m_maxDeltaM(3000.0)
38  {
39  declareInterface<DerivationFramework::IAugmentationTool>(this);
40 
41  // Declare user-defined properties
42  declareProperty("DiMuonVertexContainer", m_diMuonCollectionToCheck);
43  declareProperty("PassFlagsToCheck", m_passFlagsToCheck);
44  declareProperty("V0Tools", m_v0Tools);
45  declareProperty("VertexFitterTool", m_vertexFitter);
46  declareProperty("VertexEstimator", m_vertexEstimator);
47  declareProperty("DistanceTool", m_distanceTool);
48  declareProperty("ConversionPostSelector", m_postSelector);
49  declareProperty("CascadeFitter", m_cascadeFitter);
50  declareProperty("InputTrackParticleContainerName", m_inputTrackParticleContainerName);
51  declareProperty("ConversionContainerName", m_conversionContainerName);
52  declareProperty("MaxDistBetweenTracks", m_maxDistBetweenTracks = 10.0); // Maximum allowed distance of minimum approach
53  declareProperty("MaxDeltaCotTheta", m_maxDeltaCotTheta = 0.3); // Maximum allowed dCotTheta between tracks
54  declareProperty("RequireDeltaM", m_requireDeltaM = true); // Only save a conversions if it's a chi_c,b candidate (must then pass "MaxDeltaM" requirement), if "False" all conversions in the event will be saved
55  declareProperty("MaxDeltaM", m_maxDeltaM = 3000.0); // Maximum mass difference between di-muon+conversion and di-muon
56 
57  }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::BPhysConversionFinder::addBranches ( ) const
overridevirtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 87 of file BPhysConversionFinder.cxx.

88  {
89 
90  int nTrackPairs_Init = 0;
91  int nTrackPairs_Selected = 0;
92  int nConv_VertexFit = 0;
93  int nConv_Selected = 0;
94  int nConv_Selected_DeltaM = 0;
95 
96  std::vector<const xAOD::Vertex*> oniaVertices;
97  oniaVertices.clear();
98 
99  //------------------------------------
100  // Look for di-muons
101  //------------------------------------
102  const xAOD::VertexContainer* diMuonContainer = NULL;
103  ATH_CHECK( evtStore()->retrieve(diMuonContainer, m_diMuonCollectionToCheck) );
104 
105  if(diMuonContainer->size() == 0) {
106 
107  ATH_MSG_DEBUG("Vertex Container (" << m_diMuonCollectionToCheck << ") is empty");
108 
109  } else {
110 
111  ATH_MSG_DEBUG("Vertex Container (" << m_diMuonCollectionToCheck << ") contains " << diMuonContainer->size() << " vertices");
112 
113  for(xAOD::VertexContainer::const_iterator vtxItr = diMuonContainer->begin(); vtxItr != diMuonContainer->end(); ++vtxItr) {
114 
115  const xAOD::Vertex* vertex = (*vtxItr);
116 
117  bool passedHypothesis = false;
118 
119  for(const auto &flag : m_passFlagsToCheck) {
121  bool pass = acc(*vertex);
122  if(pass) passedHypothesis = true;
123  }
124 
125  if(passedHypothesis) {
126  oniaVertices.push_back(vertex);
127  }
128 
129  }
130  }
131  //------------------------------------
132 
133  // Output conversion container
134  std::unique_ptr<xAOD::VertexContainer> conversionContainer( new xAOD::VertexContainer() );
135  std::unique_ptr<xAOD::VertexAuxContainer> conversionAuxContainer( new xAOD::VertexAuxContainer() );
136  conversionContainer->setStore(conversionAuxContainer.get());
137 
138  // Only call conversion finder if we've found a di-muon candidate or
139  // we really want to look for conversions independently
140  const bool callConvFinder = !m_requireDeltaM || oniaVertices.size() > 0;
141 
142  if(callConvFinder) {
143 
144  // Retrieve track particles from StoreGate
145  const xAOD::TrackParticleContainer* inputTrackParticles = NULL;
147 
148  ATH_MSG_DEBUG("Track particle container size " << inputTrackParticles->size());
149 
150  // Track Selection
151  std::vector<const xAOD::TrackParticle*> posTracks; posTracks.clear();
152  std::vector<const xAOD::TrackParticle*> negTracks; negTracks.clear();
153 
154  // Track Loop
155  for(xAOD::TrackParticleContainer::const_iterator trkItr = inputTrackParticles->begin(); trkItr != inputTrackParticles->end(); ++trkItr) {
156 
157  const xAOD::TrackParticle* track = (*trkItr);
158 
159  uint8_t nSCT(0);
160  uint8_t nPIX(0);
161 
162  track->summaryValue(nPIX,xAOD::numberOfPixelHits);
163  track->summaryValue(nSCT,xAOD::numberOfSCTHits);
164 
165  // Don't want TRT-only tracks
166  // Require Si hits on all tracks
167  if( nSCT + nPIX < 1 ) continue;
168 
169  if( track->charge() > 0.0) {
170  posTracks.push_back(track);
171  } else {
172  negTracks.push_back(track);
173  }
174 
175  } // Track Loop
176 
177  ATH_MSG_DEBUG(posTracks.size() + negTracks.size() << " tracks pass pre-selection");
178 
179  std::vector<const xAOD::TrackParticle*>::const_iterator tpIt1;
180  std::vector<const xAOD::TrackParticle*>::const_iterator tpIt2;
181 
182  // Pos Track Loop
183  for(tpIt1 = posTracks.begin(); tpIt1 != posTracks.end(); ++tpIt1) {
184 
185  const xAOD::TrackParticle* trackParticle1 = (*tpIt1);
186 
187  const Trk::Perigee& trackPerigee1 = trackParticle1->perigeeParameters();
188 
189  // Neg Track Loop
190  for(tpIt2 = negTracks.begin(); tpIt2 != negTracks.end(); ++tpIt2) {
191 
192  if (*tpIt1 == *tpIt2) continue;
193 
194  const xAOD::TrackParticle* trackParticle2 = (*tpIt2);
195 
196  const Trk::Perigee& trackPerigee2 = trackParticle2->perigeeParameters();
197 
198  nTrackPairs_Init++;
199 
200  //------------------------------------
201  // Track pair selection
202  //------------------------------------
203  const double deltaCotTheta = fabs(1./tan(trackPerigee1.parameters()[Trk::theta]) - 1./tan(trackPerigee2.parameters()[Trk::theta]));
204  if(deltaCotTheta > m_maxDeltaCotTheta) continue;
205 
206  double distance = 1000000.;
207  std::optional<std::pair<Amg::Vector3D,Amg::Vector3D>> result = m_distanceTool->CalculateMinimumDistance(trackParticle1->perigeeParameters(),trackParticle2->perigeeParameters() );
208  bool gotDistance = result.has_value();
209  if(gotDistance) distance = Amg::distance (result->first, result->second);
210  if(!gotDistance || (distance > m_maxDistBetweenTracks)) continue;
211  //------------------------------------
212 
213  //------------------------------------
214  // Estimate starting point + cuts on compatiblity of tracks
215  //------------------------------------
216  int sflag = 0;
217  int errorcode = 0;
218  std::map<std::string, float> vertexOutput;
219  Amg::Vector3D startingPoint = m_vertexEstimator->getCirclesIntersectionPoint(&trackPerigee1,&trackPerigee2,sflag,errorcode, vertexOutput);
220  if(errorcode != 0) continue;
221  //------------------------------------
222 
223  nTrackPairs_Selected++;
224 
225  std::vector<const xAOD::TrackParticle*> trackPair;
226  trackPair.clear();
227  trackPair.push_back(trackParticle1);
228  trackPair.push_back(trackParticle2);
229 
230  // Do the vertex fit
231  std::unique_ptr<xAOD::Vertex> convVertexCandidate( m_vertexFitter->fit(trackPair, startingPoint) );
232 
233  // Check for successful fit
234  if(convVertexCandidate != NULL) {
235 
236  ATH_MSG_DEBUG("Vertex Fit Succeeded");
237 
238  convVertexCandidate->clearTracks();
240  newLink1.setElement(*tpIt1);
241  newLink1.setStorableObject(*inputTrackParticles);
243  newLink2.setElement(*tpIt2);
244  newLink2.setStorableObject(*inputTrackParticles);
245  convVertexCandidate->addTrackAtVertex(newLink1);
246  convVertexCandidate->addTrackAtVertex(newLink2);
247 
248  nConv_VertexFit++;
249 
250  //------------------------------------
251  // Post-vertexing cuts
252  //------------------------------------
253 
254  // This is empty and only present for compatiblity.
255  // The cut this informtion pertains to is not used for Si-Si conversions so this is OK
256  std::vector<Amg::Vector3D> positionList;
257 
258  // Apply Si-Si converion post-selection
259  if( !m_postSelector->selectConversionCandidate(convVertexCandidate.get(),0,positionList) ) {
260  convVertexCandidate.reset();
261  continue;
262  }
263  //------------------------------------
264 
265  nConv_Selected++;
266 
267  // Get photon momentum 3-vector
268  const xAOD::Vertex * constConvVertex = convVertexCandidate.get();
269  Amg::Vector3D momentum = m_v0Tools->V0Momentum(constConvVertex);
270 
271  TLorentzVector photon;
272  photon.SetXYZM(momentum.x(),momentum.y(),momentum.z(),0.0);
273 
274  //------------------------------------
275  // Check if conversion is consistent with a chi_c,b candidate
276  // by requiring a small mass difference w.r.t. any di-muon in event
277  //------------------------------------
278  bool passDeltaM = false;
279 
280  // Use to keep track of which dimuon(s) gave a chi_c/b candidate
281  std::vector<const xAOD::Vertex*> candidateOniaVertices;
282  candidateOniaVertices.clear();
283 
284  for ( std::vector<const xAOD::Vertex*>::const_iterator vtxItr = oniaVertices.begin(); vtxItr != oniaVertices.end(); ++vtxItr ) {
285 
286  const xAOD::Vertex* oniaVertex = (*vtxItr);
287 
288  static const SG::ConstAccessor<std::vector<float> > RefTrackPxAcc("RefTrackPx");
289  static const SG::ConstAccessor<std::vector<float> > RefTrackPyAcc("RefTrackPy");
290  static const SG::ConstAccessor<std::vector<float> > RefTrackPzAcc("RefTrackPz");
291  std::vector<float> diMuon_Px = RefTrackPxAcc(*oniaVertex);
292  std::vector<float> diMuon_Py = RefTrackPyAcc(*oniaVertex);
293  std::vector<float> diMuon_Pz = RefTrackPzAcc(*oniaVertex);
294 
295  TLorentzVector muon1, muon2;
296  muon1.SetXYZM(diMuon_Px.at(0),diMuon_Py.at(0),diMuon_Pz.at(0),105.658);
297  muon2.SetXYZM(diMuon_Px.at(1),diMuon_Py.at(1),diMuon_Pz.at(1),105.658);
298 
299  TLorentzVector diMuon = muon1 + muon2;
300 
301  const double deltaM = (diMuon+photon).M() - diMuon.M();
302 
303  ATH_MSG_DEBUG("Candidate DeltaM = " << deltaM << " MeV DiMuon " << oniaVertex->index() << " ( Mass = " << diMuon.M() << " MeV )");
304 
305  // Did we find a one di-muon + photon candidate with a mass diff. consistent with chi_c/b?
306  if(deltaM < m_maxDeltaM) {
307  passDeltaM = true;
308  candidateOniaVertices.push_back(oniaVertex);
309  }
310 
311  }
312 
313  // Only keep the conversion candidate if it's consistent with a chi_c,b decay
314  if(m_requireDeltaM && !passDeltaM) {
315  convVertexCandidate.reset();
316  continue;
317  }
318  //------------------------------------
319 
320  //------------------------------------
321  // Final conversion candidates
322  //------------------------------------
323  nConv_Selected_DeltaM++;
324 
325  // Keep track of which dimuon(s) gave a chi_c/b candidate
326  std::vector< ElementLink<xAOD::VertexContainer> > diMuonLinks;
327  diMuonLinks.clear();
328 
329  // Output of cascade fits with various di-muon mass hypotheses
330  std::vector<float> fit_Psi1S_Px, fit_Psi1S_Py, fit_Psi1S_Pz, fit_Psi1S_M, fit_Psi1S_ChiSq;
331  std::vector<float> fit_Psi2S_Px, fit_Psi2S_Py, fit_Psi2S_Pz, fit_Psi2S_M, fit_Psi2S_ChiSq;
332  std::vector<float> fit_Upsi1S_Px, fit_Upsi1S_Py, fit_Upsi1S_Pz, fit_Upsi1S_M, fit_Upsi1S_ChiSq;
333  std::vector<float> fit_Upsi2S_Px, fit_Upsi2S_Py, fit_Upsi2S_Pz, fit_Upsi2S_M, fit_Upsi2S_ChiSq;
334  std::vector<float> fit_Upsi3S_Px, fit_Upsi3S_Py, fit_Upsi3S_Pz, fit_Upsi3S_M, fit_Upsi3S_ChiSq;
335 
336  // Loop over di-muon vertices associated with a candidate
337  for(std::vector<const xAOD::Vertex*>::const_iterator vtxItr = candidateOniaVertices.begin(); vtxItr != candidateOniaVertices.end(); ++vtxItr ) {
338 
339  //------------------------------------
340  // Add an element link to each dimuon which formed a
341  // candidate, leading to the decision to save this conversion
342  //------------------------------------
344  myLink.setElement(*vtxItr);
345  myLink.setStorableObject(*diMuonContainer);
346 
347  if(!myLink.isValid()) {
348  ATH_MSG_WARNING("Invalid DiMuon ElementLink!");
349  }
350 
351  diMuonLinks.push_back(myLink);
352  //------------------------------------
353 
354  // Check which mass window this di-muon passed
355  static const SG::ConstAccessor<Char_t> passed_PsiAcc("passed_Psi");
356  static const SG::ConstAccessor<Char_t> passed_UpsiAcc("passed_Upsi");
357  bool passed_Psi = passed_PsiAcc(**vtxItr);
358  bool passed_Upsi = passed_UpsiAcc(**vtxItr);
359 
360  //------------------------------------
361  // Cascade fit with J/psi mass hypothesis
362  //------------------------------------
363  float fitChiSq_Psi1S = 99999;
364  TLorentzVector fitResult_Psi1S;
365 
366  // Only bother with the fit if di-muon mass is within the relveant range,
367  // but still fill an dummy 4-vector to preserve one to one correspondance with "DiMuonLinks"
368  if(passed_Psi) {
369  ATH_CHECK( doCascadeFit(*vtxItr,constConvVertex,3096.916,fitResult_Psi1S,fitChiSq_Psi1S) );
370  }
371 
372  fit_Psi1S_Px.push_back(fitResult_Psi1S.Px());
373  fit_Psi1S_Py.push_back(fitResult_Psi1S.Py());
374  fit_Psi1S_Pz.push_back(fitResult_Psi1S.Pz());
375  fit_Psi1S_M.push_back(fitResult_Psi1S.M());
376  fit_Psi1S_ChiSq.push_back(fitChiSq_Psi1S);
377 
378  //------------------------------------
379  // Cascade fit with psi(2S) mass hypothesis
380  //------------------------------------
381  float fitChiSq_Psi2S = 99999;
382  TLorentzVector fitResult_Psi2S;
383 
384  // Only bother with the fit if di-muon mass is within the relveant range,
385  // but still fill an dummy 4-vector to preserve one to one correspondance with "DiMuonLinks"
386  if(passed_Psi) {
387  ATH_CHECK( doCascadeFit(*vtxItr,constConvVertex,3686.097,fitResult_Psi2S,fitChiSq_Psi2S) );
388  }
389 
390  fit_Psi2S_Px.push_back(fitResult_Psi2S.Px());
391  fit_Psi2S_Py.push_back(fitResult_Psi2S.Py());
392  fit_Psi2S_Pz.push_back(fitResult_Psi2S.Pz());
393  fit_Psi2S_M.push_back(fitResult_Psi2S.M());
394  fit_Psi2S_ChiSq.push_back(fitChiSq_Psi2S);
395 
396  //------------------------------------
397  // Cascade fit with Upsi(1S) mass hypothesis
398  //------------------------------------
399  float fitChiSq_Upsi1S = 99999;
400  TLorentzVector fitResult_Upsi1S;
401 
402  // Only bother with the fit if di-muon mass is within the relveant range,
403  // but still fill an dummy 4-vector to preserve one to one correspondance with "DiMuonLinks"
404  if(passed_Upsi) {
405  ATH_CHECK( doCascadeFit(*vtxItr,constConvVertex,9460.30,fitResult_Upsi1S,fitChiSq_Upsi1S) );
406  }
407 
408  fit_Upsi1S_Px.push_back(fitResult_Upsi1S.Px());
409  fit_Upsi1S_Py.push_back(fitResult_Upsi1S.Py());
410  fit_Upsi1S_Pz.push_back(fitResult_Upsi1S.Pz());
411  fit_Upsi1S_M.push_back(fitResult_Upsi1S.M());
412  fit_Upsi1S_ChiSq.push_back(fitChiSq_Upsi1S);
413 
414  //------------------------------------
415  // Cascade fit with Upsi(2S) mass hypothesis
416  //------------------------------------
417  float fitChiSq_Upsi2S = 99999;
418  TLorentzVector fitResult_Upsi2S;
419 
420  // Only bother with the fit if di-muon mass is within the relveant range,
421  // but still fill an dummy 4-vector to preserve one to one correspondance with "DiMuonLinks"
422  if(passed_Upsi) {
423  ATH_CHECK( doCascadeFit(*vtxItr,constConvVertex,10023.26,fitResult_Upsi2S,fitChiSq_Upsi2S) );
424  }
425 
426  fit_Upsi2S_Px.push_back(fitResult_Upsi2S.Px());
427  fit_Upsi2S_Py.push_back(fitResult_Upsi2S.Py());
428  fit_Upsi2S_Pz.push_back(fitResult_Upsi2S.Pz());
429  fit_Upsi2S_M.push_back(fitResult_Upsi2S.M());
430  fit_Upsi2S_ChiSq.push_back(fitChiSq_Upsi2S);
431 
432  //------------------------------------
433  // Cascade fit with Upsi(3S) mass hypothesis
434  //------------------------------------
435  float fitChiSq_Upsi3S = 99999;
436  TLorentzVector fitResult_Upsi3S;
437 
438  // Only bother with the fit if di-muon mass is within the relveant range,
439  // but still fill an dummy 4-vector to preserve one to one correspondance with "DiMuonLinks"
440  if(passed_Upsi) {
441  ATH_CHECK( doCascadeFit(*vtxItr,constConvVertex,10355.2,fitResult_Upsi3S,fitChiSq_Upsi3S) );
442  }
443 
444  fit_Upsi3S_Px.push_back(fitResult_Upsi3S.Px());
445  fit_Upsi3S_Py.push_back(fitResult_Upsi3S.Py());
446  fit_Upsi3S_Pz.push_back(fitResult_Upsi3S.Pz());
447  fit_Upsi3S_M.push_back(fitResult_Upsi3S.M());
448  fit_Upsi3S_ChiSq.push_back(fitChiSq_Upsi3S);
449 
450  }
451 
452  //------------------------------------
453  // Decorate selected conversions
454  //------------------------------------
455  ATH_MSG_DEBUG("Decorating conversion vertices");
456 
457  static const SG::Accessor< std::vector< ElementLink<xAOD::VertexContainer> > > DiMuonLinksAcc("DiMuonLinks");
458  DiMuonLinksAcc(*convVertexCandidate) = diMuonLinks;
459 
460  static const SG::Accessor< std::vector<float> > CascadeFit_Psi1S_PxAcc("CascadeFit_Psi1S_Px");
461  static const SG::Accessor< std::vector<float> > CascadeFit_Psi1S_PyAcc("CascadeFit_Psi1S_Py");
462  static const SG::Accessor< std::vector<float> > CascadeFit_Psi1S_PzAcc("CascadeFit_Psi1S_Pz");
463  static const SG::Accessor< std::vector<float> > CascadeFit_Psi1S_MAcc("CascadeFit_Psi1S_M");
464  static const SG::Accessor< std::vector<float> > CascadeFit_Psi1S_ChiSqAcc("CascadeFit_Psi1S_ChiSq");
465  CascadeFit_Psi1S_PxAcc(*convVertexCandidate) = fit_Psi1S_Px;
466  CascadeFit_Psi1S_PyAcc(*convVertexCandidate) = fit_Psi1S_Py;
467  CascadeFit_Psi1S_PzAcc(*convVertexCandidate) = fit_Psi1S_Pz;
468  CascadeFit_Psi1S_MAcc(*convVertexCandidate) = fit_Psi1S_M;
469  CascadeFit_Psi1S_ChiSqAcc(*convVertexCandidate) = fit_Psi1S_ChiSq;
470 
471  static const SG::Accessor< std::vector<float> > CascadeFit_Psi2S_PxAcc("CascadeFit_Psi2S_Px");
472  static const SG::Accessor< std::vector<float> > CascadeFit_Psi2S_PyAcc("CascadeFit_Psi2S_Py");
473  static const SG::Accessor< std::vector<float> > CascadeFit_Psi2S_PzAcc("CascadeFit_Psi2S_Pz");
474  static const SG::Accessor< std::vector<float> > CascadeFit_Psi2S_MAcc("CascadeFit_Psi2S_M");
475  static const SG::Accessor< std::vector<float> > CascadeFit_Psi2S_ChiSqAcc("CascadeFit_Psi2S_ChiSq");
476  CascadeFit_Psi2S_PxAcc(*convVertexCandidate) = fit_Psi2S_Px;
477  CascadeFit_Psi2S_PyAcc(*convVertexCandidate) = fit_Psi2S_Py;
478  CascadeFit_Psi2S_PzAcc(*convVertexCandidate) = fit_Psi2S_Pz;
479  CascadeFit_Psi2S_MAcc(*convVertexCandidate) = fit_Psi2S_M;
480  CascadeFit_Psi2S_ChiSqAcc(*convVertexCandidate) = fit_Psi2S_ChiSq;
481 
482  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi1S_PxAcc("CascadeFit_Upsi1S_Px");
483  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi1S_PyAcc("CascadeFit_Upsi1S_Py");
484  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi1S_PzAcc("CascadeFit_Upsi1S_Pz");
485  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi1S_MAcc("CascadeFit_Upsi1S_M");
486  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi1S_ChiSqAcc("CascadeFit_Upsi1S_ChiSq");
487  CascadeFit_Upsi1S_PxAcc(*convVertexCandidate) = fit_Upsi1S_Px;
488  CascadeFit_Upsi1S_PyAcc(*convVertexCandidate) = fit_Upsi1S_Py;
489  CascadeFit_Upsi1S_PzAcc(*convVertexCandidate) = fit_Upsi1S_Pz;
490  CascadeFit_Upsi1S_MAcc(*convVertexCandidate) = fit_Upsi1S_M;
491  CascadeFit_Upsi1S_ChiSqAcc(*convVertexCandidate) = fit_Upsi1S_ChiSq;
492 
493  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi2S_PxAcc("CascadeFit_Upsi2S_Px");
494  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi2S_PyAcc("CascadeFit_Upsi2S_Py");
495  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi2S_PzAcc("CascadeFit_Upsi2S_Pz");
496  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi2S_MAcc("CascadeFit_Upsi2S_M");
497  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi2S_ChiSqAcc("CascadeFit_Upsi2S_ChiSq");
498  CascadeFit_Upsi2S_PxAcc(*convVertexCandidate) = fit_Upsi2S_Px;
499  CascadeFit_Upsi2S_PyAcc(*convVertexCandidate) = fit_Upsi2S_Py;
500  CascadeFit_Upsi2S_PzAcc(*convVertexCandidate) = fit_Upsi2S_Pz;
501  CascadeFit_Upsi2S_MAcc(*convVertexCandidate) = fit_Upsi2S_M;
502  CascadeFit_Upsi2S_ChiSqAcc(*convVertexCandidate) = fit_Upsi2S_ChiSq;
503 
504  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi3S_PxAcc("CascadeFit_Upsi3S_Px");
505  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi3S_PyAcc("CascadeFit_Upsi3S_Py");
506  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi3S_PzAcc("CascadeFit_Upsi3S_Pz");
507  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi3S_MAcc("CascadeFit_Upsi3S_M");
508  static const SG::Accessor< std::vector<float> > CascadeFit_Upsi3S_ChiSqAcc("CascadeFit_Upsi3S_ChiSq");
509  CascadeFit_Upsi3S_PxAcc(*convVertexCandidate) = fit_Upsi3S_Px;
510  CascadeFit_Upsi3S_PyAcc(*convVertexCandidate) = fit_Upsi3S_Py;
511  CascadeFit_Upsi3S_PzAcc(*convVertexCandidate) = fit_Upsi3S_Pz;
512  CascadeFit_Upsi3S_MAcc(*convVertexCandidate) = fit_Upsi3S_M;
513  CascadeFit_Upsi3S_ChiSqAcc(*convVertexCandidate) = fit_Upsi3S_ChiSq;
514 
515  static const SG::Accessor<float> pxAcc("px");
516  static const SG::Accessor<float> pyAcc("py");
517  static const SG::Accessor<float> pzAcc("pz");
518  pxAcc(*convVertexCandidate) = momentum.x();
519  pyAcc(*convVertexCandidate) = momentum.y();
520  pzAcc(*convVertexCandidate) = momentum.z();
521 
522  static const SG::Accessor<float> deltaCotThetaTrkAcc("deltaCotThetaTrk");
523  static const SG::Accessor<float> minimumDistanceTrkAcc("minimumDistanceTrk");
524  deltaCotThetaTrkAcc(*convVertexCandidate) = deltaCotTheta;
525  minimumDistanceTrkAcc(*convVertexCandidate) = distance;
526 
527  static const SG::Accessor<float> deltaPhiTracksAcc("deltaPhiTracks");
528  static const SG::Accessor<float> DR1R2Acc("DR1R2");
529  deltaPhiTracksAcc(*convVertexCandidate) = vertexOutput["deltaPhiTracks"];
530  DR1R2Acc(*convVertexCandidate) = vertexOutput["DR1R2"];
531 
532  static const SG::Accessor<Char_t> passedAcc("passed");
533  passedAcc(*convVertexCandidate) = true; // Used in event skimming
534 
535  conversionContainer->push_back(convVertexCandidate.release());
536 
537  } else {
538  ATH_MSG_DEBUG("Vertex Fit Failed");
539  }
540 
541  } // Neg Track Loop
542 
543  } // Pos Track Loop
544 
545  } // callConvFinder
546 
547  // Write the results to StoreGate
548  CHECK(evtStore()->record(conversionContainer.release(), m_conversionContainerName));
549  CHECK(evtStore()->record(conversionAuxContainer.release(), m_conversionContainerName+"Aux."));
550 
551  ATH_MSG_DEBUG("-------------------------");
552  ATH_MSG_DEBUG("Number of track pairs: " << nTrackPairs_Init);
553  ATH_MSG_DEBUG("Number of track pairs selected: " << nTrackPairs_Selected);
554  ATH_MSG_DEBUG("Number of successful vertex fits: " << nConv_VertexFit);
555  ATH_MSG_DEBUG("Number of selected vertices: " << nConv_Selected);
556  ATH_MSG_DEBUG("Number of selected vertices (after DeltaM req.): " << nConv_Selected_DeltaM);
557 
558  return StatusCode::SUCCESS;
559  }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ 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.

95 { return m_detStore; }

◆ doCascadeFit()

StatusCode DerivationFramework::BPhysConversionFinder::doCascadeFit ( const xAOD::Vertex diMuonVertex,
const xAOD::Vertex convVertex,
const double  diMuonMassConstraint,
TLorentzVector &  fitMom,
float &  chiSq 
) const
private

Definition at line 561 of file BPhysConversionFinder.cxx.

561  {
562 
563  std::vector<const xAOD::TrackParticle*> diMuonTracks;
564  diMuonTracks.push_back(diMuonVertex->trackParticle(0));
565  diMuonTracks.push_back(diMuonVertex->trackParticle(1));
566 
567  std::vector<double> diMuonTrackMasses;
568  diMuonTrackMasses.push_back(105.658);
569  diMuonTrackMasses.push_back(105.658);
570 
571  std::vector<const xAOD::TrackParticle*> convTracks;
572  convTracks.push_back(convVertex->trackParticle(0));
573  convTracks.push_back(convVertex->trackParticle(1));
574 
575  std::vector<double> convTrackMasses;
576  convTrackMasses.push_back(0.511);
577  convTrackMasses.push_back(0.511);
578 
579  // Reset
580  std::unique_ptr<Trk::IVKalState> state = m_cascadeFitter->makeState();
581 
582  // Set Robustness
583  m_cascadeFitter->setRobustness(0, *state);
584 
585  // Build up the topology
586 
587  // Vertex list
588  std::vector<Trk::VertexID> vrtList;
589  // V0 vertex
590  Trk::VertexID vID;
591  vID = m_cascadeFitter->startVertex(convTracks,convTrackMasses,*state,0.0); // Constrain converision mass to zero
592 
593  vrtList.push_back(vID);
594 
595  // chi_c/b vertex
596  Trk::VertexID vID2 = m_cascadeFitter->nextVertex(diMuonTracks,diMuonTrackMasses,vrtList,*state);
597 
598  std::vector<Trk::VertexID> cnstV;
599  cnstV.clear();
600  if ( !m_cascadeFitter->addMassConstraint(vID2,diMuonTracks,cnstV,*state,diMuonMassConstraint).isSuccess() ) {
601  ATH_MSG_WARNING("addMassConstraint failed");
602  }
603 
604  // Do the fit
605  std::unique_ptr<Trk::VxCascadeInfo> result(m_cascadeFitter->fitCascade(*state));
606 
607  const std::vector< std::vector<TLorentzVector> > &moms = result->getParticleMoms();
608 
609  {
610 
611  if(moms.size() > 2) ATH_MSG_WARNING("DoCascadeFit - More than two output momentum!?");
612 
613  TLorentzVector conv_Fit = moms.at(0).at(0) + moms.at(0).at(1);
614  TLorentzVector diMuon_Fit = moms.at(1).at(0) + moms.at(1).at(1);
615 
616  // Momentum of DiMuon + photon system
617  fitMom = diMuon_Fit + conv_Fit;
618 
619  chiSq = result->fitChi2()/result->nDoF();
620 
621  // Done with the fit result
622  result.reset();
623 
624  }
625 
626  return StatusCode::SUCCESS;
627 
628  }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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

◆ finalize()

StatusCode DerivationFramework::BPhysConversionFinder::finalize ( )
override

Definition at line 79 of file BPhysConversionFinder.cxx.

80  {
81  // everything all right
82  return StatusCode::SUCCESS;
83  }

◆ initialize()

StatusCode DerivationFramework::BPhysConversionFinder::initialize ( )
override

Definition at line 61 of file BPhysConversionFinder.cxx.

62  {
63 
64  ATH_MSG_DEBUG("in initialize()");
65 
66  ATH_CHECK( m_v0Tools.retrieve() );
67  ATH_CHECK( m_vertexFitter.retrieve() );
68  ATH_CHECK( m_vertexEstimator.retrieve() );
69  ATH_CHECK( m_distanceTool.retrieve() );
70  ATH_CHECK( m_postSelector.retrieve() );
71  ATH_CHECK( m_cascadeFitter.retrieve() );
72 
73  return StatusCode::SUCCESS;
74 
75  }

◆ 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.

◆ interfaceID()

static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 31 of file IAugmentationTool.h.

31 { return IID_IAugmentationTool; }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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.

◆ 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 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_cascadeFitter

ToolHandle<Trk::TrkVKalVrtFitter > DerivationFramework::BPhysConversionFinder::m_cascadeFitter
private

Definition at line 56 of file BPhysConversionFinder.h.

◆ m_conversionContainerName

std::string DerivationFramework::BPhysConversionFinder::m_conversionContainerName
private

Definition at line 59 of file BPhysConversionFinder.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_diMuonCollectionToCheck

std::string DerivationFramework::BPhysConversionFinder::m_diMuonCollectionToCheck
private

Definition at line 48 of file BPhysConversionFinder.h.

◆ m_distanceTool

ToolHandle<Trk::ITrkDistanceFinder> DerivationFramework::BPhysConversionFinder::m_distanceTool
private

Definition at line 54 of file BPhysConversionFinder.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_inputTrackParticleContainerName

std::string DerivationFramework::BPhysConversionFinder::m_inputTrackParticleContainerName
private

Definition at line 58 of file BPhysConversionFinder.h.

◆ m_maxDeltaCotTheta

float DerivationFramework::BPhysConversionFinder::m_maxDeltaCotTheta
private

Definition at line 62 of file BPhysConversionFinder.h.

◆ m_maxDeltaM

float DerivationFramework::BPhysConversionFinder::m_maxDeltaM
private

Definition at line 65 of file BPhysConversionFinder.h.

◆ m_maxDistBetweenTracks

float DerivationFramework::BPhysConversionFinder::m_maxDistBetweenTracks
private

Definition at line 61 of file BPhysConversionFinder.h.

◆ m_passFlagsToCheck

std::vector<std::string> DerivationFramework::BPhysConversionFinder::m_passFlagsToCheck
private

Definition at line 49 of file BPhysConversionFinder.h.

◆ m_postSelector

ToolHandle<InDet::ConversionPostSelector> DerivationFramework::BPhysConversionFinder::m_postSelector
private

Definition at line 55 of file BPhysConversionFinder.h.

◆ m_requireDeltaM

bool DerivationFramework::BPhysConversionFinder::m_requireDeltaM
private

Definition at line 64 of file BPhysConversionFinder.h.

◆ m_v0Tools

ToolHandle<Trk::V0Tools> DerivationFramework::BPhysConversionFinder::m_v0Tools
private

Definition at line 51 of file BPhysConversionFinder.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexEstimator

ToolHandle<InDet::VertexPointEstimator> DerivationFramework::BPhysConversionFinder::m_vertexEstimator
private

Definition at line 53 of file BPhysConversionFinder.h.

◆ m_vertexFitter

ToolHandle<Trk::IVertexFitter> DerivationFramework::BPhysConversionFinder::m_vertexFitter
private

Definition at line 52 of file BPhysConversionFinder.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
DerivationFramework::BPhysConversionFinder::m_v0Tools
ToolHandle< Trk::V0Tools > m_v0Tools
Definition: BPhysConversionFinder.h:51
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::VertexAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: VertexAuxContainer_v1.h:32
Trk::VertexID
int VertexID
Definition: IVertexCascadeFitter.h:23
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
DerivationFramework::BPhysConversionFinder::m_conversionContainerName
std::string m_conversionContainerName
Definition: BPhysConversionFinder.h:59
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
DerivationFramework::BPhysConversionFinder::m_maxDistBetweenTracks
float m_maxDistBetweenTracks
Definition: BPhysConversionFinder.h:61
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
DerivationFramework::BPhysConversionFinder::m_diMuonCollectionToCheck
std::string m_diMuonCollectionToCheck
Definition: BPhysConversionFinder.h:48
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::BPhysConversionFinder::doCascadeFit
StatusCode doCascadeFit(const xAOD::Vertex *diMuonVertex, const xAOD::Vertex *convVertex, const double diMuonMassConstraint, TLorentzVector &fitMom, float &chiSq) const
Definition: BPhysConversionFinder.cxx:561
DerivationFramework::BPhysConversionFinder::m_distanceTool
ToolHandle< Trk::ITrkDistanceFinder > m_distanceTool
Definition: BPhysConversionFinder.h:54
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
DerivationFramework::BPhysConversionFinder::m_cascadeFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_cascadeFitter
Definition: BPhysConversionFinder.h:56
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DerivationFramework::BPhysConversionFinder::m_vertexFitter
ToolHandle< Trk::IVertexFitter > m_vertexFitter
Definition: BPhysConversionFinder.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::BPhysConversionFinder::m_passFlagsToCheck
std::vector< std::string > m_passFlagsToCheck
Definition: BPhysConversionFinder.h:49
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:66
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
master.flag
bool flag
Definition: master.py:29
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
DerivationFramework::BPhysConversionFinder::m_requireDeltaM
bool m_requireDeltaM
Definition: BPhysConversionFinder.h:64
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
DerivationFramework::BPhysConversionFinder::m_vertexEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition: BPhysConversionFinder.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
DerivationFramework::BPhysConversionFinder::m_postSelector
ToolHandle< InDet::ConversionPostSelector > m_postSelector
Definition: BPhysConversionFinder.h:55
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
DerivationFramework::BPhysConversionFinder::m_inputTrackParticleContainerName
std::string m_inputTrackParticleContainerName
Definition: BPhysConversionFinder.h:58
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DerivationFramework::BPhysConversionFinder::m_maxDeltaCotTheta
float m_maxDeltaCotTheta
Definition: BPhysConversionFinder.h:62
DerivationFramework::BPhysConversionFinder::m_maxDeltaM
float m_maxDeltaM
Definition: BPhysConversionFinder.h:65
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528