3 added files
lcdd/include
diff -N HitComparator.hh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ HitComparator.hh 27 Sep 2005 00:12:00 -0000 1.1
@@ -0,0 +1,16 @@
+// $Header: /cvs/lcd/lcdd/include/HitComparator.hh,v 1.1 2005/09/27 00:12:00 jeremy Exp $
+#ifndef HitComparator_hh
+#define HitComparator_hh 1
+
+#include "G4CalorimeterHit.hh"
+
+class HitComparator
+{
+public:
+ virtual ~HitComparator() {}
+
+public:
+ virtual bool compare(const G4CalorimeterHit&, const G4CalorimeterHit&) = 0;
+};
+
+#endif
lcdd/include
diff -N IdComparator.hh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ IdComparator.hh 27 Sep 2005 00:12:00 -0000 1.1
@@ -0,0 +1,30 @@
+// $Header: /cvs/lcd/lcdd/include/IdComparator.hh,v 1.1 2005/09/27 00:12:00 jeremy Exp $
+#ifndef IdComparator_hh
+#define IdComparator_hh 1
+
+#include "HitComparator.hh"
+
+class IdComparator : public HitComparator
+{
+
+public:
+ virtual ~IdComparator() {}
+
+public:
+
+ virtual bool compare(const G4CalorimeterHit& hit1, const G4CalorimeterHit& hit2)
+ {
+// std::cout << "ID --> hit1 " << hit1.getId64bit().getId0() << " " << hit2.getId64bit().getId1()
+// << " == hit2 " << hit2.getId64bit().getId0() << " " << hit2.getId64bit().getId1() << std::endl;
+// if ( hit1.getId64bit() == hit2.getId64bit() ) {
+// std::cout << "EQUAL" << std::endl;
+// }
+// else {
+// std::cout << "NOT EQUAL" << std::endl;
+// }
+
+ return ( hit1.getId64bit() == hit2.getId64bit() );
+ }
+};
+
+#endif
lcdd/include
diff -N PositionComparator.hh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ PositionComparator.hh 27 Sep 2005 00:12:00 -0000 1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/PositionComparator.hh,v 1.1 2005/09/27 00:12:00 jeremy Exp $
+#ifndef PositionComparator_hh
+#define PositionComparator_hh 1
+
+#include "HitComparator.hh"
+
+class PositionComparator : public HitComparator
+{
+
+public:
+
+ virtual ~PositionComparator()
+ {}
+
+public:
+
+ virtual bool compare(const G4CalorimeterHit& hit1, const G4CalorimeterHit& hit2)
+ {
+// std::cout << "POS --> hit1 " << hit1.getPos() << " == hit2 " << hit2.getPos() << std::endl;
+// if ( hit1.getPos() == hit2.getPos() ) {
+// std::cout << "EQUAL" << std::endl;
+// }
+// else {
+// std::cout << "NOT EQUAL" << std::endl;
+// }
+
+ return ( hit1.getPos() == hit2.getPos() );
+ }
+};
+
+#endif
CVSspam 0.2.8