|
ATLAS Offline Software
|
#include <VertexTrackIsolation.h>
|
| VertexTrackIsolation (const std::string &t, const std::string &n, const IInterface *p) |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
virtual StatusCode | addBranches () const |
| Pass the thinning service
More...
|
|
bool | isSame (const xAOD::Vertex *theVtx1, const xAOD::Vertex *theVtx2) const |
|
bool | isContainedIn (const xAOD::Vertex *theVtx, const std::vector< const xAOD::Vertex * > &theColl) const |
|
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 |
|
Definition at line 24 of file VertexTrackIsolation.h.
◆ StoreGateSvc_t
◆ VertexTrackIsolation()
DerivationFramework::VertexTrackIsolation::VertexTrackIsolation |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Definition at line 21 of file VertexTrackIsolation.cxx.
33 declareInterface<DerivationFramework::IAugmentationTool>(
this);
44 "New property to deal with track isolation per track, the default option "
45 "(m_doIsoPerTrk=false) preserves the old behavior");
◆ addBranches()
StatusCode DerivationFramework::VertexTrackIsolation::addBranches |
( |
| ) |
const |
|
virtual |
Pass the thinning service
Implements DerivationFramework::IAugmentationTool.
Definition at line 125 of file VertexTrackIsolation.cxx.
133 ATH_MSG_ERROR(
"Failed loading IdTrackparticleContainer container");
134 return StatusCode::FAILURE;
142 return StatusCode::FAILURE;
145 std::vector<const xAOD::Vertex*> outVtxContainer;
149 std::vector<xAOD::Iso::IsolationType> cones(
m_cones.size());
151 for (
unsigned int i = 0;
i <
m_cones.size();
i++)
156 return xAOD::Iso::coneSize(i) > xAOD::Iso::coneSize(j);
160 for (
auto vertex : *vertexContainer) {
163 for (std::vector<std::string>::const_iterator flagItr =
m_passFlags.begin(); flagItr !=
m_passFlags.end();
166 if (flagAcc.isAvailable(*
vertex) && flagAcc(*
vertex) != 0) {
179 outVtxContainer.push_back(
vertex);
183 TLorentzVector candidate;
185 std::set<const xAOD::TrackParticle*> exclusionset;
187 for (
auto part :
vertex->trackParticleLinks()) {
189 candidate += (*part)->p4();
195 exclusionset.insert(
partID);
197 exclusionset.insert(*
part);
205 V0VertexLinksAcc(
"V0VertexLinks");
206 auto V0VertLink = V0VertexLinksAcc(*
vertex);
207 const xAOD::Vertex* V0Vert = V0VertLink.at(0).getDataPtr()->at(0);
209 candidate += (*part)->p4();
210 exclusionset.insert(*
part);
228 const string vtxType_name[3] = {
"SumPt",
"A0",
"Z0"};
239 for (
unsigned int i = 0;
i < cones.size();
i++) {
244 if(refVtx ==
nullptr){
251 m_trackIsoTool->trackIsolation(
result, candidate_slyTrack, cones, corrlist, refVtx, &exclusionset,
252 idTrackParticleContainer);
255 for (
unsigned int i = 0;
i < cones.size();
i++) {
258 variableName += vtxType_name[vertex_type];
264 for (
size_t i = 0;
i <
vertex->nTrackParticles();
i++) {
266 idTrackParticleContainer);
268 for (
unsigned int j = 0; j < cones.size(); j++) {
270 variableName += vtxType_name[vertex_type];
271 variableName +=
"_trk";
283 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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::VertexTrackIsolation::finalize |
( |
| ) |
|
◆ initialize()
StatusCode DerivationFramework::VertexTrackIsolation::initialize |
( |
| ) |
|
◆ inputHandles()
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; }
◆ isContainedIn()
◆ isSame()
Definition at line 82 of file VertexTrackIsolation.cxx.
85 if (theVtx1 == theVtx2)
91 bool firstTwoAreSame =
93 std::set<const xAOD::TrackParticle*>(
97 std::set<const xAOD::TrackParticle*>(
99 if (firstTwoAreSame && lastTwoAreSame)
104 std::set<const xAOD::TrackParticle*> vtxset1;
105 std::set<const xAOD::TrackParticle*> vtxset2;
110 return vtxset1 == vtxset2;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_cones
std::vector<unsigned int> DerivationFramework::VertexTrackIsolation::m_cones |
|
private |
◆ m_detStore
◆ m_doIsoPerTrk
bool DerivationFramework::VertexTrackIsolation::m_doIsoPerTrk |
|
private |
◆ m_evtStore
◆ m_fixElecExclusion
bool DerivationFramework::VertexTrackIsolation::m_fixElecExclusion |
|
private |
◆ m_includeV0
bool DerivationFramework::VertexTrackIsolation::m_includeV0 |
|
private |
◆ m_passFlags
std::vector<std::string> DerivationFramework::VertexTrackIsolation::m_passFlags |
|
private |
◆ m_removeDuplicate
int DerivationFramework::VertexTrackIsolation::m_removeDuplicate |
|
private |
◆ m_trackContainerName
std::string DerivationFramework::VertexTrackIsolation::m_trackContainerName |
|
private |
◆ m_trackIsoTool
◆ m_varHandleArraysDeclared
◆ m_vertexContainerName
std::string DerivationFramework::VertexTrackIsolation::m_vertexContainerName |
|
private |
◆ m_vertexType
int DerivationFramework::VertexTrackIsolation::m_vertexType |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::string toString(const IsoType &iso)
@ coreTrackPtr
tracks pointer
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
Iso::IsolationTrackCorrectionBitset trackbitset
@ ptcone20
Track isolation.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
Helper class to provide constant type-safe access to aux data.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
pv_type
: Enum type of the PV
IsolationType
Overall enumeration for isolation types in xAOD files.
#define CHECK(...)
Evaluate an expression and check for errors.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string to_string(const DetectorType &type)
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
void makePrivateStore()
Create a new (empty) private store for this object.
Class describing a Vertex.
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Class describing a TrackParticle.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>