![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <MergedElectronDetailsDecorator.h>
|
| MergedElectronDetailsDecorator (const std::string &t, const std::string &n, const IInterface *p) |
|
| ~MergedElectronDetailsDecorator () |
|
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 |
|
◆ StoreGateSvc_t
◆ MergedElectronDetailsDecorator()
DerivationFramework::MergedElectronDetailsDecorator::MergedElectronDetailsDecorator |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MergedElectronDetailsDecorator()
DerivationFramework::MergedElectronDetailsDecorator::~MergedElectronDetailsDecorator |
( |
| ) |
|
◆ addBranches()
StatusCode DerivationFramework::MergedElectronDetailsDecorator::addBranches |
( |
| ) |
const |
|
virtual |
◆ 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);
◆ 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.
◆ 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.
◆ 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
◆ fillClusterDetails()
void DerivationFramework::MergedElectronDetailsDecorator::fillClusterDetails |
( |
const xAOD::Electron * |
el | ) |
|
|
staticprivate |
Definition at line 286 of file MergedElectronDetailsDecorator.cxx.
288 const auto *caloCluster =
el->caloCluster();
290 std::vector<float> subCluster_E;
291 std::vector<float> subCluster_dEta;
292 std::vector<float> subCluster_dPhi;
295 if(caloCluster && clusterLinksAcc.isAvailable(*caloCluster) ){
296 std::vector<ElementLink<xAOD::CaloClusterContainer> > clusterLinks = clusterLinksAcc(*caloCluster);
297 for(
const auto& link : clusterLinks){
298 if( link.isValid() ){
299 subCluster_E.push_back( (*link)->e() );
300 subCluster_dEta.push_back( caloCluster->eta() - (*link)->eta() );
302 subCluster_dPhi.push_back(dphi);
309 SubCluster_EDec(*
el) = subCluster_E;
310 SubCluster_dEtaDec(*
el) = subCluster_dEta;
311 SubCluster_dPhiDec(*
el) = subCluster_dPhi;
◆ fillMatchDetails()
Definition at line 131 of file MergedElectronDetailsDecorator.cxx.
139 for(
unsigned int i(0);
i<trkMatchTrk.size(); ++
i ){
140 trkMatchTrk[
i] = -999;
143 std::array<double,4>
eta = { -999.0, -999.0, -999.0, -999.0 };
144 std::array<double,4>
phi = { -999.0, -999.0, -999.0, -999.0 };
145 std::array<double,4>
deltaEta = { -999.0, -999.0, -999.0, -999.0 };
146 std::array<double,4>
deltaPhi = { -999.0, -999.0, -999.0, -999.0 };
148 const EventContext& ctx = Gaudi::Hive::currentContext();
149 std::pair<std::vector<CaloSampling::CaloSample>,
150 std::vector<std::unique_ptr<Trk::Surface>>>
155 ->getMatchAtCalo(ctx,
158 layersAndSurfaces.first,
159 layersAndSurfaces.second,
174 ->getMatchAtCalo(ctx,
177 layersAndSurfaces.first,
178 layersAndSurfaces.second,
195 layersAndSurfaces.first,
196 layersAndSurfaces.second,
◆ fillTrackDetails()
void DerivationFramework::MergedElectronDetailsDecorator::fillTrackDetails |
( |
const xAOD::Electron * |
el, |
|
|
bool |
isMC |
|
) |
| const |
|
private |
Definition at line 219 of file MergedElectronDetailsDecorator.cxx.
221 std::vector<float> trkMatchTrkP_dEta1(
el->nTrackParticles(),-999);
222 std::vector<float> trkMatchTrkP_dEta2(
el->nTrackParticles(),-999);
223 std::vector<float> trkMatchTrkP_dPhi1(
el->nTrackParticles(),-999);
224 std::vector<float> trkMatchTrkP_dPhi2(
el->nTrackParticles(),-999);
225 std::vector<float> trkMatchTrkLM_dEta1(
el->nTrackParticles(),-999);
226 std::vector<float> trkMatchTrkLM_dEta2(
el->nTrackParticles(),-999);
227 std::vector<float> trkMatchTrkLM_dPhi1(
el->nTrackParticles(),-999);
228 std::vector<float> trkMatchTrkLM_dPhi2(
el->nTrackParticles(),-999);
229 std::vector<float> trkMatchTrkR_dPhi2(
el->nTrackParticles(),-999);
231 std::vector<float> trueMatch_dEta2(
el->nTrackParticles(),-999);
232 std::vector<float> trueMatch_dPhi2(
el->nTrackParticles(),-999);
234 const auto *caloCluster =
el->caloCluster();
235 if( caloCluster && caloCluster->pt() >
m_minET ){
236 std::vector<float> trkMatch(9,-999);
237 for(
unsigned int i(0);
i <
el->nTrackParticles(); ++
i ){
238 const auto *trackParticle =
el->trackParticle(
i );
241 trkMatchTrkP_dEta1[
i] = trkMatch[0];
242 trkMatchTrkP_dEta2[
i] = trkMatch[1];
243 trkMatchTrkP_dPhi1[
i] = trkMatch[2];
244 trkMatchTrkP_dPhi2[
i] = trkMatch[3];
245 trkMatchTrkLM_dEta1[
i] = trkMatch[4];
246 trkMatchTrkLM_dEta2[
i] = trkMatch[5];
247 trkMatchTrkLM_dPhi1[
i] = trkMatch[6];
248 trkMatchTrkLM_dPhi2[
i] = trkMatch[7];
249 trkMatchTrkR_dPhi2[
i] = trkMatch[8];
253 if( trkMatch.size() == 2 ){
254 trueMatch_dEta2[
i] = trkMatch[0];
255 trueMatch_dPhi2[
i] = trkMatch[1];
273 TrackMatchingP_dEta1Dec(*
el) = trkMatchTrkP_dEta1;
274 TrackMatchingP_dEta2Dec(*
el) = trkMatchTrkP_dEta2;
275 TrackMatchingP_dPhi1Dec(*
el) = trkMatchTrkP_dPhi1;
276 TrackMatchingP_dPhi2Dec(*
el) = trkMatchTrkP_dPhi2;
277 TrackMatchingLM_dEta1Dec(*
el) = trkMatchTrkLM_dEta1;
278 TrackMatchingLM_dEta2Dec(*
el) = trkMatchTrkLM_dEta2;
279 TrackMatchingLM_dPhi1Dec(*
el) = trkMatchTrkLM_dPhi1;
280 TrackMatchingLM_dPhi2Dec(*
el) = trkMatchTrkLM_dPhi2;
281 TrackMatchingR_dPhi2Dec(*
el) = trkMatchTrkR_dPhi2;
282 TrackMatchingTrue_dEta2Dec(*
el) = trueMatch_dEta2;
283 TrackMatchingTrue_dPhi2Dec(*
el) = trueMatch_dPhi2;
◆ fillTruthDetails()
Definition at line 100 of file MergedElectronDetailsDecorator.cxx.
110 const auto *prodVtx = truthPart->
prodVtx();
117 const EventContext& ctx = Gaudi::Hive::currentContext();
118 float etaAtCalo, phiAtCalo;
123 trkMatchTrk.push_back( cluster->
etaBE(2) - etaAtCalo );
◆ fillVertexDetails()
void DerivationFramework::MergedElectronDetailsDecorator::fillVertexDetails |
( |
const xAOD::Electron * |
el | ) |
const |
|
private |
Definition at line 315 of file MergedElectronDetailsDecorator.cxx.
317 const EventContext& ctx = Gaudi::Hive::currentContext();
318 const auto *caloCluster =
el->caloCluster();
324 int vtxTrkParticleIndex1 = -999;
325 int vtxTrkParticleIndex2 = -999;
326 float vtxTrkParticle1_dEta2 = -999;
327 float vtxTrkParticle1_dPhi2 = -999;
328 float vtxTrkParticle2_dEta2 = -999;
329 float vtxTrkParticle2_dPhi2 = -999;
330 float vtxRerr = -999;
331 float vtxZerr = -999;
332 float vtxMerr = -999;
333 float vtxPerr = -999;
334 float vtxChi2 = -999;
336 float vtxdEta = -999;
337 float vtxdPhi = -999;
342 if( caloCluster && caloCluster->pt() >
m_minET ){
345 int trkIndex1 = -999;
346 int trkIndex2 = -999;
347 for(
unsigned int i(0);
i <
el->nTrackParticles(); ++
i ){
348 const auto *trackParticle =
el->trackParticle(
i );
350 if ( trk1 ==
nullptr ){
351 trk1 = trackParticle;
353 }
else if( trk2 ==
nullptr ){
354 if( trk1->
charge() == trackParticle->charge() )
356 trk2 = trackParticle;
362 if( trk2 !=
nullptr){
369 std::vector<const xAOD::TrackParticle*> trksToFit;
370 trksToFit.push_back( trk1 );
371 trksToFit.push_back( trk2 );
372 vtxTrkParticleIndex1 = trkIndex1;
373 vtxTrkParticleIndex2 = trkIndex2;
375 std::unique_ptr<xAOD::Vertex> myVertex(
m_VertexFitter->fit( trksToFit, startingPoint ) );
380 vtxRerr =
m_V0Tools->rxyError( myVertex.get() );
381 vtxZ = myVertex->z();
382 vtxZerr = myVertex->covariancePosition()(2,2) > 0 ? sqrt( myVertex->covariancePosition()(2,2) ): myVertex->covariancePosition()(2,2);
384 std::vector<double>
masses = { 0.511e-3, 0.511e-3 };
389 vtxPerr =
m_V0Tools->pTError( myVertex.get() );
391 vtxChi2 = myVertex->chiSquared();
392 vtxNdof = myVertex->numberDoF();
397 vtxdEta -= caloCluster->etaBE(2);
401 vtxPhi = vertex4P.Phi();
402 vtxEta = vertex4P.Eta();
403 double momentumScaleFactor = caloCluster->e() / vtxE;
408 mom *= momentumScaleFactor;
411 float etaAtCalo, phiAtCalo;
416 vtxTrkParticle1_dEta2 = caloCluster->etaBE(2) - etaAtCalo;
421 pos = perigeeParameters2.position();
422 mom = perigeeParameters2.momentum();
423 mom *= momentumScaleFactor;
430 vtxTrkParticle2_dEta2 = caloCluster->etaBE(2) - etaAtCalo;
464 vtxRerrDec(*
el) = vtxRerr;
466 vtxZerrDec(*
el) = vtxZerr;
468 vtxMerrDec(*
el) = vtxMerr;
469 vtxPtDec(*
el) = vtxP;
470 vtxPterrDec(*
el)= vtxPerr;
472 vtxEtaDec(*
el) = vtxEta;
473 vtxPhiDec(*
el) = vtxPhi;
474 vtxTrkParticleIndex1Dec(*
el) = vtxTrkParticleIndex1;
475 vtxTrkParticleIndex2Dec(*
el) = vtxTrkParticleIndex2;
476 vtxTrkParticle1_dPhi2Dec(*
el) = vtxTrkParticle1_dPhi2;
477 vtxTrkParticle1_dEta2Dec(*
el) = vtxTrkParticle1_dEta2;
478 vtxTrkParticle2_dPhi2Dec(*
el) = vtxTrkParticle2_dPhi2;
479 vtxTrkParticle2_dEta2Dec(*
el) = vtxTrkParticle2_dEta2;
480 vtxChi2Dec(*
el) = vtxChi2;
481 vtxNdofDec(*
el) = vtxNdof;
482 vtxdEtaDec(*
el) = vtxdEta;
483 vtxdPhiDec(*
el) = vtxdPhi;
◆ finalize()
StatusCode DerivationFramework::MergedElectronDetailsDecorator::finalize |
( |
| ) |
|
◆ initialize()
StatusCode DerivationFramework::MergedElectronDetailsDecorator::initialize |
( |
| ) |
|
Definition at line 43 of file MergedElectronDetailsDecorator.cxx.
49 return StatusCode::FAILURE;
55 return StatusCode::FAILURE;
61 return StatusCode::FAILURE;
69 return StatusCode::SUCCESS;
◆ 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; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ nSiHits()
◆ 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_caloMgrKey
◆ m_detStore
◆ m_electronKey
◆ m_emExtrapolationTool
ToolHandle<IEMExtrapolationTools> DerivationFramework::MergedElectronDetailsDecorator::m_emExtrapolationTool |
|
private |
◆ m_eventInfoKey
◆ m_evtStore
◆ m_minET
float DerivationFramework::MergedElectronDetailsDecorator::m_minET |
|
private |
◆ m_V0Tools
ToolHandle<Trk::V0Tools> DerivationFramework::MergedElectronDetailsDecorator::m_V0Tools |
|
private |
◆ m_varHandleArraysDeclared
◆ m_VertexFitter
ToolHandle<Trk::IVertexFitter> DerivationFramework::MergedElectronDetailsDecorator::m_VertexFitter |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
ToolHandle< Trk::IVertexFitter > m_VertexFitter
Scalar phi() const
phi method
float pz() const
The z component of the particle's momentum.
Helper class to provide type-safe access to aux data.
float charge() const
Returns the charge.
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronKey
float px() const
The x component of the particle's momentum.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
float py() const
The y component of the particle's momentum.
@ IS_SIMULATION
true: simulation, false: data
bool passBLayerRequirement(const xAOD::TrackParticle &tp)
return true if effective number of BL hits + outliers is at least one
ToolHandle< Trk::V0Tools > m_V0Tools
ToolHandle< IEMExtrapolationTools > m_emExtrapolationTool
virtual void setOwner(IDataHandleHolder *o)=0
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Helper class to provide type-safe access to aux data.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Class describing a truth particle in the MC record.
bool hasProdVtx() const
Check for a production vertex on this particle.
CurvilinearParametersT< 5, Charged, PlaneSurface > CurvilinearParameters
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void fillTruthDetails(std::vector< float > &trkMatchTrk, const xAOD::TrackParticle *tp, const xAOD::CaloCluster *cluster) const
static int nSiHits(const xAOD::TrackParticle *tp)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
void fillTrackDetails(const xAOD::Electron *el, bool isMC) const
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
StatusCode initialize(bool used=true)
void fillVertexDetails(const xAOD::Electron *el) const
Eigen::Matrix< double, 3, 1 > Vector3D
This class provides the client interface for accessing the detector description information common to...
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static void fillClusterDetails(const xAOD::Electron *el)
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Class describing a TrackParticle.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
double charge() const
Physical charge.
void fillMatchDetails(std::vector< float > &trkMatchTrk, const xAOD::TrackParticle *tp, const xAOD::CaloCluster *cluster) const