Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:46

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 // 20100202  M. Kelsey -- Move most code into .cc file
0028 // 20100405  M. Kelsey -- Pass const-ref std::vector<>
0029 // 20101010  M. Kelsey -- Migrate to integer A and Z
0030 
0031 #ifndef G4NUCL_WATCHER_HH
0032 #define G4NUCL_WATCHER_HH
0033 
0034 #include "G4Types.hh"
0035 
0036 #include <algorithm>
0037 #include <vector>
0038 #include <cmath>
0039 
0040 class G4NuclWatcher {
0041 public:
0042   G4NuclWatcher(G4int z, 
0043         const std::vector<G4double>& expa, 
0044         const std::vector<G4double>& expcs, 
0045         const std::vector<G4double>& experr, 
0046         G4bool check, 
0047         G4bool nucl);
0048 
0049   ~G4NuclWatcher() {}
0050 
0051   void watch(G4int a, G4int z);
0052   void setInuclCs(G4double csec, G4int nev);
0053 
0054   G4double getChsq() const { return izotop_chsq; }
0055   G4bool to_check() const { return checkable; }
0056   G4bool look_forNuclei() const { return nucleable; }
0057   G4double getLhood() const { return aver_lhood; }
0058   G4double getNmatched() const { return aver_matched; }
0059 
0060   std::pair<G4double, G4double> getExpCs() const;
0061   std::pair<G4double, G4double> getInuclCs() const;
0062 
0063   std::pair<G4double, G4double> getAverageRatio() const { 
0064     return std::pair<G4double, G4double>(average_ratio, aver_rat_err); 
0065   }
0066 
0067   void print();
0068 
0069 private: 
0070   G4int nuclz;
0071   G4double izotop_chsq;
0072   G4double average_ratio;
0073   G4double aver_rat_err;
0074   G4double aver_lhood;
0075   G4double aver_matched;
0076   std::vector<G4double> exper_as;
0077   std::vector<G4double> exper_cs;
0078   std::vector<G4double> exper_err;
0079   std::vector<G4double> simulated_as;
0080   std::vector<G4double> simulated_cs;
0081   std::vector<G4double> simulated_errors;
0082   std::vector<G4double> simulated_prob;
0083   G4bool checkable;
0084   G4bool nucleable;
0085 };
0086 
0087 #endif // G4NUCL_WATCHER_HH 
0088