ATLAS Offline Software
Loading...
Searching...
No Matches
Filter_Offline2017.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
13
14
15#ifndef TRIGINDETANALYSISUTILS_FILTER_OFFLINE2017_H
16#define TRIGINDETANALYSISUTILS_FILTER_OFFLINE2017_H
17
18#include <iostream>
19#include <cmath>
20
24
25
26// generic selection cut selection function
27
29
30public:
31
32 Filter_Offline2017( 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<7 ) selected = false;
54 if( Nsiholes>2 ) selected = false;
55 if ( t->pixelHoles()>1 ) selected = false;
56
57 // if ( m_expectBL && ( ( t->expectBL() || t->hasTruth() ) && t->bLayerHits()<1) ) selected = false;
58 }
59 else if ( m_type=="loose-primary" ) {
60
61 // Select track silicon hit content
62 if ( ( Nsi<10 ) && ( Nsi<7 || Nsiholes>0 ) ) selected = false;
63
64 }
65 else if ( m_type=="tight" || m_type=="vtight" ) {
66
67 // Select track silicon hit content
68 if ( std::fabs(t->eta())< 1.65 && Nsi<9 ) selected = false;
69 if ( std::fabs(t->eta())>=1.65 && Nsi<11 ) selected = false;
70
71 if ( t->pixelHoles()>0 ) selected = false;
72
74 if ( ( t->expectBL() || t->hasTruth() ) && t->bLayerHits()<1 ) selected = false;
75
76 if ( m_type=="vtight" && t->pixelHits()==0 ) selected = false;
77 }
78 else if ( m_type=="tight-tau" ) {
79
80 // Select track silicon hit content
81 if ( std::fabs(t->eta())< 1.65 && Nsi<9 ) selected = false;
82 if ( std::fabs(t->eta())>=1.65 && Nsi<11 ) selected = false;
83
84 if ( t->pixelHoles()>0 ) selected = false;
85
86 if ( t->pixelHits()<4 ) selected = false;
87
89 if ( ( t->expectBL() || t->hasTruth() ) && t->bLayerHits()<1 ) selected = false;
90 }
91 else {
92 std::cerr << "Filter_Offline2017::type: " << m_type << "not recognised" << std::endl;
93 std::abort();
94 }
95
96
97 return selected;
98 }
99
100private:
101
102 // selection
103
104 double m_pTMin;
105 double m_z0max;
106 double m_a0max;
107 std::string m_type;
108
109};
110
111
112
113
114
115inline std::ostream& operator<<( std::ostream& s, const Filter_Offline2017& ) {
116 return s;
117}
118
119
120#endif // TRIGINDETANALYSISUTILS_FILTER_OFFLINE2017_H
121
122
123
124
125
126
127
128
129
130
std::ostream & operator<<(std::ostream &s, const Filter_Offline2017 &)
base class for a single track selection filter allowing parameter setting for complex track selection
Filter_Offline2017(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 Ineterest geometry It has basically 8 parameters.
double a0
Definition globals.cxx:27