Is the converted hit in the zone we're looking at now?
Definition at line 16 of file Matching.h.
References rpcdqm::BX, ConvertedHit::BX(), gather_cfg::cout, SortingOutput::Hits(), i, ConvertedHit::Id(), ConvertedHit::IsNeighbor(), convertSQLitetoXML_cfg::output, colinearityKinematic::Phi, ConvertedHit::Phi(), MatchingOutput::setM2(), ConvertedHit::SetNull(), MatchingOutput::SetValues(), align::Strip, groupFilesInBlocks::tt, w, SortingOutput::Winners(), ThOutput2::x, PhOutput::x, and detailsBasic3DVector::z.
Referenced by PhiMatching_Hold().
20 std::vector<ConvertedHit> Thits = Sout.
Hits();
21 std::vector<std::vector<Winner>> Winners = Sout.
Winners();
22 std::vector<int> segment (4,0);
23 int phdiff[4] = {15,7,7,7};
41 if(Winners[
z][
w].Rank()){
43 if(verbose)
std::cout<<
"\n\nWinner position-"<<Winners[
z][
w].Strip()<<
". Zone = "<<
z<<std::endl;
44 if(verbose)
std::cout<<
"Number of possible hits to match = "<<Thits.size()<<
"\n";
47 for(
unsigned int i=0;
i<Thits.size();
i++){
49 int zmask[4] {1,2,4,8};
51 if(Thits[
i].ZoneWord() & zmask[
z]) inzone =
true;
53 bool inBXgroup =
false;
55 switch(Winners[
z][
w].BXGroup()){
57 case 1:
if(Thits[
i].
BX() > 3 && Thits[
i].BX() < 7) inBXgroup =
true;
break;
58 case 2:
if(Thits[
i].
BX() > 4 && Thits[
i].BX() < 8) inBXgroup =
true;
break;
59 case 3:
if(Thits[
i].
BX() > 5 && Thits[
i].BX() < 9) inBXgroup =
true;
break;
60 default: inBXgroup =
false;
67 int setstation = Thits[
i].Station() - 1;
71 std::cout<<
"setstation = "<<setstation<<std::endl;
78 if((fabs(Winners[
z][
w].
Strip() - (Thits[
i].
Phi()>>5)) <= phdiff[setstation]) && inBXgroup && inzone){
80 if(ph_output.
x[
z][
w][setstation].
Phi() == -999){
82 if(verbose)
std::cout<<
"hasn't been set"<<std::endl;
84 ph_output.
x[
z][
w][setstation] = (Thits[
i]);
86 if(verbose)
std::cout<<
"set with strip-"<<Thits[
i].Strip()<<
", and wire-"<<Thits[
i].Wire()<<std::endl;
91 if(verbose)
std::cout<<
"has already been set"<<std::endl;
93 int d1 = fabs((ph_output.
x[
z][
w][setstation].
Phi()>>5) - Winners[
z][
w].
Strip());
94 int d2 = fabs((Thits[
i].
Phi()>>5) - Winners[
z][
w].
Strip());
96 if(verbose)
std::cout<<
"d1 = "<<d1<<
" and d2 = "<<d2<<
"\n";
100 if(verbose)
std::cout<<
"this is closer strip-"<<Thits[
i].Strip()<<
", and wire-"<<Thits[
i].Wire()<<std::endl;
102 ph_output.
x[
z][
w][setstation] = (Thits[
i]);
109 if (Thits[
i].
BX() < ph_output.
x[
z][
w][setstation].
BX()) {
110 ph_output.
x[
z][
w][setstation] = (Thits[
i]);
113 else if (Thits[
i].IsNeighbor() && !ph_output.
x[
z][
w][setstation].
IsNeighbor()) {
114 ph_output.
x[
z][
w][setstation] = (Thits[
i]);
117 else if ((Thits[
i].IsNeighbor() == ph_output.
x[
z][
w][setstation].
IsNeighbor()) && (Thits[
i].Id() < ph_output.
x[
z][
w][setstation].
Id())) {
118 ph_output.
x[
z][
w][setstation] = (Thits[
i]);
135 th_output2.
x[
z][
w][setstation][0] = Thits[
i].Theta();
152 if(Thits[
i].Theta2() != -999)
153 th_output2.
x[
z][
w][setstation][1] = Thits[
i].Theta2();
167 output.
SetValues(th_output,ph_output,Thits,Winners,segment);
168 output.
setM2(th_output2);
std::vector< std::vector< Winner > > Winners()
void SetValues(ThOutput th_output, PhOutput ph_output, std::vector< ConvertedHit > hits, std::vector< std::vector< Winner >> winners, std::vector< int > segment)
std::vector< ConvertedHit > Hits()