|
ATLAS Offline Software
|
Go to the documentation of this file.
51 if ( pjet ==
nullptr )
return empty;
69 if ( !
sc.isFailure() && pobjs !=
nullptr )
return dump_collection(pobjs,
"Pseudojet");
70 }
else if (
evtStore()->contains<xAOD::CaloClusterContainer>(
m_cname) ) {
80 if ( pobjs !=
nullptr ) {
86 }
else if (
evtStore()->contains<xAOD::MuonSegmentContainer>(
m_cname) ) {
99 std::string myname =
"JetDumper::print: ";
113 return cui.
label() +
" pseudojet";
115 return "No-CUI pseudojet";
123 const double mevtogev = 0.001;
125 std::ostringstream ssjetline;
126 double px = mevtogev*
jet.px();
127 double py = mevtogev*
jet.py();
130 ssjetline <<
"pT =" << std::setw(6) << std::fixed << std::setprecision(1) <<
pt <<
" GeV";
131 ssjetline <<
", m =" << std::setw(6) << std::fixed << std::setprecision(1)
132 << mevtogev*
jet.m() <<
" GeV";
133 ssjetline <<
", eta =" << std::setw(5) << std::fixed << std::setprecision(2) <<
jet.eta();
134 ssjetline <<
", phi =" << std::setw(5) << std::fixed << std::setprecision(2) <<
jet.phi();
144 if ( pseg ==
nullptr )
return 1;
146 const double mmtom = 0.001;
148 std::ostringstream ssline;
149 double x = mmtom*seg.
x();
150 double y = mmtom*seg.
y();
151 double z = mmtom*seg.
z();
152 double r = sqrt(
x*
x+
y*
y);
153 double phi = atan2(
y,
x);
154 ssline <<
"r =" << std::setw(7) << std::fixed << std::setprecision(2) <<
r <<
" m";
155 ssline <<
", z =" << std::setw(7) << std::fixed << std::setprecision(2) <<
z <<
" m";
156 ssline <<
", phi =" << std::setw(7) << std::fixed << std::setprecision(2) <<
phi;
172 std::vector<int>&
vals)
const {
173 typedef std::vector<int>
T;
180 std::vector<float>&
vals)
const {
181 typedef std::vector<float>
T;
223 std::ostringstream sout;
229 sout <<
"Jet " << eljet.
dataID() <<
"[" << eljet.
index() <<
"]";
236 sout <<
"Vertex " << elvtx.
dataID() <<
"[" << elvtx.
index() <<
"]";
243 sout <<
"IParticle " << elobj.
dataID() <<
"[" << elobj.
index() <<
"]";
247 return "Not a known element link.";
255 out <<
", ncon = " << ncon;
260 string lab =
", size/ncon=";
261 out << lab << scon <<
"/" << ncon;
265 if ( ppj ==
nullptr ) {
266 out <<
", No pseudojet";
268 out <<
", npjcon=" << ppj->constituents().size();
276 if ( ppsj ==
nullptr ) {
277 out <<
", Null pseudojet";
280 const fastjet::PseudoJet& psj = *ppsj;
281 if ( psj.has_user_info() ) {
283 if ( linedetail > 1 ) {
285 if ( linedetail > 2 ) {
287 if ( pip ==
nullptr ) {
288 out <<
", Associated particle is null";
291 if ( linedetail > 3 )
out <<
", IParticle @ " << pip;
297 out <<
", No user info";
const fastjet::PseudoJet * getPseudoJet() const
std::vector< Name > NameList
NameList m_apmoms
Vector<float> moments.
Scalar phi() const
phi method
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
void getAssociatedLinks(TObj *pobj, std::string name, APELVector &val) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< MSEL > MSELVector
JetDumper::NameList get_moment_keys< Jet, int >(const Jet *)
Class describing a MuonSegment.
std::string object_label(const T *pjet, const std::string &label) const
size_t size() const
number of constituents
NameList m_vfmoms
Vector<int> moments.
JetFourMom_t jetP4() const
The full 4-momentum of the particle : internal jet type.
virtual const xAOD::IParticle * particle() const =0
int execute() const
Method to be called for each event.
JetConstituentVector getConstituents() const
Return a vector of consituents. The object behaves like vector<const IParticle*>. See JetConstituentV...
Class providing the definition of the 4-vector interface.
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.
const ID_type & dataID() const
Get the key that we reference, as a string.
NameList m_cbmoms
Bool moments.
void get_moment(TObj *pobj, std::string name, TMom &val) const
NameList m_vimoms
Element link moments.
std::vector< const T * > getAssociatedObjects(const std::string &name) const
get associated objects as a vector<object> this compact form throws an exception if the object is not...
std::vector< fastjet::PseudoJet > PseudoJetVector
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
NameList m_bmoms
Int moments.
std::string get_moment_as_string(const TObj &obj, std::string name) const
JetDumper(const std::string &myname)
virtual bool isGhost() const
Returns true if this constituent is a ghost.
NameList m_smoms
Bool stored as char moments.
void extra_info(const T *, std::ostream &out, int) const
::StatusCode StatusCode
StatusCode definition for legacy code.
JetDumper::NameList get_moment_keys< Jet, float >(const Jet *pjet)
virtual Index index() const
virtual Label label() const =0
NameList m_elmoms
Four-vector moments.
size_t index() const
Return the index of this element within its container.
std::vector< const xAOD::MuonSegment * > MSVector
ElementLink implementation for ROOT usage.
std::vector< const xAOD::IParticle * > APVector
int dump_collection(const TList *pjets, const std::string &objtypename="Unknown") const
float z() const
Returns the y position.
xAOD::JetFourMom_t FourVector
std::vector< fastjet::PseudoJet > PseudoJetVector
float y() const
Returns the x position.
IJetConstituentsRetriever::NameList NameList
index_type index() const
Get the index of the element inside of its container.
void getAssociatedParticles(TObj *pobj, std::string name, APVector &val) const
std::vector< APEL > APELVector
NameList m_imoms
Float moments.
int dump_object_after_prefix(const T *pjet, const std::string &objtypename) const
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t numConstituents() const
Number of constituents in this jets (this is valid even when reading a file where the constituents ha...
Jet_v1 Jet
Definition of the current "jet version".
void print() const
Print the state of the tool.
NameList m_fvmoms
String moments.