EnergyResolution Namespace Reference

Functions

Double_t GetResolution (Double_t trkmomentum, Double_t trkmomentumerr, Double_t shwenergy, Double_t shwenergyerr, Bool_t rangecurve, Bool_t containedvertex=1, Bool_t useshwenergy=1, Detector::Detector_t detector=Detector::kFar, ReleaseType::Release_t release=(ReleaseType::kDogwood|ReleaseType::kDaikon))
Double_t MuonResolution (Double_t trkmomentum, Double_t trkmomentumerr, Bool_t rangecurve, Bool_t containedvertex=1, Detector::Detector_t detector=Detector::kFar, ReleaseType::Release_t release=(ReleaseType::kDogwood|ReleaseType::kDaikon))
Double_t ShowerResolution (Double_t shwenergy, Double_t shwenergyerr, Bool_t useshwenergy=1, Detector::Detector_t detector=Detector::kFar, ReleaseType::Release_t release=(ReleaseType::kDogwood|ReleaseType::kDaikon))
Double_t MuonResolutionDogwoodFar (Double_t trkmomentum, Double_t trkmomentumerr, Bool_t rangecurve, Bool_t containedvertex)
Double_t MuonResolutionDogwoodNear (Double_t trkmomentum, Double_t trkmomentumerr, Bool_t rangecurve, Bool_t containedvertex)
Double_t MuonResolutionCedar (Double_t trkmomentum, Double_t trkmomentumerr, Bool_t rangecurve, Bool_t containedvertex)
Double_t ShowerResolutionDogwoodFar (Double_t shwenergy, Double_t shwenergyerr, Bool_t useshwenergy)
Double_t ShowerResolutionDogwoodNear (Double_t shwenergy, Double_t shwenergyerr, Bool_t useshwenergy)
Double_t ShowerResolutionCedar (Double_t shwenergy)

Function Documentation

Double_t EnergyResolution::GetResolution ( Double_t  trkmomentum,
Double_t  trkmomentumerr,
Double_t  shwenergy,
Double_t  shwenergyerr,
Bool_t  rangecurve,
Bool_t  containedvertex = 1,
Bool_t  useshwenergy = 1,
Detector::Detector_t  detector = Detector::kFar,
ReleaseType::Release_t  release = (ReleaseType::kDogwood|ReleaseType::kDaikon) 
)

Definition at line 7 of file EnergyResolution.cxx.

References MuonResolution(), and ShowerResolution().

00008 {
00009   Double_t muon_resolution = MuonResolution(trkmomentum, trkmomentumerr,
00010                                             rangecurve, containedvertex, 
00011                                             detector, release );
00012 
00013   Double_t shower_resolution = ShowerResolution(shwenergy, shwenergyerr,
00014                                                 useshwenergy,
00015                                                 detector, release );
00016 
00017   return sqrt( muon_resolution*muon_resolution + shower_resolution*shower_resolution );
00018 }

Double_t EnergyResolution::MuonResolution ( Double_t  trkmomentum,
Double_t  trkmomentumerr,
Bool_t  rangecurve,
Bool_t  containedvertex = 1,
Detector::Detector_t  detector = Detector::kFar,
ReleaseType::Release_t  release = (ReleaseType::kDogwood|ReleaseType::kDaikon) 
)

Definition at line 42 of file EnergyResolution.cxx.

References ReleaseType::kCedar, ReleaseType::kDogwood, Detector::kFar, Detector::kNear, MuonResolutionCedar(), MuonResolutionDogwoodFar(), and MuonResolutionDogwoodNear().

Referenced by NuReco::CalcResolution(), and GetResolution().

00043 {
00044   // dogwood resolution
00045   if( (release&ReleaseType::kDogwood)==(ReleaseType::kDogwood) ){
00046     if( detector == Detector::kNear ) return MuonResolutionDogwoodNear(trkmomentum,trkmomentumerr,
00047                                                                        rangecurve,containedvertex);
00048     if( detector == Detector::kFar ) return MuonResolutionDogwoodFar(trkmomentum,trkmomentumerr,
00049                                                                      rangecurve,containedvertex);
00050   }
00051 
00052   // cedar resolution
00053   else if( (release&ReleaseType::kCedar)==(ReleaseType::kCedar) ){
00054     if( detector == Detector::kNear ) return MuonResolutionCedar(trkmomentum,trkmomentumerr,
00055                                                                  rangecurve,containedvertex);
00056     if( detector == Detector::kFar ) return MuonResolutionCedar(trkmomentum,trkmomentumerr,
00057                                                                 rangecurve,containedvertex);
00058   }
00059 
00060   // default to zero
00061   return 0.0;
00062 }

Double_t EnergyResolution::MuonResolutionCedar ( Double_t  trkmomentum,
Double_t  trkmomentumerr,
Bool_t  rangecurve,
Bool_t  containedvertex 
)

Definition at line 114 of file EnergyResolution.cxx.

Referenced by MuonResolution().

00115 {
00116   if( containedvertex ){
00117 
00118     // momentum from range
00119     if( rangecurve ){
00120       Double_t trkmomentum_input = trkmomentum;
00121       if( trkmomentum_input<0.0 ) trkmomentum_input = 0.0;
00122 
00123       Double_t fRange0 = 0.0;    // Emu = 0  : sigma   -> 0 GeV
00124       Double_t fRange1 = 0.0467; // Emu >> 0 : sigma/E -> 4.7%/sqrt(E) + 7%
00125       Double_t fRange2 = 0.0700; // Emu >> 0 : sigma/E -> 4.7%/sqrt(E) + 7%
00126 
00127       Double_t rangesigma0 = fRange0;
00128       Double_t rangesigma1 = fRange1*sqrt(trkmomentum_input);
00129       Double_t rangesigma2 = fRange2*trkmomentum_input;
00130 
00131       return sqrt( rangesigma0*rangesigma0 + rangesigma1*rangesigma1 + rangesigma2*rangesigma2 );
00132     }
00133 
00134     // momentum from curvature
00135     else{
00136       Double_t trkmomentumerr_input = trkmomentumerr;
00137       if( trkmomentumerr_input<0.0 ) trkmomentumerr_input = 0.0;
00138 
00139       Double_t fCurve0 = 0.0;
00140       Double_t fCurve1 = 1.237;
00141       Double_t fCurve2 = 1.198;
00142 
00143       Double_t curvesigma0 = fCurve0;
00144       Double_t curvesigma1 = fCurve1*sqrt(trkmomentumerr_input);
00145       Double_t curvesigma2 = fCurve2*trkmomentumerr_input;
00146 
00147       return sqrt( curvesigma0*curvesigma0 + curvesigma1*curvesigma1 + curvesigma2*curvesigma2 );
00148     }
00149   }
00150 
00151   // default to zero
00152   return 0.0;
00153 }

Double_t EnergyResolution::MuonResolutionDogwoodFar ( Double_t  trkmomentum,
Double_t  trkmomentumerr,
Bool_t  rangecurve,
Bool_t  containedvertex 
)

Definition at line 73 of file EnergyResolution.cxx.

Referenced by MuonResolution(), and MuonResolutionDogwoodNear().

00074 {
00075   if( containedvertex ){
00076 
00077     // momentum from range
00078     if( rangecurve ){
00079       Double_t trkmomentum_input = trkmomentum;
00080       if( trkmomentum_input<0.0 ) trkmomentum_input = 0.0;
00081 
00082       Double_t fRange0 = 0.0;    // Emu = 0  : sigma   -> 0 GeV
00083       Double_t fRange1 = 0.0512; // Emu >> 0 : sigma/E -> 5.1%/sqrt(E) + 6.9%
00084       Double_t fRange2 = 0.0692; // Emu >> 0 : sigma/E -> 5.1%/sqrt(E) + 6.9%
00085      
00086       Double_t rangesigma0 = fRange0;
00087       Double_t rangesigma1 = fRange1*sqrt(trkmomentum_input);
00088       Double_t rangesigma2 = fRange2*trkmomentum_input;
00089 
00090       return sqrt( rangesigma0*rangesigma0 + rangesigma1*rangesigma1 + rangesigma2*rangesigma2 );
00091     }
00092 
00093     // momentum from curvature
00094     else{
00095       Double_t trkmomentumerr_input = trkmomentumerr;
00096       if( trkmomentumerr_input<0.0 ) trkmomentumerr_input = 0.0;
00097 
00098       Double_t fCurve0 = 0.0;
00099       Double_t fCurve1 = 1.341;
00100       Double_t fCurve2 = 1.000;
00101 
00102       Double_t curvesigma0 = fCurve0;
00103       Double_t curvesigma1 = fCurve1*sqrt(trkmomentumerr_input);
00104       Double_t curvesigma2 = fCurve2*trkmomentumerr_input;
00105 
00106       return sqrt( curvesigma0*curvesigma0 + curvesigma1*curvesigma1 + curvesigma2*curvesigma2 );
00107     }
00108   }
00109 
00110   // default to zero
00111   return 0.0;
00112 }

Double_t EnergyResolution::MuonResolutionDogwoodNear ( Double_t  trkmomentum,
Double_t  trkmomentumerr,
Bool_t  rangecurve,
Bool_t  containedvertex 
)

Definition at line 68 of file EnergyResolution.cxx.

References MuonResolutionDogwoodFar().

Referenced by MuonResolution().

00069 {
00070   return MuonResolutionDogwoodFar(trkmomentum, trkmomentumerr, rangecurve, containedvertex);
00071 }

Double_t EnergyResolution::ShowerResolution ( Double_t  shwenergy,
Double_t  shwenergyerr,
Bool_t  useshwenergy = 1,
Detector::Detector_t  detector = Detector::kFar,
ReleaseType::Release_t  release = (ReleaseType::kDogwood|ReleaseType::kDaikon) 
)

Definition at line 22 of file EnergyResolution.cxx.

References ReleaseType::kCedar, ReleaseType::kDogwood, Detector::kFar, Detector::kNear, ShowerResolutionCedar(), ShowerResolutionDogwoodFar(), and ShowerResolutionDogwoodNear().

Referenced by NuReco::CalcResolution(), and GetResolution().

00023 {
00024   // dogwood resolution
00025   if( (release&ReleaseType::kDogwood)==(ReleaseType::kDogwood) ){
00026     if( detector == Detector::kNear ) return ShowerResolutionDogwoodNear(shwenergy, shwenergyerr, useshwenergy);
00027     if( detector == Detector::kFar ) return ShowerResolutionDogwoodFar(shwenergy, shwenergyerr, useshwenergy);
00028   }
00029 
00030   // cedar resolution
00031   else if( (release&ReleaseType::kCedar)==(ReleaseType::kCedar) ){
00032     if( detector == Detector::kNear ) return ShowerResolutionCedar(shwenergy);
00033     if( detector == Detector::kFar ) return ShowerResolutionCedar(shwenergy);
00034   }
00035   
00036   // default to zero
00037   return 0.0;
00038 }

Double_t EnergyResolution::ShowerResolutionCedar ( Double_t  shwenergy  ) 

Definition at line 202 of file EnergyResolution.cxx.

Referenced by ShowerResolution().

00203 {
00204   // shower resolution from energy
00205   Double_t shwenergy_input = shwenergy;
00206   if( shwenergy_input<0.0 ) shwenergy_input = 0.0;
00207 
00208   Double_t fShw0 = 0.190;  // Eshw = 0  : sigma   -> 190 MeV
00209   Double_t fShw1 = 0.509;  // Eshw >> 0 : sigma/E -> 51%/sqrt(E) 
00210   Double_t fShw2 = 0.0;
00211 
00212   Double_t shwsigma0 = fShw0;
00213   Double_t shwsigma1 = fShw1*sqrt(shwenergy_input);
00214   Double_t shwsigma2 = fShw2*shwenergy_input;
00215 
00216   return sqrt( shwsigma0*shwsigma0 + shwsigma1*shwsigma1 + shwsigma2*shwsigma2 );
00217 }  

Double_t EnergyResolution::ShowerResolutionDogwoodFar ( Double_t  shwenergy,
Double_t  shwenergyerr,
Bool_t  useshwenergy 
)

Definition at line 164 of file EnergyResolution.cxx.

Referenced by ShowerResolution(), and ShowerResolutionDogwoodNear().

00165 {
00166   // shower resolution from energy
00167   if( useshwenergy ){  
00168     Double_t shwenergy_input = shwenergy;
00169     if( shwenergy_input<0.0 ) shwenergy_input = 0.0;
00170 
00171     Double_t fShw0 = 0.257;    // Value before kNN bug fix: 0.181;  // Eshw = 0  : sigma   -> 257 MeV
00172     Double_t fShw1 = 0.404;    // Value before kNN bug fix: 0.425;  // Eshw >> 0 : sigma/E -> 40.4%/sqrt(E) + 8.6%
00173     Double_t fShw2 = 0.086;    // Value before kNN bug fix: 0.075;  // Eshw >> 0 : sigma/E -> 40.4%/sqrt(E) + 8.6%
00174 
00175     Double_t shwsigma0 = fShw0;
00176     Double_t shwsigma1 = fShw1*sqrt(shwenergy_input);
00177     Double_t shwsigma2 = fShw2*shwenergy_input;
00178 
00179     return sqrt( shwsigma0*shwsigma0 + shwsigma1*shwsigma1 + shwsigma2*shwsigma2 );
00180   }
00181 
00182   // shower resolution from error
00183   else{  
00184     Double_t shwenergyerr_input = shwenergyerr;
00185     if( shwenergyerr_input<0.0 ) shwenergyerr_input = 0.0;
00186 
00187     Double_t fShw0 = 0.0;      // Value before kNN bug fix: 0.0;
00188     Double_t fShw1 = 0.455;    // Value before kNN bug fix: 0.436;
00189     Double_t fShw2 = 0.862;    // Value before kNN bug fix: 0.861;
00190 
00191     Double_t shwsigma0 = fShw0;
00192     Double_t shwsigma1 = fShw1*sqrt(shwenergyerr_input);
00193     Double_t shwsigma2 = fShw2*shwenergyerr_input;
00194 
00195     return sqrt( shwsigma0*shwsigma0 + shwsigma1*shwsigma1 + shwsigma2*shwsigma2 );
00196   }
00197 
00198   // default to zero
00199   return 0.0;
00200 }

Double_t EnergyResolution::ShowerResolutionDogwoodNear ( Double_t  shwenergy,
Double_t  shwenergyerr,
Bool_t  useshwenergy 
)

Definition at line 159 of file EnergyResolution.cxx.

References ShowerResolutionDogwoodFar().

Referenced by ShowerResolution().

00160 {
00161   return ShowerResolutionDogwoodFar(shwenergy, shwenergyerr, useshwenergy);
00162 }


Generated on 16 Jan 2018 for loon by  doxygen 1.6.1