18#include "GaudiKernel/SystemOfUnits.h"
21using Gaudi::Units::MeV;
33DRAssociationTool::DRAssociationTool (
const std::string&
type,
34 const std::string& name,
35 const IInterface* parent)
40 "ICollectionGetterTool instance defining "
41 "the target collection");
42 declareProperty (
"DRCut",
m_drcut = 999,
43 "DR cut for the association");
45 DRAssociationTool::book().ignore();
52StatusCode DRAssociationTool::initialize()
56 CHECK( m_getter.retrieve() );
59 return Base::initialize();
72 const std::type_info& ti)
75 CHECK(
m_getter->configureElementTypeinfo (this->typeinfo()));
76 return StatusCode::SUCCESS;
85 CHECK( addVariable (
"dr", m_dr) );
86 return StatusCode::SUCCESS;
100 if (
p.p() < 1e-3*
MeV)
return 0;
102 if( std::isinf(
p.eta()) )
return 0;
106 if (
m_getter->reset().isFailure()) {
116 if (
obj->pt() < 1e-2*
MeV)
continue;
117 if( std::isinf(
obj->eta() ) )
continue;
139 if (
p.e() < 1e-3*
MeV)
return 0;
141 if( std::isinf(
p.eta()) )
return 0;
145 if (
m_getter->reset().isFailure()) {
155 if (
obj->pt() < 1e-2*
MeV)
continue;
156 if( std::isinf(
obj->eta() ) )
continue;
157 float dr =
p.p4().DeltaR (
obj->p4());
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
#define CHECK(...)
Evaluate an expression and check for errors.
doing TRTHTH Hypo selection
Class providing the definition of the 4-vector interface.
Block filler tool for noisy FEB information.
float * m_dr
Variable: DR to associated object.
ToolHandle< ICollectionGetterTool > m_getter
Property: The collection getter tool.
float m_drcut
Property: DR cut.
::StatusCode StatusCode
StatusCode definition for legacy code.
double deltaR(const I4Momentum &p4, double eta, double phi)
from 1 I4Momentum