]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSLink.cxx
make sure EMCal trigger-cluster matching is done when event is EMCal triggered, in...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSLink.cxx
index 56c7aad3f5b5902ced75decbd38d2c07de87c002..6673c83cbe074a8324773d2b3a6c3ead0d849758 100644 (file)
 
 ClassImp(AliPHOSLink)
 //____________________________________________________________________________
-  AliPHOSLink::AliPHOSLink(Float_t r, Int_t Emc, Int_t Ppsd)
+  AliPHOSLink::AliPHOSLink() : 
+    fEmcN(-1), fCpvN(-1), fTrack(-1), fx(-1.), fz(-1.) 
 {
-  // ctor
+}
 
-  fR     = r ;  
-  fEmcN  = Emc ;
-  fPpsdN = Ppsd ;   
+//____________________________________________________________________________
+AliPHOSLink::AliPHOSLink(Float_t dx, Float_t dz, Int_t emc, Int_t cpv, Int_t track):
+  fEmcN(emc),
+  fCpvN(cpv),
+  fTrack(track),
+  fx(dx),
+  fz(dz)
+{
+  // ctor
 }
 
 //____________________________________________________________________________
 Int_t AliPHOSLink::Compare(const TObject * obj) const
 {
-  // Compare according to the distance between EMC and PPSD RecPoints in a track segment 
+  // Compare according to the distance between EMC and CPV RecPoints in a track segment 
 
   Int_t rv ;
 
   AliPHOSLink * link = (AliPHOSLink *) obj ;
 
-  if(this->fR < link->GetR() ) 
+  if(fx*fx+fz*fz < link->fz*link->fz+link->fx*link->fx ) 
     rv = -1 ;
   else 
     rv = 1 ;