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 "GeoModelKernel/GeoTrd.h"
003 #include "GeoModelKernel/GeoShapeShift.h"
004 #include "GeoModelKernel/GeoShapeUnion.h"
005 #include "GeoModelKernel/GeoPhysVol.h"
006 #include "GeoModelKernel/GeoMaterial.h"
007 #include "GeoModelKernel/GeoNameTag.h"
008 #include "GeoModelKernel/GeoTransform.h"
009 #include "GeoModelKernel/GeoIdentifierTag.h"
010 #include "MuonGeoModel/MYSQL.h"
011 #include "MuonGeoModel/Csc.h"
012 #include "MuonGeoModel/CSC_Technology.h"
013 #include "MuonGeoModel/CscMultiLayer.h"
014 #include "MuonGeoModel/Cutout.h"
015 
016 #include <vector>
017 // for cutouts:
018 #include "GeoModelKernel/GeoShapeSubtraction.h"
019 
020 namespace MuonGM {
021 
022 CscMultiLayer::CscMultiLayer(std::string n): DetectorElement(n)
023 {
024   MYSQL* amdb = MYSQL::GetPointer();    
025   CSC* md =(CSC*)amdb->GetTechnology(name);
026   nrOfLayers = md->numOfLayers;
027   cscthickness = md->totalThickness;
028   thickness = cscthickness;
029 }
030 
031 GeoVPhysVol* CscMultiLayer::build()
032 {
033   std::vector<Cutout*> vcutdef;
034   int cutoutson = 0;
035   return build(cutoutson, vcutdef);
036 }
037 
038 GeoVPhysVol*
039 CscMultiLayer::build(int /*cutoutson*/, std::vector<Cutout*> /*vcutdef*/)
040 {
041   MYSQL* amdb = MYSQL::GetPointer();    
042   CSC* md = (CSC*)amdb->GetTechnology(name);
043   
044 //   std::cout<<" Building a CSCMultilayer ... Name, Thickness, NwLayers, total techn. thickness = "
045 //            <<name<<" "
046 //            <<thickness<<" "
047 //            <<nrOfLayers<<" "
048 //            <<md->totalThickness<<std::endl;
049 //   std::cout<<" all standard dimensions:  width "<<width<<" "<<longWidth<<" "<<upWidth<<std::endl;
050 //   std::cout<<" all standard dimensions: length "<<length<<" "<<maxwLength<<" "<<physicalLength<<" "<<excent<<std::endl;
051   
052   // define the chamber volumes --- for CSS and CSL
053 
054   //-------------internal CSC layer structure-------------4 layers ------       
055   
056   // The dimensions of the panel
057   double hon_thick=md->honeycombthick;
058   double gasThickness=2.0*md->anocathodist;
059   double newpos=cscthickness/2.;        
060   double g10thi = (2.*md->g10thick+md->honeycombthick);
061   
062   // define the volumes
063   // g10, honeycomb, and the gas
064   // gas mixture: 80% Ar + 20% CO2:
065   // at 1 atmosphere, 20 deg. Celcius:
066   // density Ar = 1.699 g cm-3
067   // density CO2 = 1.902 g cm-3
068   // density of mixture = 0.8 d1 + 0.2 d2 = 1.740 gcm-3
069 
070   // Create CSC layer envelope made of air
071   const GeoShape* sml = new GeoTrd(thickness/2., thickness/2., width/2., 
072                                    longWidth/2., maxwLength/2.);
073   if (excent != length) {
074     const GeoShape* smlt = new GeoTrd(thickness/2., thickness/2., longWidth/2.,
075                                       upWidth/2., (physicalLength-maxwLength)/2.);
076     sml = & ( (sml->add( (*smlt) << HepTranslateZ3D(physicalLength/2.) ) )
077               << HepTranslateZ3D((maxwLength - physicalLength)/2.) );
078   }
079 //  const GeoMaterial* mair = matManager->getMaterial("std::Air");
080   const GeoMaterial* mhon = matManager->getMaterial("muo::Honeycomb");
081   const GeoLogVol* lml = new GeoLogVol("CscMultilayer",sml,mhon);
082   GeoPhysVol* pml = new GeoPhysVol(lml);
083 
084   // Create G10 and honeycomb volumes
085   const GeoShape* shon = new GeoTrd(hon_thick/2., hon_thick/2., width/2., 
086                                     longWidth/2., maxwLength/2.);
087   const GeoShape* sg10hon = new GeoTrd(g10thi/2., g10thi/2., width/2., 
088                                        longWidth/2., maxwLength/2.);
089   if (excent != length) {
090     const GeoShape* shont = new GeoTrd(hon_thick/2., hon_thick/2., longWidth/2., 
091                                        upWidth/2., (physicalLength-maxwLength)/2.);
092     shon = &( (shon->add( (*shont) << HepTranslateZ3D(physicalLength/2.) ) )
093              << HepTranslateZ3D((maxwLength - physicalLength)/2.) );
094     const GeoShape* sg10hont = new GeoTrd(g10thi/2., g10thi/2., longWidth/2., 
095                                           upWidth/2., (physicalLength-maxwLength)/2.);
096     sg10hon = &( (sg10hon->add( (*sg10hont) << HepTranslateZ3D(physicalLength/2.) ) )
097              << HepTranslateZ3D((maxwLength - physicalLength)/2.) );
098   }
099 //  const GeoMaterial* mhon = matManager->getMaterial("muo::Honeycomb");
100   const GeoLogVol* lhon = new GeoLogVol("Honeycomb",shon,mhon);
101   GeoPhysVol* phon = new GeoPhysVol(lhon);
102 
103   const GeoMaterial* mg10 = matManager->getMaterial("std::G10");
104   const GeoLogVol* lg10hon = new GeoLogVol("G10",sg10hon,mg10);
105   GeoPhysVol* pg10hon = new GeoPhysVol(lg10hon);
106   // Put honeycomb inside G10 
107   pg10hon->add(phon);
108 
109   // Create gas volume
110   const GeoShape* sgas = NULL;
111   double beta = atan((longWidth-width)/(2.*maxwLength) );
112   double gShortWidth = width - 2*md->fullwirefixbarwidth*
113                        (1-sin(beta))/cos(beta);
114   double gLongWidth = longWidth - 2*md->fullwirefixbarwidth*
115                       (1+sin(beta))/cos(beta);
116   if (excent == length) {
117     double gLength = maxwLength - 2*md->fullwirefixbarwidth;
118     sgas = new GeoTrd(gasThickness/2.,gasThickness/2.,
119                       gShortWidth/2.,gLongWidth/2.,gLength/2.);
120   } else {
121     double alpha = atan((excent-maxwLength)/(longWidth/2.) );
122     double gmaxwLength = maxwLength - md->fullwirefixbarwidth;
123     double gLength = length - 2.*md->fullwirefixbarwidth;
124     double gupWidth = upWidth - 2*md->fullwirefixbarwidth*
125                       (1-cos(alpha))/sin(alpha);
126 
127     sgas = new GeoTrd(gasThickness/2., gasThickness/2.,
128                       gShortWidth/2., gLongWidth/2., gmaxwLength/2.);
129     const GeoShape* sgast = new GeoTrd(gasThickness/2.,gasThickness/2., gLongWidth/2.,
130                                        gupWidth/2., (gLength-gmaxwLength)/2.);
131     sgas = &( (sgas->add( (*sgast) << HepTranslateZ3D(gLength/2.) ) )
132                << HepTranslateZ3D((gmaxwLength - gLength)/2.) );
133   }
134   const GeoMaterial* mgas = matManager->getMaterial("muo::CscArCO2");
135   const GeoLogVol* lgas = NULL;
136 
137   // Place G10/honeycomb and gas volumes in CSC envelop, starting at top
138   //   G10 - gas - G10 - gas - G10 - gas - G10 - gas - G10
139   for (int i = 0; i < nrOfLayers+1; i++) {
140 
141     GeoNameTag* np = new GeoNameTag("panel");
142     GeoTransform* xp = new GeoTransform(HepTranslateX3D(newpos-g10thi/2.));
143     pml->add(new GeoIdentifierTag(i));
144     pml->add(np);
145     pml->add(xp);
146     pml->add(pg10hon);
147     newpos -= g10thi;
148       
149     if (i < nrOfLayers) {
150       lgas = new GeoLogVol("CscArCO2", sgas, mgas);
151       GeoPhysVol* pgas = new GeoPhysVol(lgas);
152       // the gas Gap 
153       // correct the position within the chamber
154       GeoNameTag* ng = new GeoNameTag("CscArCO2");
155       GeoTransform* xg = new GeoTransform(HepTranslateX3D(newpos-gasThickness/2.));
156       pml->add(new GeoIdentifierTag(i));
157       pml->add(ng);
158       pml->add(xg);
159       pml->add(pgas);
160       newpos -= gasThickness;
161     }
162   }
163   
164   return pml;   
165 }
166 
167 void CscMultiLayer::print()
168 {
169   std::cout << "CscMulti Layer:: CscMulti Layer " << name << " :" << std::endl;
170 }
171 
172 } // namespace MuonGM
173 

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!