#include <RoadSearchHitSorting.h>
Public Member Functions | |
bool | operator() (const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > &HitTM1, const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > &HitTM2) const |
SortHitTrajectoryPairsByGlobalPosition () | |
Private Member Functions | |
bool | InsideOutCompare (const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > &HitTM1, const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > &HitTM2) const |
Definition at line 76 of file RoadSearchHitSorting.h.
SortHitTrajectoryPairsByGlobalPosition::SortHitTrajectoryPairsByGlobalPosition | ( | ) | [inline] |
Definition at line 79 of file RoadSearchHitSorting.h.
{ };
bool SortHitTrajectoryPairsByGlobalPosition::InsideOutCompare | ( | const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > & | HitTM1, |
const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > & | HitTM2 | ||
) | const [private] |
Definition at line 146 of file RoadSearchHitSorting.cc.
References abs, LogDebug, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, and StripSubdetector::TOB.
Referenced by operator()().
{ DetId ida(HitTM1.first->det()->geographicalId()); DetId idb(HitTM2.first->det()->geographicalId()); LogDebug("RoadSearch")<<" Comparing (r/phi/z) Hit 1 on DetID " << ida.rawId() << " : " << HitTM1.first->globalPosition().perp() << " / " << HitTM1.first->globalPosition().phi() << " / " << HitTM1.first->globalPosition().z() << " and Hit 2 on DetID " << idb.rawId() << " : " << HitTM2.first->globalPosition().perp() << " / " << HitTM2.first->globalPosition().phi() << " / " << HitTM2.first->globalPosition().z() ; if( ((unsigned int)ida.subdetId() == StripSubdetector::TIB || (unsigned int)ida.subdetId() == StripSubdetector::TOB || (unsigned int)ida.subdetId() == PixelSubdetector::PixelBarrel) && ((unsigned int)idb.subdetId() == StripSubdetector::TIB || (unsigned int)idb.subdetId() == StripSubdetector::TOB || (unsigned int)idb.subdetId() == PixelSubdetector::PixelBarrel)) { // barrel with barrel return static_cast<unsigned int>(HitTM1.first->globalPosition().perp() * 1E7) < static_cast<unsigned int>(HitTM2.first->globalPosition().perp() * 1E7); } if( ((unsigned int)ida.subdetId() == StripSubdetector::TEC || (unsigned int)ida.subdetId() == StripSubdetector::TID || (unsigned int)ida.subdetId() == PixelSubdetector::PixelEndcap) && ((unsigned int)idb.subdetId() == StripSubdetector::TEC || (unsigned int)idb.subdetId() == StripSubdetector::TID || (unsigned int)idb.subdetId() == PixelSubdetector::PixelEndcap)) { // fwd with fwd return static_cast<unsigned int>(std::abs(HitTM1.first->globalPosition().z()) * 1E7) < static_cast<unsigned int>(std::abs(HitTM2.first->globalPosition().z()) * 1E7); } // // here I have 1 barrel against one forward // if( ((unsigned int)ida.subdetId() == StripSubdetector::TIB || (unsigned int)ida.subdetId() == StripSubdetector::TOB || (unsigned int)ida.subdetId() == PixelSubdetector::PixelBarrel) && ((unsigned int)idb.subdetId() == StripSubdetector::TEC || (unsigned int)idb.subdetId() == StripSubdetector::TID || (unsigned int)idb.subdetId() == PixelSubdetector::PixelEndcap)) { // barrel with barrel LogDebug("RoadSearch") <<"*** How did this happen ?!?!? ***" ; }else{ LogDebug("RoadSearch") <<"*** How did this happen ?!?!? ***" ; } //throw DetLogicError("GeomDetLess: arguments are not Barrel or Forward GeomDets"); throw Genexception("SortHitTrajectoryPairsByGlobalPosition: arguments are not Ok"); }
bool SortHitTrajectoryPairsByGlobalPosition::operator() | ( | const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > & | HitTM1, |
const std::pair< TransientTrackingRecHit::ConstRecHitPointer, TrajectoryMeasurement * > & | HitTM2 | ||
) | const [inline] |
Definition at line 81 of file RoadSearchHitSorting.h.
References InsideOutCompare().
{ return InsideOutCompare(HitTM1,HitTM2); }