14 const std::string& name,
15 const IInterface* parent)
16 : base_class(
type, name, parent)
29 return StatusCode::SUCCESS;
34 const EventContext& ctx )
const {
45 if ( primaryVertex ==
nullptr ) {
46 ATH_MSG_ERROR(
"No primary vertex has been found for this event!" );
47 return StatusCode::FAILURE;
50 "," << primaryVertex->
y() <<
51 "," << primaryVertex->
z() <<
")" );
63 if (myFeature.size() != 1) {
65 <<
", found " << myFeature.size());
66 return StatusCode::FAILURE;
70 const xAOD::Jet *myJet = *(myFeature.at(0).link);
71 double jetPt = myJet->
p4().Et();
72 double jetEta = myJet->
eta();
73 double jetPhi = myJet->
phi();
81 ATH_MSG_DEBUG(
" ** Imposing Z constraint while building RoI" );
92 jetPhi, phiMinus, phiPlus,
93 primaryVertex->
z(),zMinus,zPlus );
95 roisWriteHandle->push_back( newROI );
106 return StatusCode::SUCCESS;
111 if ( vertexContainer->
size() == 0 ) {
112 ATH_MSG_WARNING(
"Vertex Container has size 0! This can't be right!" );
116 for (
unsigned int i(0); i<vertexContainer->
size(); i++ ) {
122 ATH_MSG_DEBUG(
"None of the vertexes in the vertex container is a primary vertex!" );
124 return vertexContainer->
at(0);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Athena::TPCnvVers::Current TrigRoiDescriptor
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
size_t index() const
Return the index of this element within its container.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.
float z() const
Returns the z position.
float y() const
Returns the y position.
float x() const
Returns the x position.
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
xAOD::TrigComposite Decision
const std::string & roiString()
const std::string & featureString()
void findLinks(const Decision *start, const std::string &linkName, std::vector< LinkInfo< T > > &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr)
search back the TC links for the object of type T linked to the one of TC (recursively) Populates pro...
xAOD::TrigCompositeContainer DecisionContainer
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
Jet_v1 Jet
Definition of the current "jet version".
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
Helper for azimuthal angle calculations.