CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HFDarkening.cc
Go to the documentation of this file.
1 //File: HFDarkening.cc
3 //Description: simple helper class containing parameterized function
4 // to be used for the SLHC darkening calculation in HF
6 
9 #include <algorithm>
10 #include <cmath>
11 
13  //HF area of consideration is 1100cm from interaction point to 1300cm in z-axis
14  //Radius (cm) - 12.5 cm from Beam pipe up to 170cm to top of PMT robox.
15  //Dose in MRad
16 
17  for(int i = 0; i < 10; ++i) radius[i] = 12.5+i*15.75;
18  //Depth 0 - 1100cm-1120 - calculated @ 1110cm
19  dose_layer_depth[0][0] = 45.8; dose_layer_depth[0][1] = 39.5;
20  dose_layer_depth[0][2] = 9.97; dose_layer_depth[0][3] = 6.46;
21  dose_layer_depth[0][4] = 3.32; dose_layer_depth[0][5] = 2.21;
22  dose_layer_depth[0][6] = 0.737; dose_layer_depth[0][7] = 0.0557;
23  dose_layer_depth[0][8] = 0.00734; dose_layer_depth[0][9] = 0.00212;
24 
25  //Depth 1 - 1120-1140 - @1130
26  dose_layer_depth[1][0] = 45.8; dose_layer_depth[1][1] = 39.5;
27  dose_layer_depth[1][2] = 9.97; dose_layer_depth[1][3] = 6.46;
28  dose_layer_depth[1][4] = 3.32; dose_layer_depth[1][5] = 2.21;
29  dose_layer_depth[1][6] = 0.737; dose_layer_depth[1][7] = 0.0557;
30  dose_layer_depth[1][8] = 0.00734; dose_layer_depth[1][9] = 0.00212;
31 
32  //Depth 2 - 1140-1160 - @1150
33  dose_layer_depth[2][0] = 74.8; dose_layer_depth[2][1] = 42.3;
34  dose_layer_depth[2][2] = 8.17; dose_layer_depth[2][3] = 5.12;
35  dose_layer_depth[2][4] = 2.21; dose_layer_depth[2][5] = 1.48;
36  dose_layer_depth[2][6] = 0.400; dose_layer_depth[2][7] = 0.0388;
37  dose_layer_depth[2][8] = 0.0050; dose_layer_depth[2][9] = 0.00202;
38 
39  //Depth 3 - 1160-1180 - @1170
40  dose_layer_depth[3][0] = 73.9; dose_layer_depth[3][1] = 18.1;
41  dose_layer_depth[3][2] = 3.81; dose_layer_depth[3][3] = 1.95;
42  dose_layer_depth[3][4] = 0.839; dose_layer_depth[3][5] = 0.559;
43  dose_layer_depth[3][6] = 0.200; dose_layer_depth[3][7] = 0.0386;
44  dose_layer_depth[3][8] = 0.00582; dose_layer_depth[3][9] = 0.00216;
45 
46  //Depth 4 - 1180-1200 - @1190
47  dose_layer_depth[4][0] = 68.0; dose_layer_depth[4][1] = 9.75;
48  dose_layer_depth[4][2] = 2.19; dose_layer_depth[4][3] = 0.974;
49  dose_layer_depth[4][4] = 0.426; dose_layer_depth[4][5] = 0.265;
50  dose_layer_depth[4][6] = 0.124; dose_layer_depth[4][7] = 0.0258;
51  dose_layer_depth[4][8] = 0.00565; dose_layer_depth[4][9] = 0.00206;
52 
53  //Depth 5 - 1200-1220 - @1210
54  dose_layer_depth[5][0] = 73.1; dose_layer_depth[5][1] = 5.42;
55  dose_layer_depth[5][2] = 1.24; dose_layer_depth[5][3] = 0.507;
56  dose_layer_depth[5][4] = 0.21; dose_layer_depth[5][5] = 0.129;
57  dose_layer_depth[5][6] = 0.0625; dose_layer_depth[5][7] = 0.0220;
58  dose_layer_depth[5][8] = 0.00404; dose_layer_depth[5][9] = 0.00156;
59 
60  //Depth 6 - 1220-1240 - @1230
61  dose_layer_depth[6][0] = 66.1; dose_layer_depth[6][1] = 2.79;
62  dose_layer_depth[6][2] = 0.650; dose_layer_depth[6][3] = 0.257;
63  dose_layer_depth[6][4] = 0.111; dose_layer_depth[6][5] = 0.0624;
64  dose_layer_depth[6][6] = 0.0335; dose_layer_depth[6][7] = 0.0134;
65  dose_layer_depth[6][8] = 0.00280; dose_layer_depth[6][9] = 0.00127;
66 
67  //Depth 7 - 1240-1260 - @1250
68  dose_layer_depth[7][0] = 68.7; dose_layer_depth[7][1] = 1.69;
69  dose_layer_depth[7][2] = 0.350; dose_layer_depth[7][3] = 0.137;
70  dose_layer_depth[7][4] = 0.0614; dose_layer_depth[7][5] = 0.0321;
71  dose_layer_depth[7][6] = 0.0167; dose_layer_depth[7][7] = 0.00621;
72  dose_layer_depth[7][8] = 0.00187; dose_layer_depth[7][9] = 0.000867;
73 
74  //Depth 8 - 1260-1280 - @1270
75  dose_layer_depth[8][0] = 62.5; dose_layer_depth[8][1] = 2.39;
76  dose_layer_depth[8][2] = 0.252; dose_layer_depth[8][3] = 0.135;
77  dose_layer_depth[8][4] = 0.0505; dose_layer_depth[8][5] = 0.0295;
78  dose_layer_depth[8][6] = 0.0159; dose_layer_depth[8][7] = 0.0131;
79  dose_layer_depth[8][8] = 0.00803; dose_layer_depth[8][9] = 0.00161;
80 
81  //Depth 9 - 1280-1300 - @1290
82  dose_layer_depth[9][0] = 48.6; dose_layer_depth[9][1] = 204.0;
83  dose_layer_depth[9][2] = 0.260; dose_layer_depth[9][3] = 2.19;
84  dose_layer_depth[9][4] = 0.528; dose_layer_depth[9][5] = 0.386;
85  dose_layer_depth[9][6] = 0.231; dose_layer_depth[9][7] = 0.19;
86  dose_layer_depth[9][8] = 0.773; dose_layer_depth[9][9] = 0.00502;
87 
88 }
89 
91 
92 float HFDarkening::dose(int layer, float Radius) {
93  // float dose_acquired = 0.;
94  int radius = (int) floor((Radius-12.5)/10.0+0.5);
95  if (layer == 15) {
96  return 0.;
97  }
98  return dose_layer_depth[layer][radius];
99 
100  /*
101  for (int i = 0; i<= layer; ++i) {
102  dose_acquired+=dose_layer_depth[i][radius];
103  }
104 
105  if((layer<-1)||(layer>17)) return (0.);
106 
107  if((layer==-1)||(layer==0)) {
108  if(ind<0) return (dose_layer_depth[0][0]); if(ind>=9) return (dose_layer_depth[0][10]);
109  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]));}
110  }
111  if((layer>=1)&&(layer<=3)) {
112  if(ind<0) return (dose_layer_depth[5][0]); if(ind>=9) return (dose_layer_depth[5][10]);
113  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]));}
114  }
115  if((layer==4)||(layer==5)) {
116  if(ind<0) return (dose_layer_depth[10][0]); if(ind>=9) return (dose_layer_depth[10][10]);
117  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]));}
118  }
119  if((layer>=6)&&(layer<=8)) {
120  if(ind<0) return (dose_l6_l8[0]); if(ind>=23) return (dose_l6_l8[23]);
121  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]));}
122  }
123  if((layer==9)||(layer==10)) {
124  if(ind<0) return (dose_l9_l10[0]); if(ind>=23) return (dose_l9_l10[23]);
125  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]));}
126  }
127  if((layer>=11)&&(layer<=13)) {
128  if(ind<0) return (dose_l11_l13[0]); if(ind>=23) return (dose_l11_l13[23]);
129  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]));}
130  }
131  if((layer==14)||(layer==15)) {
132  if(ind<0) return (dose_l14_l15[0]); if(ind>=23) return (dose_l14_l15[23]);
133  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]));}
134  }
135  if((layer==16)||(layer==17)) {
136  if(ind<0) return (dose_l16_l17[0]); if(ind>=23) return (dose_l16_l17[23]);
137  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]));}
138  }
139  return 0.;
140  */
141 }
142 
143 float HFDarkening::degradation(float mrad) {
144  return (exp(-1.44*pow(mrad/100,0.44)*0.2/4.343));
145 }
146 
147 float HFDarkening::int_lumi(float intlumi) {
148  return (intlumi/500.);
149 }
int i
Definition: DBlmapReader.cc:9
float int_lumi(float intlumi)
Definition: HFDarkening.cc:147
float degradation(float mrad)
Definition: HFDarkening.cc:143
float dose_layer_depth[10][10]
Definition: HFDarkening.h:16
float radius[10]
Definition: HFDarkening.h:15
float dose(int layer, float radius)
Definition: HFDarkening.cc:92
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40