Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:40:44

0001 #ifndef Alignment_TrackerAlignment_TrackerNameSpace_H
0002 #define Alignment_TrackerAlignment_TrackerNameSpace_H
0003 
0004 #include "CondFormats/Alignment/interface/Definitions.h"
0005 
0006 class TrackerTopology;
0007 class TrackerAlignmentLevelBuilder;
0008 
0009 namespace align {
0010   class TrackerNameSpace {
0011     /// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
0012     friend class ::TrackerAlignmentLevelBuilder;
0013 
0014   public:
0015     TrackerNameSpace(const TrackerTopology*);
0016 
0017     TrackerNameSpace(const TrackerNameSpace&) = default;
0018     TrackerNameSpace& operator=(const TrackerNameSpace&) = default;
0019     TrackerNameSpace(TrackerNameSpace&&) = default;
0020     TrackerNameSpace& operator=(TrackerNameSpace&&) = default;
0021 
0022     virtual ~TrackerNameSpace() = default;
0023 
0024     class TPB {
0025       /// grant access for the enclosing TrackerNameSpace
0026       friend class TrackerNameSpace;
0027 
0028       /// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
0029       friend class ::TrackerAlignmentLevelBuilder;
0030 
0031     public:
0032       TPB(const TrackerTopology*);
0033       TPB(const TPB&) = default;
0034       TPB& operator=(const TPB&) = default;
0035       TPB(TPB&&) = default;
0036       TPB& operator=(TPB&&) = default;
0037       virtual ~TPB() = default;
0038 
0039       /// Module number increases with z from 1 to 8.
0040       unsigned int moduleNumber(align::ID) const;
0041 
0042       /// Ladder number increases from 1 at the top to 2 * lpqc at the bottom
0043       /// of each half cylinder.
0044       unsigned int ladderNumber(align::ID) const;
0045 
0046       /// Layer number increases with rho from 1 to 3.
0047       unsigned int layerNumber(align::ID) const;
0048 
0049       /// Half barrel number is 1 at left side (-x) and 2 at right side (+x).
0050       unsigned int halfBarrelNumber(align::ID) const;
0051 
0052       /// Barrel number is 1 for all align::ID's which belong to this barrel
0053       unsigned int barrelNumber(align::ID) const;
0054 
0055     private:
0056       const TrackerTopology* trackerTopology_;
0057 
0058       /// Number of ladders for each quarter cylinder.
0059       std::vector<unsigned int> lpqc_;
0060     };
0061 
0062     class TPE {
0063       /// grant access for the enclosing TrackerNameSpace
0064       friend class TrackerNameSpace;
0065 
0066       /// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
0067       friend class ::TrackerAlignmentLevelBuilder;
0068 
0069     public:
0070       TPE(const TrackerTopology*);
0071       TPE(const TPE&) = default;
0072       TPE& operator=(const TPE&) = default;
0073       TPE(TPE&&) = default;
0074       TPE& operator=(TPE&&) = default;
0075       virtual ~TPE() = default;
0076 
0077       /// Module number increases with rho; from 1 to 4.
0078       unsigned int moduleNumber(align::ID) const;
0079 
0080       /// Panel number is 1 for 4 modules, 2 for 3 modules.
0081       unsigned int panelNumber(align::ID) const;
0082 
0083       /// Blade number increases from 1 at the top to 12 at the bottom
0084       /// of each half disk.
0085       unsigned int bladeNumber(align::ID) const;
0086 
0087       /// Half disk number increases with |z| from 1 to 3.
0088       unsigned int halfDiskNumber(align::ID) const;
0089 
0090       /// Half cylinder number is 1 at left side (-x) and 2 at right side (+x).
0091       unsigned int halfCylinderNumber(align::ID) const;
0092 
0093       /// Endcap number is 1 for -z and 2 for +z.
0094       unsigned int endcapNumber(align::ID) const;
0095 
0096     private:
0097       const TrackerTopology* trackerTopology_;
0098 
0099       /// no. of blades per quarter disk
0100       unsigned int bpqd_;
0101     };
0102 
0103     class TIB {
0104       /// grant access for the enclosing TrackerNameSpace
0105       friend class TrackerNameSpace;
0106 
0107       /// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
0108       friend class ::TrackerAlignmentLevelBuilder;
0109 
0110     public:
0111       TIB(const TrackerTopology*);
0112       TIB(const TIB&) = default;
0113       TIB& operator=(const TIB&) = default;
0114       TIB(TIB&&) = default;
0115       TIB& operator=(TIB&&) = default;
0116       virtual ~TIB() = default;
0117 
0118       /// Module number increases with |z| from 1 to 3.
0119       unsigned int moduleNumber(align::ID) const;
0120 
0121       /// String number increases with |phi| from right (1) to left (sphs)
0122       /// of each half shell.
0123       unsigned int stringNumber(align::ID) const;
0124 
0125       /// Surface number is 1 for inner and 2 for outer.
0126       unsigned int surfaceNumber(align::ID) const;
0127 
0128       /// Half shell number is 1 for bottom (-y) and 2 for top (+y).
0129       unsigned int halfShellNumber(align::ID) const;
0130 
0131       /// Layer number increases with rho from 1 to 8.
0132       unsigned int layerNumber(align::ID) const;
0133 
0134       /// Half barrel number is 1 at -z side and 2 at +z side.
0135       unsigned int halfBarrelNumber(align::ID) const;
0136 
0137       /// Barrel number is 1 for all align::ID's which belong to this barrel
0138       unsigned int barrelNumber(align::ID) const;
0139 
0140     private:
0141       const TrackerTopology* trackerTopology_;
0142 
0143       /// Number of strings for each surface of a half shell.
0144       std::vector<unsigned int> sphs_;
0145     };
0146 
0147     class TOB {
0148       /// grant access for the enclosing TrackerNameSpace
0149       friend class TrackerNameSpace;
0150 
0151       /// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
0152       friend class ::TrackerAlignmentLevelBuilder;
0153 
0154     public:
0155       TOB(const TrackerTopology*);
0156       TOB(const TOB&) = default;
0157       TOB& operator=(const TOB&) = default;
0158       TOB(TOB&&) = default;
0159       TOB& operator=(TOB&&) = default;
0160       virtual ~TOB() = default;
0161 
0162       /// Module number increases with |z| from 1 to 6.
0163       unsigned int moduleNumber(align::ID) const;
0164 
0165       /// Rod number increases with phi.
0166       unsigned int rodNumber(align::ID) const;
0167 
0168       /// Layer number increases with rho from 1 to 6.
0169       unsigned int layerNumber(align::ID) const;
0170 
0171       /// HalfBarrel number is 1 at -z side and 2 at +z side.
0172       unsigned int halfBarrelNumber(align::ID) const;
0173 
0174       /// Barrel number is 1 for all align::ID's which belong to this barrel
0175       unsigned int barrelNumber(align::ID) const;
0176 
0177     private:
0178       const TrackerTopology* trackerTopology_;
0179     };
0180 
0181     class TID {
0182       /// grant access for the enclosing TrackerNameSpace
0183       friend class TrackerNameSpace;
0184 
0185       /// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
0186       friend class ::TrackerAlignmentLevelBuilder;
0187 
0188     public:
0189       TID(const TrackerTopology*);
0190       TID(const TID&) = default;
0191       TID& operator=(const TID&) = default;
0192       TID(TID&&) = default;
0193       TID& operator=(TID&&) = default;
0194       virtual ~TID() = default;
0195 
0196       /// Module number increases with phi.
0197       unsigned int moduleNumber(align::ID) const;
0198 
0199       /// Side number is 1 for back ring and 2 for front (towards IP).
0200       unsigned int sideNumber(align::ID) const;
0201 
0202       /// Ring number increases with rho from 1 to 3.
0203       unsigned int ringNumber(align::ID) const;
0204 
0205       /// Disk number increases with |z| from 1 to 3.
0206       unsigned int diskNumber(align::ID) const;
0207 
0208       /// Endcap number is 1 at -z side and 2 at +z side.
0209       unsigned int endcapNumber(align::ID) const;
0210 
0211     private:
0212       const TrackerTopology* trackerTopology_;
0213     };
0214 
0215     class TEC {
0216       /// grant access for the enclosing TrackerNameSpace
0217       friend class TrackerNameSpace;
0218 
0219       /// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
0220       friend class ::TrackerAlignmentLevelBuilder;
0221 
0222     public:
0223       TEC(const TrackerTopology*);
0224       TEC(const TEC&) = default;
0225       TEC& operator=(const TEC&) = default;
0226       TEC(TEC&&) = default;
0227       TEC& operator=(TEC&&) = default;
0228       virtual ~TEC() = default;
0229 
0230       /// Module number increases (decreases) with phi for +z (-z) endcap.
0231       unsigned int moduleNumber(align::ID) const;
0232 
0233       /// Ring number increases with rho.
0234       unsigned int ringNumber(align::ID) const;
0235 
0236       /// Petal number increases with phi from 1 to 8.
0237       unsigned int petalNumber(align::ID) const;
0238 
0239       /// Side number is 1 for back disk and 2 for front (towards IP).
0240       unsigned int sideNumber(align::ID) const;
0241 
0242       /// Disk number increases with |z| from 1 to 9.
0243       unsigned int diskNumber(align::ID) const;
0244 
0245       /// Endcap number is 1 at -z side and 2 at +z side.
0246       unsigned int endcapNumber(align::ID) const;
0247 
0248     private:
0249       const TrackerTopology* trackerTopology_;
0250     };
0251 
0252     const TrackerTopology* trackerTopology() const { return trackerTopology_; }
0253     const TPB& tpb() const { return tpb_; }
0254     const TPE& tpe() const { return tpe_; }
0255     const TIB& tib() const { return tib_; }
0256     const TOB& tob() const { return tob_; }
0257     const TID& tid() const { return tid_; }
0258     const TEC& tec() const { return tec_; }
0259 
0260   private:
0261     const TrackerTopology* trackerTopology_;
0262     TPB tpb_;
0263     TPE tpe_;
0264     TIB tib_;
0265     TOB tob_;
0266     TID tid_;
0267     TEC tec_;
0268   };
0269 };     // namespace align
0270 #endif /* Alignment_TrackerAlignment_TrackerNameSpace_H */