CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
SingleParticleJetResponse Class Reference

This class computes the expected response in the calorimeters for a given track, for which it is known if it has interacted, its energy as measured in the tracker and the energy released in the ECAL. Two algorithms are available at the moment. More...

#include <SingleParticleJetResponse.h>

Public Member Functions

std::vector< double > response (double echar, double energycluster, int algo=0) const
 
 SingleParticleJetResponse ()
 
 ~SingleParticleJetResponse ()
 

Detailed Description

This class computes the expected response in the calorimeters for a given track, for which it is known if it has interacted, its energy as measured in the tracker and the energy released in the ECAL. Two algorithms are available at the moment.

Author
O. Kodolova, A.Heister

Definition at line 15 of file SingleParticleJetResponse.h.

Constructor & Destructor Documentation

SingleParticleJetResponse::SingleParticleJetResponse ( )

Definition at line 5 of file SingleParticleJetResponse.cc.

5 {}
SingleParticleJetResponse::~SingleParticleJetResponse ( )
inline

Definition at line 20 of file SingleParticleJetResponse.h.

20 {};

Member Function Documentation

vector< double > SingleParticleJetResponse::response ( double  echar,
double  energycluster,
int  algo = 0 
) const

Definition at line 7 of file SingleParticleJetResponse.cc.

References funct::log(), and mathSSE::sqrt().

8 {
9  vector<double> response;
10  double recal=0,rhcal=0;
11 
12  // threshold on energy of track
13  double e_thEC_hint;
14  double e_thHC_hint;
15  double e_thHC1_mip;
16  double e_thHC2_mip;
17 
18  // parameters for Ecal responces with interaction in Ecal
19  double PAR1_EC_hint;
20  double PAR2_EC_hint;
21  double PAR3_EC_hint;
22  double PAR4_EC_hint;
23 
24  // parameters for Hcal responces with interaction in Ecal
25  double PAR1_HC_hint;
26  double PAR2_HC_hint;
27  double PAR3_HC_hint;
28  double PAR4_HC_hint;
29 
30  // parameters for Hcal responces without interaction in Ecal (MIP)
31  double PAR1_HC_mip;
32  double PAR2_HC_mip;
33  double PAR3_HC_mip;
34  double PAR4_HC_mip;
35  double PAR5_HC_mip;
36 
37  if (algo == 0)
38  {
39  if(energycluster>0.5)
40  {
41  double epiecal=1.6/(1+0.6*0.11*log(0.4*echar));
42  double epihcal=1.39/(1+0.39*0.11*log(0.6*echar));
43  recal=0.4*echar/epiecal;
44  rhcal=0.6*echar/epihcal;
45  }
46  else
47  {
48  double epihcal=1.39/(1+0.39*0.11*log(echar));
49  rhcal=echar/epihcal;
50  recal=energycluster;
51  } // interact or not
52  }
53 
54  else if (algo == 1) // ORCA_6
55  {
56  // threshold on energy of track
57  e_thHC_hint = 65.;
58  e_thHC1_mip = 14.;
59  e_thHC2_mip = 54.;
60 
61  // parameters for Ecal responses with interaction in Ecal
62  PAR1_EC_hint = 3.2181;
63  PAR2_EC_hint = 4.8399;
64 
65  // parameters for Hcal responses with interaction in Ecal
66  PAR1_HC_hint = 0.2496;
67  PAR2_HC_hint =-1.1673;
68  PAR3_HC_hint = 0.7506;
69 
70  // parameters for Hcal responses without interaction in Ecal (MIP)
71  PAR1_HC_mip = 0.4108;
72  PAR2_HC_mip =-0.3474;
73  PAR3_HC_mip = 0.0293;
74  PAR4_HC_mip = 0.8388;
75  PAR5_HC_mip = 1.0520;
76 
77  if(energycluster>0.5)
78  {
79  double fecal_hint = PAR1_EC_hint/(sqrt(echar) + PAR2_EC_hint);
80  recal = echar*fecal_hint;
81 
82  if(echar <= e_thHC_hint)
83  {
84  double fhcal_hint = PAR1_HC_hint * (log(echar) + PAR2_HC_hint);
85  rhcal=echar*fhcal_hint;
86  }
87  else
88  {
89  rhcal =echar* PAR3_HC_hint;
90  } // hcal response, interact=1
91 
92  // MIP, interact=0
93  }
94  else
95  {
96  recal=energycluster;
97  if(echar <= e_thHC1_mip)
98  {
99  double fhcal_mip = PAR1_HC_mip * (log(echar) + PAR2_HC_mip);
100  rhcal=echar*fhcal_mip;
101  }
102  else if (echar > e_thHC1_mip && echar <= e_thHC2_mip)
103  {
104  double fhcal_mip = PAR3_HC_mip * sqrt(echar) + PAR4_HC_mip;
105  rhcal=echar*fhcal_mip;
106  }
107  else
108  {
109  rhcal=echar*PAR5_HC_mip;
110  } // hcal response, MIP
111 
112  } // interact or not
113  }
114 
115  else if (algo == 2) // cmsim133
116  {
117  // threshold on energy of track
118  e_thEC_hint = 0.1;
119  e_thHC_hint = 1000.;
120  e_thHC1_mip = 15.5;
121  e_thHC2_mip = 58.;
122 
123  // parameters for Ecal responses with interaction in Ecal
124  PAR1_EC_hint = -0.99228E-01;
125  PAR2_EC_hint = -8.2298;
126  PAR3_EC_hint = -0.82878E-03;
127  PAR4_EC_hint = 0.41902;
128 
129  // parameters for Hcal responses with interaction in Ecal
130  PAR1_HC_hint = 0.90693E-01;
131  PAR2_HC_hint = 0.86861E-01;
132  PAR3_HC_hint = 0.089524;
133  PAR4_HC_hint = 0.65067;
134 
135  // parameters for Hcal responses without interaction in Ecal (MIP)
136  PAR1_HC_mip = 0.29538;
137  PAR2_HC_mip = -0.12289;
138  PAR3_HC_mip = 0.14940E-01;
139  PAR4_HC_mip = 0.73503;
140  PAR5_HC_mip = 0.84801;
141 
142 
143  if(energycluster>0.5)
144  {
145 
146  if(echar <= e_thEC_hint)
147  {
148  double fecal_hint = PAR1_EC_hint * (echar + PAR2_EC_hint);
149  recal = echar*fecal_hint;
150  }
151  else
152  {
153  double fecal_hint = PAR3_EC_hint * echar + PAR4_EC_hint;
154  recal = echar*fecal_hint;
155  }
156 
157  if(echar <= e_thHC_hint)
158  {
159  double fhcal_hint = PAR1_HC_hint * (log(echar) + PAR2_HC_hint);
160  rhcal=echar*fhcal_hint;
161  }
162  else
163  {
164  double fhcal_hint = PAR3_HC_hint * (log(echar) + PAR4_HC_hint);
165  rhcal=echar*fhcal_hint;
166  } // hcal response, interact=1
167 
168  // MIP, interact=0
169  }
170  else
171  {
172  recal=energycluster;
173  if(echar <= e_thHC1_mip)
174  {
175  double fhcal_mip = PAR1_HC_mip * (log(echar) + PAR2_HC_mip);
176  rhcal=echar*fhcal_mip;
177  }
178  else if (echar > e_thHC1_mip && echar <= e_thHC2_mip)
179  {
180  double fhcal_mip = PAR3_HC_mip * sqrt(echar) + PAR4_HC_mip;
181  rhcal=echar*fhcal_mip;
182  }
183  else
184  {
185  rhcal=echar*PAR5_HC_mip;
186  } // hcal response, MIP
187 
188  } // interact or not
189  }
190 
191  else if (algo == 3) // OSCAR_3_6_0
192  {
193  // threshold on energy of track
194  e_thEC_hint = 1000.;
195  e_thHC_hint = 0.5;
196  e_thHC1_mip = 12.;
197  e_thHC2_mip = 30.;
198 
199  // parameters for Ecal responses with interaction in Ecal
200  PAR1_EC_hint = -0.54951E-03;
201  PAR2_EC_hint = 0.42609;
202  PAR3_EC_hint = -2.8831;
203  PAR4_EC_hint = 0.33487;
204 
205  // parameters for Hcal responses with interaction in Ecal
206  PAR1_HC_hint = -0.028222;
207  PAR2_HC_hint = 0.43868;
208  PAR3_HC_hint = 0.12144;
209  PAR4_HC_hint = -0.63474;
210 
211  // parameters for Hcal responses without interaction in Ecal (MIP)
212  PAR1_HC_mip = 0.86455E-01;
213  PAR2_HC_mip = -0.36659;
214  PAR3_HC_mip = 0.60879E-01;
215  PAR4_HC_mip = 0.64219;
216  PAR5_HC_mip = 0.96800;
217 
218  if(energycluster>0.5)
219  {
220  if(echar <= e_thEC_hint)
221  {
222  double fecal_hint = PAR1_EC_hint * (echar) + PAR2_EC_hint;
223  recal = echar*fecal_hint;
224  }
225  else
226  {
227  double fecal_hint = PAR3_EC_hint/(-echar) + PAR4_EC_hint;
228  recal = echar*fecal_hint;
229  }
230 
231  if(echar <= e_thHC_hint)
232  {
233  double fhcal_hint = PAR1_HC_hint * echar + PAR2_HC_hint;
234  rhcal=echar*fhcal_hint;
235  }
236  else
237  {
238  double fhcal_hint = PAR3_HC_hint * (log(echar) + PAR4_HC_hint);
239  rhcal=echar*fhcal_hint;
240  } // hcal response, interact=1
241 
242  // MIP, interact=0
243  }
244  else
245  {
246  recal=energycluster;
247  if(echar <= e_thHC1_mip)
248  {
249  double fhcal_mip = PAR1_HC_mip * (echar + PAR2_HC_mip);
250  rhcal=echar*fhcal_mip;
251  }
252  else if (echar > e_thHC1_mip && echar <= e_thHC2_mip)
253  {
254  double fhcal_mip = PAR3_HC_mip * sqrt(echar) + PAR4_HC_mip;
255  rhcal=echar*fhcal_mip;
256  } else
257  {
258  rhcal=echar*PAR5_HC_mip;
259  } // hcal response, MIP
260 
261  } // interact or not
262  }
263 
264  response.push_back(recal);
265  response.push_back(rhcal);
266  return response;
267 }
T sqrt(T t)
Definition: SSEVec.h:28
Log< T >::type log(const T &t)
Definition: Log.h:22
std::vector< double > response(double echar, double energycluster, int algo=0) const