--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+/* $Id$ */
+//_________________________________________________________________________
+// Algorithm class used only by AliEMCALTrackSegmentMaker
+// Links recpoints into tracksegments
+//*-- Author: Dmitri Peressounko (SUBATECH)
+//*-- Author: Adapted from PHOS by Y. Schutz (SUBATECH)
+
+// --- ROOT system ---
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+
+#include "AliEMCALLink.h"
+
+ClassImp(AliEMCALLink)
+//____________________________________________________________________________
+ AliEMCALLink::AliEMCALLink(Float_t prod, Int_t ec, Int_t rp, unsigned int what)
+{
+ // ctor
+
+ if (gDebug == 2 )
+ Info("ctor", "prod = %f, ec=%d , rp=%d, what=%d", prod, ec, rp, what) ;
+ fProd = prod ;
+ fECALN = ec ;
+ fOtherN = rp ;
+ fWhat = what ;
+}
+
+//____________________________________________________________________________
+Int_t AliEMCALLink::Compare(const TObject * obj) const
+{
+ // Compare according to the distance between two recpoints in a track segment
+
+ Int_t rv ;
+
+ AliEMCALLink * link = (AliEMCALLink *)obj ;
+
+ if(GetProd() < link->GetProd() )
+ rv = -1 ;
+ else
+ rv = 1 ;
+
+ return rv ;
+}
--- /dev/null
+#ifndef ALIEMCALLINK_H
+#define ALIEMCALLINK_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+//_________________________________________________________________________
+// Algorithm class used only by AliEMCALTrackSegmentMaker
+// Links recpoints
+// into tracksegments
+//*-- Author: Dmitri Peressounko (SUBATECH)
+//*-- Author: Adapted from PHOS by Y. Schutz (SUBATECH)
+
+// --- ROOT system ---
+
+#include "TObject.h"
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+
+class AliEMCALLink : public TObject
+{
+
+public:
+
+ AliEMCALLink( Float_t prod, Int_t ec, Int_t rp, unsigned int what) ; // ctor
+ virtual ~AliEMCALLink(){
+ // dtor
+ }
+ Int_t Compare(const TObject * obj) const ;
+ const Int_t GetECAL(void) const { return fECALN ; }
+ const Int_t GetOther(void) const { return fOtherN ; }
+ const Float_t GetProd(void) const { return fProd ; }
+ const Bool_t IsLinkToPRE(void) const {if (fWhat) return kFALSE; else return kTRUE;}
+ const Bool_t IsLinkToHCAL(void) const {if (fWhat) return kTRUE; else return kFALSE;}
+ Bool_t IsSortable() const{ return kTRUE; }
+
+private:
+
+ Int_t fECALN ; // ECAL index
+ Int_t fOtherN ; // index of the linked recpoint
+ Float_t fProd ; // Scalar produc of the direction of the 2 recpoints
+ unsigned int fWhat ; // PRE (=0) or HCAL (=1)
+
+ ClassDef(AliEMCALLink,1) // Auxilliary algorithm class used by AliEMCALTrackSegmentMaker
+
+};
+
+#endif // AliEMCALLINK_H