Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 
002 #include "MuonGeoModel/Csc.h"
003 #include "MuonGeoModel/CSC_Technology.h"
004 #include "MuonGeoModel/Station.h"
005 #include "MuonGeoModel/CscComponent.h"
006 #include "MuonGeoModel/DetectorElement.h"
007 #include "MuonGeoModel/CscMultiLayer.h"
008 #include "MuonGeoModel/Cutout.h"
009 #include "GeoModelKernel/GeoFullPhysVol.h"
010 #include "GeoModelKernel/GeoBox.h"
011 #include "GeoModelKernel/GeoTrd.h"
012 #include "GeoModelKernel/GeoLogVol.h"
013 #include "GeoModelKernel/GeoMaterial.h"
014 #include "GeoModelKernel/GeoNameTag.h"
015 #include "GeoModelKernel/GeoShapeShift.h"
016 #include "GeoModelKernel/GeoShapeSubtraction.h"
017 #include "GeoModelKernel/GeoShapeUnion.h"
018 #include <cassert>
019 // for cutouts:
020 #include "GeoModelKernel/GeoShapeIntersection.h"
021 
022 #define skip_csc false
023 
024 namespace MuonGM {
025 
026 Csc::Csc(Component* ss): DetectorElement(ss->name)
027 {
028   CscComponent* s = (CscComponent*)ss;
029   width = s->dx1;
030   longWidth = s->dx2;
031   thickness = s->GetThickness();
032   maxwLength = s->maxwdy;
033   excent=s->excent;
034   physicalLength = s->dy;
035   length = physicalLength;
036   double num = longWidth*(excent - physicalLength);
037   if (fabs(num) < 1e-10) {
038     upWidth = 0;
039   } else {
040     upWidth = num/(excent-maxwLength);
041   }
042 
043   layer = new CscMultiLayer(s->name);
044   layer->width = width;
045   layer->longWidth = longWidth;
046   layer->upWidth = upWidth;
047   layer->excent = excent;
048   layer->length = length;
049   layer->physicalLength = physicalLength;
050   layer->maxwLength = maxwLength;
051   
052   index = s->index;
053 }
054 
055 
056 Csc::~Csc()
057 {
058   delete layer;
059   layer = 0;
060 }
061 
062 
063 GeoFullPhysVol *Csc::build(int minimalgeo)
064 {
065   std::vector<Cutout*> vcutdef;
066   int cutoutson = 0;
067   return build(minimalgeo, cutoutson, vcutdef);
068 }
069 
070 
071 GeoFullPhysVol*
072 Csc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef)
073 {
074   GeoFullPhysVol* pcsc   = NULL;
075   GeoLogVol* lcsc   = NULL;
076   const GeoMaterial* mcsc = matManager->getMaterial("std::Air");
077 
078   if (excent == length) {
079     // CSC is a simple traezoid 
080     const GeoShape* sCSS = new GeoTrd(thickness/2.,thickness/2.,
081                                       width/2.,longWidth/2.,length/2.);
082     lcsc = new GeoLogVol(logVolName, sCSS, mcsc);
083 
084   } else {
085     // CSC is a union of two trapezoids 
086     GeoTrd* downTrd = new GeoTrd(thickness/2., thickness/2., width/2., 
087                                  longWidth/2.,  maxwLength/2.);
088     GeoTrd* upTrd = new GeoTrd(thickness/2., thickness/2., longWidth/2., 
089                                  upWidth/2., (physicalLength-maxwLength)/2.);
090     const GeoShape* sCSL =
091       & ( (downTrd->add( (*upTrd) << HepTranslateZ3D(physicalLength/2.) ) ) 
092       << HepTranslateZ3D((maxwLength - physicalLength)/2.) );
093     lcsc = new GeoLogVol(logVolName, sCSL, mcsc);
094   }
095 
096   pcsc = new GeoFullPhysVol(lcsc);
097   if (minimalgeo == 1) return pcsc;
098     
099   GeoVPhysVol* lay = layer->build(cutoutson, vcutdef);
100   if (!skip_csc) pcsc->add(lay);
101   
102   return pcsc;  
103 }
104 
105 
106 void Csc::print()
107 {
108   std::cout << " Csc:: Csc " << name << " : " << std::endl;
109 }
110 
111 } // namespace MuonGM
112 

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!