ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/src/OpenGLDisplayer.cc
(Generate patch)

Comparing UserCode/FastOpenGlDisplayer/src/OpenGLDisplayer.cc (file contents):
Revision 1.3 by querten, Mon Mar 17 06:26:31 2008 UTC vs.
Revision 1.4 by querten, Tue Mar 18 10:52:55 2008 UTC

# Line 126 | Line 126 | OpenGLDisplayer::beginJob(const edm::Eve
126  
127     for(unsigned int i=0;i<Det.size();i++){
128        DetId  Detid  = Det[i]->geographicalId();
129 <      int    SubDet = Detid.subdetId();
130 <  
131 <      StripGeomDetUnit* DetUnit     = dynamic_cast<StripGeomDetUnit*> (Det[i]);
129 > //      int    SubDet = Detid.subdetId();
130 >  
131 >      GeomDet* DetUnit = Det[i];
132 > //      StripGeomDetUnit* DetUnit     = dynamic_cast<StripGeomDetUnit*> (Det[i]);
133        if(!DetUnit)continue;
134  
135 +      const BoundPlane plane = DetUnit->surface();
136 +      float width     = DetUnit->surface().bounds().width();
137 +      float length    = DetUnit->surface().bounds().length();
138 +      float thickness = DetUnit->surface().bounds().thickness();
139 +
140 +      Surface::GlobalPoint WidthVector  = plane.toGlobal( LocalPoint(width/2, 0, 0) );
141 +      Surface::GlobalPoint LengthVector = plane.toGlobal( LocalPoint(0, length/2, 0) );
142 +      Surface::GlobalPoint ThickVector  = plane.toGlobal( LocalPoint(0, 0, thickness/2) );
143 +
144 +
145        GlobalVector Pos =  GlobalVector(DetUnit->position().basicVector());
146  
147 <      Geom->Add_TrackerDet(SubDet,Pos.x(),Pos.y(),Pos.z(),Detid.rawId());
147 >      Geom->Add_TrackerDet(Detid.rawId(),
148 >                           Pos.x(),                  Pos.y(),                  Pos.z(),
149 >                           WidthVector.x() -Pos.x(), WidthVector.y() -Pos.y(), WidthVector.z() -Pos.z(),
150 >                           LengthVector.x()-Pos.x(), LengthVector.y()-Pos.y(), LengthVector.z()-Pos.z(),
151 >                           ThickVector.x() -Pos.x(), ThickVector.y() -Pos.y(), ThickVector.z() -Pos.z());
152     }
153     Geom->Save("Tracker.geom");    
154  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines