CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
GeomDetLess Class Reference

#include <GeomDetLess.h>

Public Member Functions

 GeomDetLess (PropagationDirection dir=alongMomentum)
 
bool operator() (const GeomDet *a, const GeomDet *b) const
 

Private Member Functions

bool barrelForwardLess (const GeomDet *blb, const GeomDet *fla) const
 
bool insideOutLess (const GeomDet *, const GeomDet *) const
 

Private Attributes

PropagationDirection theDir
 

Detailed Description

Defines order of layers in the Tracker as seen by straight tracks coming from the interaction region.

Definition at line 12 of file GeomDetLess.h.

Constructor & Destructor Documentation

GeomDetLess::GeomDetLess ( PropagationDirection  dir = alongMomentum)
inline

Definition at line 15 of file GeomDetLess.h.

15  :
16  theDir(dir) {}
PropagationDirection theDir
Definition: GeomDetLess.h:25
dbl *** dir
Definition: mlp_gen.cc:35

Member Function Documentation

bool GeomDetLess::barrelForwardLess ( const GeomDet blb,
const GeomDet fla 
) const
private

Definition at line 38 of file GeomDetLess.cc.

References funct::abs(), GloballyPositioned< T >::position(), GeomDet::position(), GeomDet::surface(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by insideOutLess().

40 {
41  return std::abs(bla->surface().position().z()) < std::abs( flb->position().z());
42 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool GeomDetLess::insideOutLess ( const GeomDet a,
const GeomDet b 
) const
private

Definition at line 6 of file GeomDetLess.cc.

References funct::abs(), barrelForwardLess(), edm::hlt::Exception, GeomDet::geographicalId(), PV3DBase< T, PVType, FrameType >::perp(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, GloballyPositioned< T >::position(), GeomDet::surface(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, and PV3DBase< T, PVType, FrameType >::z().

Referenced by operator()().

7 {
8  if (a == b) return false;
9 
10  DetId ida(a->geographicalId());
11  DetId idb(b->geographicalId());
12 
13  if ( (ida.subdetId() == StripSubdetector::TIB || ida.subdetId() == StripSubdetector::TOB || ida.subdetId() == PixelSubdetector::PixelBarrel) &&
14  (idb.subdetId() == StripSubdetector::TIB || idb.subdetId() == StripSubdetector::TOB || idb.subdetId() == PixelSubdetector::PixelBarrel)) { // barrel with barrel
15  return a->surface().position().perp() < b->surface().position().perp();
16  }
17 
18  if ( (ida.subdetId() == StripSubdetector::TEC || ida.subdetId() == StripSubdetector::TID || ida.subdetId() == PixelSubdetector::PixelEndcap) &&
19  (idb.subdetId() == StripSubdetector::TEC || idb.subdetId() == StripSubdetector::TID || idb.subdetId() == PixelSubdetector::PixelEndcap)) { // fwd with fwd
20  return std::abs(a->surface().position().z()) < std::abs(b->surface().position().z());
21  }
22 
23  //
24  // here I have 1 barrel against one forward
25  //
26 
27  if ( (ida.subdetId() == StripSubdetector::TIB || ida.subdetId() == StripSubdetector::TOB || ida.subdetId() == PixelSubdetector::PixelBarrel) &&
28  (idb.subdetId() == StripSubdetector::TEC || idb.subdetId() == StripSubdetector::TID || idb.subdetId() == PixelSubdetector::PixelEndcap)) { // barrel with barrel
29  return barrelForwardLess( a, b);
30  }else{
31  return !barrelForwardLess( b, a);
32  }
33 
34  throw cms::Exception("GeomDetLess") << "GeomDetLess: arguments are not Ok";
35 
36 }
bool barrelForwardLess(const GeomDet *blb, const GeomDet *fla) const
Definition: GeomDetLess.cc:38
T perp() const
Definition: PV3DBase.h:72
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
Definition: DetId.h:18
const PositionType & position() const
bool GeomDetLess::operator() ( const GeomDet a,
const GeomDet b 
) const
inline

Definition at line 18 of file GeomDetLess.h.

References alongMomentum, insideOutLess(), and theDir.

18  {
19  if (theDir == alongMomentum) return insideOutLess( a, b);
20  else return insideOutLess( b, a);
21  }
bool insideOutLess(const GeomDet *, const GeomDet *) const
Definition: GeomDetLess.cc:6
PropagationDirection theDir
Definition: GeomDetLess.h:25

Member Data Documentation

PropagationDirection GeomDetLess::theDir
private

Definition at line 25 of file GeomDetLess.h.

Referenced by operator()().