Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "fastjet/PseudoJet.hh"
11 #include "fastjet/AreaDefinition.hh"
12 #include "fastjet/ClusterSequence.hh"
24 using fastjet::PseudoJet;
32 : AsgTool(
name), m_doArea(false), m_doFourVecArea(false) {
41 for (
const std::string & att :
m_atts) {
42 if ( att ==
"ActiveArea" )
m_doArea =
true;
49 return StatusCode::SUCCESS;
66 if(!
vec.isValid() ) {
67 ATH_MSG_ERROR(
"Jet constituent vector is invalid. Can't set EM scale momentum");
75 for (
auto it=
vec.begin(uncal);
it !=
vec.end(uncal); ++
it) {
81 ATH_MSG_DEBUG(
" EM scale momentum set with uncalibrated constituents.");
98 if ( pjet ==
nullptr )
return pjet;
134 return addjet(pj, pjContainer,
jets, pparent);
151 double eta = pj.eta();
152 double phi = pj.phi_std();
155 double dpovere =
p/
e - 1.0;
157 if ( dpovere > 1.
e-6 ) {
160 <<
e <<
", " <<
p <<
", " <<
m <<
", " <<
p/
e-1.0);
161 ATH_MSG_WARNING(setw(12) <<
"px" << setw(12) <<
"py" << setw(12) <<
"pz"
162 << setw(12) <<
"E" << setw(12) <<
"p");
163 ATH_MSG_WARNING(setw(12) <<
"---" << setw(12) <<
"---" << setw(12) <<
"---"
164 << setw(12) <<
"---" << setw(12) <<
"---");
166 for ( PseudoJetVector::const_iterator icon=cons.begin(); icon!=cons.end(); ++icon ) {
167 double cpx = icon->px();
168 double cpy = icon->py();
169 double cpz = icon->pz();
170 double ce = icon->e();
171 double cp2 = cpx*cpx + cpy*cpy + cpz*cpz;
172 double cp = sqrt(cp2);
173 ATH_MSG_WARNING(setw(12) <<
int(cpx) << setw(12) <<
int(cpy) << setw(12) <<
int(cpz)
174 << setw(12) <<
int(ce) << setw(12) <<
int(
cp));
184 jets.push_back(pjet);
187 if ( pj.associated_cluster_sequence() ==
nullptr ) {
188 ATH_MSG_VERBOSE(
"Pseudojet does not have a cluster sequence and so cannot be copied to Jet.");
196 if ( pj.has_area() ) {
202 fastjet::PseudoJet pja = pj.area_4vector();
208 ATH_MSG_WARNING(
"Save of active area attribute requested for jet without area.");
211 if ( pj.has_area() ) {
217 ATH_MSG_VERBOSE(
" Adding constituents: multiplicity is " << pjcons.size());
218 if ( pparent !=
nullptr ) {
221 if ( pcon ==
nullptr ) {
254 for ( std::vector<std::string>::const_iterator inam=
m_atts.begin();
255 inam!=
m_atts.end(); ++inam ) {
256 const std::string&
name = *inam;
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
JetFourMom_t jetP4() const
The full 4-momentum of the particle : internal jet type.
std::vector< size_t > vec
#define ATH_MSG_VERBOSE(x)
JetAlgorithmType::ID getAlgorithmType() const
JetInput::Type getInputType() const
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.
JetFromPseudojet(const std::string &name)
void setJetP4(const JetFourMom_t &p4)
void buildAndSetEMScaleMom(xAOD::Jet *jet, xAOD::JetInput::Type inputtype) const
@ JetConstitScaleMomentum
void setSizeParameter(float p)
::StatusCode StatusCode
StatusCode definition for legacy code.
float getSizeParameter() const
JetConstitScale getConstituentsSignalState() const
The state at which constituents were when this jet was found.
void setConstituentsSignalState(JetConstitScale t)
Set the state at which constituents were when this jet was found. This function is called by jet buil...
xAOD::Jet * addjet(const fastjet::PseudoJet &pj, const PseudoJetContainer &, xAOD::JetContainer &jets, const xAOD::Jet *pparent) const
@ CalibratedJetConstituent
bool extractConstituents(xAOD::Jet &, const std::vector< PseudoJet > &) const
size_t index() const
Return the index of this element within its container.
void setAttribute(const std::string &name, const T &v)
ElementLink implementation for ROOT usage.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
virtual xAOD::Jet * add(const fastjet::PseudoJet &, const PseudoJetContainer &, xAOD::JetContainer &, xAOD::JetInput::Type inputtype) const override
Method to construct an ATLAS jet from a pseudojet, input type and vector of ghost labels.
void setInputType(JetInput::Type t)
std::vector< fastjet::PseudoJet > PseudoJetVector
@ UncalibratedJetConstituent
#define ATH_MSG_WARNING(x)
virtual void print() const override
Print the state of the tool.
A vector of jet constituents at the scale used during jet finding.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
const SG::AuxVectorData * container() const
Return the container holding this element.
std::vector< std::string > m_atts
void setPseudoJet(const PSEUDOJET *fj)
Set the fast jet pointer.
void setAlgorithmType(JetAlgorithmType::ID a)
Jet_v1 Jet
Definition of the current "jet version".