CMS 3D CMS Logo

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. More...

#include <JetMETCorrections/Algorithms/interface/SingleParticleJetResponse.h>

List of all members.

Public Member Functions

std::vector< double > response (double echar, double energycluster, int algo=0) const
std::vector< double > response (double echar, double energycluster, int algo=0) const
 SingleParticleJetResponse ()
 SingleParticleJetResponse ()
 ~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 19 of file SingleParticleJetResponse.h.


Constructor & Destructor Documentation

SingleParticleJetResponse::SingleParticleJetResponse (  ) 

Definition at line 5 of file SingleParticleJetResponse.cc.

00005 {}

SingleParticleJetResponse::~SingleParticleJetResponse (  )  [inline]

Definition at line 24 of file SingleParticleJetResponse.h.

00024 {};

SingleParticleJetResponse::SingleParticleJetResponse (  ) 

SingleParticleJetResponse::~SingleParticleJetResponse (  )  [inline]

Definition at line 20 of file SingleParticleJetResponse.h.

00020 {};


Member Function Documentation

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

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

Definition at line 7 of file SingleParticleJetResponse.cc.

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

00008 {
00009   vector<double> response;
00010   double recal=0,rhcal=0;
00011   
00012  // threshold on energy of track
00013   double e_thEC_hint;
00014   double e_thHC_hint;
00015   double e_thHC1_mip;
00016   double e_thHC2_mip;
00017   
00018   double e_thEC1;
00019   double e_thEC2;
00020   double e_thHC1;
00021 
00022   // parameters for Ecal responces with interaction in Ecal
00023   double PAR1_EC_hint;
00024   double PAR2_EC_hint;
00025   double PAR3_EC_hint;
00026   double PAR4_EC_hint;
00027 
00028   // parameters for Hcal responces with interaction in Ecal
00029   double PAR1_HC_hint;
00030   double PAR2_HC_hint;
00031   double PAR3_HC_hint;
00032   double PAR4_HC_hint;
00033 
00034   // parameters for Hcal responces without interaction in Ecal (MIP)
00035   double PAR1_HC_mip;
00036   double PAR2_HC_mip;
00037   double PAR3_HC_mip;
00038   double PAR4_HC_mip;
00039   double PAR5_HC_mip;
00040 
00041 //===>  
00042   // parameters for Ecal responces with (without) interaction in Ecal
00043   double PAR1_EC;
00044   double PAR2_EC;
00045   double PAR3_EC;
00046   double PAR4_EC;
00047 
00048   // parameters for Hcal responces with (without) interaction in Ecal
00049   double PAR1_HC;
00050   double PAR2_HC;
00051   double PAR3_HC;
00052   double PAR4_HC;
00053 //===>
00054 
00055   if (algo == 0) // e/pi  
00056     {
00057       if(energycluster>0.5) 
00058         {
00059           double epiecal=1.6/(1+0.6*0.11*log(0.4*echar));
00060           double epihcal=1.39/(1+0.39*0.11*log(0.6*echar));
00061           recal=0.4*echar/epiecal;
00062           rhcal=0.6*echar/epihcal;
00063         } 
00064       else 
00065         {
00066           double epihcal=1.39/(1+0.39*0.11*log(echar));
00067           rhcal=echar/epihcal;
00068           recal=energycluster;
00069         } // interact or not 
00070     }
00071   
00072   else if (algo == 1) // ORCA_6 
00073     {
00074       // threshold on energy of track
00075       e_thHC_hint = 65.;
00076       e_thHC1_mip = 14.;
00077       e_thHC2_mip = 54.;
00078       
00079       // parameters for Ecal responses with interaction in Ecal
00080       PAR1_EC_hint = 3.2181;
00081       PAR2_EC_hint = 4.8399;
00082       
00083       // parameters for Hcal responses with interaction in Ecal
00084       PAR1_HC_hint = 0.2496;
00085       PAR2_HC_hint =-1.1673;
00086       PAR3_HC_hint = 0.7506;
00087       
00088       // parameters for Hcal responses without interaction in Ecal (MIP)
00089       PAR1_HC_mip  = 0.4108;
00090       PAR2_HC_mip  =-0.3474;
00091       PAR3_HC_mip  = 0.0293;
00092       PAR4_HC_mip  = 0.8388;
00093       PAR5_HC_mip  = 1.0520;
00094       
00095       if(energycluster>0.5) 
00096         {
00097           double fecal_hint = PAR1_EC_hint/(sqrt(echar) + PAR2_EC_hint);
00098           recal = echar*fecal_hint;
00099           
00100           if(echar <= e_thHC_hint) 
00101             {
00102               double fhcal_hint = PAR1_HC_hint * (log(echar) + PAR2_HC_hint);
00103               rhcal=echar*fhcal_hint;
00104             } 
00105           else 
00106             {
00107               rhcal =echar* PAR3_HC_hint;
00108             } // hcal response, interact=1
00109           
00110           // MIP, interact=0
00111         } 
00112       else 
00113         {
00114           recal=energycluster;
00115           if(echar <= e_thHC1_mip) 
00116             {
00117               double fhcal_mip = PAR1_HC_mip * (log(echar) + PAR2_HC_mip);
00118               rhcal=echar*fhcal_mip;
00119             } 
00120           else if (echar > e_thHC1_mip && echar <= e_thHC2_mip) 
00121             {
00122               double fhcal_mip = PAR3_HC_mip * sqrt(echar) + PAR4_HC_mip;
00123               rhcal=echar*fhcal_mip;
00124             } 
00125           else 
00126             {
00127               rhcal=echar*PAR5_HC_mip;
00128             } // hcal response, MIP
00129           
00130         } // interact or not
00131     } // algo = 1
00132   
00133   else if (algo == 2) // cmsim133
00134     {
00135       // threshold on energy of track
00136       e_thEC_hint = 0.1;
00137       e_thHC_hint = 1000.;
00138       e_thHC1_mip = 15.5;
00139       e_thHC2_mip = 58.;
00140       
00141       // parameters for Ecal responses with interaction in Ecal
00142       PAR1_EC_hint = -0.99228E-01;
00143       PAR2_EC_hint = -8.2298;
00144       PAR3_EC_hint = -0.82878E-03;
00145       PAR4_EC_hint = 0.41902;
00146       
00147       // parameters for Hcal responses with interaction in Ecal
00148       PAR1_HC_hint = 0.90693E-01;
00149       PAR2_HC_hint = 0.86861E-01;
00150       PAR3_HC_hint = 0.089524;
00151       PAR4_HC_hint = 0.65067;
00152       
00153       // parameters for Hcal responses without interaction in Ecal (MIP)
00154       PAR1_HC_mip  = 0.29538;
00155       PAR2_HC_mip  = -0.12289;
00156       PAR3_HC_mip  = 0.14940E-01;
00157       PAR4_HC_mip  = 0.73503;
00158       PAR5_HC_mip  = 0.84801;    
00159 
00160      
00161       if(energycluster>0.5) 
00162         {
00163           
00164           if(echar <= e_thEC_hint) 
00165             {
00166               double fecal_hint = PAR1_EC_hint * (echar + PAR2_EC_hint);
00167               recal = echar*fecal_hint;
00168             }
00169           else 
00170             {
00171               double fecal_hint = PAR3_EC_hint * echar + PAR4_EC_hint;
00172               recal = echar*fecal_hint;
00173             }
00174 
00175           if(echar <= e_thHC_hint) 
00176             {
00177               double fhcal_hint = PAR1_HC_hint * (log(echar) + PAR2_HC_hint);
00178               rhcal=echar*fhcal_hint;
00179             }
00180           else 
00181             {
00182               double fhcal_hint = PAR3_HC_hint * (log(echar) + PAR4_HC_hint);
00183               rhcal=echar*fhcal_hint;
00184             } // hcal response, interact=1
00185           
00186           // MIP, interact=0
00187         }
00188       else 
00189         {
00190           recal=energycluster;
00191           if(echar <= e_thHC1_mip) 
00192             {
00193               double fhcal_mip = PAR1_HC_mip * (log(echar) + PAR2_HC_mip);
00194               rhcal=echar*fhcal_mip;
00195             } 
00196           else if (echar > e_thHC1_mip && echar <= e_thHC2_mip) 
00197             {
00198               double fhcal_mip = PAR3_HC_mip * sqrt(echar) + PAR4_HC_mip;
00199               rhcal=echar*fhcal_mip;
00200             } 
00201           else 
00202             {
00203               rhcal=echar*PAR5_HC_mip;
00204             } // hcal response, MIP
00205       
00206         } // interact or not
00207     } // algo = 2
00208 
00209   else if (algo == 3) // OSCAR_3_6_0
00210     {
00211 //       std::cout<<" SingleParticleJetResponse for OSCAR360 "<<energycluster<<std::endl;
00212       // threshold on energy of track
00213       e_thEC_hint = 1000.;
00214       e_thHC_hint = 0.5;
00215       e_thHC1_mip = 12.;
00216       e_thHC2_mip = 30.;
00217 
00218       // parameters for Ecal responses with interaction in Ecal
00219       PAR1_EC_hint = -0.54951E-03;
00220       PAR2_EC_hint = 0.42609;
00221       PAR3_EC_hint = -2.8831;
00222       PAR4_EC_hint = 0.33487;
00223       
00224       // parameters for Hcal responses with interaction in Ecal
00225       PAR1_HC_hint = -0.028222;
00226       PAR2_HC_hint = 0.43868;
00227       PAR3_HC_hint = 0.12144;
00228       PAR4_HC_hint = -0.63474;
00229 
00230       // parameters for Hcal responses without interaction in Ecal (MIP)
00231       PAR1_HC_mip  = 0.86455E-01;
00232       PAR2_HC_mip  = -0.36659;
00233       PAR3_HC_mip  = 0.60879E-01;
00234       PAR4_HC_mip  = 0.64219;
00235       PAR5_HC_mip  = 0.96800;
00236      
00237       if(energycluster>0.5) 
00238         {
00239           if(echar <= e_thEC_hint) 
00240             {
00241               double fecal_hint = PAR1_EC_hint * (echar) + PAR2_EC_hint;
00242               recal = echar*fecal_hint;
00243             }
00244           else 
00245             {
00246               double fecal_hint = PAR3_EC_hint/(-echar) + PAR4_EC_hint;
00247               recal = echar*fecal_hint;
00248             }
00249 
00250           if(echar <= e_thHC_hint) 
00251             {
00252               double fhcal_hint = PAR1_HC_hint * echar + PAR2_HC_hint;
00253               rhcal=echar*fhcal_hint;
00254             }
00255           else 
00256             {
00257               double fhcal_hint = PAR3_HC_hint * (log(echar) + PAR4_HC_hint);
00258               rhcal=echar*fhcal_hint;
00259             } // hcal response, interact=1
00260           
00261 //        std::cout<<" Interacted in ECAL Ecal resp / Hcal resp "<<recal<<" "<<rhcal<<std::endl;
00262           // MIP, interact=0
00263         }
00264       else 
00265         {
00266           recal=energycluster;
00267           if(echar <= e_thHC1_mip) 
00268             {
00269               double fhcal_mip = PAR1_HC_mip * (echar + PAR2_HC_mip);
00270               rhcal=echar*fhcal_mip;
00271             } 
00272           else if (echar > e_thHC1_mip && echar <= e_thHC2_mip) 
00273             {
00274               double fhcal_mip = PAR3_HC_mip * sqrt(echar) + PAR4_HC_mip;
00275               rhcal=echar*fhcal_mip;
00276             } else 
00277             {
00278               rhcal=echar*PAR5_HC_mip;
00279             } // hcal response, MIP
00280           
00281 //        std::cout<<" Non-Interacted in ECAL Ecal resp / Hcal resp "<<recal<<" "<<rhcal<<std::endl;
00282           
00283         } // interact or not
00284     } // algo = 3
00285     
00286 //=> algo = 4, CMSSW_130_pre3
00287 
00288   else if (algo == 4) // CMSSW_130_pre3 (with Ecal Zero Suppression)
00289     {
00290       // threshold on energy of track
00291       
00292       e_thHC1_mip = 35.;
00293       
00294       // parameters for Ecal responses with interaction in Ecal
00295       PAR1_EC_hint = 22.976;
00296       PAR2_EC_hint = 55.913;
00297       
00298       // parameters for Hcal responses with interaction in Ecal
00299       PAR1_HC_hint = 0.20229E-01;
00300       PAR2_HC_hint = 0.30293;
00301       
00302       // parameters for Hcal responses without interaction in Ecal (MIP)
00303       PAR1_HC_mip  = 0.52371E-01;
00304       PAR2_HC_mip  = 0.66230;
00305       PAR3_HC_mip  = 0.96957;
00306       
00307       if(energycluster>0.7) 
00308         {
00309           double fecal_hint = PAR1_EC_hint / (sqrt(echar) + PAR2_EC_hint);
00310           recal = echar*fecal_hint;
00311           
00312           double fhcal_hint = PAR1_HC_hint * sqrt(echar) + PAR2_HC_hint;
00313           rhcal=echar*fhcal_hint;
00314         } // ecal, hcal responses, interact=1;
00315         
00316         // MIP, interact=0 
00317       else 
00318         {
00319           recal=energycluster;
00320           if(echar <= e_thHC1_mip) 
00321             {
00322               double fhcal_mip = PAR1_HC_mip * sqrt(echar) + PAR2_HC_mip;
00323               rhcal=echar*fhcal_mip;
00324             }  
00325           else 
00326             {
00327               rhcal=echar*PAR3_HC_mip;
00328             } // hcal response, MIP
00329           
00330         } // interact or not
00331     } // algo = 4
00332           
00333   else if (algo == 5) // CMSSW_130_pre3 (without Ecal Zero Suppression)
00334                       // without MIP definition
00335     {
00336       // threshold on energy of track
00337       
00338       e_thEC1 = 3.;
00339       e_thEC2 = 15.;
00340       e_thHC1 = 18.;
00341       
00342       // parameters for Ecal responses with (without) interaction in Ecal
00343       PAR1_EC = 0.12560;
00344       PAR2_EC = 2.0539;
00345       PAR3_EC = 5.1346;
00346       PAR4_EC = 0.22829;
00347       
00348       // parameters for Hcal responses with (without) interaction in Ecal
00349       PAR1_HC = 0.15370;
00350       PAR2_HC = 0.79737;
00351       PAR3_HC = 0.69524E-01;
00352       PAR4_HC = 5.2839;
00353 
00354 // Ecal responses
00355           if(echar <= e_thEC1) 
00356             {
00357               double fecal = PAR1_EC * echar;
00358               recal=echar*fecal;
00359             } 
00360            else if (echar > e_thEC1 && echar <= e_thEC2) 
00361             {
00362               double fecal = PAR2_EC / (sqrt(echar) + PAR3_EC);
00363               recal=echar*fecal;
00364             } 
00365            else 
00366             {
00367               recal=echar*PAR4_EC;
00368             } // ecal response
00369             
00370 //Hcal responses
00371           if(echar <= e_thHC1) 
00372             {
00373               double fhcal = PAR1_HC * (log(echar) + PAR2_HC);
00374               rhcal=echar*fhcal;
00375             }  
00376           else 
00377             {
00378               double fhcal = PAR3_HC * (log(echar) + PAR4_HC);
00379               rhcal=echar*fhcal;
00380             } // hcal response
00381           
00382 
00383     } // algo = 5
00384 //  cout<<"CMSSW130 Algo = "<<algo<<" Ecal response= "<<recal <<" Hcal response= "<<rhcal<<" Energy of track= "<<echar<<endl;            
00385   response.push_back(recal);
00386   response.push_back(rhcal);
00387   return response;
00388 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:48 2009 for CMSSW by  doxygen 1.5.4