ATLAS Offline Software
TIDARoi.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
15 #ifndef TRIGINDETANALYSIS_TRACKROI_H
16 #define TRIGINDETANALYSIS_TRACKROI_H
17 
18 #include <iostream>
19 #include <vector>
20 #include <string>
21 
22 #include "TObject.h"
23 
28 
29 namespace TIDA {
30 
31 class Roi : public TObject {
32 
33 public:
34 
35  Roi();
36  Roi(const TIDARoiDescriptor& roi);
37 
38  virtual ~Roi();
39 
40 
42  const TIDARoiDescriptor& roi() const { return m_roi; }
43  TIDARoiDescriptor& roi() { return m_roi; }
44 
46  void addTracks( const std::vector<TIDA::Track>& tracks) {
47  m_tracks = tracks;
48  }
49 
50  void addTracks( const std::vector<TIDA::Track*>& trackp);
51 
52  const std::vector<TIDA::Track>& tracks() const { return m_tracks; }
53  std::vector<TIDA::Track>& tracks() { return m_tracks; }
54 
56  const std::vector<TIDA::Vertex>& vertices() const { return m_vertices; }
57  std::vector<TIDA::Vertex>& vertices() { return m_vertices; }
58  void addVertex( const TIDA::Vertex& v) { m_vertices.push_back(v); }
59  void addVertices( const std::vector<TIDA::Vertex>& v) { m_vertices = v; }
60 
62  const std::vector<TrackTrigObject>& objects() const { return m_objects; }
63  std::vector<TrackTrigObject>& objects() { return m_objects; }
64  void addObject( const TrackTrigObject& o) { m_objects.push_back(o); }
65  void addObjects( const std::vector<TrackTrigObject>& ob) { m_objects.insert( m_objects.end(), ob.begin(), ob.end() ); }
66 
68  const std::vector<double>& user() const { return m_user; }
69  std::vector<double>& user() { return m_user; }
70  void addUserData( const std::vector<double>& user) { m_user = user; }
71 
72 
74  void clear() {
75  m_tracks.clear();
76  m_user.clear();
77  m_objects.clear();
78  m_vertices.clear();
79  }
80 
81 private:
82 
84 
85  std::vector<TIDA::Track> m_tracks;
86  std::vector<TIDA::Vertex> m_vertices;
87 
88 
89  std::vector<double> m_user;
90  std::vector<TrackTrigObject> m_objects;
91 
92  ClassDef(TIDA::Roi,2)
93 
94 };
95 
96 }
97 
98 
99 inline std::ostream& operator<<( std::ostream& s, const TIDA::Roi& r ) {
100  s << "\tRoi " << r.roi();
101  for ( unsigned i=0 ; i<r.tracks().size() ; i++ ) s << "\n\t\t\t" << r.tracks()[i];
102  for ( unsigned i=0 ; i<r.user().size() ; i++ ) s << "\n\t\t\t" << r.user()[i];
103  for ( unsigned i=0 ; i<r.objects().size() ; i++ ) s << "\n\t\t\t" << r.objects()[i];
104  s << "\tvertices: " << r.vertices().size();
105  for ( unsigned i=0 ; i<r.vertices().size() ; i++ ) s << "\n\t\t\t" << r.vertices()[i];
106  return s;
107 }
108 
109 
110 #endif // TRIGINDETANALYSIS_TRACKROI_H
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
TIDA::Roi::roi
const TIDARoiDescriptor & roi() const
access the roi information
Definition: TIDARoi.h:42
beamspotman.r
def r
Definition: beamspotman.py:676
Track.h
TIDA
Test for xAOD.
Definition: Filter_AcceptAll.h:22
TIDA::Roi::addObject
void addObject(const TrackTrigObject &o)
Definition: TIDARoi.h:64
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TIDA::Roi::~Roi
virtual ~Roi()
Definition: TIDARoi.cxx:19
TIDA::Roi::user
const std::vector< double > & user() const
access the user data
Definition: TIDARoi.h:68
TIDA::Roi::addTracks
void addTracks(const std::vector< TIDA::Track > &tracks)
accessors for the track vector
Definition: TIDARoi.h:46
TIDA::Roi::Roi
Roi()
TIDAVertex.h
TIDARoiDescriptor
Describes the Region of Ineterest geometry It has basically 8 parameters.
Definition: TIDARoiDescriptor.h:42
TIDARoiDescriptor.h
TIDA::Roi::addObjects
void addObjects(const std::vector< TrackTrigObject > &ob)
Definition: TIDARoi.h:65
TIDA::Roi::m_roi
TIDARoiDescriptor m_roi
Definition: TIDARoi.h:83
TIDA::Roi::m_tracks
std::vector< TIDA::Track > m_tracks
roi parameters
Definition: TIDARoi.h:85
TIDA::Roi::m_vertices
std::vector< TIDA::Vertex > m_vertices
tracks in this roi
Definition: TIDARoi.h:86
TIDA::Roi::clear
void clear()
clean out everything
Definition: TIDARoi.h:74
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TIDA::Roi::user
std::vector< double > & user()
Definition: TIDARoi.h:69
TIDA::Roi::objects
std::vector< TrackTrigObject > & objects()
Definition: TIDARoi.h:63
TIDA::Roi::m_user
std::vector< double > m_user
vertices
Definition: TIDARoi.h:89
lumiFormat.i
int i
Definition: lumiFormat.py:85
TIDA::Roi::tracks
const std::vector< TIDA::Track > & tracks() const
Definition: TIDARoi.h:52
TIDA::Roi::addUserData
void addUserData(const std::vector< double > &user)
Definition: TIDARoi.h:70
TIDA::Roi::vertices
const std::vector< TIDA::Vertex > & vertices() const
access the vertices
Definition: TIDARoi.h:56
TIDA::Roi::tracks
std::vector< TIDA::Track > & tracks()
Definition: TIDARoi.h:53
TIDA::Vertex
Definition: TIDAVertex.h:23
TIDA::Roi::roi
TIDARoiDescriptor & roi()
Definition: TIDARoi.h:43
TIDA::Roi
Definition: TIDARoi.h:31
TrackTrigObject.h
TIDA::Roi::addVertex
void addVertex(const TIDA::Vertex &v)
Definition: TIDARoi.h:58
python.PyAthena.v
v
Definition: PyAthena.py:154
TrackTrigObject
Definition: TrackTrigObject.h:21
TIDA::Roi::vertices
std::vector< TIDA::Vertex > & vertices()
Definition: TIDARoi.h:57
TIDA::Roi::addVertices
void addVertices(const std::vector< TIDA::Vertex > &v)
Definition: TIDARoi.h:59
TIDA::Roi::objects
const std::vector< TrackTrigObject > & objects() const
access the generic objects
Definition: TIDARoi.h:62
TIDA::Roi::m_objects
std::vector< TrackTrigObject > m_objects
user vector
Definition: TIDARoi.h:90
operator<<
std::ostream & operator<<(std::ostream &s, const TIDA::Roi &r)
Definition: TIDARoi.h:99