CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GEMSuperChamber Class Reference

#include <GEMSuperChamber.h>

Inheritance diagram for GEMSuperChamber:
GeomDet

Public Member Functions

void add (const GEMChamber *ch)
 Add chamber to the super chamber which takes ownership. More...
 
const GEMChamberchamber (GEMDetId id) const
 Return the chamber corresponding to the given id. More...
 
const GEMChamberchamber (int layer) const
 
const std::vector< const GEMChamber * > & chambers () const
 Return the chambers in the super chamber. More...
 
const GeomDetcomponent (DetId id) const override
 Return the sub-component (chamber) with a given id in this super chamber. More...
 
std::vector< const GeomDet * > components () const override
 Return the chambers in the super chamber. More...
 
float computeDeltaPhi (const LocalPoint &position, const LocalVector &direction) const
 
 GEMSuperChamber (GEMDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
 constructor More...
 
GEMDetId id () const
 Return the GEMDetId of this super chamber. More...
 
const std::vector< GEMDetId > & ids () const
 Return the vector of GEMDetIds in this super chamber. More...
 
int nChambers () const
 Return numbers of chambers. More...
 
bool operator== (const GEMSuperChamber &sch) const
 equal if the id is the same More...
 
SubDetector subDetector () const override
 Which subdetector. More...
 
 ~GEMSuperChamber () override
 destructor More...
 
- Public Member Functions inherited from GeomDet
AlignmentPositionError const * alignmentPositionError () const
 Return pointer to alignment errors. More...
 
int gdetIndex () const
 
DetId geographicalId () const
 The label of this GeomDet. More...
 
 GeomDet (const ReferenceCountingPointer< Plane > &plane)
 
 GeomDet (Plane *plane)
 
int index () const
 
virtual bool isLeaf () const
 is a Unit More...
 
const Surface::PositionTypeposition () const
 The position (origin of the R.F.) More...
 
const Surface::RotationTyperotation () const
 The rotation defining the local R.F. More...
 
void setGdetIndex (int i)
 
void setIndex (int i)
 
const PlanespecificSurface () const
 Same as surface(), kept for backward compatibility. More...
 
const Planesurface () const
 The nominal surface of the GeomDet. More...
 
virtual const SurfaceDeformationsurfaceDeformation () const
 
GlobalPoint toGlobal (const Local2DPoint &lp) const
 Conversion to the global R.F. from the R.F. of the GeomDet. More...
 
GlobalPoint toGlobal (const Local3DPoint &lp) const
 Conversion to the global R.F. from the R.F. of the GeomDet. More...
 
GlobalVector toGlobal (const LocalVector &lv) const
 Conversion to the global R.F. from the R.F. of the GeomDet. More...
 
LocalPoint toLocal (const GlobalPoint &gp) const
 Conversion to the R.F. of the GeomDet. More...
 
LocalVector toLocal (const GlobalVector &gv) const
 Conversion to the R.F. of the GeomDet. More...
 
virtual const Topologytopology () const
 
virtual const GeomDetTypetype () const
 
virtual ~GeomDet ()
 

Private Attributes

std::vector< const GEMChamber * > chambers_
 
GEMDetId detId_
 

Additional Inherited Members

- Public Types inherited from GeomDet
using SubDetector = GeomDetEnumerators::SubDetector
 
- Protected Member Functions inherited from GeomDet
virtual bool setAlignmentPositionError (const AlignmentPositionError &ape)
 
void setDetId (DetId id)
 

Detailed Description

Model of a GEM super chamber.

The super chamber is composed of 2 chambers. It's detId is layer 0, chambers are layer 1 and 2

Author
S. Dildick

Definition at line 19 of file GEMSuperChamber.h.

Constructor & Destructor Documentation

◆ GEMSuperChamber()

GEMSuperChamber::GEMSuperChamber ( GEMDetId  id,
const ReferenceCountingPointer< BoundPlane > &  plane 
)

constructor

Definition at line 4 of file GEMSuperChamber.cc.

5  : GeomDet(plane), detId_(id) {
6  setDetId(id);
7 }

References GeomDet::setDetId().

◆ ~GEMSuperChamber()

GEMSuperChamber::~GEMSuperChamber ( )
override

destructor

Definition at line 9 of file GEMSuperChamber.cc.

9 {}

Member Function Documentation

◆ add()

void GEMSuperChamber::add ( const GEMChamber ch)

Add chamber to the super chamber which takes ownership.

Definition at line 15 of file GEMSuperChamber.cc.

15 { chambers_.emplace_back(ch); }

References chambers_.

Referenced by counter.Counter::register().

◆ chamber() [1/2]

const GEMChamber * GEMSuperChamber::chamber ( GEMDetId  id) const

Return the chamber corresponding to the given id.

Definition at line 27 of file GEMSuperChamber.cc.

27  {
28  if (id.chamber() != detId_.chamber())
29  return nullptr; // not in this super chamber!
30  return chamber(id.layer());
31 }

References GEMDetId::chamber(), detId_, and phase1PixelTopology::layer.

Referenced by GEMCoPadDigiValidation::analyze(), component(), computeDeltaPhi(), and geometryXMLparser.CSCAlignable::index().

◆ chamber() [2/2]

const GEMChamber * GEMSuperChamber::chamber ( int  layer) const

Definition at line 33 of file GEMSuperChamber.cc.

33  {
34  for (auto ch : chambers_) {
35  if (ch->id().layer() == isl)
36  return ch;
37  }
38  return nullptr;
39 }

References chambers_.

Referenced by geometryXMLparser.CSCAlignable::index().

◆ chambers()

const std::vector< const GEMChamber * > & GEMSuperChamber::chambers ( ) const

◆ component()

const GeomDet * GEMSuperChamber::component ( DetId  id) const
overridevirtual

Return the sub-component (chamber) with a given id in this super chamber.

Reimplemented from GeomDet.

Definition at line 21 of file GEMSuperChamber.cc.

21 { return chamber(GEMDetId(id.rawId())); }

References chamber().

◆ components()

std::vector< const GeomDet * > GEMSuperChamber::components ( ) const
overridevirtual

Return the chambers in the super chamber.

Reimplemented from GeomDet.

Definition at line 17 of file GEMSuperChamber.cc.

17  {
18  return std::vector<const GeomDet*>(chambers_.begin(), chambers_.end());
19 }

References chambers_.

◆ computeDeltaPhi()

float GEMSuperChamber::computeDeltaPhi ( const LocalPoint position,
const LocalVector direction 
) const

Definition at line 41 of file GEMSuperChamber.cc.

41  {
42  auto extrap = [](const LocalPoint& point, const LocalVector& dir, double extZ) -> LocalPoint {
43  if (dir.z() == 0)
44  return LocalPoint(0.f, 0.f, extZ);
45  double extX = point.x() + extZ * dir.x() / dir.z();
46  double extY = point.y() + extZ * dir.y() / dir.z();
47  return LocalPoint(extX, extY, extZ);
48  };
49  if (nChambers() < 2) {
50  return 0.f;
51  }
52 
53  const float beginOfChamber = chamber(1)->position().z();
54  const float centerOfChamber = this->position().z();
55  const float endOfChamber = chamber(nChambers())->position().z();
56 
57  LocalPoint projHigh =
58  extrap(position, direction, (centerOfChamber < 0 ? -1.0 : 1.0) * (endOfChamber - centerOfChamber));
59  LocalPoint projLow =
60  extrap(position, direction, (centerOfChamber < 0 ? -1.0 : 1.0) * (beginOfChamber - centerOfChamber));
61  auto globLow = toGlobal(projLow);
62  auto globHigh = toGlobal(projHigh);
63  return globHigh.phi() - globLow.phi(); //Geom::phi automatically normalizes to [-pi, pi]
64 }

References chamber(), DeadROC_duringRun::dir, f, nChambers(), point, GeomDet::position(), GeomDet::toGlobal(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by GE0SegAlgoRU::addUniqueSegments().

◆ id()

GEMDetId GEMSuperChamber::id ( void  ) const

Return the GEMDetId of this super chamber.

Definition at line 11 of file GEMSuperChamber.cc.

11 { return detId_; }

References detId_.

Referenced by GEMPadDigiClusterValidation::bookHistograms(), GEMPadDigiValidation::bookHistograms(), and operator==().

◆ ids()

const std::vector<GEMDetId>& GEMSuperChamber::ids ( ) const

Return the vector of GEMDetIds in this super chamber.

◆ nChambers()

int GEMSuperChamber::nChambers ( ) const

Return numbers of chambers.

Definition at line 25 of file GEMSuperChamber.cc.

25 { return chambers_.size(); }

References chambers_.

Referenced by computeDeltaPhi(), GEMOfflineDQMBase::getDetOccXBin(), and GE0SegAlgoRU::run().

◆ operator==()

bool GEMSuperChamber::operator== ( const GEMSuperChamber sch) const

equal if the id is the same

Definition at line 13 of file GEMSuperChamber.cc.

13 { return this->id() == sch.id(); }

References id().

◆ subDetector()

SubDetector GEMSuperChamber::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 34 of file GEMSuperChamber.h.

34 { return GeomDetEnumerators::GEM; }

References GeomDetEnumerators::GEM.

Member Data Documentation

◆ chambers_

std::vector<const GEMChamber*> GEMSuperChamber::chambers_
private

Definition at line 65 of file GEMSuperChamber.h.

Referenced by add(), chamber(), chambers(), components(), and nChambers().

◆ detId_

GEMDetId GEMSuperChamber::detId_
private

Definition at line 62 of file GEMSuperChamber.h.

Referenced by chamber(), and id().

Vector3DBase< float, LocalTag >
GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
GEMSuperChamber::detId_
GEMDetId detId_
Definition: GEMSuperChamber.h:62
GeomDet::setDetId
void setDetId(DetId id)
Definition: GeomDet.h:99
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
GeomDet::GeomDet
GeomDet(Plane *plane)
Definition: GeomDet.h:31
GEMSuperChamber::chamber
const GEMChamber * chamber(GEMDetId id) const
Return the chamber corresponding to the given id.
Definition: GEMSuperChamber.cc:27
GEMSuperChamber::nChambers
int nChambers() const
Return numbers of chambers.
Definition: GEMSuperChamber.cc:25
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
Point3DBase< float, LocalTag >
GEMSuperChamber::chambers_
std::vector< const GEMChamber * > chambers_
Definition: GEMSuperChamber.h:65
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
GEMDetId::chamber
constexpr int chamber() const
Definition: GEMDetId.h:183
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
GEMDetId
Definition: GEMDetId.h:18
GeomDetEnumerators::GEM
Definition: GeomDetEnumerators.h:21
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
GEMSuperChamber::id
GEMDetId id() const
Return the GEMDetId of this super chamber.
Definition: GEMSuperChamber.cc:11
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23