15 const IInterface*
p) :
18 declareInterface<DerivationFramework::IAugmentationTool>(
this);
33 ATH_MSG_ERROR (
"Couldn't retrieve VertexContainer with key PrimaryVertices");
34 return StatusCode::FAILURE;
52 ATH_MSG_ERROR (
"Couldn't retrieve TrackParticleContainer with key InDetTrackParticles");
53 return StatusCode::FAILURE;
58 for(
const auto*
track:*tracks) {
62 else decorator(*
track) = 0;
65 return StatusCode::SUCCESS;
72 int n_sct_hits = acc_n_sct_hits(*
track);
77 float theta =
track->theta();
80 bool pass_min_bias=
false;
84 bool pass_hi_loose=
false;
88 bool pass_hi_loose_additional_SCT_hit=
true;
89 if(!pass_hi_loose || n_sct_hits<7) pass_hi_loose_additional_SCT_hit=
false;
92 bool pass_hi_loose_tight_d0_z0=
true;
93 if(!pass_hi_loose || fabs(
d0)>1.0 || fabs(z0_wrtPV*
sin(theta))>1.0) pass_hi_loose_tight_d0_z0=
false;
96 bool pass_hi_loose_tighter_d0_z0=
true;
97 if(!pass_hi_loose || fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(theta))>0.5) pass_hi_loose_tighter_d0_z0=
false;
100 bool pass_hi_tight=
false;
104 bool pass_hi_tight_loose_d0_z0=
true;
105 if(pass_hi_tight==
false){
108 static const auto d0Index = taccept.getCutPosition(
"D0");
109 static const auto z0Index = taccept.getCutPosition(
"Z0SinTheta");
110 static const auto nCuts = taccept.getNCuts();
112 cutBitset |= (1 << d0Index) | (1 << z0Index);
113 if(cutBitset.count() != nCuts ) pass_hi_tight_loose_d0_z0=
false;
114 if(fabs(
d0)>1.5 || fabs(z0_wrtPV*
sin(theta))>1.5) pass_hi_tight_loose_d0_z0=
false;
118 bool pass_hi_tight_tighter_d0_z0=
true;
119 if(!pass_hi_tight || fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(theta))>0.5) pass_hi_tight_tighter_d0_z0=
false;
122 unsigned short quality =0;
124 if(pass_hi_loose ) quality+=
HI_LOOSE;
129 if(pass_hi_tight ) quality+=
HI_TIGHT;
139 float eta =
track->eta();
153 int n_Ipix_hits = acc_n_Ipix_hits(*
track);
154 int n_Ipix_expected = acc_n_Ipix_expected(*
track);
155 int n_NIpix_hits = acc_n_NIpix_hits(*
track);
156 int n_NIpix_expected = acc_n_NIpix_expected(*
track);
157 int n_sct_hits = acc_n_sct_hits(*
track);
158 int n_pix_hits = acc_n_pix_hits(*
track);
159 int n_sct_holes = acc_n_sct_holes(*
track);
160 int n_sct_dead = acc_n_sct_dead(*
track);
161 int n_pix_dead = acc_n_pix_dead(*
track);
168 float z0_wrtPV=
track->z0()+
track->vz()-z_vtx;
169 float theta =
track->theta();
174 bool pass_min_bias=
true;
176 if(fabs(eta)>2.5) pass_min_bias=
false;
177 if(n_Ipix_expected>0){
178 if (n_Ipix_hits==0) pass_min_bias=
false;
181 if(n_NIpix_expected>0 && n_NIpix_hits==0) pass_min_bias=
false;
184 int n_sct=n_sct_hits+n_sct_dead;
185 if (
pt<=300) {
if (n_sct <2) pass_min_bias=
false;}
186 else if(
pt<=400) {
if (n_sct <4) pass_min_bias=
false;}
187 else if(
pt> 400) {
if (n_sct <6) pass_min_bias=
false;}
189 int n_pix=n_pix_hits+n_pix_dead;
190 if(n_pix<=0) pass_min_bias=
false;
192 if(fabs(
d0)>1.5) pass_min_bias=
false;
193 if(fabs(z0_wrtPV*
sin(theta))>1.5) pass_min_bias=
false;
195 if(
pt>10000 && TMath::Prob(
chi2,
ndof)<=0.01) pass_min_bias=
false;
204 bool pass_hi_loose=
true;
206 if(fabs(eta)>2.5) pass_hi_loose=
false;
207 if(n_Ipix_expected>0){
208 if (n_Ipix_hits==0) pass_hi_loose=
false;
211 if(n_NIpix_expected>0 && n_NIpix_hits==0) pass_hi_loose=
false;
214 if(n_pix_hits==0) pass_hi_loose=
false;
215 if(n_sct_hits< 6) pass_hi_loose=
false;
216 if(
pt>10000 && TMath::Prob(
chi2,
ndof)<=0.01) pass_hi_loose=
false;
217 if(fabs(
d0) >1.5) pass_hi_loose=
false;
218 if(fabs(z0_wrtPV*
sin(theta))>1.5) pass_hi_loose=
false;
225 bool pass_hi_loose_additional_SCT_hit=
true;
226 if(!pass_hi_loose) pass_hi_loose_additional_SCT_hit=
false;
228 if(n_sct_hits<7) pass_hi_loose_additional_SCT_hit=
false;
235 bool pass_hi_loose_tight_d0_z0=
true;
236 if(!pass_hi_loose || fabs(
d0)>1.0 || fabs(z0_wrtPV*
sin(theta))>1.0) pass_hi_loose_tight_d0_z0=
false;
242 bool pass_hi_loose_tighter_d0_z0=
true;
243 if(!pass_hi_loose || fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(theta))>0.5) pass_hi_loose_tighter_d0_z0=
false;
249 bool pass_hi_tight_loose_d0_z0=
true;
250 if(!pass_hi_loose) pass_hi_tight_loose_d0_z0=
false;
252 if(n_pix_hits <2 ) pass_hi_tight_loose_d0_z0=
false;
253 if(n_sct_hits <8 ) pass_hi_tight_loose_d0_z0=
false;
254 if(n_sct_holes>1 ) pass_hi_tight_loose_d0_z0=
false;
255 if(
ndof==0) pass_hi_tight_loose_d0_z0=
false;
256 else if(
chi2/
ndof>6) pass_hi_tight_loose_d0_z0=
false;
263 bool pass_hi_tight=
true;
264 if(!pass_hi_loose) pass_hi_tight=
false;
266 if(n_pix_hits <2 ) pass_hi_tight=
false;
267 if(n_sct_hits <8 ) pass_hi_tight=
false;
268 if(n_sct_holes>1 ) pass_hi_tight=
false;
269 if(fabs(
d0) >1.0) pass_hi_tight=
false;
270 if(fabs(z0_wrtPV*
sin(theta))>1.0) pass_hi_tight=
false;
271 if(
ndof==0) pass_hi_tight=
false;
272 else if(
chi2/
ndof>6) pass_hi_tight=
false;
279 bool pass_hi_tight_tighter_d0_z0=
true;
280 if(!pass_hi_tight) pass_hi_tight_tighter_d0_z0=
false;
282 if(fabs(
d0)>0.5 || fabs(z0_wrtPV*
sin(theta))>0.5) pass_hi_tight_tighter_d0_z0=
false;
290 unsigned short quality =0;
292 if(pass_hi_loose ) quality+=
HI_LOOSE;
297 if(pass_hi_tight ) quality+=
HI_TIGHT;