11 const IInterface*
p) :
27 return StatusCode::SUCCESS;
35 if(!vertices.isValid()) {
37 return StatusCode::FAILURE;
49 if(!tracks.isValid()) {
51 return StatusCode::FAILURE;
58 for(
const auto*
track:*tracks) {
60 else decorator(*
track) = 0;
63 return StatusCode::SUCCESS;
70 int n_sct_hits = acc_n_sct_hits(*
track);
78 bool pass_min_bias=
false;
82 bool pass_hi_loose=
false;
86 bool pass_hi_loose_additional_SCT_hit=
true;
87 if(!pass_hi_loose || n_sct_hits<7) pass_hi_loose_additional_SCT_hit=
false;
90 bool pass_hi_loose_tight_d0_z0=
true;
91 if(!pass_hi_loose || fabs(
d0)>1.0 || fabs(z0_wrtPV*
sin(
theta))>1.0) pass_hi_loose_tight_d0_z0=
false;
94 bool pass_hi_loose_tighter_d0_z0=
true;
95 if(!pass_hi_loose || fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(
theta))>0.5) pass_hi_loose_tighter_d0_z0=
false;
98 bool pass_hi_tight=
false;
102 bool pass_hi_tight_loose_d0_z0=
true;
103 if(pass_hi_tight==
false){
106 static const auto d0Index = taccept.getCutPosition(
"D0");
107 static const auto z0Index = taccept.getCutPosition(
"Z0SinTheta");
108 static const auto nCuts = taccept.getNCuts();
110 cutBitset |= (1 << d0Index) | (1 << z0Index);
111 if(cutBitset.count() != nCuts ) pass_hi_tight_loose_d0_z0=
false;
112 if(fabs(
d0)>1.5 || fabs(z0_wrtPV*
sin(
theta))>1.5) pass_hi_tight_loose_d0_z0=
false;
116 bool pass_hi_tight_tighter_d0_z0=
true;
117 if(!pass_hi_tight || fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(
theta))>0.5) pass_hi_tight_tighter_d0_z0=
false;
151 int n_Ipix_hits = acc_n_Ipix_hits(*
track);
152 int n_Ipix_expected = acc_n_Ipix_expected(*
track);
153 int n_NIpix_hits = acc_n_NIpix_hits(*
track);
154 int n_NIpix_expected = acc_n_NIpix_expected(*
track);
155 int n_sct_hits = acc_n_sct_hits(*
track);
156 int n_pix_hits = acc_n_pix_hits(*
track);
157 int n_sct_holes = acc_n_sct_holes(*
track);
158 int n_sct_dead = acc_n_sct_dead(*
track);
159 int n_pix_dead = acc_n_pix_dead(*
track);
166 float z0_wrtPV=
track->z0()+
track->vz()-z_vtx;
172 bool pass_min_bias=
true;
174 if(fabs(
eta)>2.5) pass_min_bias=
false;
175 if(n_Ipix_expected>0){
176 if (n_Ipix_hits==0) pass_min_bias=
false;
179 if(n_NIpix_expected>0 && n_NIpix_hits==0) pass_min_bias=
false;
182 int n_sct=n_sct_hits+n_sct_dead;
183 if (
pt<=300) {
if (n_sct <2) pass_min_bias=
false;}
184 else if(
pt<=400) {
if (n_sct <4) pass_min_bias=
false;}
185 else if(
pt> 400) {
if (n_sct <6) pass_min_bias=
false;}
187 int n_pix=n_pix_hits+n_pix_dead;
188 if(n_pix<=0) pass_min_bias=
false;
190 if(fabs(
d0)>1.5) pass_min_bias=
false;
191 if(fabs(z0_wrtPV*
sin(
theta))>1.5) pass_min_bias=
false;
193 if(
pt>10000 && TMath::Prob(
chi2,
ndof)<=0.01) pass_min_bias=
false;
202 bool pass_hi_loose=
true;
204 if(fabs(
eta)>2.5) pass_hi_loose=
false;
205 if(n_Ipix_expected>0){
206 if (n_Ipix_hits==0) pass_hi_loose=
false;
209 if(n_NIpix_expected>0 && n_NIpix_hits==0) pass_hi_loose=
false;
212 if(n_pix_hits==0) pass_hi_loose=
false;
213 if(n_sct_hits< 6) pass_hi_loose=
false;
214 if(
pt>10000 && TMath::Prob(
chi2,
ndof)<=0.01) pass_hi_loose=
false;
215 if(fabs(
d0) >1.5) pass_hi_loose=
false;
216 if(fabs(z0_wrtPV*
sin(
theta))>1.5) pass_hi_loose=
false;
223 bool pass_hi_loose_additional_SCT_hit=
true;
224 if(!pass_hi_loose) pass_hi_loose_additional_SCT_hit=
false;
226 if(n_sct_hits<7) pass_hi_loose_additional_SCT_hit=
false;
233 bool pass_hi_loose_tight_d0_z0=
true;
234 if(!pass_hi_loose || fabs(
d0)>1.0 || fabs(z0_wrtPV*
sin(
theta))>1.0) pass_hi_loose_tight_d0_z0=
false;
240 bool pass_hi_loose_tighter_d0_z0=
true;
241 if(!pass_hi_loose || fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(
theta))>0.5) pass_hi_loose_tighter_d0_z0=
false;
247 bool pass_hi_tight_loose_d0_z0=
true;
248 if(!pass_hi_loose) pass_hi_tight_loose_d0_z0=
false;
250 if(n_pix_hits <2 ) pass_hi_tight_loose_d0_z0=
false;
251 if(n_sct_hits <8 ) pass_hi_tight_loose_d0_z0=
false;
252 if(n_sct_holes>1 ) pass_hi_tight_loose_d0_z0=
false;
253 if(
ndof==0) pass_hi_tight_loose_d0_z0=
false;
254 else if(
chi2/
ndof>6) pass_hi_tight_loose_d0_z0=
false;
261 bool pass_hi_tight=
true;
262 if(!pass_hi_loose) pass_hi_tight=
false;
264 if(n_pix_hits <2 ) pass_hi_tight=
false;
265 if(n_sct_hits <8 ) pass_hi_tight=
false;
266 if(n_sct_holes>1 ) pass_hi_tight=
false;
267 if(fabs(
d0) >1.0) pass_hi_tight=
false;
268 if(fabs(z0_wrtPV*
sin(
theta))>1.0) pass_hi_tight=
false;
269 if(
ndof==0) pass_hi_tight=
false;
270 else if(
chi2/
ndof>6) pass_hi_tight=
false;
277 bool pass_hi_tight_tighter_d0_z0=
true;
278 if(!pass_hi_tight) pass_hi_tight_tighter_d0_z0=
false;
280 if(fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(
theta))>0.5) pass_hi_tight_tighter_d0_z0=
false;