Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:33

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 /// \file Par02DetectorParametrisation.cc
0028 /// \brief Implementation of the Par02DetectorParametrisation class
0029 
0030 #include "Par02DetectorParametrisation.hh"
0031 
0032 #include "G4SystemOfUnits.hh"
0033 #include "G4UnitsTable.hh"
0034 
0035 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0036 
0037 Par02DetectorParametrisation::Par02DetectorParametrisation() = default;
0038 
0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0040 
0041 Par02DetectorParametrisation::~Par02DetectorParametrisation() = default;
0042 
0043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0044 
0045 G4double Par02DetectorParametrisation::GetResolution(Detector aDetector, Parametrisation aParam,
0046                                                      G4double aMomentum)
0047 {
0048   aMomentum /= GeV;  // To make sure momentum's unit is GeV
0049   G4double res = 1.0;
0050   if (aParam == eCMS) {
0051     switch (aDetector) {
0052       case Par02DetectorParametrisation::eTRACKER:
0053         res = 0.013;
0054         break;
0055       case Par02DetectorParametrisation::eEMCAL:
0056         res = std::sqrt(std::pow(0.03 / std::sqrt(aMomentum), 2)  // stochastic
0057                         + std::pow(0.12 / aMomentum, 2)  // noise
0058                         + std::pow(0.003, 2));  // constant
0059         break;
0060       case Par02DetectorParametrisation::eHCAL:
0061         res = std::sqrt(std::pow(1.1 / std::sqrt(aMomentum), 2)  // stochastic
0062                         + std::pow(0.09, 2));  // constant
0063         break;
0064     }
0065   }
0066   else if (aParam == eATLAS) {
0067     switch (aDetector) {
0068       case Par02DetectorParametrisation::eTRACKER:
0069         res = 0.01;
0070         break;
0071       case Par02DetectorParametrisation::eEMCAL:
0072         res = std::sqrt(std::pow(0.1 / std::sqrt(aMomentum), 2)  // stochastic
0073                         + std::pow(0.0017, 2));  // constant
0074         break;
0075       case Par02DetectorParametrisation::eHCAL:
0076         res = std::sqrt(std::pow(0.55 / std::sqrt(aMomentum), 2)  // stochastic
0077                         + std::pow(0.06, 2));  // constant
0078         break;
0079     }
0080   }
0081   else if (aParam == eALEPH) {
0082     switch (aDetector) {
0083       case Par02DetectorParametrisation::eTRACKER:
0084         res = 0.01;
0085         break;
0086       case Par02DetectorParametrisation::eEMCAL:
0087         res = std::sqrt(std::pow(0.18 / std::sqrt(aMomentum), 2)  // stochastic
0088                         + std::pow(0.009, 2));  // constant
0089         break;
0090       case Par02DetectorParametrisation::eHCAL:
0091         res = 0.85 / std::sqrt(aMomentum);  // stochastic
0092         break;
0093     }
0094   }
0095   return res;
0096 }
0097 
0098 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0099 
0100 G4double Par02DetectorParametrisation::GetEfficiency(Detector aDetector, Parametrisation /*aParam*/,
0101                                                      G4double /*aMomentum*/)
0102 {
0103   // For the time being, we set the efficiency to 1.0
0104   G4double eff = 1.0;
0105   switch (aDetector) {
0106     case Par02DetectorParametrisation::eTRACKER:
0107       eff = 1.0;
0108       break;
0109     case Par02DetectorParametrisation::eEMCAL:
0110       eff = 1.0;
0111       break;
0112     case Par02DetectorParametrisation::eHCAL:
0113       eff = 1.0;
0114       break;
0115   }
0116   return eff;
0117 }
0118 
0119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......