CMS 3D CMS Logo

VisCuTracker.h

Go to the documentation of this file.
00001 #ifndef VIS_CUTRACKER_VIS_TRACKER_H
00002 # define VIS_CUTRACKER_VIS_TRACKER_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 # include "Iguana/Framework/interface/IgTwig.h"
00006 # include "FWCore/Framework/interface/ESHandle.h"
00007 //# include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00008 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00009 #include "VisReco/VisRecoGeometry/interface/VisTrackingGeometry.h"
00010 # include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00011 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00012 #include "DataFormats/SiStripDetId/interface/TIBDetId.h"
00013 #include "DataFormats/SiStripDetId/interface/TOBDetId.h"
00014 #include "DataFormats/SiStripDetId/interface/TECDetId.h"
00015 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00016 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
00017 #include "DataFormats/SiPixelDetId/interface/PXBDetId.h"
00018 #include "DataFormats/SiPixelDetId/interface/PXFDetId.h"
00019 
00020 #include <string>
00021 #include <iostream>  
00022 #include <fstream>
00023 #include <sstream>
00024 
00025 
00026 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00027 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00028 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00029 
00030 class GeomDetUnit;
00031 class SbVec3f;
00032 class SoSeparator;
00033 
00034 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00035 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00036 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00037 
00038 class VisCuTracker
00039 {
00040 public:
00041     VisCuTracker (void);
00042     // implicit copy constructor
00043     // implicit assignment operator
00044     // implicit destructor
00045 
00046 //    enum DetectorRep { FullDet, RZDet, RPhiDet };
00047     SoSeparator        *buildDet (VisTrackingGeometry::DetectorRep type, TrackerGeometry* pDD, int subDetector);
00048     int                 subDetector (const std::string &key);
00049 
00050 static int nlayer(int det,int part,int lay){
00051     if(det==3 && part==1) return lay;
00052     if(det==2 && part==1) return lay+9;
00053     if(det==1 && part==1) return lay+12;
00054     if(det==1 && part==3) return lay+15;
00055     if(det==2 && part==3) return lay+18;
00056     if(det==3 && part==3) return lay+21;
00057     if(det==1 && part==2) return lay+30;
00058     if(det==2 && part==2) return lay+33;
00059     if(det==3 && part==2) return lay+37;
00060   return -1;
00061   }
00062 static  std::string getModuleName(DetId detid1){
00063   std::ostringstream outs;
00064   std::string name0,name1,name2;
00065   switch( detid1.subdetId())
00066     {
00067     case PixelSubdetector::PixelBarrel:
00068       {
00069       PXBDetId detid(detid1);  
00070       outs <<detid<<" "<<detid1.rawId();
00071      break;
00072      }
00073 
00074     case PixelSubdetector::PixelEndcap:
00075       {
00076       PXFDetId detid(detid1);  
00077       outs <<detid<<" "<<detid1.rawId();
00078      break;
00079      }
00080 
00081     case StripSubdetector::TIB: 
00082       {
00083       TIBDetId detid(detid1);  
00084       outs <<detid;
00085      break;
00086      }
00087 
00088     case StripSubdetector::TID: 
00089       {
00090       TIDDetId detid(detid1);  
00091       outs <<detid;
00092      break;
00093      }
00094 
00095     case StripSubdetector::TOB: 
00096       {
00097       TOBDetId detid(detid1);  
00098       outs <<detid;
00099      break;
00100      }
00101 
00102     case StripSubdetector::TEC: 
00103       {
00104       TECDetId detid(detid1);  
00105       outs <<detid;
00106      break;
00107      }
00108 
00109      }
00110   return outs.str();
00111     
00112 }
00113 
00114 private:
00115     bool                visible (const GlobalPoint & point, VisTrackingGeometry::DetectorRep type, int subDetector);
00116 };
00117 
00118 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00119 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00120 
00121 #endif // VIS_CUTRACKER_VIS_TRACKER_H

Generated on Tue Jun 9 17:50:12 2009 for CMSSW by  doxygen 1.5.4