15 #ifndef TRIGINDETANALYSISUTILS_TRACKMATCHDELTARCOSMIC_H
16 #define TRIGINDETANALYSISUTILS_TRACKMATCHDELTARCOSMIC_H
39 virtual void match(
const std::vector<TIDA::Track*>&
s1,
40 const std::vector<TIDA::Track*>&
s2 )
44 const std::vector<TIDA::Track*>&
ref =
s1;
45 const std::vector<TIDA::Track*>&
test =
s2;
48 for (
int i=
ref.size() ;
i-- ; ) {
57 for (
int j=
test.size() ; j-- ; ) {
61 double R2tmp =
deltaR2( reftrack, testtrack );
62 double R2PItmp =
deltaR2PI( reftrack, testtrack );
64 if ( R2PItmp<R2tmp ) R2tmp = R2PItmp;
67 if ( tmptrack==NULL || R2tmp<R2min ) {
74 if ( tmptrack && R2min<
m_R2 ) {
75 mmatched.insert( map_type::value_type(reftrack,tmptrack) );
76 mrevmatched.insert( map_type::value_type(tmptrack,reftrack) );
78 std::cout <<
"\t\tSUTT matched " << *reftrack <<
"\t -> \t" << *tmptrack <<
"\tDr=" << R2min << std::endl;
85 double deta = reftrack->
eta()+testtrack->
eta();
86 double dphi = reftrack->
phi()-testtrack->
phi()-
M_PI;
89 return deta*deta+dphi*dphi;
93 double deta = reftrack->
eta()-testtrack->
eta();
94 double dphi = reftrack->
phi()-testtrack->
phi();
97 return deta*deta+dphi*dphi;
112 #endif // TRIGINDETANALYSISUTILS_TRACKMATCHDELTARCOSMIC_H