ATLAS Offline Software
Loading...
Searching...
No Matches
Filter_Vertex Class Reference

#include <Filters.h>

Inheritance diagram for Filter_Vertex:
Collaboration diagram for Filter_Vertex:

Public Member Functions

 Filter_Vertex (double d0Cut, double z0Cut)
virtual ~Filter_Vertex ()
void setVertex (const TIDA::Vertex &v)
void setVertex (const std::vector< TIDA::Vertex > &vv)
bool select (const TIDA::Track *t, const TIDARoiDescriptor *=0)

Private Attributes

double m_d0Cut
double m_z0Cut
std::vector< TIDA::Vertexm_v

Detailed Description

Definition at line 155 of file Filters.h.

Constructor & Destructor Documentation

◆ Filter_Vertex()

Filter_Vertex::Filter_Vertex ( double d0Cut,
double z0Cut )
inline

TDirectory* dir = gDirectory; dir->cd();

Definition at line 158 of file Filters.h.

158 : m_d0Cut(d0Cut), m_z0Cut(z0Cut) {
159 std::cout << "Filter_Vertex::Filter_Vertex() with d0 cut " << m_d0Cut << "\tz0 cut " << m_z0Cut << std::endl;
162 }
double m_z0Cut
Definition Filters.h:214
double m_d0Cut
Definition Filters.h:213

◆ ~Filter_Vertex()

virtual Filter_Vertex::~Filter_Vertex ( )
inlinevirtual

Definition at line 164 of file Filters.h.

164{ }

Member Function Documentation

◆ select()

bool Filter_Vertex::select ( const TIDA::Track * t,
const TIDARoiDescriptor * = 0 )
inlinevirtual

calculate z, d0 with respect to vertex and then cut on them

tracks should already be corrected to the beam line now

calculate z

now test agreement

Implements TrackFilter.

Definition at line 176 of file Filters.h.

176 {
179
180 // std::cout << "Filter_Vertex::select() " << *t << "\t" << m_v.size() << std::endl;
181
182 if ( m_v.size()==0 ) return true;
183
184 for (unsigned int i=0 ; i<m_v.size() ; i++ ) {
185
186 double* v = m_v[i].position();
188 // double a0 = t->a0() + v[0]*std::sin( t->phi() ) - v[1]*std::cos( t->phi() );
189 double a0 = t->a0();
190
192
193 double theta = 2*std::atan(std::exp( -t->eta() ));
194 // double z = t->z0() + ( v[0]*std::cos( t->phi() ) + v[1]*std::sin( t->phi() ) )/std::atan(theta);
195 double z = t->z0();
196 double z0sin = (z-v[2])*std::sin(theta);
197
198
199 // std::cout << "Filter_Vertex::select()"
200 // << "\ta0 " << std::fabs(a0) << "(" << m_d0Cut << ")"
201 // << "\tz0sin " << std::fabs(z0sin) << "(" << m_z0Cut << ")"
202 // << std::endl;
203
205 if ( std::fabs(a0)<m_d0Cut && std::fabs(z0sin)<m_z0Cut ) return true;
206 }
207
208 return false;
209 }
Scalar theta() const
theta method
#define z
std::vector< TIDA::Vertex > m_v
Definition Filters.h:216
double a0
Definition globals.cxx:27

◆ setVertex() [1/2]

void Filter_Vertex::setVertex ( const std::vector< TIDA::Vertex > & vv)
inline

Definition at line 171 of file Filters.h.

171 {
172 m_v.clear();
173 m_v = vv;
174 }

◆ setVertex() [2/2]

void Filter_Vertex::setVertex ( const TIDA::Vertex & v)
inline

Definition at line 166 of file Filters.h.

166 {
167 m_v.clear();
168 m_v.push_back(v);
169 }

Member Data Documentation

◆ m_d0Cut

double Filter_Vertex::m_d0Cut
private

Definition at line 213 of file Filters.h.

◆ m_v

std::vector<TIDA::Vertex> Filter_Vertex::m_v
private

Definition at line 216 of file Filters.h.

◆ m_z0Cut

double Filter_Vertex::m_z0Cut
private

Definition at line 214 of file Filters.h.


The documentation for this class was generated from the following file: