|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "fastjet/PseudoJet.hh"
27 : AsgTool(
name), m_hpjr(
"",this) {
43 return StatusCode::SUCCESS;
57 const fastjet::PseudoJet* ppj =
m_hpjr->pseudojet(
jet);
58 if ( ppj ==
nullptr ) {
61 if ( ! ppj->has_constituents() ) {
65 constits.insert(constits.end(), pjcons.begin(), pjcons.end());
73 const string liname =
"PseudoJetLabelMap";
74 if (
evtStore()->contains<jet::LabelIndex>(liname) ) {
77 if ( pli ==
nullptr ) {
84 if (
evtStore()->record(pli, liname).isFailure() ) {
96 <<
" real constituents.");
97 for (
const auto *
const pjetcon :
jet.getConstituents() ) {
98 if ( pjetcon ==
nullptr ) {
102 fastjet::PseudoJet psj(pjetcon->px(), pjetcon->py(), pjetcon->pz(), pjetcon->e());
106 psj.set_user_info(pcui);
107 constits.push_back(psj);
109 <<
", index=" << pcui->
index()
110 <<
", label=" << pcui->
label()
111 <<
", isGhost=" << pcui->
isGhost());
118 for (
const std::string& glab :
m_glabs ) {
119 string gname =
"Ghost" + glab;
121 if ( glab ==
"MuonSegment" ) {
123 if (
jet.getAssociatedObjects(
gname, psegs) ) {
125 << psegs.size() <<
" entries.");
127 glabs.push_back(glab);
128 unsigned int iseg = 0;
130 if ( pseg ==
nullptr ) {
135 double x = pseg->x();
136 double y = pseg->y();
137 double z = pseg->z();
138 double xy = sqrt(
x*
x +
y*
y);
139 double r = xy*xy +
z*
z;
145 fastjet::PseudoJet psj(
px,
py,
pz,
e);
148 psj.set_user_info(pcui);
149 constits.push_back(psj);
151 <<
", index=" << pcui->
index()
152 <<
", label=" << pcui->
label()
153 <<
", isGhost=" << pcui->
isGhost());
164 if (
jet.getAssociatedObjects(
gname, ppars) ) {
166 << ppars.size() <<
" entries.");
168 glabs.push_back(glab);
169 unsigned int ipar = 0;
171 if ( ppar ==
nullptr ) {
174 auto p4 = ppar->p4();
175 fastjet::PseudoJet psj(fac*p4.Px(), fac*p4.Py(), fac*p4.Pz(), fac*p4.E());
178 psj.set_user_info(pcui);
179 constits.push_back(psj);
181 <<
", index=" << pcui->
index()
182 <<
", label=" << pcui->
label()
183 <<
", isGhost=" << pcui->
isGhost());
193 if ( pghostlabs !=
nullptr ) {
194 pghostlabs->insert(pghostlabs->end(), glabs.begin(), glabs.end());
214 for (
const std::string& glab :
m_glabs ) {
void print() const
Print the state of the tool.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< const IParticle * > IParticleVector
virtual const xAOD::IParticle * particle() const =0
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
std::vector< fastjet::PseudoJet > PseudoJetVector
JetConstituentsRetriever(const std::string &name)
int constituents(const xAOD::Jet &jet, PseudoJetVector &cons, NameList *pghostlabs=nullptr) const
Append constituents to the supplied vector.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
StatusCode initialize()
Dummy implementation of the initialisation function.
virtual bool isGhost() const
Returns true if this constituent is a ghost.
Index addLabel(const Label &lab)
Add a label and get its index.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual Index index() const
virtual Label label() const =0
std::vector< std::string > NameList
std::vector< fastjet::PseudoJet > PseudoJetVector
std::vector< const MuonSegment * > MuonSegmentVector
IJetConstituentsRetriever::NameList NameList
#define ATH_MSG_WARNING(x)
ToolHandle< IJetPseudojetRetriever > m_hpjr