CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
align::TrackerNameSpace::TPB Class Reference

#include <TrackerNameSpace.h>

Public Member Functions

unsigned int barrelNumber (align::ID) const
 Barrel number is 1 for all align::ID's which belong to this barrel. More...
 
unsigned int halfBarrelNumber (align::ID) const
 Half barrel number is 1 at left side (-x) and 2 at right side (+x). More...
 
unsigned int ladderNumber (align::ID) const
 
unsigned int layerNumber (align::ID) const
 Layer number increases with rho from 1 to 3. More...
 
unsigned int moduleNumber (align::ID) const
 Module number increases with z from 1 to 8. More...
 
TPBoperator= (const TPB &)=default
 
TPBoperator= (TPB &&)=default
 
 TPB (const TrackerTopology *)
 
 TPB (const TPB &)=default
 
 TPB (TPB &&)=default
 
virtual ~TPB ()=default
 

Private Attributes

std::vector< unsigned int > lpqc_
 Number of ladders for each quarter cylinder. More...
 
const TrackerTopologytrackerTopology_
 

Friends

class ::TrackerAlignmentLevelBuilder
 grant access for the TrackerAlignmentLevelBuilder (in global namespace) More...
 
class TrackerNameSpace
 grant access for the enclosing TrackerNameSpace More...
 

Detailed Description

Definition at line 26 of file TrackerNameSpace.h.

Constructor & Destructor Documentation

align::TrackerNameSpace::TPB::TPB ( const TrackerTopology topology)

Definition at line 22 of file TrackerNameSpace.cc.

References moduleNumber().

Referenced by align::TrackerNameSpace::TrackerNameSpace().

22  :
23  trackerTopology_(topology)
24 {
25 }
const TrackerTopology * trackerTopology_
align::TrackerNameSpace::TPB::TPB ( const TPB )
default
align::TrackerNameSpace::TPB::TPB ( TPB &&  )
default
virtual align::TrackerNameSpace::TPB::~TPB ( )
virtualdefault

Member Function Documentation

unsigned int align::TrackerNameSpace::TPB::barrelNumber ( align::ID  ) const

Barrel number is 1 for all align::ID's which belong to this barrel.

Definition at line 75 of file TrackerNameSpace.cc.

References align::TrackerNameSpace::TPE::TPE().

Referenced by halfBarrelNumber().

76 {
77  return 1;
78 }
unsigned int align::TrackerNameSpace::TPB::halfBarrelNumber ( align::ID  id) const

Half barrel number is 1 at left side (-x) and 2 at right side (+x).

Definition at line 64 of file TrackerNameSpace.cc.

References barrelNumber(), EnergyCorrector::c, checklumidiff::l, lpqc_, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), and trackerTopology_.

Referenced by layerNumber().

65 {
66  unsigned int l = trackerTopology_->pxbLadder(id); // increases with phi
67  unsigned int c = trackerTopology_->pxbLayer(id) - 1;
68 
69  return l > lpqc_[c] && l <= 3 * lpqc_[c] ? 1 : 2;
70 }
const TrackerTopology * trackerTopology_
unsigned int pxbLadder(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
std::vector< unsigned int > lpqc_
Number of ladders for each quarter cylinder.
unsigned int align::TrackerNameSpace::TPB::ladderNumber ( align::ID  id) const

Ladder number increases from 1 at the top to 2 * lpqc at the bottom of each half cylinder.

Definition at line 38 of file TrackerNameSpace.cc.

References EnergyCorrector::c, checklumidiff::l, layerNumber(), lpqc_, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), and trackerTopology_.

Referenced by moduleNumber().

39 {
40  unsigned int l = trackerTopology_->pxbLadder(id); // increases with phi
41  unsigned int c = trackerTopology_->pxbLayer(id) - 1;
42 
43  // Ladder in 1st quadrant: number = lpqc_ + 1 - l (1 to lpqc_)
44  // Ladder in 2nd quadrant: number = l - lpqc_ (1 to lpqc_)
45  // Ladder in 3rd quadrant: number = l - lpqc_ (lpqc_ + 1 to 2 * lpqc_)
46  // Ladder in 4th quadrant: number = 5 * lpqc_ + 1 - l (lpqc_ + 1 to 2 * lpqc_)
47 
48  return l > 3 * lpqc_[c] ? 5 * lpqc_[c] + 1 - l : // ladder in 4th quadrant
49  (l > lpqc_[c] ? l - lpqc_[c] : // ladder not in 1st quadrant
50  lpqc_[c] + 1 - l);
51 }
const TrackerTopology * trackerTopology_
unsigned int pxbLadder(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
std::vector< unsigned int > lpqc_
Number of ladders for each quarter cylinder.
unsigned int align::TrackerNameSpace::TPB::layerNumber ( align::ID  id) const

Layer number increases with rho from 1 to 3.

Definition at line 56 of file TrackerNameSpace.cc.

References halfBarrelNumber(), TrackerTopology::pxbLayer(), and trackerTopology_.

Referenced by ladderNumber().

57 {
58  return trackerTopology_->pxbLayer(id);
59 }
const TrackerTopology * trackerTopology_
unsigned int pxbLayer(const DetId &id) const
unsigned int align::TrackerNameSpace::TPB::moduleNumber ( align::ID  id) const

Module number increases with z from 1 to 8.

Definition at line 30 of file TrackerNameSpace.cc.

References ladderNumber(), TrackerTopology::pxbModule(), and trackerTopology_.

Referenced by TPB().

31 {
32  return trackerTopology_->pxbModule(id);
33 }
const TrackerTopology * trackerTopology_
unsigned int pxbModule(const DetId &id) const
TPB& align::TrackerNameSpace::TPB::operator= ( const TPB )
default
TPB& align::TrackerNameSpace::TPB::operator= ( TPB &&  )
default

Friends And Related Function Documentation

friend class ::TrackerAlignmentLevelBuilder
friend

grant access for the TrackerAlignmentLevelBuilder (in global namespace)

Definition at line 31 of file TrackerNameSpace.h.

friend class TrackerNameSpace
friend

grant access for the enclosing TrackerNameSpace

Definition at line 28 of file TrackerNameSpace.h.

Member Data Documentation

std::vector<unsigned int> align::TrackerNameSpace::TPB::lpqc_
private

Number of ladders for each quarter cylinder.

Definition at line 61 of file TrackerNameSpace.h.

Referenced by TrackerAlignmentLevelBuilder::buildPXBAlignmentLevels(), halfBarrelNumber(), and ladderNumber().

const TrackerTopology* align::TrackerNameSpace::TPB::trackerTopology_
private