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] |
Detector geometry and addressing related imformation and routines.
Definition at line 169 of file CSCDQM_Detector.h.
cscdqm::Detector::Detector | ( | const unsigned int | p_partitions_x = 0 , |
const unsigned int | p_partitions_y = 0 |
||
) |
Constructor.
p_partition_x | Number of efficiency partitions on X axis |
p_partition_y | Number of efficiency partitions on Y axis |
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.
References cscdqm::AddressBox::adr, Area(), boxes, reco::ceil(), cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, Eta(), egammaIdentification::eta_max, egammaIdentification::eta_min, EtaToX(), cscdqm::AddressMask::hv, cscdqm::Address::hv, mps_fire::i, createfilelist::int, cscdqm::AddressMask::layer, cscdqm::Address::mask, N_SIDES, N_STATIONS, NumberOfChamberCFEBs(), NumberOfChamberHVs(), NumberOfChambers(), NumberOfRings(), PARTITION_INDEX, PARTITION_STEP_X, PARTITION_STEP_Y, partitions, partitions_x, partitions_y, PhiMaxCFEB(), PhiMinCFEB(), PhiToY(), cscdqm::AddressMask::ring, cscdqm::Address::ring, RMaxHV(), RMinHV(), cscdqm::AddressMask::side, cscdqm::Address::side, Validation_hcalonly_cfi::sign, cscdqm::AddressMask::station, cscdqm::Address::station, station_area, findQualityFiles::v, x, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, cscdqm::AddressBox::xmax, cscdqm::AddressBox::xmin, testProducerWithPsetDescEmpty_cfi::y1, testProducerWithPsetDescEmpty_cfi::y2, cscdqm::AddressBox::ymax, cscdqm::AddressBox::ymin, and Z().
const bool cscdqm::Detector::AddressFromString | ( | const std::string & | str_address, |
Address & | adr | ||
) | const |
Construct address from string.
Definition at line 658 of file CSCDQM_Detector.cc.
References ADDR_SIZE, cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, TauDecayModes::dec, cscdqm::AddressMask::hv, cscdqm::Address::hv, cscdqm::AddressMask::layer, cscdqm::Address::layer, gpuClustering::pixelStatus::mask, cscdqm::Address::mask, EgammaValidation_cff::num, alignCSCRings::r, cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::Utility::splitString(), cscdqm::AddressMask::station, cscdqm::Address::station, AlCaHLTBitMon_QueryRunRegistry::string, unpackBuffers-CaloStage2::token, and cscdqm::Utility::trimString().
Referenced by cscdqm::Summary::setMaskedHWElements().
const float cscdqm::Detector::Area | ( | const unsigned int | station | ) | const |
Calculate station area in eta/phi space.
station | Station number |
Definition at line 132 of file CSCDQM_Detector.cc.
References N_STATIONS, relativeConstraints::station, and station_area.
Referenced by Detector(), cscdqm::Summary::GetEfficiencyArea(), and cscdqm::Summary::GetReportingArea().
const float cscdqm::Detector::Area | ( | const Address & | adr | ) | const |
Calculate address area in eta/phi space.
adr | Address |
Definition at line 182 of file CSCDQM_Detector.cc.
References a, boxes, mps_fire::i, N_ELEMENTS, TrackerOfflineValidation_Dqm_cff::xmax, TrackerOfflineValidation_Dqm_cff::xmin, L1TOccupancyClient_cfi::ymax, and L1TOccupancyClient_cfi::ymin.
|
private |
Definition at line 391 of file CSCDQM_Detector.cc.
References dqm-mbProfile::log, alignCSCRings::r, and mathSSE::sqrt().
Referenced by Detector().
|
private |
Transform eta coordinate to local canvas coordinate.
eta | Eta coordinate |
Definition at line 407 of file CSCDQM_Detector.cc.
References a, b, PVValHelper::eta, egammaIdentification::eta_max, and egammaIdentification::eta_min.
Referenced by Detector().
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.
side | Side (1,2) |
station | Station |
ring | Ring\ |
chamber | Chamber position |
Definition at line 147 of file CSCDQM_Detector.cc.
References cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, relativeConstraints::chamber, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, cscdqm::AddressMask::hv, cscdqm::Address::hv, mps_fire::i, cscdqm::AddressMask::layer, cscdqm::Address::layer, cscdqm::Address::mask, N_SIDES, N_STATIONS, NumberOfChambers(), NumberOfRings(), relativeConstraints::ring, cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, relativeConstraints::station, cscdqm::AddressMask::station, and cscdqm::Address::station.
Referenced by cscdqm::EventProcessor::processCSC().
const bool cscdqm::Detector::NextAddress | ( | unsigned int & | i, |
const Address *& | adr, | ||
const Address & | mask | ||
) | const |
Address iterator by mask.
Definition at line 337 of file CSCDQM_Detector.cc.
References cscdqm::AddressBox::adr, boxes, mps_fire::i, gpuClustering::pixelStatus::mask, and N_ELEMENTS.
const bool cscdqm::Detector::NextAddressBox | ( | unsigned int & | i, |
const AddressBox *& | box, | ||
const Address & | mask | ||
) | const |
Address box iterator by mask.
i | Iterator |
adr | AddressBox to return |
mask | for addresses |
Definition at line 355 of file CSCDQM_Detector.cc.
References boxes, mps_fire::i, gpuClustering::pixelStatus::mask, and N_ELEMENTS.
Referenced by cscdqm::Summary::Write().
const bool cscdqm::Detector::NextAddressBoxByPartition | ( | unsigned int & | i, |
const unsigned int | px, | ||
const unsigned int | py, | ||
AddressBox *& | box | ||
) |
Address box iterator by partition.
i | Iterator |
px | Partition x index |
py | Partition y index |
box | AddressBox to return |
Definition at line 374 of file CSCDQM_Detector.cc.
References boxes, mps_fire::i, PARTITION_INDEX, partitions, multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, and findQualityFiles::size.
Referenced by cscdqm::Summary::IsPhysicsReady().
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.
station | Station number (1...4) |
ring | Ring number (1...3) |
Definition at line 243 of file CSCDQM_Detector.cc.
References relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector(), cscdqm::Summary::GetEfficiencyHW(), cscdqm::Summary::GetReportingArea(), cscdqm::Summary::GetValue(), PhiMaxCFEB(), PhiMinCFEB(), and cscdqm::Summary::SetValue().
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.
station | Station number (1...4) |
ring | Ring number (1...3) |
Definition at line 271 of file CSCDQM_Detector.cc.
References relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector(), cscdqm::Summary::GetEfficiencyHW(), cscdqm::Summary::GetReportingArea(), cscdqm::Summary::GetValue(), and cscdqm::Summary::SetValue().
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.
station | Station number (1...4) |
ring | Ring number (1...3) |
Definition at line 215 of file CSCDQM_Detector.cc.
References relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector(), cscdqm::Summary::GetEfficiencyHW(), cscdqm::Summary::GetReportingArea(), cscdqm::Summary::GetValue(), GlobalChamberIndex(), PhiMaxCFEB(), PhiMinCFEB(), cscdqm::Summary::SetValue(), cscdqm::EventProcessor::updateEfficiencyHistos(), and cscdqm::Summary::WriteChamberState().
const unsigned int cscdqm::Detector::NumberOfRings | ( | const unsigned int | station | ) | const |
Returns the number of rings for the given station.
station | Station number (1, 2, 3, 4) |
Definition at line 197 of file CSCDQM_Detector.cc.
References relativeConstraints::station.
Referenced by Detector(), cscdqm::Summary::GetEfficiencyHW(), cscdqm::Summary::GetReportingArea(), cscdqm::Summary::GetValue(), GlobalChamberIndex(), cscdqm::Summary::SetValue(), cscdqm::EventProcessor::updateEfficiencyHistos(), and cscdqm::Summary::WriteChamberState().
|
private |
Get Max phi boundary for particular CFEB.
station | Station number |
ring | Ring number |
chamber | Chamber number |
cfeb | CFEB number |
Definition at line 641 of file CSCDQM_Detector.cc.
References relativeConstraints::chamber, dqmMemoryStats::float, NumberOfChamberCFEBs(), NumberOfChambers(), relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector().
|
private |
Get Min phi boundary for particular CFEB.
station | Station number |
ring | Ring number |
chamber | Chamber number |
cfeb | CFEB number |
Definition at line 621 of file CSCDQM_Detector.cc.
References relativeConstraints::chamber, dqmMemoryStats::float, NumberOfChamberCFEBs(), NumberOfChambers(), relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector().
|
private |
Transform phi coordinate to local canvas coordinate.
phi | Phi coordinate |
Definition at line 422 of file CSCDQM_Detector.cc.
Referenced by Detector().
void cscdqm::Detector::PrintAddress | ( | const Address & | adr | ) | const |
Prints address for debugging.
adr | Address to print |
Definition at line 298 of file CSCDQM_Detector.cc.
References cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, gather_cfg::cout, cscdqm::AddressMask::hv, cscdqm::Address::hv, cscdqm::AddressMask::layer, cscdqm::Address::layer, cscdqm::Address::mask, cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, and cscdqm::Address::station.
|
private |
Get R max parameter (used in address eta/phi calculation)
station | Station Id |
ring | Ring Id |
n_hv | HV number |
Definition at line 542 of file CSCDQM_Detector.cc.
References relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector().
|
private |
Get R min parameter (used in address eta/phi calculation)
station | Station Id |
ring | Ring Id |
n_hv | HV number |
Definition at line 464 of file CSCDQM_Detector.cc.
References relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector().
|
private |
Get Z parameter (used in address eta/phi calculation)
station | Station Id |
ring | Ring Id |
Definition at line 438 of file CSCDQM_Detector.cc.
References relativeConstraints::ring, and relativeConstraints::station.
Referenced by Detector().
|
private |
Address boxes in epa/phi space
Definition at line 207 of file CSCDQM_Detector.h.
Referenced by Area(), Detector(), NextAddress(), NextAddressBox(), and NextAddressBoxByPartition().
|
private |
Map of partitions and list of it covering addresses indexes
Definition at line 219 of file CSCDQM_Detector.h.
Referenced by Detector(), and NextAddressBoxByPartition().
|
private |
Number of partitions in X axis
Definition at line 213 of file CSCDQM_Detector.h.
Referenced by Detector().
|
private |
Number of partitions in Y axis
Definition at line 216 of file CSCDQM_Detector.h.
Referenced by Detector().
|
private |
Station areas precalculated
Definition at line 210 of file CSCDQM_Detector.h.
Referenced by Area(), and Detector().