ATLAS Offline Software
Loading...
Searching...
No Matches
Filter_OfflineR22.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
13
14
15#ifndef TRIGINDETANALYSISUTILS_FILTER_OFFLINER22_H
16#define TRIGINDETANALYSISUTILS_FILTER_OFFLINER22_H
17
18#include <iostream>
19#include <cmath>
20
24
25
26// generic selection cut selection function
27
29
30public:
31
32 Filter_OfflineR22( double pTMin=1000, const std::string& type="tight", double z0=1000, double a0=1000 ) :
33 m_pTMin(pTMin),
34 m_z0max(z0),
35 m_a0max(a0),
37 { }
38
39 bool select(const TIDA::Track* t, const TIDARoiDescriptor* =0 ) {
40 // Select track parameters
41 bool selected = true;
42
43 int Nsi = t->pixelHits()*0.5 + t->sctHits();
44 int Nsiholes = t->pixelHoles()+t->sctHoles();
45
46 if ( std::fabs(t->z0())>m_z0max ) selected = false;
47 if ( std::fabs(t->a0())>m_a0max ) selected = false;
48 if ( std::fabs(t->eta())>2.5 || std::fabs(t->pT())<m_pTMin ) selected = false;
49
50 if ( m_type=="loose" ) {
51
52 // Select track silicon hit content
53 if( Nsi<8 ) selected = false;
54 if( Nsiholes>2 ) selected = false;
55 if ( t->pixelHoles()>1 ) selected = false;
56 }
57 else if ( m_type=="loose-primary" ) {
58
59 // Select track silicon hit content
60 if ( ( Nsi<10 ) && ( Nsi<8 || Nsiholes>0 ) ) selected = false;
61
62 }
63 else if ( m_type=="tight" || m_type=="vtight" ) {
64
65 // Select track silicon hit content
66 if ( std::fabs(t->eta())< 1.65 && Nsi<9 ) selected = false;
67 if ( std::fabs(t->eta())>=1.65 && Nsi<11 ) selected = false;
68
69 if( Nsiholes>2 ) selected = false;
70 if ( t->pixelHoles()>0 ) selected = false;
71
73 if ( ( t->expectBL() || t->hasTruth() ) && t->bLayerHits()<1 ) selected = false;
74
75 if ( m_type=="vtight" && t->pixelHits()==0 ) selected = false;
76 }
77 else if ( m_type=="tight-tau" ) {
78
79 // Select track silicon hit content
80 if ( std::fabs(t->eta())< 1.65 && Nsi<9 ) selected = false;
81 if ( std::fabs(t->eta())>=1.65 && Nsi<11 ) selected = false;
82
83 if ( t->pixelHoles()>0 ) selected = false;
84
85 if ( t->pixelHits()<4 ) selected = false;
86
88 if ( ( t->expectBL() || t->hasTruth() ) && t->bLayerHits()<1 ) selected = false;
89 }
90 else {
91 std::cerr << "Filter_OfflineR22::type: " << m_type << "not recognised" << std::endl;
92 std::abort();
93 }
94
95
96 return selected;
97 }
98
99private:
100
101 // selection
102
103 double m_pTMin;
104 double m_z0max;
105 double m_a0max;
106 std::string m_type;
107
108};
109
110
111
112
113
114inline std::ostream& operator<<( std::ostream& s, const Filter_OfflineR22& ) {
115 return s;
116}
117
118
119#endif // TRIGINDETANALYSISUTILS_FILTER_OFFLINER22_H
120
121
122
123
124
125
126
127
128
129
std::ostream & operator<<(std::ostream &s, const Filter_OfflineR22 &)
base class for a single track selection filter allowing parameter setting for complex track selection
Filter_OfflineR22(double pTMin=1000, const std::string &type="tight", double z0=1000, double a0=1000)
bool select(const TIDA::Track *t, const TIDARoiDescriptor *=0)
Describes the Region of Interest geometry It has basically 8 parameters.
double a0
Definition globals.cxx:27