Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-15 07:54:00

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 /// \file Par02DetectorParametrisation.cc
0027 /// \brief Implementation of the Par02DetectorParametrisation class
0028 
0029 #include "Par02DetectorParametrisation.hh"
0030 
0031 #include "G4SystemOfUnits.hh"
0032 #include "G4UnitsTable.hh"
0033 
0034 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0035 
0036 Par02DetectorParametrisation::Par02DetectorParametrisation() = default;
0037 
0038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0039 
0040 Par02DetectorParametrisation::~Par02DetectorParametrisation() = default;
0041 
0042 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0043 
0044 G4double Par02DetectorParametrisation::GetResolution(Detector aDetector, Parametrisation aParam,
0045                                                      G4double aMomentum)
0046 {
0047   aMomentum /= GeV;  // To make sure momentum's unit is GeV
0048   G4double res = 1.0;
0049   if (aParam == eCMS) {
0050     switch (aDetector) {
0051       case Par02DetectorParametrisation::eTRACKER:
0052         res = 0.013;
0053         break;
0054       case Par02DetectorParametrisation::eEMCAL:
0055         res = std::sqrt(std::pow(0.03 / std::sqrt(aMomentum), 2)  // stochastic
0056                         + std::pow(0.12 / aMomentum, 2)  // noise
0057                         + std::pow(0.003, 2));  // constant
0058         break;
0059       case Par02DetectorParametrisation::eHCAL:
0060         res = std::sqrt(std::pow(1.1 / std::sqrt(aMomentum), 2)  // stochastic
0061                         + std::pow(0.09, 2));  // constant
0062         break;
0063     }
0064   }
0065   else if (aParam == eATLAS) {
0066     switch (aDetector) {
0067       case Par02DetectorParametrisation::eTRACKER:
0068         res = 0.01;
0069         break;
0070       case Par02DetectorParametrisation::eEMCAL:
0071         res = std::sqrt(std::pow(0.1 / std::sqrt(aMomentum), 2)  // stochastic
0072                         + std::pow(0.0017, 2));  // constant
0073         break;
0074       case Par02DetectorParametrisation::eHCAL:
0075         res = std::sqrt(std::pow(0.55 / std::sqrt(aMomentum), 2)  // stochastic
0076                         + std::pow(0.06, 2));  // constant
0077         break;
0078     }
0079   }
0080   else if (aParam == eALEPH) {
0081     switch (aDetector) {
0082       case Par02DetectorParametrisation::eTRACKER:
0083         res = 0.01;
0084         break;
0085       case Par02DetectorParametrisation::eEMCAL:
0086         res = std::sqrt(std::pow(0.18 / std::sqrt(aMomentum), 2)  // stochastic
0087                         + std::pow(0.009, 2));  // constant
0088         break;
0089       case Par02DetectorParametrisation::eHCAL:
0090         res = 0.85 / std::sqrt(aMomentum);  // stochastic
0091         break;
0092     }
0093   }
0094   return res;
0095 }
0096 
0097 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0098 
0099 G4double Par02DetectorParametrisation::GetEfficiency(Detector aDetector, Parametrisation /*aParam*/,
0100                                                      G4double /*aMomentum*/)
0101 {
0102   // For the time being, we set the efficiency to 1.0
0103   G4double eff = 1.0;
0104   switch (aDetector) {
0105     case Par02DetectorParametrisation::eTRACKER:
0106       eff = 1.0;
0107       break;
0108     case Par02DetectorParametrisation::eEMCAL:
0109       eff = 1.0;
0110       break;
0111     case Par02DetectorParametrisation::eHCAL:
0112       eff = 1.0;
0113       break;
0114   }
0115   return eff;
0116 }
0117 
0118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......