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
cscdqm::Detector Class Reference

Detector geometry and addressing related imformation and routines. More...

#include <CSCDQM_Detector.h>

Public Member Functions

const bool AddressFromString (const std::string &str_address, Address &adr) const
 Construct address from string. More...
 
const float Area (const unsigned int station) const
 Calculate station area in eta/phi space. More...
 
const float Area (const Address &adr) const
 Calculate address area in eta/phi space. More...
 
 Detector (const unsigned int p_partitions_x=0, const unsigned int p_partitions_y=0)
 Constructor. More...
 
unsigned int GlobalChamberIndex (unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
 Return global chamber index on his geometric location. More...
 
const bool NextAddress (unsigned int &i, const Address *&adr, const Address &mask) const
 Address iterator by mask. More...
 
const bool NextAddressBox (unsigned int &i, const AddressBox *&box, const Address &mask) const
 Address box iterator by mask. More...
 
const bool NextAddressBoxByPartition (unsigned int &i, const unsigned int px, const unsigned int py, AddressBox *&box)
 Address box iterator by partition. More...
 
const unsigned int NumberOfChamberCFEBs (const unsigned int station, const unsigned int ring) const
 Returns the number of CFEBs per Chamber on given Station/Ring. More...
 
const unsigned int NumberOfChamberHVs (const unsigned int station, const unsigned int ring) const
 Returns the number of HVs per Chamber on given Station/Ring. More...
 
const unsigned int NumberOfChambers (const unsigned int station, const unsigned int ring) const
 Returns the number of chambers for the given station and ring. More...
 
const unsigned int NumberOfRings (const unsigned int station) const
 Returns the number of rings for the given station. More...
 
void PrintAddress (const Address &adr) const
 Prints address for debugging. More...
 

Private Member Functions

const float Eta (const float r, const float z) const
 
const float EtaToX (const float eta) const
 Transform eta coordinate to local canvas coordinate. More...
 
const float PhiMaxCFEB (const int station, const int ring, const int chamber, const int cfeb) const
 Get Max phi boundary for particular CFEB. More...
 
const float PhiMinCFEB (const int station, const int ring, const int chamber, const int cfeb) const
 Get Min phi boundary for particular CFEB. More...
 
const float PhiToY (const float phi) const
 Transform phi coordinate to local canvas coordinate. More...
 
const float RMaxHV (const int station, const int ring, const int n_hv) const
 Get R max parameter (used in address eta/phi calculation) More...
 
const float RMinHV (const int station, const int ring, const int n_hv) const
 Get R min parameter (used in address eta/phi calculation) More...
 
const float Z (const int station, const int ring) const
 Get Z parameter (used in address eta/phi calculation) More...
 

Private Attributes

AddressBox boxes [9540]
 
PartitionMap partitions
 
unsigned int partitions_x
 
unsigned int partitions_y
 
float station_area [4]
 

Detailed Description

Detector geometry and addressing related imformation and routines.

Definition at line 183 of file CSCDQM_Detector.h.

Constructor & Destructor Documentation

cscdqm::Detector::Detector ( const unsigned int  p_partitions_x = 0,
const unsigned int  p_partitions_y = 0 
)

Constructor.

Parameters
p_partition_xNumber of efficiency partitions on X axis
p_partition_yNumber of efficiency partitions on Y axis
Returns

Creating real eta/phi boxes for available addresses

Address box calculated successfully. Now lets cache its partition elements for performace.

Cached the most frequently used areas

Definition at line 33 of file CSCDQM_Detector.cc.

Member Function Documentation

const bool cscdqm::Detector::AddressFromString ( const std::string &  str_address,
Address adr 
) const

Construct address from string.

Parameters
str_addressAddress in string
adrAddress to return
Returns
true if address was successfully created, false - otherwise

Definition at line 572 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::Area ( const unsigned int  station) const

Calculate station area in eta/phi space.

Parameters
stationStation number
Returns
Area that is being covered by station

Definition at line 138 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::Area ( const Address adr) const

Calculate address area in eta/phi space.

Parameters
adrAddress
Returns
Area that is being covered by address

Definition at line 184 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::Eta ( const float  r,
const float  z 
) const
private

Definition at line 356 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::EtaToX ( const float  eta) const
private

Transform eta coordinate to local canvas coordinate.

Parameters
etaEta coordinate
Returns
local canvas coordinate

Definition at line 372 of file CSCDQM_Detector.cc.

unsigned int cscdqm::Detector::GlobalChamberIndex ( unsigned int  side,
unsigned int  station,
unsigned int  ring,
unsigned int  chamber 
) const

Return global chamber index on his geometric location.

Parameters
sideSide (1,2)
stationStation
ringRing\
chamberChamber position
Returns
Global chamber index starting 1. If chamber is not existing - returns 0

Definition at line 153 of file CSCDQM_Detector.cc.

const bool cscdqm::Detector::NextAddress ( unsigned int &  i,
const Address *&  adr,
const Address mask 
) const

Address iterator by mask.

Parameters
iIterator
adrAddress to return
maskfor addresses
Returns
true if address was found and filled in, false - otherwise

Definition at line 302 of file CSCDQM_Detector.cc.

const bool cscdqm::Detector::NextAddressBox ( unsigned int &  i,
const AddressBox *&  box,
const Address mask 
) const

Address box iterator by mask.

Parameters
iIterator
adrAddressBox to return
maskfor addresses
Returns
true if address box was found and filled in, false - otherwise

Definition at line 320 of file CSCDQM_Detector.cc.

const bool cscdqm::Detector::NextAddressBoxByPartition ( unsigned int &  i,
const unsigned int  px,
const unsigned int  py,
AddressBox *&  box 
)

Address box iterator by partition.

Parameters
iIterator
pxPartition x index
pyPartition y index
boxAddressBox to return
Returns
true if address box was found and filled in, false - otherwise

Definition at line 340 of file CSCDQM_Detector.cc.

const unsigned int cscdqm::Detector::NumberOfChamberCFEBs ( const unsigned int  station,
const unsigned int  ring 
) const

Returns the number of CFEBs per Chamber on given Station/Ring.

Parameters
stationStation number (1...4)
ringRing number (1...3)
Returns
Number of CFEBs per Chamber

Definition at line 232 of file CSCDQM_Detector.cc.

const unsigned int cscdqm::Detector::NumberOfChamberHVs ( const unsigned int  station,
const unsigned int  ring 
) const

Returns the number of HVs per Chamber on given Station/Ring.

Parameters
stationStation number (1...4)
ringRing number (1...3)
Returns
Number of HVs per Chamber

Definition at line 251 of file CSCDQM_Detector.cc.

const unsigned int cscdqm::Detector::NumberOfChambers ( const unsigned int  station,
const unsigned int  ring 
) const

Returns the number of chambers for the given station and ring.

Parameters
stationStation number (1...4)
ringRing number (1...3)
Returns
number of chambers

Definition at line 213 of file CSCDQM_Detector.cc.

const unsigned int cscdqm::Detector::NumberOfRings ( const unsigned int  station) const

Returns the number of rings for the given station.

Parameters
stationStation number (1, 2, 3, 4)
Returns
number of rings for the given station

Definition at line 199 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::PhiMaxCFEB ( const int  station,
const int  ring,
const int  chamber,
const int  cfeb 
) const
private

Get Max phi boundary for particular CFEB.

Parameters
stationStation number
ringRing number
chamberChamber number
cfebCFEB number
Returns
Max phi CFEB boundary

Definition at line 555 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::PhiMinCFEB ( const int  station,
const int  ring,
const int  chamber,
const int  cfeb 
) const
private

Get Min phi boundary for particular CFEB.

Parameters
stationStation number
ringRing number
chamberChamber number
cfebCFEB number
Returns
Min phi CFEB boundary

Definition at line 536 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::PhiToY ( const float  phi) const
private

Transform phi coordinate to local canvas coordinate.

Parameters
phiPhi coordinate
Returns
local canvas coordinate

Definition at line 387 of file CSCDQM_Detector.cc.

void cscdqm::Detector::PrintAddress ( const Address adr) const

Prints address for debugging.

Parameters
adrAddress to print
Returns

Definition at line 269 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::RMaxHV ( const int  station,
const int  ring,
const int  n_hv 
) const
private

Get R max parameter (used in address eta/phi calculation)

Parameters
stationStation Id
ringRing Id
n_hvHV number
Returns
R max value

Definition at line 479 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::RMinHV ( const int  station,
const int  ring,
const int  n_hv 
) const
private

Get R min parameter (used in address eta/phi calculation)

Parameters
stationStation Id
ringRing Id
n_hvHV number
Returns
R min value

Definition at line 423 of file CSCDQM_Detector.cc.

const float cscdqm::Detector::Z ( const int  station,
const int  ring 
) const
private

Get Z parameter (used in address eta/phi calculation)

Parameters
stationStation Id
ringRing Id
Returns
Z value

Definition at line 403 of file CSCDQM_Detector.cc.

Member Data Documentation

AddressBox cscdqm::Detector::boxes[9540]
private

Address boxes in epa/phi space

Definition at line 218 of file CSCDQM_Detector.h.

PartitionMap cscdqm::Detector::partitions
private

Map of partitions and list of it covering addresses indexes

Definition at line 230 of file CSCDQM_Detector.h.

unsigned int cscdqm::Detector::partitions_x
private

Number of partitions in X axis

Definition at line 224 of file CSCDQM_Detector.h.

unsigned int cscdqm::Detector::partitions_y
private

Number of partitions in Y axis

Definition at line 227 of file CSCDQM_Detector.h.

float cscdqm::Detector::station_area[4]
private

Station areas precalculated

Definition at line 221 of file CSCDQM_Detector.h.