63 typedef std::vector<const xAOD::IParticle*>
APVector;
66 typedef std::vector<const xAOD::MuonSegment*>
MSVector;
78 int dump_object(
const T* pjet,
const std::string& objtypename=
"Unknown")
const;
82 template<
typename TList>
83 int dump_collection(
const TList* pjets,
const std::string& objtypename=
"Unknown")
const;
105 template<
typename TObj,
typename TMom>
106 void get_moment(TObj* pobj, std::string name, TMom& val)
const;
107 template<
typename TObj>
109 template<
typename TObj>
110 void get_moment(TObj* pobj, std::string name, std::string& val)
const;
111 template<
typename TObj>
112 void get_moment(TObj* pobj, std::string name, std::vector<int>&)
const;
113 template<
typename TObj>
114 void get_moment(TObj* pobj, std::string name, std::vector<float>&)
const;
115 template<
typename TMom>
119 void get_moment(
const xAOD::Jet* pobj,
const std::string& name, std::vector<int>& vals)
const;
120 void get_moment(
const xAOD::Jet* pobj,
const std::string& name, std::vector<float>& vals)
const;
121 template<
typename TObj>
125 template<
typename TObj>
128 template<
typename TObj>
131 template<
typename TObj>
134 template<
typename TObj>
141 void extra_info(
const T*, std::ostream& out,
int)
const;
143 void extra_info(
const fastjet::PseudoJet* ppsj, std::ostream& out,
int linedetail)
const;
184 const double mevtogev = 0.001;
185 const int wname = 30;
192 std::ostringstream ssjetline;
194 ssjetline <<
"pT =" << std::setw(6) << std::fixed << std::setprecision(1) << mevtogev*pjet->pt() <<
" GeV";
195 ssjetline <<
", m =" << std::setw(6) << std::fixed << std::setprecision(1) << mevtogev*pjet->m() <<
" GeV";
196 ssjetline <<
", eta =" << std::setw(5) << std::fixed << std::setprecision(2) << pjet->eta();
197 ssjetline <<
", phi =" << std::setw(5) << std::fixed << std::setprecision(2) << pjet->phi();
214 ATH_MSG_INFO(
" " << objtypename <<
" has " << fnames.size() <<
" float attributes:");
215 for ( NameList::const_iterator inam=fnames.begin(); inam!=fnames.end(); ++inam ) {
220 ATH_MSG_INFO(std::setw(wname) << name <<
":" << std::setw(16) << std::scientific << std::setprecision(3) << val);
222 ATH_MSG_INFO(std::setw(wname) << name <<
":" << std::setw(12) << std::fixed << std::setprecision(3) << val);
226 ATH_MSG_INFO(
" " << objtypename <<
" has " << inames.size() <<
" int attributes:");
227 for ( NameList::const_iterator inam=inames.begin(); inam!=inames.end(); ++inam ) {
231 ATH_MSG_INFO(std::setw(wname) << name <<
":" << std::setw(12) << std::fixed << std::setprecision(3) << ival);
234 ATH_MSG_INFO(
" " << objtypename <<
" has " << bnames.size() <<
" bool attributes:");
235 for ( NameList::const_iterator inam=bnames.begin(); inam!=bnames.end(); ++inam ) {
239 std::string sval = val ?
"true" :
"false";
240 ATH_MSG_INFO(std::setw(wname) << name <<
":" << std::setw(6) << sval);
243 ATH_MSG_INFO(
" " << objtypename <<
" has " << cbnames.size() <<
" cbool attributes:");
244 for ( NameList::const_iterator inam=cbnames.begin(); inam!=cbnames.end(); ++inam ) {
248 std::string sval = val ?
"true" :
"false";
249 ATH_MSG_INFO(std::setw(wname) << name <<
":" << std::setw(6) << sval);
251 ATH_MSG_INFO(
" " << objtypename <<
" has " << snames.size() <<
" string attributes:");
252 for ( NameList::const_iterator inam=snames.begin(); inam!=snames.end(); ++inam ) {
256 ATH_MSG_INFO(std::setw(wname) << name <<
":" << std::setw(30) << sval);
258 ATH_MSG_INFO(
" " << objtypename <<
" has " << vinames.size() <<
" vector<int> attributes:");
259 for ( NameList::const_iterator inam=vinames.begin(); inam!=vinames.end(); ++inam ) {
261 std::vector<int> vals;
263 if ( vals.size() == 0 ) {
264 ATH_MSG_INFO(std::setw(wname) << name <<
": No entries.");
267 if ( vals.size() > 10 ) widx = 2;
268 for (
unsigned int ival=0; ival<vals.size(); ++ival ) {
269 ATH_MSG_INFO(std::setw(wname) << name <<
"[" << std::setw(widx) << ival <<
"]: "
270 << std::setw(8) << vals[ival]);
274 ATH_MSG_INFO(
" " << objtypename <<
" has " << vfnames.size() <<
" vector<float> attributes:");
275 for ( NameList::const_iterator inam=vfnames.begin(); inam!=vfnames.end(); ++inam ) {
277 std::vector<float> vals;
279 if ( vals.size() == 0 ) {
280 ATH_MSG_INFO(std::setw(wname) << name <<
": No entries.");
283 if ( vals.size() > 10 ) widx = 2;
284 for (
unsigned int ival=0; ival<vals.size(); ++ival ) {
285 ATH_MSG_INFO(std::setw(wname) << name <<
"[" << std::setw(widx) << ival <<
"]: "
286 << std::setw(12) << std::fixed << std::setprecision(3) << vals[ival]);
290 ATH_MSG_INFO(
" " << objtypename <<
" has " << apnames.size() <<
" associated particle vectors:");
291 for ( NameList::const_iterator inam=apnames.begin(); inam!=apnames.end(); ++inam ) {
293 if ( name.find(
"MuonSegment") != std::string::npos ) {
298 std::string slab =
"entries";
299 if ( vals.size() == 1 ) slab =
"entry";
300 if ( vals.size() > 0 ) slab +=
":";
301 ATH_MSG_INFO(std::setw(wname) << name <<
" has " << vals.size() <<
" " << slab);
302 if ( els.size() == vals.size() ) {
303 for (
const MSEL& el : els) {
304 ATH_MSG_INFO(std::setw(wname+2) <<
"" << el.dataID() <<
"[" << el.index() <<
"]");
307 for (
auto ppar : vals) {
308 ATH_MSG_INFO(std::setw(wname+2) <<
"" << ppar->container() <<
"[" << ppar->index() <<
"]");
316 std::string slab =
"entries";
317 if ( vals.size() == 1 ) slab =
"entry";
318 if ( vals.size() > 0 ) slab +=
":";
319 ATH_MSG_INFO(std::setw(wname) << name <<
" has " << vals.size() <<
" " << slab);
321 if ( els.size() == vals.size() ) {
322 for (
const APEL& el : els) {
323 ATH_MSG_INFO(std::setw(wname+2) <<
"" << el.dataID() <<
"[" << el.index() <<
"]");
326 for (
auto ppar : vals) {
327 ATH_MSG_INFO(std::setw(wname+2) <<
"" << ppar->container() <<
"[" << ppar->index() <<
"]");
333 ATH_MSG_INFO(
" " << objtypename <<
" has " << fvnames.size() <<
" four-vector attributes (pT m eta phi):");
334 for ( NameList::const_iterator inam=fvnames.begin(); inam!=fvnames.end(); ++inam ) {
339 << std::setw(12) << std::fixed << std::setprecision(3) << val.Pt()
340 << std::setw(12) << std::fixed << std::setprecision(3) << val.M()
341 << std::setw(12) << std::fixed << std::setprecision(3) << val.Eta()
342 << std::setw(12) << std::fixed << std::setprecision(3) << val.Phi()
345 ATH_MSG_INFO(
" " << objtypename <<
" has " << elnames.size() <<
" element-link attributes:");
346 for ( NameList::const_iterator inam=elnames.begin(); inam!=elnames.end(); ++inam ) {
347 std::string name = *inam;
370 int njet = pjets->size();
372 std::string line =
"-------------------------------------------------------------------------";
375 unsigned int njetshow = njet;
377 typename TList::const_iterator itjet = pjets->begin();
378 typedef typename TList::const_iterator::reference TValue;
379 std::vector<std::string> labs;
380 unsigned int wlab = 0;
381 for (
unsigned int ijet=0; ijet<njetshow; ++ijet ) {
382 TValue pjet = *itjet++;
385 if ( lab.size() > wlab ) wlab = lab.size();
387 itjet = pjets->begin();
389 if ( njetshow > 10 ) widx = 2;
390 if ( njetshow > 100 ) widx = 3;
391 if ( njetshow > 1000 ) widx = 4;
392 for (
unsigned int ijet=0; ijet<njetshow; ++ijet ) {
393 TValue pjet = *itjet++;
396 msg() << MSG::INFO <<
" ";
398 msg() << std::setw(wlab) << labs[ijet] <<
" ";
401 msg() << std::setw(widx) << ijet;
404 msg() <<
"[" << std::setw(widx) << ijet <<
"]";
Class providing the definition of the 4-vector interface.