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::Reco_4mu Class Reference

#include <Reco_4mu.h>

Inheritance diagram for DerivationFramework::Reco_4mu:
Collaboration diagram for DerivationFramework::Reco_4mu:

Public Member Functions

 Reco_4mu (const std::string &t, const std::string &n, const IInterface *p)
 
StatusCode initialize ()
 
StatusCode finalize ()
 
virtual StatusCode addBranches () const
 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

void ProcessVertex (xAOD::BPhysHypoHelper &, xAOD::BPhysHelper::pv_type, std::vector< double > trackMasses) const
 tools More...
 
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

ToolHandle< Trk::V0Toolsm_v0Tools
 
ToolHandle< DerivationFramework::FourMuonToolm_fourMuonTool
 
ToolHandle< Analysis::PrimaryVertexRefitterm_pvRefitter
 
std::string m_pairName
 job options More...
 
std::string m_quadName
 
std::string m_pvContainerName
 
std::string m_refPVContainerName
 
bool m_refitPV
 
int m_PV_max
 
int m_DoVertexType
 
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 34 of file Reco_4mu.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

◆ Reco_4mu()

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

Definition at line 20 of file Reco_4mu.cxx.

22  :
23  AthAlgTool(t,n,p),
24  m_v0Tools("Trk::V0Tools"),
25  m_fourMuonTool("DerivationFramework::FourMuonTool",this),
26  m_pvRefitter("Analysis::PrimaryVertexRefitter",this)
27  {
28  declareInterface<DerivationFramework::IAugmentationTool>(this);
29 
30  // Declare tools
31  declareProperty("V0Tools" , m_v0Tools);
32  declareProperty("FourMuonTool", m_fourMuonTool);
33  declareProperty("PVRefitter", m_pvRefitter);
34 
35  // Declare user-defined properties
36  declareProperty("PairContainerName" , m_pairName = "Pairs");
37  declareProperty("QuadrupletContainerName", m_quadName = "Quadruplets");
38  declareProperty("PVContainerName" , m_pvContainerName = "PrimaryVertices");
39  declareProperty("RefPVContainerName" , m_refPVContainerName = "RefittedPrimaryVertices");
40  declareProperty("RefitPV" , m_refitPV = false);
41  declareProperty("MaxPVrefit" , m_PV_max = 1);
42  declareProperty("DoVertexType" , m_DoVertexType = 1);
43  }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::Reco_4mu::addBranches ( ) const
virtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 75 of file Reco_4mu.cxx.

76  {
77  // Output containers and its auxilliary store
78  xAOD::VertexContainer* pairContainer = NULL;
79  xAOD::VertexAuxContainer* pairAuxContainer = NULL;
80  xAOD::VertexContainer* quadContainer = NULL;
81  xAOD::VertexAuxContainer* quadAuxContainer = NULL;
82  bool acceptEvent = false; // this is a dummy
83  //----------------------------------------------------
84  // call finder
85  //----------------------------------------------------
86  if( !m_fourMuonTool->performSearch(pairContainer, pairAuxContainer, quadContainer, quadAuxContainer, acceptEvent).isSuccess() ) {
87  ATH_MSG_FATAL("4mu tool (" << m_fourMuonTool << ") failed.");
88  return StatusCode::FAILURE;
89  }
90 
91  //----------------------------------------------------
92  // event selection
93  //----------------------------------------------------
94  /*if (quadContainer->size()==0) {
95  if (pairContainer!=NULL) delete pairContainer;
96  if (pairAuxContainer!=NULL) delete pairAuxContainer;
97  if (quadContainer!=NULL) delete quadContainer;
98  if (quadAuxContainer!=NULL) delete quadAuxContainer;
99  return(acceptEvent);
100  // acceptEvent based on muon selection only, not quads
101  }*/
102 
103  //----------------------------------------------------
104  // retrieve primary vertices
105  //----------------------------------------------------
106  const xAOD::VertexContainer* pvContainer = NULL;
107  auto sc = evtStore()->retrieve(pvContainer, m_pvContainerName);
108  if(sc.isFailure()){
109  ATH_MSG_FATAL("Cannot find PV Container");
110  return StatusCode::FAILURE;
111  }
112  //----------------------------------------------------
113  // Refit primary vertices
114  //----------------------------------------------------
115  xAOD::VertexContainer* refPvContainer = NULL;
116  xAOD::VertexAuxContainer* refPvAuxContainer = NULL;
117 
118  if(m_refitPV) {
119  refPvContainer = new xAOD::VertexContainer;
120  refPvAuxContainer = new xAOD::VertexAuxContainer;
121  refPvContainer->setStore(refPvAuxContainer);
122  }
123 
124  BPhysPVTools helper(&(*m_v0Tools));//Give the helper class the ptr to v0tools to use
125 
126  if(m_refitPV){
127  if(quadContainer->size() >0){
128  StatusCode SC = helper.FillCandwithRefittedVertices(quadContainer, pvContainer, refPvContainer, &(*m_pvRefitter) , m_PV_max, m_DoVertexType);
129  if(SC.isFailure()){
130  ATH_MSG_FATAL("refitting failed - check the vertices you passed");
131  return StatusCode::FAILURE;
132  }
133  }
134  if(pairContainer->size()>0) {
135  StatusCode SC = helper.FillCandwithRefittedVertices(pairContainer, pvContainer, refPvContainer, &(*m_pvRefitter) , m_PV_max, m_DoVertexType);
136  if(SC.isFailure()){
137  ATH_MSG_FATAL("refitting failed - check the vertices you passed");
138  return StatusCode::FAILURE;
139  }
140  }
141  }else{
142  if(quadContainer->size() >0){
143  auto sc = helper.FillCandExistingVertices(quadContainer, pvContainer, m_DoVertexType);
144  sc.ignore();
145  }
146  if(pairContainer->size() >0)
147  {
148  auto sc = helper.FillCandExistingVertices(pairContainer, pvContainer, m_DoVertexType);
149  sc.ignore();
150  }
151  }
152 
153  //----------------------------------------------------
154  // Mass-hypothesis dependent quantities
155  //----------------------------------------------------
156 
157  std::vector<double> muonPairMasses = std::vector<double>(2, 105.658);
158  std::vector<double> muonQuadMasses = std::vector<double>(4, 105.658);
159 
160  bool doPt = (m_DoVertexType & 1) != 0;
161  bool doA0 = (m_DoVertexType & 2) != 0;
162  bool doZ0 = (m_DoVertexType & 4) != 0;
163  bool doZ0BA = (m_DoVertexType & 8) != 0;
164 
165  // loop over pairs
166  xAOD::VertexContainer::iterator pairItr = pairContainer->begin();
167  ATH_MSG_DEBUG("Indices/masses of pairs follows....");
168  for(; pairItr!=pairContainer->end(); ++pairItr) {
169  // create BPhysHypoHelper
170  xAOD::BPhysHypoHelper pairHelper("PAIR", *pairItr);
171 
172  //----------------------------------------------------
173  // decorate the vertex
174  //----------------------------------------------------
175  // a) invariant mass and error
176  if( !pairHelper.setMass(muonPairMasses) ) ATH_MSG_WARNING("Decoration pair.setMass failed");
177 
178  double massErr = m_v0Tools->invariantMassError(pairHelper.vtx(), muonPairMasses);
179  if( !pairHelper.setMassErr(massErr) ) ATH_MSG_WARNING("Decoration pair.setMassErr failed");
180 
181  // b) proper decay time and error:
182  // retrieve the refitted PV (or the original one, if the PV refitting was turned off)
183  if(doPt) ProcessVertex(pairHelper, xAOD::BPhysHelper::PV_MAX_SUM_PT2, muonPairMasses);
184  if(doA0) ProcessVertex(pairHelper, xAOD::BPhysHelper::PV_MIN_A0, muonPairMasses);
185  if(doZ0) ProcessVertex(pairHelper, xAOD::BPhysHelper::PV_MIN_Z0, muonPairMasses);
186  if(doZ0BA) ProcessVertex(pairHelper, xAOD::BPhysHelper::PV_MIN_Z0_BA, muonPairMasses);
187  static const SG::ConstAccessor<std::string> CombinationCodeAcc("CombinationCode");
188  ATH_MSG_DEBUG(CombinationCodeAcc(**pairItr) << " : " << pairHelper.mass() << " +/- " << pairHelper.massErr());
189  }
190 
191  // loop over quadruplets
192  xAOD::VertexContainer::iterator quadItr = quadContainer->begin();
193  ATH_MSG_DEBUG("Indices/masses of quadruplets follows....");
194  for(; quadItr!=quadContainer->end(); ++quadItr) {
195  // create BPhysHypoHelper
196  xAOD::BPhysHypoHelper quadHelper("QUAD", *quadItr);
197 
198  //----------------------------------------------------
199  // decorate the vertex
200  //----------------------------------------------------
201  // a) invariant mass and error
202  if( !quadHelper.setMass(muonQuadMasses) ) ATH_MSG_WARNING("Decoration quad.setMass failed");
203 
204  double massErr = m_v0Tools->invariantMassError(quadHelper.vtx(), muonQuadMasses);
205  if( !quadHelper.setMassErr(massErr) ) ATH_MSG_WARNING("Decoration quad.setMassErr failed");
206 
207  // b) proper decay time and error:
208  // retrieve the refitted PV (or the original one, if the PV refitting was turned off)
209  if(doPt) ProcessVertex(quadHelper, xAOD::BPhysHelper::PV_MAX_SUM_PT2, muonQuadMasses);
210  if(doA0) ProcessVertex(quadHelper, xAOD::BPhysHelper::PV_MIN_A0, muonQuadMasses);
211  if(doZ0) ProcessVertex(quadHelper, xAOD::BPhysHelper::PV_MIN_Z0, muonQuadMasses);
212  if(doZ0BA) ProcessVertex(quadHelper, xAOD::BPhysHelper::PV_MIN_Z0_BA, muonQuadMasses);
213  static const SG::ConstAccessor<std::string> CombinationCodeAcc("CombinationCode");
214  ATH_MSG_DEBUG(CombinationCodeAcc(**quadItr) << " : " << quadHelper.mass() << " +/- " << quadHelper.massErr());
215  }
216 
217  //----------------------------------------------------
218  // save in the StoreGate
219  //----------------------------------------------------
220  // Pairs
221  if (!evtStore()->contains<xAOD::VertexContainer>(m_pairName))
222  evtStore()->record(pairContainer, m_pairName).ignore();
223  if (!evtStore()->contains<xAOD::VertexAuxContainer>(m_pairName+"Aux."))
224  evtStore()->record(pairAuxContainer, m_pairName+"Aux.").ignore();
225 
226  // Quads
227  if (!evtStore()->contains<xAOD::VertexContainer>(m_quadName))
228  evtStore()->record(quadContainer, m_quadName).ignore();
229  if (!evtStore()->contains<xAOD::VertexAuxContainer>(m_quadName+"Aux."))
230  evtStore()->record(quadAuxContainer, m_quadName+"Aux.").ignore();
231 
232  // Refitted PVs
233  if(m_refitPV) {
234  evtStore()->record(refPvContainer , m_refPVContainerName).ignore();
235  evtStore()->record(refPvAuxContainer, m_refPVContainerName+"Aux.").ignore();
236  }
237 
238  return StatusCode::SUCCESS;
239  }

◆ 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; }

◆ 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::Reco_4mu::finalize ( )

Definition at line 67 of file Reco_4mu.cxx.

68  {
69  // everything all right
70  return StatusCode::SUCCESS;
71  }

◆ initialize()

StatusCode DerivationFramework::Reco_4mu::initialize ( )

Definition at line 47 of file Reco_4mu.cxx.

48  {
49 
50  ATH_MSG_DEBUG("in initialize()");
51 
52  // retrieve V0 tools
53  CHECK( m_v0Tools.retrieve() );
54 
55  // get the JpsiFinder tool
56  CHECK( m_fourMuonTool.retrieve() );
57 
58  // get the PrimaryVertexRefitter tool
59  CHECK( m_pvRefitter.retrieve() );
60 
61  return StatusCode::SUCCESS;
62 
63  }

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

◆ ProcessVertex()

void DerivationFramework::Reco_4mu::ProcessVertex ( xAOD::BPhysHypoHelper hypoHelper,
xAOD::BPhysHelper::pv_type  pv_t,
std::vector< double >  trackMasses 
) const
private

tools

Definition at line 242 of file Reco_4mu.cxx.

242  {
243 
244  const xAOD::Vertex* pv = hypoHelper.pv(pv_t);
245  if(pv) {
246  // decorate the vertex.
247 
248  BPHYS_CHECK( hypoHelper.setTau( m_v0Tools->tau(hypoHelper.vtx(), pv, trackMasses),
249  pv_t,
251 
252  BPHYS_CHECK( hypoHelper.setTauErr( m_v0Tools->tauError(hypoHelper.vtx(), pv, trackMasses),
253  pv_t,
255 
256  //enum pv_type {PV_MAX_SUM_PT2, PV_MIN_A0, PV_MIN_Z0, PV_MIN_Z0BA};
257  }else{
258 
259  const float errConst = -9999999;
260  BPHYS_CHECK( hypoHelper.setTau( errConst,
261  pv_t,
263 
264  BPHYS_CHECK( hypoHelper.setTauErr( errConst,
265  pv_t,
267  }
268 
269  return;
270  }

◆ 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_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_DoVertexType

int DerivationFramework::Reco_4mu::m_DoVertexType
private

Definition at line 59 of file Reco_4mu.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_fourMuonTool

ToolHandle<DerivationFramework::FourMuonTool> DerivationFramework::Reco_4mu::m_fourMuonTool
private

Definition at line 48 of file Reco_4mu.h.

◆ m_pairName

std::string DerivationFramework::Reco_4mu::m_pairName
private

job options

Definition at line 53 of file Reco_4mu.h.

◆ m_PV_max

int DerivationFramework::Reco_4mu::m_PV_max
private

Definition at line 58 of file Reco_4mu.h.

◆ m_pvContainerName

std::string DerivationFramework::Reco_4mu::m_pvContainerName
private

Definition at line 55 of file Reco_4mu.h.

◆ m_pvRefitter

ToolHandle<Analysis::PrimaryVertexRefitter> DerivationFramework::Reco_4mu::m_pvRefitter
private

Definition at line 49 of file Reco_4mu.h.

◆ m_quadName

std::string DerivationFramework::Reco_4mu::m_quadName
private

Definition at line 54 of file Reco_4mu.h.

◆ m_refitPV

bool DerivationFramework::Reco_4mu::m_refitPV
private

Definition at line 57 of file Reco_4mu.h.

◆ m_refPVContainerName

std::string DerivationFramework::Reco_4mu::m_refPVContainerName
private

Definition at line 56 of file Reco_4mu.h.

◆ m_v0Tools

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

Definition at line 47 of file Reco_4mu.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.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:
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DerivationFramework::Reco_4mu::m_DoVertexType
int m_DoVertexType
Definition: Reco_4mu.h:59
xAOD::VertexAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: VertexAuxContainer_v1.h:32
xAOD::BPhysHypoHelper::setTauErr
bool setTauErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time error
Definition: BPhysHypoHelper.cxx:176
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DerivationFramework::Reco_4mu::m_pvContainerName
std::string m_pvContainerName
Definition: Reco_4mu.h:55
DerivationFramework::Reco_4mu::ProcessVertex
void ProcessVertex(xAOD::BPhysHypoHelper &, xAOD::BPhysHelper::pv_type, std::vector< double > trackMasses) const
tools
Definition: Reco_4mu.cxx:242
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::BPhysHelper::PV_MIN_Z0
@ PV_MIN_Z0
Definition: BPhysHelper.h:475
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
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
xAOD::BPhysHypoHelper::TAU_INV_MASS
@ TAU_INV_MASS
Definition: BPhysHypoHelper.h:137
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
DerivationFramework::Reco_4mu::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: Reco_4mu.h:49
DerivationFramework::Reco_4mu::m_PV_max
int m_PV_max
Definition: Reco_4mu.h:58
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::BPhysHypoHelper
Definition: BPhysHypoHelper.h:73
BPHYS_CHECK
#define BPHYS_CHECK(EXP)
Useful CHECK macro.
Definition: BPhysHelper.h:738
DerivationFramework::Reco_4mu::m_pairName
std::string m_pairName
job options
Definition: Reco_4mu.h:53
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DerivationFramework::Reco_4mu::m_v0Tools
ToolHandle< Trk::V0Tools > m_v0Tools
Definition: Reco_4mu.h:47
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::Reco_4mu::m_quadName
std::string m_quadName
Definition: Reco_4mu.h:54
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
xAOD::VertexAuxContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
Definition: VertexAuxContainer.h:19
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::BPhysHelper::PV_MIN_A0
@ PV_MIN_A0
Definition: BPhysHelper.h:475
TRT_PAI_gasdata::SC
const float SC[NC]
Cross sections for Carbon.
Definition: TRT_PAI_gasdata.h:255
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
DerivationFramework::Reco_4mu::m_refPVContainerName
std::string m_refPVContainerName
Definition: Reco_4mu.h:56
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DerivationFramework::Reco_4mu::m_fourMuonTool
ToolHandle< DerivationFramework::FourMuonTool > m_fourMuonTool
Definition: Reco_4mu.h:48
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::BPhysHelper::vtx
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
Definition: BPhysHelper.h:108
xAOD::BPhysHelper::PV_MAX_SUM_PT2
@ PV_MAX_SUM_PT2
Definition: BPhysHelper.h:475
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
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
DerivationFramework::Reco_4mu::m_refitPV
bool m_refitPV
Definition: Reco_4mu.h:57
python.changerun.pv
pv
Definition: changerun.py:81
xAOD::BPhysHelper::pv
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
Definition: BPhysHelper.cxx:796
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::BPhysHypoHelper::setTau
bool setTau(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
: Set the proper decay time and error.
Definition: BPhysHypoHelper.cxx:140
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
xAOD::BPhysHelper::PV_MIN_Z0_BA
@ PV_MIN_Z0_BA
Definition: BPhysHelper.h:475
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