CMS 3D CMS Logo

Point5MaterialMap.cc File Reference

#include <iostream>
#include "GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonParameters.h"

Go to the source code of this file.

Functions

int inAirAfterPlug (double vx, double vy, double vz)
int inClayAfterWall (double vx, double vy, double vz)
int inClayOrRockAfterWall (double vx, double vy, double vz)
int inMat (double vx, double vy, double vz, double PlugVx=PlugOnShaftVx, double PlugVz=PlugOnShaftVz)
int inPlug (double vx, double vy, double vz, double PlugVx=PlugOnShaftVx, double PlugVz=PlugOnShaftVz)
int inRockAfterClay (double vx, double vy, double vz)
int inWallAfterAir (double vx, double vy, double vz)


Function Documentation

int inAirAfterPlug ( double  vx,
double  vy,
double  vz 
) [inline]

Definition at line 22 of file Point5MaterialMap.cc.

References Air, funct::sqrt(), SurfaceOfEarth, Unknown, and Z_PX56.

Referenced by inMat().

00022                                                            {
00023   // particles above surface of earth
00024   if (vy >= SurfaceOfEarth) return Air;
00025   
00026   // CMS cavern (UXC 55)
00027   if (fabs(vz) < 26548. && sqrt((vx*1.1576)*(vx*1.1576) + vy*vy) < 15460. &&
00028       vy > -8762) return Air;
00029   
00030   // access shaft (PX 56)
00031   if (vy > 0. && vy < (SurfaceOfEarth-2250.) && 
00032       sqrt(vx*vx + (vz-Z_PX56)*(vz-Z_PX56)) < 10250.) return Air;
00033   
00034   //surface hall ground floor
00035   if (vy >= SurfaceOfEarth-2250. && vy < SurfaceOfEarth) {
00036     if (sqrt(vx*vx + (vz-Z_PX56)*(vz-Z_PX56)) < 10250.
00037         && vz-Z_PX56 > -7000. && vz-Z_PX56 < 7000.) return Air;
00038     if (vx > -2400. && vx < 2400. && vz-Z_PX56 >= -9800. && vz-Z_PX56 < -7000. )
00039       return Air;
00040   }
00041   
00042     // Shaft (PM 54)
00043   if (vy > 3233. && vy < (SurfaceOfEarth) && 
00044       sqrt((vx-26600.)*(vx-26600.) + (vz-30100.-Z_PX56)*(vz-30100.-Z_PX56)) < 6050.)
00045     //sqrt((vx-5000.)*(vx-5000.) + (vz-30100.-Z_PX56)*(vz-30100.-Z_PX56)) < 10050.)//@@@@@
00046     return Air;
00047   
00048   
00049   // Shaft (PM 56)
00050   if (vy > -3700. && vy < (SurfaceOfEarth) &&
00051       sqrt((vx-18220.)*(vx-18220.) + (vz+24227.-Z_PX56)*(vz+24227.-Z_PX56)) < 3550.)
00052       return Air;
00053   
00054   //Service cavern USC 55
00055   if (vz > -22050. && vz < 62050. &&
00056       sqrt((vx-29550.)*(vx-29550.) + (vy-3233.)*(vy-3233.)) < 9050. && 
00057       vy > -3650.) return Air;
00058   
00059   //UXC55 cavern endcap beam openings
00060   if (((vz >= -29278. && vz < -26548.) || (vz >= 26548 && vz <= 29278.)) &&
00061       sqrt(vy*vy + vx*vx) < 800.) return Air; 
00062   
00063   //Pillar access between CMS collision cavern and service cavern
00064   if (vx > 10000. && vx < 20500.+3050. && //TX54 galerie
00065       vz > 14460. && vz < 16260. &&//estimated wall thickness 1m
00066       vy > -8680. && vy < -1507.) return Air;
00067   
00068   if (vx > 10000. && vx < 16500. && //TX54 galerie 30.9 degree opening to UXC55
00069       vy > -8680. && vy < -1507. && //@vx=13300 delta(vz)=1865., 2vx=1650. delta(vz)=0
00070       vz > 14460.-1865.*(16500.-vx)/(3200.) && vz <= 14460.) return Air;
00071   
00072   if (vx > 13300. && vx < 20500.+3050. && //TX54 galerie
00073       vz > 14460. && vz < 16260. && //estimated wall thickness 1m
00074       vy > -8680. && vy < -1507.) return Air;
00075   
00076   if (vx > 26600-6050. && vx < 20500.+3050. && //TX54 going up in sewrvice cavern
00077       vz > 14460. && vz < 16260. && //estimated wall thickness 1m
00078       vy >= -1507. && vy < 1000.) return Air;
00079   
00080   //R56, LHC beam tunnel East
00081   if (vz > -85000. && vz <= -29278. && //UJ57 junction to UXC55 cavern
00082       sqrt(vy*vy + (vx-350.)*(vx-350.)) < 1900. &&
00083       vy > -1000.) return Air;
00084   
00085   //R54, LHC beam tunnel West
00086   if (vz >= 29278. && vz < 63000. && //UJ57 junction to UXC55 cavern
00087       sqrt(vy*vy + (vx-350.)*(vx-350.)) < 1900. &&
00088       vy > -1000.) return Air;
00089   
00090   //UJ56 cavern
00091   if (vz > -58875. && vz < -33927. &&
00092       sqrt(vy*vy + (vx-4450.)*(vx-4450.)) < 6750. && vy > -1000. && //and beam shielding
00093       !(vx > 2250. && vx < 4250. && (vz > -(33927.+18000.) || vz < -(33927.+19500.))) && 
00094       !(vx >= 4250. && vx < 6650. && vz > -(33927.+18000.) && vz < -(33927.+16000.)))
00095     return Air;
00096   
00097   //connection between PM56 shaft and UJ56 cavern
00098   if (vx > 9000. && vx < 18220. &&
00099       sqrt((vy-50.)*(vy-50.)+(vz+24227.-Z_PX56)*(vz+24227.-Z_PX56)) < 3550.
00100       && vy > -1000.) return Air;
00101   
00102   return Unknown;
00103   
00104 }

int inClayAfterWall ( double  vx,
double  vy,
double  vz 
) [inline]

Definition at line 207 of file Point5MaterialMap.cc.

References Clay, ClayWidth, SurfaceOfEarth, and Unknown.

00207                                                             {
00208   
00209   //So, it is not plug, air and wall, Check for clay
00210   if (vy >= SurfaceOfEarth - ClayWidth && vy < SurfaceOfEarth)
00211     return Clay;
00212   
00213   return Unknown;
00214   
00215 }

int inClayOrRockAfterWall ( double  vx,
double  vy,
double  vz 
) [inline]

Definition at line 191 of file Point5MaterialMap.cc.

References Clay, ClayWidth, Rock, SurfaceOfEarth, and Unknown.

00191                                                                   {
00192   
00193   //So, it is not plug, air and wall, Check for clay
00194   if (vy >= SurfaceOfEarth - ClayWidth && vy < SurfaceOfEarth)
00195     return Clay;
00196   
00197   //So, it is not plug, air, wall and clay, Check for rock
00198   if (vy < SurfaceOfEarth - ClayWidth)
00199     return Rock;
00200   
00201   return Unknown;
00202   
00203 }

int inMat ( double  vx,
double  vy,
double  vz,
double  PlugVx = PlugOnShaftVx,
double  PlugVz = PlugOnShaftVz 
) [inline]

Definition at line 233 of file Point5MaterialMap.cc.

References Air, Clay, ClayWidth, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), inAirAfterPlug(), inPlug(), inWallAfterAir(), Plug, Rock, SurfaceOfEarth, Unknown, and Wall.

Referenced by SingleParticleEvent::propagate().

00234                                                                                {
00235   
00236   //check for Plug
00237   if (inPlug(vx, vy, vz, PlugVx, PlugVz)) return Plug;
00238   
00239   //So, it is not plug, Check for air
00240   if (inAirAfterPlug(vx, vy, vz)) return Air;
00241   
00242   //So, it is not plug and air, Check for wall
00243   if (inWallAfterAir(vx, vy, vz)) return Wall;
00244   
00245   //So, it is not plug, air and wall, Check for clay
00246   if (vy >= SurfaceOfEarth - ClayWidth && vy < SurfaceOfEarth)
00247     return Clay;
00248   
00249   //So, it is not plug, air, wall and clay, Check for rock
00250   if (vy < SurfaceOfEarth - ClayWidth)
00251     return Rock;
00252   
00253   
00254   std::cout << "Point5MaterialMap.h: Warning! No Material recognised for point: vx="
00255             << vx << " vy=" << vy << " vz=" << vz << std::endl;
00256   //Something went wrong
00257   return Unknown;
00258   
00259 }

int inPlug ( double  vx,
double  vy,
double  vz,
double  PlugVx = PlugOnShaftVx,
double  PlugVz = PlugOnShaftVz 
) [inline]

Definition at line 10 of file Point5MaterialMap.cc.

References Plug, PlugNoseXlength, PlugNoseZlength, PlugWidth, PlugXlength, PlugZlength, SurfaceOfEarth, and Unknown.

Referenced by inMat().

00011                                                                                 {
00012   if (vy > SurfaceOfEarth && vy < SurfaceOfEarth + PlugWidth) {
00013     if (vx > PlugVx - PlugXlength/2. && vx < PlugVx + PlugXlength/2. &&
00014         vz > PlugVz - PlugZlength/2. && vz < PlugVz + PlugZlength/2.) return Plug;
00015     if (vz >= PlugVz - PlugZlength/2. - PlugNoseZlength && vz < PlugVz - PlugZlength/2. &&
00016         vx > PlugVx - PlugNoseXlength/2. && vx < PlugVx + PlugNoseXlength/2.) return Plug;
00017   }
00018   return Unknown;
00019 }

int inRockAfterClay ( double  vx,
double  vy,
double  vz 
) [inline]

Definition at line 219 of file Point5MaterialMap.cc.

References ClayWidth, Rock, SurfaceOfEarth, and Unknown.

00219                                                             {
00220   
00221   //So, it is not plug, air, wall and clay, Check for rock
00222   if (vy < SurfaceOfEarth - ClayWidth)
00223     return Rock;
00224   
00225   return Unknown;
00226   
00227 }

int inWallAfterAir ( double  vx,
double  vy,
double  vz 
) [inline]

Definition at line 107 of file Point5MaterialMap.cc.

References funct::sqrt(), SurfaceOfEarth, Unknown, Wall, and Z_PX56.

Referenced by inMat().

00107                                                            {
00108   // phase II surface building
00109   if (vy < SurfaceOfEarth && vy >= (SurfaceOfEarth-2250.)) {
00110     if (fabs(vz-Z_PX56) < 30000. && fabs(vx) < 10950) return Wall;
00111     // foundation of crane
00112     if (fabs(vz-Z_PX56) < 9000. && fabs(vx) >= 10950 && fabs(vx) < 16950) 
00113       return Wall;
00114   }
00115   
00116   // CMS cavern (UXC 55)
00117   if (fabs(vz) < 29278. && sqrt((vx*1.1576)*(vx*1.1576) + vy*vy) < 16830. &&
00118       vy > -11762.) return Wall;
00119   
00120   // access shaft (PX 56)
00121   if (vy > 0. && vy < (SurfaceOfEarth-2250.) && //t(shaft wall)=2150.
00122       sqrt(vx*vx + (vz-Z_PX56)*(vz-Z_PX56)) < 12400.) return Wall;
00123   
00124   // Shaft (PM 54)
00125   if (vy > 3233. && vy < (SurfaceOfEarth-1000.) && //t~=t(PX56)/R(PX56)*R(PM54)
00126       sqrt((vx-26600.)*(vx-26600.) + (vz-30100.-Z_PX56)*(vz-30100.-Z_PX56)) 
00127       < 6050.+2150./10250.*6050.) return Wall;
00128   //sqrt((vx-5000.)*(vx-5000.) + (vz-30100.-Z_PX56)*(vz-30100.-Z_PX56))//@@@@@ 
00129   //< 10050.+2150./10250.*6050.) return Wall;//@@@@@
00130   else if (vy >= SurfaceOfEarth-1000. && vy < SurfaceOfEarth && //t~=t(PX56)/R(PX56)*R(PM54)
00131            sqrt((vx-26600.)*(vx-26600.) + (vz-30100.-Z_PX56)*(vz-30100.-Z_PX56)) 
00132            < 6050.+2150./10250.*6050. +1800.) return Wall;
00133   //sqrt((vx-5000.)*(vx-5000.) + (vz-30100.-Z_PX56)*(vz-30100.-Z_PX56))//@@@@@ 
00134   //< 10050.+2150./10250.*10050. +1800.) return Wall; //@@@@@@
00135   
00136   // Shaft (PM 56)
00137   if (vy > -5450. && vy < (SurfaceOfEarth-1000.) && //t~=t(PX56)/R(PX56)*R(PM56)
00138       sqrt((vx-18220.)*(vx-18220.) + (vz+24227.-Z_PX56)*(vz+24227.-Z_PX56)) 
00139       < 3550.+2150./10250.*3550.) return Wall;
00140   else if (vy > SurfaceOfEarth-1000. && vy < SurfaceOfEarth && //t~=t(PX56)/R(PX56)*R(PM56)
00141            sqrt((vx-18220.)*(vx-18220.) + (vz+24227.-Z_PX56)*(vz+24227.-Z_PX56)) 
00142            < 3550.+2150./10250.*3550. +1800.) return Wall;
00143   
00144   //Service cavern USC 55
00145   if (vz > -(22050.+1150.) && vz < (62050.+1150.) &&
00146       sqrt((vx-29550.)*(vx-29550.) + (vy-3233.)*(vy-3233.)) < 9050.+950. &&
00147       vy > -3650.-2000.) return Wall; //8762=estimate, to be checked 
00148   
00149   //Pillar between CMS collision cavern and service cavern
00150   if (vz > -29278.+1000. && vz < 29278.+1000.) {
00151     if (vy > -17985. && vy < 10410. && vx > 13300. && vx < 20500.) 
00152       return Wall;
00153     
00154     if (vy > 0. && vy < 10410. && vx > 10000. && vx <= 13300.)
00155       return Wall;
00156     
00157     if (vy > -3650.-2000. && vy < -3233. && // bottom edge between pillar and service cavern
00158         vx > 20000. && vx < 24000.) return Wall;
00159     if (vy > -11762. && vy < -5000. && // bottom edge between pillar and UXC55 cavern
00160         vx > 10500. && vx < 14000.) return Wall;
00161   }
00162   
00163   if (vy > -14000. && vy < -1450. && //TX54 galerie surrounding
00164       vz > 13460. && vz < 17260. && vx >= 20500. && vx < 24550.) 
00165     return Wall;
00166   
00167   //R56, LHC beam tunnel East
00168   if (vz > -85000. && vz < -28510.) { //UJ57 junction to UXC55 cavern
00169     if (sqrt(vy*vy + (vx-350.)*(vx-350.)) < 2250.) return Wall;
00170   }
00171   
00172   //R54, LHC beam tunnel West
00173   if (vz > 26550. && vz < 63000. && //UJ57 junction to UXC55 cavern
00174       sqrt(vy*vy + (vx-350.)*(vx-350.)) < 2250.) return Wall;
00175   
00176   //UJ56 cavern
00177   if (vz > -(58875.+500.) && vz < -(33927.-500.) &&
00178       sqrt(vy*vy + (vx-4450.)*(vx-4450.)) < (6750.+500.) && vy > -3650.) 
00179     return Wall;
00180   
00181   //connection between PM56 shaft and UJ56 cavern
00182   if (vx > 9000. && vx < 18220. &&
00183       sqrt((vy-50.)*(vy-50.)+(vz+24227.-Z_PX56)*(vz+24227.-Z_PX56)) < 3550.+500. 
00184       && vy > -3650.) return Wall;
00185   
00186   return Unknown;
00187 }


Generated on Tue Jun 9 17:53:34 2009 for CMSSW by  doxygen 1.5.4