47 saEta = (*muEL)->eta();
48 saPhi = (*muEL)->phi();
49 saddr = (*muEL)->sAddress();
50 roiEta = (*muEL)->roiEta();
51 roiPhi = (*muEL)->roiPhi();
53 ATH_MSG_DEBUG(
"saPt = " << saPt <<
", saEta =" << saEta <<
", saPhi = " << saPhi <<
", saddr = " << saddr);
54 if(std::abs(saPt) <
ZERO_LIMIT) mf_failure =
true;
57 if( mf_failure )
continue;
63 if(saddr == -1) isEndcap =
true;
70 std::vector<int> proc_flow;
73 bool isL1hitThere =
false;
74 bool isL1emuOkForTriggerPlane =
false;
75 bool isMDThitThereForTriggerPlane =
false;
76 bool isMDTFitOkForTriggerPlane =
false;
77 bool isMDTFitOkFor2Plane =
false;
88 nRPC = (*muEL)->rpcHitLayer().size();
89 TGCMidRhoChi2 = (*muEL)->tgcMidRhoChi2();
90 TGCMidPhiChi2 = (*muEL)->tgcMidPhiChi2();
91 nTGCMidRho = (*muEL)->tgcMidRhoN();
92 nTGCMidPhi = (*muEL)->tgcMidPhiN();
99 if( nRPC > 0 ) isL1hitThere =
true;
100 float rpcFitMidSlope = (*muEL)->rpcFitMidSlope();
101 if( std::abs(rpcFitMidSlope) >
ZERO_LIMIT ) isL1emuOkForTriggerPlane =
true;
104 if( nTGCMidRho > 0 && nTGCMidPhi > 0 ) isL1hitThere =
true;
105 float TGCMid1Z = (*muEL)->tgcMid1Z();
106 if( std::abs(TGCMid1Z) >
ZERO_LIMIT ) isL1emuOkForTriggerPlane =
true;
126 if( saPhi < 0 )
sign = -1;
130 std::vector<float> sp_r, sp_z;
135 if( std::abs((*muEL)->superPointR(inner)) >
ZERO_LIMIT ) {
136 sp_r.push_back(
sign * (*muEL)->superPointR(inner) );
137 sp_z.push_back( (*muEL)->superPointZ(inner) );
139 if( std::abs((*muEL)->superPointR(middle)) >
ZERO_LIMIT ) {
140 sp_r.push_back(
sign * (*muEL)->superPointR(middle) );
141 sp_z.push_back( (*muEL)->superPointZ(middle) );
143 if( std::abs((*muEL)->superPointR(outer)) >
ZERO_LIMIT ) {
144 sp_r.push_back(
sign * (*muEL)->superPointR(outer) );
145 sp_z.push_back( (*muEL)->superPointZ(outer) );
160 MDTInnChi2 = (*muEL)->superPointChi2(inner);
161 MDTMidChi2 = (*muEL)->superPointChi2(middle);
162 MDTOutChi2 = (*muEL)->superPointChi2(outer);
165 std::vector<float> res_inn, res_mid, res_out;
172 n_mdt_hits = (*muEL)->nMdtHits();
174 for (
int i_tube=0; i_tube<n_mdt_hits; i_tube++) {
175 float res = (*muEL)->mdtHitResidual(i_tube) / 10 ;
176 int imr = (*muEL)->mdtHitChamber(i_tube);
180 res_inn.push_back(
res);
182 else if (imr == middle) {
184 res_mid.push_back(
res);
186 else if (imr == outer) {
188 res_out.push_back(
res);
192 fill(
m_group+
"_"+
chain, MDTInnChi2, MDTMidChi2, MDTOutChi2, n_mdt_hits, n_mdt_hits_inner, n_mdt_hits_middle, n_mdt_hits_outer, mon_res_inn, mon_res_mid, mon_res_out,
lb,
isBarrel, isEndcap);
196 float MDTInnR = (*muEL)->superPointR(inner);
197 float MDTMidR = (*muEL)->superPointR(middle);
198 float MDTOutR = (*muEL)->superPointR(outer);
200 if( n_mdt_hits_middle > 0 ) isMDThitThereForTriggerPlane =
true;
201 if( MDTMidR >
ZERO_LIMIT ) isMDTFitOkForTriggerPlane =
true;
202 if( isMDTFitOkForTriggerPlane && (MDTInnR >
ZERO_LIMIT || MDTOutR >
ZERO_LIMIT) ) isMDTFitOkFor2Plane =
true;
204 proc_flow.push_back(1);
205 if( isL1hitThere ) proc_flow.push_back(2);
206 if( isL1emuOkForTriggerPlane ) proc_flow.push_back(3);
207 if( isMDThitThereForTriggerPlane ) proc_flow.push_back(4);
208 if( isMDTFitOkForTriggerPlane ) proc_flow.push_back(5);
209 if( isMDTFitOkFor2Plane ) proc_flow.push_back(6);
216 if(RecMuonCB ==
nullptr)
continue;
218 std::vector<float> res_inn_OffMatch = res_inn;
219 std::vector<float> res_mid_OffMatch = res_mid;
220 std::vector<float> res_out_OffMatch = res_out;
230 return StatusCode::SUCCESS;
247 float offPt =
mu->pt()/1
e3;
248 float offPhi =
mu->phi();
249 float offCharge =
mu->charge();
250 offPt_signed = offPt * offCharge;
255 if ( !muLinkInfo.
isValid() )
return StatusCode::SUCCESS;
264 if( !
m_matchTool->isMatchedL2SA( *muEL,
mu) )
return StatusCode::SUCCESS;
268 float saPt = (*muEL)->pt();
269 float roiEta = (*muEL)->roiEta();
270 float roiPhi = (*muEL)->roiPhi();
276 roidEta =
roiEta - offEta;
278 roidR = sqrt(roidEta*roidEta + roidPhi*roidPhi);
287 ptresol = std::abs(saPt)/std::abs(offPt) - 1.;
288 invptresol = (1./(offPt * offCharge) - 1./saPt) / (1./(offPt * offCharge));
293 std::vector<float> invptresol_pos, invptresol_neg;
298 if( offCharge > 0. ) invptresol_pos.push_back(invptresol);
299 else invptresol_neg.push_back(invptresol);
303 const float ETA_OF_BARREL = 1.05;
304 const float ETA_OF_ENDCAP1 = 1.5;
305 const float ETA_OF_ENDCAP2 = 2.0;
306 const float ETA_OF_ENDCAP3 = 2.5;
330 if( std::abs(offEta) < ETA_OF_BARREL ) {
331 if( offEta > 0. ) isBarrelA =
true;
332 else isBarrelC =
true;
335 if( offEta > 0. ) isEndcapA =
true;
336 else isEndcapC =
true;
340 if( std::abs(offEta) < ETA_OF_BARREL ){
342 if( offEta > 0. ) isBarrelA =
true;
343 else isBarrelC =
true;
345 else if ( std::abs(offEta) < ETA_OF_ENDCAP1 ){
347 if( offEta > 0. ) isEndcap1A =
true;
348 else isEndcap1C =
true;
350 else if ( std::abs(offEta) < ETA_OF_ENDCAP2 ){
352 if( offEta > 0. ) isEndcap2A =
true;
353 else isEndcap2C =
true;
355 else if ( std::abs(offEta) < ETA_OF_ENDCAP3 ){
357 if( offEta > 0. ) isEndcap3A =
true;
358 else isEndcap3C =
true;
362 if( std::abs(offPt) > 4 ){
363 if( std::abs(offPt) < 6 ) pt4to6 =
true;
364 else if( std::abs(offPt) < 8 ) pt6to8 =
true;
369 fill(
m_group+
"_"+
chain, ptresol, offPt_signed, offEta,
isBarrel, isEndcap1, isEndcap2, isEndcap3, isBarrelA, isBarrelC, isEndcapA, isEndcapC, pt4to6, pt6to8, ptover8);
370 fill(
m_group+
"_"+
chain, mon_invptresol_pos, mon_invptresol_neg, isBarrelA, isBarrelC, isEndcap1A, isEndcap2A, isEndcap3A, isEndcap1C, isEndcap2C, isEndcap3C);
373 return StatusCode::SUCCESS;
384 return StatusCode::SUCCESS;
392 ATH_CHECK( fillVariablesRatioPlots<xAOD::L2StandAloneMuon>(ctx,
mu,
"L2SA", xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle,
396 return StatusCode::SUCCESS;