19 #ifndef CSCDQM_Detector_H
20 #define CSCDQM_Detector_H
30 #ifdef CSC_RENDER_PLUGIN
54 #define N_ELEMENTS 9540
61 #define PARTITION_INDEX(x, y) (x * partitions_y + y)
62 #define PARTITION_STEP_X (5.0 / partitions_x)
63 #define PARTITION_STEP_Y ((2.0 * 3.14159) / partitions_y)
121 std::ostringstream oss;
124 oss <<
"_Side" << (
side == 1 ?
"Plus" :
"Minus");
126 oss <<
"_Station" << std::setfill(
'0') << std::setw(2) <<
station;
128 oss <<
"_Ring" << std::setfill(
'0') << std::setw(2) <<
ring;
130 oss <<
"_Chamber" << std::setfill(
'0') << std::setw(2) <<
chamber;
132 oss <<
"_Layer" << std::setfill(
'0') << std::setw(2) <<
layer;
134 oss <<
"_CFEB" << std::setfill(
'0') << std::setw(2) <<
cfeb;
136 oss <<
"_HV" << std::setfill(
'0') << std::setw(2) <<
hv;
160 typedef std::map<const unsigned int, std::vector<unsigned int> >
PartitionMap;
171 Detector(
const unsigned int p_partitions_x = 0,
const unsigned int p_partitions_y = 0);
177 const unsigned int px,
178 const unsigned int py,
181 const float Area(
const unsigned int station)
const;
187 const unsigned int NumberOfRings(
const unsigned int station)
const;
189 const unsigned int NumberOfChamberCFEBs(
const unsigned int station,
const unsigned int ring)
const;
190 const unsigned int NumberOfChamberHVs(
const unsigned int station,
const unsigned int ring)
const;
192 unsigned int station,
194 unsigned int chamber)
const;
197 const float Eta(
const float r,
const float z)
const;
198 const float EtaToX(
const float eta)
const;
199 const float PhiToY(
const float phi)
const;
200 const float Z(
const int station,
const int ring)
const;
201 const float RMinHV(
const int station,
const int ring,
const int n_hv)
const;
202 const float RMaxHV(
const int station,
const int ring,
const int n_hv)
const;
203 const float PhiMinCFEB(
const int station,
const int ring,
const int chamber,
const int cfeb)
const;
204 const float PhiMaxCFEB(
const int station,
const int ring,
const int chamber,
const int cfeb)
const;
Detector geometry and addressing related imformation and routines.
const bool AddressFromString(const std::string &str_address, Address &adr) const
Construct address from string.
unsigned int partitions_y
PartitionMap::iterator PartitionMapIterator
const float Area(const unsigned int station) const
Calculate station area in eta/phi space.
const bool NextAddressBox(unsigned int &i, const AddressBox *&box, const Address &mask) const
Address box iterator by mask.
friend std::ostream & operator<<(std::ostream &out, const Address &adr)
const float Z(const int station, const int ring) const
Get Z parameter (used in address eta/phi calculation)
unsigned int partitions_x
void PrintAddress(const Address &adr) const
Prints address for debugging.
const float RMinHV(const int station, const int ring, const int n_hv) const
Get R min parameter (used in address eta/phi calculation)
Area covered by Address in eta/phy space.
const unsigned int NumberOfRings(const unsigned int station) const
Returns the number of rings for the given station.
std::map< const unsigned int, std::vector< unsigned int > > PartitionMap
Detector(const unsigned int p_partitions_x=0, const unsigned int p_partitions_y=0)
Constructor.
Mask of the address which is used to switch on and off appropriate Address fields.
const float EtaToX(const float eta) const
Transform eta coordinate to local canvas coordinate.
const bool NextAddressBoxByPartition(unsigned int &i, const unsigned int px, const unsigned int py, AddressBox *&box)
Address box iterator by partition.
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 bool NextAddress(unsigned int &i, const Address *&adr, const Address &mask) const
Address iterator by mask.
const unsigned int NumberOfChamberHVs(const unsigned int station, const unsigned int ring) const
Returns the number of HVs per Chamber on given Station/Ring.
const bool operator==(const Address &a) const
const float PhiMinCFEB(const int station, const int ring, const int chamber, const int cfeb) const
Get Min phi boundary for particular CFEB.
const std::string name() const
Get the full name of the address prefixed with CSC_. It is being used by summaryReportContent variabl...
const float Eta(const float r, const float z) const
const float PhiToY(const float phi) const
Transform phi coordinate to local canvas coordinate.
unsigned int GlobalChamberIndex(unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
Return global chamber index on his geometric location.
const unsigned int NumberOfChambers(const unsigned int station, const unsigned int ring) const
Returns the number of chambers for the given station and ring.
Structure to store detector addresses of any granularity: from whole detector to the single HV elemen...
const float PhiMaxCFEB(const int station, const int ring, const int chamber, const int cfeb) const
Get Max phi boundary for particular CFEB.
const float RMaxHV(const int station, const int ring, const int n_hv) const
Get R max parameter (used in address eta/phi calculation)