ATLAS Offline Software
Loading...
Searching...
No Matches
TrackTrigObject.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
10
11
12#ifndef TRACKTRIGOBJECT_H
13#define TRACKTRIGOBJECT_H
14
15#include <iostream>
16
18
19#include "TObject.h"
20
21class TrackTrigObject : public TObject {
22
23public:
24
26 TrackTrigObject(double eta, double phi, double pt, double z0,
27 int type, unsigned long id=0);
28
30 int type, unsigned long id=0);
31
32 virtual ~TrackTrigObject() { }
33
34 double eta() const { return m_eta; }
35 double phi() const { return m_phi; }
36 double pt() const { return m_pt; }
37 double z0() const { return m_z0; }
38
39 int type() const { return m_type; }
40
41 unsigned long id() const { return m_id; }
42
43 void addChild(unsigned long id) { m_children.push_back(id); }
44
45 const std::vector<unsigned long>& children() const { return m_children; }
46
47private:
48
50 double m_eta;
51 double m_phi;
52 double m_pt;
53 double m_z0;
54
56 int m_type;
57
59 unsigned long m_id;
60
62 std::vector<unsigned long> m_children;
63
65
66};
67
68
69inline std::ostream& operator<<( std::ostream& s, const TrackTrigObject& t ) {
70 s << "Object ["
71 << "\ttype=" << t.type()
72 << ":\teta=" << t.eta()
73 << "\tphi=" << t.phi()
74 << "\tpt=" << t.pt()*0.001 << " GeV"
75 << " ] \t(";
76
77 std::string n = "";
78 if ( t.children().size()>3 ) n = "\n\t";
79 for ( size_t i=0 ; i<t.children().size() ; i++ ) s << n << " 0x" << std::hex << t.children()[i] << std::dec;
80 s << " )" ;
81
82 return s;
83}
84
85
86#endif // TRACKTRIGOBJECT_H
87
88
89
90
91
92
93
94
95
96
std::ostream & operator<<(std::ostream &s, const TrackTrigObject &t)
double z0() const
double pt() const
unsigned long id() const
const std::vector< unsigned long > & children() const
double phi() const
std::vector< unsigned long > m_children
identifiers of children
double eta() const
double m_eta
parameters
TrackTrigObject(double eta, double phi, double pt, double z0, int type, unsigned long id=0)
just for root, don't want this really
ClassDef(TrackTrigObject, 1)
void addChild(unsigned long id)
unsigned long m_id
identifier
virtual ~TrackTrigObject()
int m_type
generic type information