CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoTracker/RingMakerESProducer/interface/RingMaker.h

Go to the documentation of this file.
00001 #ifndef RECOTRACKER_RINGMAKER_H
00002 #define RECOTRACKER_RINGMAKER_H
00003 
00004 //
00005 // Package:         RecoTracker/RingMakerESProducer
00006 // Class:           RingMaker
00007 // 
00008 // Description:     The RingMaker object creates and povides
00009 //                  all Rings in the detector.
00010 //
00011 // Original Author: Oliver Gutsche, gutsche@fnal.gov
00012 // Created:         Tue Oct  3 23:51:34 UTC 2006
00013 //
00014 // $Author: gutsche $
00015 // $Date: 2007/03/30 02:49:35 $
00016 // $Revision: 1.2 $
00017 //
00018 
00019 #include <vector>
00020 #include <string>
00021 
00022 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00023 
00024 #include "RecoTracker/RingRecord/interface/Rings.h"
00025 
00026 #include "DataFormats/DetId/interface/DetId.h"
00027 
00028 class RingMaker {
00029  
00030  public:
00031 
00032   RingMaker(const TrackerGeometry *tracker,
00033             std::string configuration);
00034   
00035   ~RingMaker();
00036 
00037   void constructRings();
00038 
00039   void constructTIBRings(unsigned int &index);
00040   void constructTOBRings(unsigned int &index);
00041   void constructTIDRings(unsigned int &index);
00042   void constructTECRings(unsigned int &index);
00043   void constructPXBRings(unsigned int &index);
00044   void constructPXFRings(unsigned int &index);
00045 
00046   Ring constructTIBRing(unsigned int layer,
00047                         unsigned int fw_bw,
00048                         unsigned int ext_int,
00049                         unsigned int detector);
00050   
00051   DetId constructTIBDetId(unsigned int layer,
00052                           unsigned int fw_bw,
00053                           unsigned int ext_int,
00054                           unsigned int string,
00055                           unsigned int detector,
00056                           unsigned int stereo);
00057 
00058   Ring constructTOBRing(unsigned int layer,
00059                         unsigned int rod_fw_bw,
00060                         unsigned int detector);
00061   
00062   DetId constructTOBDetId(unsigned int layer,
00063                           unsigned int rod_fw_bw,
00064                           unsigned int rod,
00065                           unsigned int detector,
00066                           unsigned int stereo);
00067 
00068   Ring constructTIDRing(unsigned int fw_bw,
00069                         unsigned int wheel,
00070                         unsigned int ring);
00071 
00072   DetId constructTIDDetId(unsigned int fw_bw,
00073                           unsigned int wheel,
00074                           unsigned int ring,
00075                           unsigned int detector_fw_bw,
00076                           unsigned int detector,
00077                           unsigned int stereo);
00078 
00079   Ring constructTECRing(unsigned int fw_bw,
00080                         unsigned int wheel,
00081                         unsigned int ring);
00082 
00083   DetId constructTECDetId(unsigned int fw_bw,
00084                           unsigned int wheel,
00085                           unsigned int petal_fw_bw,
00086                           unsigned int petal,
00087                           unsigned int ring,
00088                           unsigned int module,
00089                           unsigned int stereo);
00090 
00091   Ring constructPXBRing(unsigned int layer,
00092                         unsigned int module);
00093 
00094   DetId constructPXBDetId(unsigned int layer,
00095                           unsigned int ladder,
00096                           unsigned int module);
00097 
00098   Ring constructPXFRing(unsigned int fw_bw,
00099                         unsigned int disk,
00100                         unsigned int panel,
00101                         unsigned int module);
00102 
00103   DetId constructPXFDetId(unsigned int fw_bw,
00104                           unsigned int disk,
00105                           unsigned int blade,
00106                           unsigned int panel,
00107                           unsigned int module);
00108 
00109   double determineExtensions(DetId id, 
00110                              float &rmin, float &rmax, 
00111                              float &zmin, float& zmax, 
00112                              Ring::type type);
00113 
00114   void fillTECGeometryArray();
00115   void fillTIBGeometryArray();
00116   void fillTIDGeometryArray();
00117   void fillTOBGeometryArray();
00118   void fillPXBGeometryArray();
00119   void fillPXFGeometryArray();
00120 
00121   inline Rings* getRings() { return rings_;}
00122  
00123   bool dumpDetIdsIntoFile(std::string fileName);
00124   std::string dumpDetIds();
00125 
00126  private:
00127   
00128   const TrackerGeometry *tracker_;
00129 
00130   Rings *rings_;
00131   
00132   int tib_[5][3][3][57][4][3];    // tib[layer][str_fw_bw][str_int_ext][str][module][stereo]
00133   int tob_[7][3][75][7][3];       // tob[layer][rod_fw_bw][rod][module][stereo]
00134   int tid_[3][4][4][3][21][3];    // tid[side][wheel][ring][module_fw_bw][module][stereo]
00135   int tec2_[3][10][8];             // tec2[side][wheel][ring]
00136   int tec_[3][10][3][9][8][21][3]; // tec[side][wheel][petal_fw_bw][petal][ring][module][stereo]
00137   int pxb_[3][44][8];             // pxb[layer][ladder][module]
00138   int pxf_[2][2][24][2][4];       // pxf[side][disk][blade][panel][module]
00139   int pxf2_[2][2][2][4];          // pxf[side][disk][panel][module]
00140 
00141   std::string configuration_;
00142 
00143 };
00144 
00145 #endif