-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed seeding for HLT #13819
Speed seeding for HLT #13819
Changes from all commits
1ccaa0e
7ab420a
7411c20
d770963
50bdcca
6cba9d5
c2a125f
53b0815
0e5d640
a6bab83
393a2aa
b4aa8ff
426feb3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,13 @@ class SurfaceDeformation; | |
|
||
class GeomDet { | ||
public: | ||
typedef GeomDetEnumerators::SubDetector SubDetector; | ||
using SubDetector = GeomDetEnumerators::SubDetector; | ||
|
||
|
||
explicit GeomDet( Plane* plane): thePlane(plane) {} | ||
explicit GeomDet( const ReferenceCountingPointer<Plane>& plane) : thePlane(plane) {} | ||
|
||
explicit GeomDet(Plane* plane); | ||
|
||
explicit GeomDet(const ReferenceCountingPointer<Plane>& plane); | ||
|
||
virtual ~GeomDet(); | ||
|
||
|
@@ -77,7 +79,7 @@ class GeomDet { | |
DetId geographicalId() const { return m_detId; } | ||
|
||
/// Which subdetector | ||
virtual SubDetector subDetector() const;; | ||
virtual SubDetector subDetector() const; | ||
|
||
/// is a Unit | ||
virtual bool isLeaf() const { return components().empty();} | ||
|
@@ -93,10 +95,14 @@ class GeomDet { | |
AlignmentPositionError const* alignmentPositionError() const { return theAlignmentPositionError;} | ||
|
||
|
||
// specific unix index in a given subdetector (such as Tracker) | ||
// specific unit index in a given subdetector (such as Tracker) | ||
int index() const { return m_index;} | ||
void setIndex(int i) { m_index=i;} | ||
|
||
// specific geomDet index in a given subdetector (such as Tracker) | ||
int gdetIndex() const { return m_gdetIndex;} | ||
void setGdetIndex(int i) { m_gdetIndex=i;} | ||
|
||
|
||
virtual const Topology& topology() const; | ||
|
||
|
@@ -105,7 +111,7 @@ class GeomDet { | |
|
||
/// Return pointer to surface deformation. | ||
/// Defaults to "null" if not reimplemented in the derived classes. | ||
virtual const SurfaceDeformation* surfaceDeformation() const { return 0; } | ||
virtual const SurfaceDeformation* surfaceDeformation() const { return nullptr; } | ||
|
||
|
||
|
||
|
@@ -119,9 +125,10 @@ class GeomDet { | |
|
||
ReferenceCountingPointer<Plane> thePlane; | ||
DetId m_detId; | ||
int m_index; | ||
int m_index=-1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @VinInn - it would be nice to clean up the class code a bit: sort public, protected and private members, name the latter either with leading m_* or the*, indent the code consistently. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to cleanup all old code in general yes. |
||
int m_gdetIndex=-1; | ||
protected: | ||
AlignmentPositionError* theAlignmentPositionError; | ||
AlignmentPositionError* theAlignmentPositionError=nullptr; | ||
|
||
private: | ||
|
||
|
@@ -158,7 +165,7 @@ class GeomDet { | |
|
||
}; | ||
|
||
typedef GeomDet GeomDetUnit; | ||
using GeomDetUnit = GeomDet; | ||
|
||
#endif | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,8 @@ void TrackerGeometry::addDetUnitId(DetId p){ | |
} | ||
|
||
void TrackerGeometry::addDet(GeomDet const * p) { | ||
// set index | ||
const_cast<GeomDet *>(p)->setGdetIndex(theDets.size()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. static analyzer is not happy with (yet another) const_cast in this file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it would require modifications in the whole TrackerGeometry building code... |
||
theDets.push_back(p); // add to vector | ||
theMap.insert(std::make_pair(p->geographicalId().rawId(),p)); | ||
DetId id(p->geographicalId()); | ||
|
@@ -162,17 +164,6 @@ void TrackerGeometry::addDetId(DetId p){ | |
theDetIds.push_back(p); | ||
} | ||
|
||
const TrackerGeometry::DetUnitContainer& | ||
TrackerGeometry::detUnits() const | ||
{ | ||
return theDetUnits; | ||
} | ||
|
||
const TrackerGeometry::DetContainer& | ||
TrackerGeometry::dets() const | ||
{ | ||
return theDets; | ||
} | ||
|
||
const TrackerGeometry::DetContainer& | ||
TrackerGeometry::detsPXB() const | ||
|
@@ -256,24 +247,6 @@ TrackerGeometry::isThere(GeomDetEnumerators::SubDetector subdet) const { | |
return false; | ||
} | ||
|
||
const TrackerGeometry::DetTypeContainer& | ||
TrackerGeometry::detTypes() const | ||
{ | ||
return theDetTypes; | ||
} | ||
|
||
|
||
const TrackerGeometry::DetIdContainer& | ||
TrackerGeometry::detUnitIds() const | ||
{ | ||
return theDetUnitIds; | ||
} | ||
|
||
const TrackerGeometry::DetIdContainer& | ||
TrackerGeometry::detIds() const | ||
{ | ||
return theDetIds; | ||
} | ||
void TrackerGeometry::fillTestMap(const GeometricDet* gd) { | ||
|
||
std::string temp = gd->name(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,10 +34,10 @@ class ExceptionSafeStlPtrCol : public StlColType | |
template <typename RealType> | ||
RealType normalized_phi( RealType phi ) | ||
{ | ||
if (phi>CLHEP::pi) | ||
{ phi -= (2*CLHEP::pi) ; } | ||
if (phi<-CLHEP::pi) | ||
{ phi += (2*CLHEP::pi) ; } | ||
constexpr RealType pi(M_PI); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fwyzard lke here. |
||
constexpr RealType pi2(2*M_PI); | ||
if (phi>pi) { phi -= pi2 ; } | ||
if (phi<-pi) { phi += pi2; } | ||
return phi ; | ||
} | ||
|
||
|
@@ -66,7 +66,7 @@ class EleRelPoint | |
EleRelPoint( const GlobalPoint & p, const GlobalPoint & origin ) : relP_(p.x()-origin.x(),p.y()-origin.y(),p.z()-origin.z()) {} | ||
double eta() { return relP_.eta() ; } | ||
double phi() { return normalized_phi(relP_.phi()) ; } | ||
double perp() { return sqrt(relP_.x()*relP_.x()+relP_.y()*relP_.y()) ; } | ||
double perp() { return std::sqrt(relP_.x()*relP_.x()+relP_.y()*relP_.y()) ; } | ||
private : | ||
math::XYZVector relP_ ; | ||
} ; | ||
|
@@ -82,10 +82,10 @@ class EleRelPointPair | |
EleRelPointPair( const math::XYZPoint & p1, const GlobalPoint & p2, const GlobalPoint & origin ) : relP1_(p1.x()-origin.x(),p1.y()-origin.y(),p1.z()-origin.z()), relP2_(p2.x()-origin.x(),p2.y()-origin.y(),p2.z()-origin.z()) {} | ||
EleRelPointPair( const GlobalPoint & p1, const math::XYZPoint & p2, const GlobalPoint & origin ) : relP1_(p1.x()-origin.x(),p1.y()-origin.y(),p1.z()-origin.z()), relP2_(p2.x()-origin.x(),p2.y()-origin.y(),p2.z()-origin.z()) {} | ||
EleRelPointPair( const GlobalPoint & p1, const GlobalPoint & p2, const GlobalPoint & origin ) : relP1_(p1.x()-origin.x(),p1.y()-origin.y(),p1.z()-origin.z()), relP2_(p2.x()-origin.x(),p2.y()-origin.y(),p2.z()-origin.z()) {} | ||
double dEta() { return (relP1_.eta()-relP2_.eta()) ; } | ||
double dPhi() { return normalized_phi(relP1_.phi()-relP2_.phi()) ; } | ||
double dZ() { return (relP1_.z()-relP2_.z()) ; } | ||
double dPerp() { return normalized_phi(relP1_.perp()-relP2_.perp()) ; } | ||
auto dEta() { return (relP1_.eta()-relP2_.eta()) ; } | ||
auto dPhi() { return normalized_phi(relP1_.barePhi()-relP2_.barePhi()) ; } | ||
auto dZ() { return (relP1_.z()-relP2_.z()) ; } | ||
auto dPerp() { return (relP1_.perp()-relP2_.perp()) ; } | ||
private : | ||
GlobalVector relP1_ ; | ||
GlobalVector relP2_ ; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use M_PI, 2. * M_PI, M_PI_2 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because is like this since orca times...
(somewhere else you will find CLHEP::pi())
I would not mind to go back to old good C macros
(as already done elsewhere)