18 typedef std::pair<const xAOD::TrackParticle*, const Trk::RIO_OnTrack*>
pairTrkRio;
27 m_assocs.insert(std::make_pair(trk,shPattern));
30 int shPattern = 100000*shB + 1000*shS + 100*shP;
31 m_assocs.insert(std::make_pair(trk,shPattern));
34 int tempSharedPattern(0);
37 if(aI!=aE) tempSharedPattern = aI->second;
38 return tempSharedPattern/100000;
41 int tempSharedPattern(0);
44 if(aI!=aE) tempSharedPattern = aI->second;
45 return ((tempSharedPattern%100000)%1000)/100;
48 int tempSharedPattern(0);
51 if(aI!=aE) tempSharedPattern = aI->second;
52 return (tempSharedPattern%100000)/1000;
56 std::cout<<
"SharedHitTrackAssoc has "<<this->
size()<<
" elements:"<<std::endl;
60 std::cout <<
"--> track: "
61 <<
" Eta= " << aI->first->eta()
62 <<
" Phi= " << aI->first->phi()
63 <<
" pT= " << aI->first->pt()
64 <<
" Shared pattern= " << aI->second
98 std::cout<<
name()<<
" initialized"<<std::endl;
99 return StatusCode::SUCCESS;
109 if (
sc.isFailure()) {
111 return StatusCode::SUCCESS;
123 for (; trk1I!=trkE; ++trk1I) {
128 if (nbs < 0) nbs = 0;
129 if (nps < 0) nps = 0;
130 if (nss < 0) nss = 0;
131 if(nbs+nps+nss>0) assoc->
add( (*trk1I), nbs, nps, nss);
141 for (; trk1I!=trkE; ++trk1I) {
144 ATH_MSG_ERROR(
"Can't get the original track ! Please run on ESD");
145 return StatusCode::SUCCESS;
150 int np1 = 0, np2 = 0, ns1 = 0, ns2 = 0;
151 int nhp1 = 0, nhp2 = 0, nhs1 = 0, nhs2 = 0, nh1 = 0, nh2 = 0;
152 int nprec1 = 0, nprec2 = 0;
153 double chi21 = 0., chi22 = 0.;
155 chi21 = (*trk1I)->chiSquared();
162 q1 = 10000*(2*nprec1-nh1) -
int(20.*chi21/
float(nprec1));
170 ATH_MSG_VERBOSE(
"First track (pT="<<t1p4.Pt()<<
", eta="<<t1p4.Eta ()<<
") has " <<
mb->size() <<
" RIOs on track");
183 for (; trk2I!=trkE; ++trk2I) {
184 if(trk2I==trk1I)
continue;
187 ATH_MSG_ERROR(
"Can't get the original track ! Please run on ESD");
188 return StatusCode::SUCCESS;
191 double deltaR = t1p4.DeltaR(t2p4);
197 chi22 = (*trk2I)->chiSquared();
204 q2 = 10000*(2*nprec2-nh2) -
int(20.*chi22/
float(nprec2));
205 if (q1 > q2)
continue;
208 nextMb =
mb->begin();
209 for(; nextMb != lastMb; ++nextMb) {
213 if( (!pixl) && (!ssct) )
continue;
243 if (nextMb ==
mb->begin())
ATH_MSG_VERBOSE(
"Second track (pT="<<t2p4.Pt()<<
") has " << mb2->
size() <<
" RIOs on track");
245 for(; nextMb2 != lastMb2; ++nextMb2) {
249 if( (!pixl2) && (!ssct2) )
continue;
252 ATH_MSG_DEBUG(
"Shared hit ! Track1 Pt = " << t1p4.Pt() <<
" Track2 Pt = " << t2p4.Pt());
254 ATH_MSG_VERBOSE(
"Track1 chi2 = " << chi21 <<
" nprec = " << nprec1 <<
" (np,ns) = (" << np1 <<
" , " << ns1 <<
") " <<
" nhole = " << nh1 <<
" (nhp,nhs) = (" << nhp1 <<
" , " << nhs1 <<
") " <<
" quality = " << q1);
255 ATH_MSG_VERBOSE(
"Track2 chi2 = " << chi22 <<
" nprec = " << nprec2 <<
" (np,ns) = (" << np2 <<
" , " << ns2 <<
") " <<
" nhole = " << nh2 <<
" (nhp,nhs) = (" << nhp2 <<
" , " << nhs2 <<
") " <<
" quality = " << q2);
259 ATH_MSG_DEBUG(sl[0] <<
" "<< sl[1] <<
" " << sl[2] <<
" " << sl[3]);
263 if (pl[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_npl[
i]++;myvecTrkRio.push_back(
p);}
266 if (
pd[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_npd[
i]++;myvecTrkRio.push_back(
p);}
269 if (sl[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_nsl[
i]++;myvecTrkRio.push_back(
p);}
272 if (
sd[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_nsd[
i]++;myvecTrkRio.push_back(
p);}
299 return StatusCode::SUCCESS;
303 return StatusCode::SUCCESS;