ATLAS Offline Software
TrackTrigObject.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
12 #ifndef TRACKTRIGOBJECT_H
13 #define TRACKTRIGOBJECT_H
14 
15 #include <iostream>
16 
18 
19 #include "TObject.h"
20 
21 class TrackTrigObject : public TObject {
22 
23 public:
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 
47 private:
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 
69 inline 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 
Track.h
TrackTrigObject::phi
double phi() const
Definition: TrackTrigObject.h:35
TrackTrigObject::m_type
int m_type
generic type information
Definition: TrackTrigObject.h:56
TrackTrigObject::TrackTrigObject
TrackTrigObject()
Definition: TrackTrigObject.h:25
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrackTrigObject::m_children
std::vector< unsigned long > m_children
identifiers of children
Definition: TrackTrigObject.h:62
TrackTrigObject::m_pt
double m_pt
Definition: TrackTrigObject.h:52
TrackTrigObject::m_phi
double m_phi
Definition: TrackTrigObject.h:51
TrackTrigObject::z0
double z0() const
Definition: TrackTrigObject.h:37
TrackTrigObject::children
const std::vector< unsigned long > & children() const
Definition: TrackTrigObject.h:45
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TrackTrigObject::m_id
unsigned long m_id
identifier
Definition: TrackTrigObject.h:59
TrackTrigObject::pt
double pt() const
Definition: TrackTrigObject.h:36
TrackTrigObject::~TrackTrigObject
virtual ~TrackTrigObject()
Definition: TrackTrigObject.h:32
TrackTrigObject::ClassDef
ClassDef(TrackTrigObject, 1)
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
operator<<
std::ostream & operator<<(std::ostream &s, const TrackTrigObject &t)
Definition: TrackTrigObject.h:69
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrackTrigObject::m_z0
double m_z0
Definition: TrackTrigObject.h:53
beamspotman.n
n
Definition: beamspotman.py:731
TrackTrigObject::m_eta
double m_eta
parameters
Definition: TrackTrigObject.h:50
TrackTrigObject
Definition: TrackTrigObject.h:21
TrackTrigObject::eta
double eta() const
Definition: TrackTrigObject.h:34
TrackTrigObject::type
int type() const
Definition: TrackTrigObject.h:39
TIDA::Track
Definition: Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/Track.h:26
TrackTrigObject::TrackTrigObject
TrackTrigObject(double eta, double phi, double pt, double z0, int type, unsigned long id=0)
just for root, don't want this really
TrackTrigObject::id
unsigned long id() const
Definition: TrackTrigObject.h:41
TrackTrigObject::addChild
void addChild(unsigned long id)
Definition: TrackTrigObject.h:43