|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef TIDA_FILTERS_H
13 #define TIDA_FILTERS_H
60 if (std::fabs(
t->author())!=
m_pdgId)
return false;
81 if ( std::abs(
t->author())!=
m_pdgId ||
83 std::fabs(
t->pT())<
m_pTMin)
return false;
101 Filter_Bound(
const double &eta_max,
const double &pT_min,
const double &pT_max) :
107 if (std::fabs(
t->eta()) >
m_eta_max)
return false;
108 if (std::fabs(
t->pT()) >
m_pT_max)
return false;
109 if (std::fabs(
t->pT()) <
m_pT_min)
return false;
159 std::cout <<
"Filter_Vertex::Filter_Vertex() with d0 cut " <<
m_d0Cut <<
"\tz0 cut " <<
m_z0Cut << std::endl;
182 if (
m_v.size()==0 )
return true;
184 for (
unsigned int i=0 ;
i<
m_v.size() ;
i++ ) {
186 double*
v =
m_v[
i].position();
216 std::vector<TIDA::Vertex>
m_v;
253 std::cerr <<
"Filter_Combined::contains() called with null roidescriptor" << std::endl;
257 if (
r->composite() ) {
258 for (
unsigned i=
r->size() ;
i-- ; )
if (
contains(
t,
r->at(
i) ) )
return true;
262 if (
r->isFullscan() )
return true;
264 bool contained_phi =
false;
268 if (
r->phiMinus()<
r->phiPlus() ) contained_phi = (
t->phi()>
r->phiMinus() &&
t->phi()<
r->phiPlus() );
269 else contained_phi = (
t->phi()>
r->phiMinus() ||
t->phi()<
r->phiPlus() );
271 bool contained_zed = (
t->z0()>
r->zedMinus() &&
t->z0()<
r->zedPlus() );
275 bool contained_eta = (
t->eta()<
r->etaPlus() &&
t->eta()>
r->etaMinus() );
293 double cross0 = zexit*
r->rMinusZed() - rexit*
r->zedMinusR();
294 double cross1 = zexit*
r->rPlusZed() - rexit*
r->zedPlusR();
297 if ( cross0>0 && cross1<0 ) contained_eta=
true;
298 else contained_eta=
false;
303 double newphi =
outerphi(
t->pT(),
t->phi(), rexit );
305 if ( newphi==0 )
return false;
307 if (
r->phiMinus()<
r->phiPlus() ) contained_phi &= ( newphi>
r->phiMinus() && newphi<
r->phiPlus() );
308 else contained_phi &= ( newphi>
r->phiMinus() || newphi<
r->phiPlus() );
312 if ( contained_eta &&
315 if (
m_debugPrintout ) std::cout <<
"\tFilter::inside roi" << std::endl;
360 double mqR = 10*
pt/(2.99792458*2);
368 if ( std::fabs(
ratio)>1 )
return 0;
371 newphi -= std::asin(
ratio );
374 while ( newphi<-
M_PI ) newphi += 2*
M_PI;
375 while ( newphi>
M_PI ) newphi -= 2*
M_PI;
396 #endif // TIDA_FILTERS_H
bool select(const TIDA::Track *t, const TIDARoiDescriptor *=0)
bool select(const TIDA::Track *t, const TIDARoiDescriptor *=0)
bool select(const TIDA::Track *t, const TIDARoiDescriptor *=0)
std::vector< TIDA::Vertex > m_v
Filter_pdgIdpTeta(const unsigned int &pdgId, double etaMax, double pTMin)
Scalar phi() const
phi method
Scalar theta() const
theta method
static double exitpoint(double tz0, double teta, double &zexit, double &rexit)
void setAuthor(unsigned int author)
bool select(const TIDA::Track *t, const TIDARoiDescriptor *r=0)
Describes the Region of Ineterest geometry It has basically 8 parameters.
static double outerphi(double pt, double phi, double r=1000)
calculate the (very approximate) phi position for a track at a rafius r
bool contains(const TIDA::Track *t, const TIDARoiDescriptor *r) const
void setVertex(const std::vector< TIDA::Vertex > &vv)
virtual bool select(const TIDA::Track *t, const TIDARoiDescriptor *r=0)=0
Filter_Author(const int &author)
bool select(const TIDA::Track *t, const TIDARoiDescriptor *)
Filter_Vertex(double d0Cut, double z0Cut)
Filter_Bound(const double &eta_max, const double &pT_min, const double &pT_max)
default simple filter which accepts all tracks
Filter_pdgId(const unsigned int &pdgId)
bool select(const TIDA::Track *t, const TIDARoiDescriptor *=0)
Filter_Combined(TrackFilter *f1, TrackFilter *f2)
void containtracks(bool b=true)
set / unset the flag to determine whether tracks should be fully contained in the RoI or not
void setRoi(TIDARoiDescriptor *r)
void containtracksPhi(bool b=true)
set / unset to allow the strict phi containment to be used even if the full rigorous containement is ...
void setVertex(const TIDA::Vertex &v)
const TIDARoiDescriptor * m_roi
bool select(const TIDA::Track *, const TIDARoiDescriptor *=0)