774 Log(4,
"ShowRec.cpp",
"--- void N3_FindBestCompliments() ---");
777 cout <<
"Looking for best compliments for segment " << seg <<
" of pattern " << TestPattern <<
" ... " << endl;
778 cout <<
"Looking for pattern with Downstream = " << Downstream << endl;
788 mindeltaZ = 0.0 - Downstream * 1300.0;
795 OtherPattern = TestPattern;
797 else if (Downstream==1) {
800 else if (Downstream==2) {
802 if (
NULL==OtherPatternInterim) {
809 else if (Downstream==-1) {
812 else if (Downstream==-2) {
814 if (
NULL==OtherPatternInterim) {
825 if (
NULL == OtherPattern) {
833 Int_t nSeg = OtherPattern->
N();
836 mindeltaZ = seg->
Z() - OtherPattern->
Z();
838 Double_t testval_dR=0;
839 Double_t testval_dT=0;
840 Double_t testval_dminDins=0;
843 Int_t IDmindminDist = -1;
851 for (Int_t i=0; i<nSeg; ++i) {
854 if (otherSeg==seg)
continue;
858 if (TMath::Abs(seg->
X() - otherSeg->
X()) > 1000 || TMath::Abs(seg->
Y() - otherSeg->
Y()) > 1000 )
continue;
864 testval_dR =
GetdR(seg, otherSeg);
868 if (testval_dR < mindR ) {
870 IDmindR = otherSeg->
ID();
872 if (testval_dT < mindT ) {
874 IDmindT = otherSeg->
ID();
876 if (testval_dminDins < mindMinDist ) {
877 mindMinDist = testval_dminDins;
878 IDmindminDist = otherSeg->
ID();
893 if (IDmindR==IDmindT || IDmindR==IDmindminDist || IDmindminDist==IDmindT) {
895 if (IDmindR==IDmindT && IDmindR==IDmindminDist && IDmindminDist==IDmindT) ndifferent=1;
897 if (nSeg==0) ndifferent=0;
898 if (nSeg==1 && OtherPattern==TestPattern) ndifferent=0;
900 nDifferentSegs= ndifferent;
903 Log(4,
"ShowRec.cpp",
"--- void N3_FindBestCompliments() done.");
Double_t GetdeltaThetaSingleAngles(EdbSegP *s1, EdbSegP *s2)
Definition: ShowRec.cpp:7258
Double_t GetdMinDist(EdbSegP *s1, EdbSegP *s2)
Definition: ShowRec.h:170
Double_t GetdR(EdbSegP *s1, EdbSegP *s2)
Definition: ShowRec.h:167
Definition: EdbPattern.h:280
EdbPattern * GetPatternPreceding(EdbPattern *pat) const
Definition: EdbPattern.cxx:2017
EdbPattern * GetPatternSucceding(EdbPattern *pat) const
Definition: EdbPattern.cxx:2011
Int_t ID() const
Definition: EdbSegP.h:144
Float_t X() const
Definition: EdbSegP.h:170
Float_t Z() const
Definition: EdbSegP.h:150
Float_t Y() const
Definition: EdbSegP.h:171
void PrintNice() const
Definition: EdbSegP.cxx:418
Float_t Z() const
Definition: EdbPattern.h:87
Int_t N() const
Definition: EdbPattern.h:89
EdbSegP * GetSegment(int i) const
Definition: EdbPattern.h:66
gEDBDEBUGLEVEL
Definition: energy.C:7
#define NULL
Definition: nidaqmx.h:84