00001 00002 //File: HFDarkening.cc 00003 //Description: simple helper class containing parameterized function 00004 // to be used for the SLHC darkening calculation in HF 00006 00007 #include "SimG4CMS/Calo/interface/HFDarkening.h" 00008 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00009 #include <algorithm> 00010 #include <cmath> 00011 00012 HFDarkening::HFDarkening() { 00013 //HF area of consideration is 1100cm from interaction point to 1300cm in z-axis 00014 //Radius (cm) - 12.5 cm from Beam pipe up to 170cm to top of PMT robox. 00015 //Dose in MRad 00016 00017 for(int i = 0; i < 10; ++i) radius[i] = 12.5+i*15.75; 00018 //Depth 0 - 1100cm-1120 - calculated @ 1110cm 00019 dose_layer_depth[0][0] = 45.8; dose_layer_depth[0][1] = 39.5; 00020 dose_layer_depth[0][2] = 9.97; dose_layer_depth[0][3] = 6.46; 00021 dose_layer_depth[0][4] = 3.32; dose_layer_depth[0][5] = 2.21; 00022 dose_layer_depth[0][6] = 0.737; dose_layer_depth[0][7] = 0.0557; 00023 dose_layer_depth[0][8] = 0.00734; dose_layer_depth[0][9] = 0.00212; 00024 00025 //Depth 1 - 1120-1140 - @1130 00026 dose_layer_depth[1][0] = 45.8; dose_layer_depth[1][1] = 39.5; 00027 dose_layer_depth[1][2] = 9.97; dose_layer_depth[1][3] = 6.46; 00028 dose_layer_depth[1][4] = 3.32; dose_layer_depth[1][5] = 2.21; 00029 dose_layer_depth[1][6] = 0.737; dose_layer_depth[1][7] = 0.0557; 00030 dose_layer_depth[1][8] = 0.00734; dose_layer_depth[1][9] = 0.00212; 00031 00032 //Depth 2 - 1140-1160 - @1150 00033 dose_layer_depth[2][0] = 74.8; dose_layer_depth[2][1] = 42.3; 00034 dose_layer_depth[2][2] = 8.17; dose_layer_depth[2][3] = 5.12; 00035 dose_layer_depth[2][4] = 2.21; dose_layer_depth[2][5] = 1.48; 00036 dose_layer_depth[2][6] = 0.400; dose_layer_depth[2][7] = 0.0388; 00037 dose_layer_depth[2][8] = 0.0050; dose_layer_depth[2][9] = 0.00202; 00038 00039 //Depth 3 - 1160-1180 - @1170 00040 dose_layer_depth[3][0] = 73.9; dose_layer_depth[3][1] = 18.1; 00041 dose_layer_depth[3][2] = 3.81; dose_layer_depth[3][3] = 1.95; 00042 dose_layer_depth[3][4] = 0.839; dose_layer_depth[3][5] = 0.559; 00043 dose_layer_depth[3][6] = 0.200; dose_layer_depth[3][7] = 0.0386; 00044 dose_layer_depth[3][8] = 0.00582; dose_layer_depth[3][9] = 0.00216; 00045 00046 //Depth 4 - 1180-1200 - @1190 00047 dose_layer_depth[4][0] = 68.0; dose_layer_depth[4][1] = 9.75; 00048 dose_layer_depth[4][2] = 2.19; dose_layer_depth[4][3] = 0.974; 00049 dose_layer_depth[4][4] = 0.426; dose_layer_depth[4][5] = 0.265; 00050 dose_layer_depth[4][6] = 0.124; dose_layer_depth[4][7] = 0.0258; 00051 dose_layer_depth[4][8] = 0.00565; dose_layer_depth[4][9] = 0.00206; 00052 00053 //Depth 5 - 1200-1220 - @1210 00054 dose_layer_depth[5][0] = 73.1; dose_layer_depth[5][1] = 5.42; 00055 dose_layer_depth[5][2] = 1.24; dose_layer_depth[5][3] = 0.507; 00056 dose_layer_depth[5][4] = 0.21; dose_layer_depth[5][5] = 0.129; 00057 dose_layer_depth[5][6] = 0.0625; dose_layer_depth[5][7] = 0.0220; 00058 dose_layer_depth[5][8] = 0.00404; dose_layer_depth[5][9] = 0.00156; 00059 00060 //Depth 6 - 1220-1240 - @1230 00061 dose_layer_depth[6][0] = 66.1; dose_layer_depth[6][1] = 2.79; 00062 dose_layer_depth[6][2] = 0.650; dose_layer_depth[6][3] = 0.257; 00063 dose_layer_depth[6][4] = 0.111; dose_layer_depth[6][5] = 0.0624; 00064 dose_layer_depth[6][6] = 0.0335; dose_layer_depth[6][7] = 0.0134; 00065 dose_layer_depth[6][8] = 0.00280; dose_layer_depth[6][9] = 0.00127; 00066 00067 //Depth 7 - 1240-1260 - @1250 00068 dose_layer_depth[7][0] = 68.7; dose_layer_depth[7][1] = 1.69; 00069 dose_layer_depth[7][2] = 0.350; dose_layer_depth[7][3] = 0.137; 00070 dose_layer_depth[7][4] = 0.0614; dose_layer_depth[7][5] = 0.0321; 00071 dose_layer_depth[7][6] = 0.0167; dose_layer_depth[7][7] = 0.00621; 00072 dose_layer_depth[7][8] = 0.00187; dose_layer_depth[7][9] = 0.000867; 00073 00074 //Depth 8 - 1260-1280 - @1270 00075 dose_layer_depth[8][0] = 62.5; dose_layer_depth[8][1] = 2.39; 00076 dose_layer_depth[8][2] = 0.252; dose_layer_depth[8][3] = 0.135; 00077 dose_layer_depth[8][4] = 0.0505; dose_layer_depth[8][5] = 0.0295; 00078 dose_layer_depth[8][6] = 0.0159; dose_layer_depth[8][7] = 0.0131; 00079 dose_layer_depth[8][8] = 0.00803; dose_layer_depth[8][9] = 0.00161; 00080 00081 //Depth 9 - 1280-1300 - @1290 00082 dose_layer_depth[9][0] = 48.6; dose_layer_depth[9][1] = 204.0; 00083 dose_layer_depth[9][2] = 0.260; dose_layer_depth[9][3] = 2.19; 00084 dose_layer_depth[9][4] = 0.528; dose_layer_depth[9][5] = 0.386; 00085 dose_layer_depth[9][6] = 0.231; dose_layer_depth[9][7] = 0.19; 00086 dose_layer_depth[9][8] = 0.773; dose_layer_depth[9][9] = 0.00502; 00087 00088 } 00089 00090 HFDarkening::~HFDarkening() { } 00091 00092 float HFDarkening::dose(int layer, float Radius) { 00093 // float dose_acquired = 0.; 00094 int radius = (int) floor((Radius-12.5)/10.0+0.5); 00095 if (layer == 15) { 00096 return 0.; 00097 } 00098 return dose_layer_depth[layer][radius]; 00099 00100 /* 00101 for (int i = 0; i<= layer; ++i) { 00102 dose_acquired+=dose_layer_depth[i][radius]; 00103 } 00104 00105 if((layer<-1)||(layer>17)) return (0.); 00106 00107 if((layer==-1)||(layer==0)) { 00108 if(ind<0) return (dose_layer_depth[0][0]); if(ind>=9) return (dose_layer_depth[0][10]); 00109 if((ind>=0)&&(ind<=9)) {float delta = (dose_layer_depth[0][ind+1]-dose_layer_depth[0][ind])/10; return (dose_layer_depth[0][ind]+delta*(Radius-radius[ind]));} 00110 } 00111 if((layer>=1)&&(layer<=3)) { 00112 if(ind<0) return (dose_layer_depth[5][0]); if(ind>=9) return (dose_layer_depth[5][10]); 00113 if((ind>=0)&&(ind<=9)) {float delta = (dose_layer_depth[5][ind+1]-dose_layer_depth[5][ind])/10; return (dose_layer_depth[5][ind]+delta*(Radius-radius[ind]));} 00114 } 00115 if((layer==4)||(layer==5)) { 00116 if(ind<0) return (dose_layer_depth[10][0]); if(ind>=9) return (dose_layer_depth[10][10]); 00117 if((ind>=0)&&(ind<=9)) {float delta = (dose_layer_depth[10][ind+1]-dose_layer_depth[10][ind])/10; return (dose_layer_depth[10][ind]+delta*(Radius-radius[ind]));} 00118 } 00119 if((layer>=6)&&(layer<=8)) { 00120 if(ind<0) return (dose_l6_l8[0]); if(ind>=23) return (dose_l6_l8[23]); 00121 if((ind>=0)&&(ind<=23)) {float delta = (dose_l6_l8[ind+1]-dose_l6_l8[ind])/10; return (dose_l6_l8[ind]+delta*(Radius-radius[ind]));} 00122 } 00123 if((layer==9)||(layer==10)) { 00124 if(ind<0) return (dose_l9_l10[0]); if(ind>=23) return (dose_l9_l10[23]); 00125 if((ind>=0)&&(ind<=23)) {float delta = (dose_l9_l10[ind+1]-dose_l9_l10[ind])/10; return (dose_l9_l10[ind]+delta*(Radius-radius[ind]));} 00126 } 00127 if((layer>=11)&&(layer<=13)) { 00128 if(ind<0) return (dose_l11_l13[0]); if(ind>=23) return (dose_l11_l13[23]); 00129 if((ind>=0)&&(ind<=23)) {float delta = (dose_l11_l13[ind+1]-dose_l11_l13[ind])/10; return (dose_l11_l13[ind]+delta*(Radius-radius[ind]));} 00130 } 00131 if((layer==14)||(layer==15)) { 00132 if(ind<0) return (dose_l14_l15[0]); if(ind>=23) return (dose_l14_l15[23]); 00133 if((ind>=0)&&(ind<=23)) {float delta = (dose_l14_l15[ind+1]-dose_l14_l15[ind])/10; return (dose_l14_l15[ind]+delta*(Radius-radius[ind]));} 00134 } 00135 if((layer==16)||(layer==17)) { 00136 if(ind<0) return (dose_l16_l17[0]); if(ind>=23) return (dose_l16_l17[23]); 00137 if((ind>=0)&&(ind<=23)) {float delta = (dose_l16_l17[ind+1]-dose_l16_l17[ind])/10; return (dose_l16_l17[ind]+delta*(Radius-radius[ind]));} 00138 } 00139 return 0.; 00140 */ 00141 } 00142 00143 float HFDarkening::degradation(float mrad) { 00144 return (exp(-1.44*pow(mrad/100,0.44)*0.2/4.343)); 00145 } 00146 00147 float HFDarkening::int_lumi(float intlumi) { 00148 return (intlumi/500.); 00149 }