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 "TObject.h"
16#include <vector>
17#include <ostream>
18#include <string>
19#include <ios> //for std::hex
20
21namespace TIDA{
22 class Track;
23}
24
25
26class TrackTrigObject : public TObject {
27
28public:
29
31 TrackTrigObject(double eta, double phi, double pt, double z0,
32 int type, unsigned long id=0);
33
35 int type, unsigned long id=0);
36
37 virtual ~TrackTrigObject() { }
38
39 double eta() const { return m_eta; }
40 double phi() const { return m_phi; }
41 double pt() const { return m_pt; }
42 double z0() const { return m_z0; }
43
44 int type() const { return m_type; }
45
46 unsigned long id() const { return m_id; }
47
48 void addChild(unsigned long id) { m_children.push_back(id); }
49
50 const std::vector<unsigned long>& children() const { return m_children; }
51
52private:
53
55 double m_eta;
56 double m_phi;
57 double m_pt;
58 double m_z0;
59
61 int m_type;
62
64 unsigned long m_id;
65
67 std::vector<unsigned long> m_children;
68
70
71};
72
73
74inline std::ostream& operator<<( std::ostream& s, const TrackTrigObject& t ) {
75 s << "Object ["
76 << "\ttype=" << t.type()
77 << ":\teta=" << t.eta()
78 << "\tphi=" << t.phi()
79 << "\tpt=" << t.pt()*0.001 << " GeV"
80 << " ] \t(";
81
82 std::string n = "";
83 if ( t.children().size()>3 ) n = "\n\t";
84 for ( size_t i=0 ; i<t.children().size() ; i++ ) s << n << " 0x" << std::hex << t.children()[i] << std::dec;
85 s << " )" ;
86
87 return s;
88}
89
90
91#endif // TRACKTRIGOBJECT_H
92
93
94
95
96
97
98
99
100
101
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
ClassDef(TrackTrigObject, 1)
void addChild(unsigned long id)
unsigned long m_id
identifier
virtual ~TrackTrigObject()
int m_type
generic type information
Test for xAOD.