Auxiliary Data
Last updated
Last updated
If you read the chapter, you saw that part of the derivation production process is adding new properties to objects. Those properties are usually called auxiliary data. By default, most InDet/TRT information is not saved because it is a lot of information and requires a lot of disk space.
When we produce TRT D(x)AOD's, we manually add that data in the xAOD designed way: as "aux data". You can find all the variables .
Every object in the xAOD framework is a daughter to the SG::AuxElement
class. You can read all about the class .
There are three main classes that we'll grab aux data from:
xAOD::TrackParticle
: our track
xTRT::MSOS
(typedef
of xAOD::TrackStateValidation
): the measurement on surface (MSOS) ("hit")
xTRT::DriftCircle
(typedef
of xAOD::TrackMeasurementValidation
): the TRT drift circle
We also add a little bit of aux data to xAOD::EventInfo
(just check that wiki I linked).
For this tutorial, I'm going to talk about _retrieving _aux data (not creating, because in analysis projects 99% you just need to retrieve). There are two ways we can do it. I'm going to tell you the recommended way to do it (though it is not the only way). The recommended way (especially in loops, for performance reasons) is to create a SG::AuxElement::ConstAccessor<T>
class.
Let's say we have a track and we want the eProbabilityHT
variable and the time over threshold of each hit, the drift circle tot
variable. I'm going to take some code from the Algorithm Development part 2 chapter, and add the ConstAccessor<T>
's
Now, that was a handful of lines of code to accomplish that. We have some help from TRTFramework
to make life easier here. When reading Algorithm Development part 2 (and above), you saw the use of xTRT::Acc::msosLink
. This is a SG::AuxElement::ConstAccessor
for the ElementLink
to a vector of track measurements (notice the entire container of hits is aux data on the track!); well, we have a set of predefined SG::AuxElement::ConstAccessor
's for you to use. We also have a one line function (get
) to check if the auxdata is there and to grab it; using the TRTFramework
helpers, we can make that block of code:
That's a bit shorter and cleaner, but shouldn't be any more difficult to read. For a complete list of available accessors supplied by TRTFramework
, see