19 #ifdef CSC_RENDER_PLUGIN 71 float y_min =
PhiToY(phi_min);
72 float y_max =
PhiToY(phi_max);
76 float xboxmin = (x_min < x_max ? x_min : x_max);
77 float xboxmax = (x_max > x_min ? x_max : x_min);
78 float yboxmin = (y_min < y_max ? y_min : y_max);
79 float yboxmax = (y_max > y_min ? y_max : y_min);
94 for (
unsigned int x = x1;
x < x2;
x++) {
95 for (
unsigned int y =
y1; y <
y2; y++) {
99 std::vector<unsigned int>
v;
185 if (
boxes[
i].adr == adr) {
375 const unsigned int px,
376 const unsigned int py,
392 if (r > 0.0 || z > 0.0) {
393 float sin_theta = r /
sqrt(r * r + z * z);
394 float cos_theta = z /
sqrt(r * r + z * z);
395 return -
log(sin_theta / (cos_theta + 1));
424 float y_max = 2.0 * 3.14159;
426 float phi_max = 2.0 * 3.14159;
427 float a = (y_max - y_min) / (phi_max - phi_min);
428 float b = (phi_max * y_min - phi_min * y_max) / (phi_max - phi_min);
442 z_csc = (5834.5 + 6101.5) / 2.0;
444 z_csc = (6790.0 + 7064.3) / 2.0;
448 z_csc = (8098.0 + 8346.0) / 2.0;
450 z_csc = (9414.8 + 9166.8) / 2.0;
628 0.0 + 2.0 * 3.14159 / ((
float)(n_chambers)) * ((
float)(
chamber - 1) + (
float)(cfeb - 1) / (
float)(n_cfeb));
647 phi_max_cfeb = 0.0 + 2.0 * 3.14159 / (
float)n_chambers * ((
float)(
chamber - 1) + (
float)(cfeb) / (
float)n_cfeb);
659 std::vector<std::string> tokens;
665 for (
unsigned int r = 0; r <
ADDR_SIZE; r++) {
669 unsigned int num = 0;
const bool NextAddressBox(unsigned int &i, const AddressBox *&box, const Address &mask) const
Address box iterator by mask.
static void splitString(const std::string &str, const std::string &delim, std::vector< std::string > &results)
Split string according to delimiter.
constexpr int32_t ceil(float num)
unsigned int partitions_y
PartitionMap::iterator PartitionMapIterator
unsigned int GlobalChamberIndex(unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
Return global chamber index on his geometric location.
unsigned int partitions_x
const float EtaToX(const float eta) const
Transform eta coordinate to local canvas coordinate.
const float PhiMaxCFEB(const int station, const int ring, const int chamber, const int cfeb) const
Get Max phi boundary for particular CFEB.
Area covered by Address in eta/phy space.
ALPAKA_FN_ACC int side(int ieta, int iphi)
Detector(const unsigned int p_partitions_x=0, const unsigned int p_partitions_y=0)
Constructor.
const bool NextAddressBoxByPartition(unsigned int &i, const unsigned int px, const unsigned int py, AddressBox *&box)
Address box iterator by partition.
#define PARTITION_INDEX(x, y)
static void trimString(std::string &str)
Trim string.
const float Area(const unsigned int station) const
Calculate station area in eta/phi space.
const float Z(const int station, const int ring) const
Get Z parameter (used in address eta/phi calculation)
const float PhiToY(const float phi) const
Transform phi coordinate to local canvas coordinate.
const unsigned int NumberOfChamberCFEBs(const unsigned int station, const unsigned int ring) const
Returns the number of CFEBs per Chamber on given Station/Ring.
const unsigned int NumberOfRings(const unsigned int station) const
Returns the number of rings for the given station.
const float RMaxHV(const int station, const int ring, const int n_hv) const
Get R max parameter (used in address eta/phi calculation)
const float RMinHV(const int station, const int ring, const int n_hv) const
Get R min parameter (used in address eta/phi calculation)
const bool AddressFromString(const std::string &str_address, Address &adr) const
Construct address from string.
const unsigned int NumberOfChambers(const unsigned int station, const unsigned int ring) const
Returns the number of chambers for the given station and ring.
const float PhiMinCFEB(const int station, const int ring, const int chamber, const int cfeb) const
Get Min phi boundary for particular CFEB.
const bool NextAddress(unsigned int &i, const Address *&adr, const Address &mask) const
Address iterator by mask.
void PrintAddress(const Address &adr) const
Prints address for debugging.
Structure to store detector addresses of any granularity: from whole detector to the single HV elemen...
const float Eta(const float r, const float z) const
const unsigned int NumberOfChamberHVs(const unsigned int station, const unsigned int ring) const
Returns the number of HVs per Chamber on given Station/Ring.