Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4ChannelingOptrChangeCrossSection.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 //
0028 // G4ChannelingOptrChangeCrossSection
0029 // Based On GB01BOptrChangeCrossSection
0030 // Class Description:
0031 //        A G4VBiasingOperator concrete implementation example to
0032 //    illustrate how to bias physics processes cross-section for
0033 //    one particle type.
0034 //        The G4VBiasingOperation G4BOptnChangeCrossSection is
0035 //    selected by this operator, and is sent to each process
0036 //    calling the operator.
0037 //        A simple constant bias to the cross-section is applied,
0038 //    but more sophisticated changes can be applied.
0039 //
0040 //---------------------------------------------------------------
0041 //
0042 
0043 #ifndef G4ChannelingOptrChangeCrossSection_hh
0044 #define G4ChannelingOptrChangeCrossSection_hh 1
0045 
0046 #include "G4VBiasingOperator.hh"
0047 class G4BOptnChangeCrossSection;
0048 class G4ParticleDefinition;
0049 #include <map>
0050 #include <unordered_map>
0051 
0052 enum G4ChannelingDensityRatio{
0053     fDensityRatioNotDefined = -1,
0054     fDensityRatioNone = 0,
0055     fDensityRatioNuDElD = 1,
0056     fDensityRatioNuD = 2,
0057     fDensityRatioElD = 3
0058 };
0059 
0060 class G4ChannelingOptrChangeCrossSection : public G4VBiasingOperator {
0061 public:
0062     // ------------------------------------------------------------
0063     // -- Constructor: takes the name of the particle type to bias:
0064     // ------------------------------------------------------------
0065     G4ChannelingOptrChangeCrossSection(G4String particleToBias, G4String name = "ChannelingChangeXS");
0066     virtual ~G4ChannelingOptrChangeCrossSection();
0067     virtual void StartRun();
0068     
0069 private:
0070     G4int fChannelingID;
0071     
0072 private:
0073     virtual G4VBiasingOperation*
0074     ProposeOccurenceBiasingOperation(const G4Track*                            track,
0075                                      const G4BiasingProcessInterface* callingProcess);
0076     virtual G4VBiasingOperation*
0077     ProposeFinalStateBiasingOperation(const G4Track*, const G4BiasingProcessInterface*)
0078     {return 0;}
0079     virtual G4VBiasingOperation*
0080     ProposeNonPhysicsBiasingOperation(const G4Track*, const G4BiasingProcessInterface*)
0081     {return 0;}
0082     
0083 private:
0084     using G4VBiasingOperator::OperationApplied;
0085     virtual void OperationApplied( const G4BiasingProcessInterface*                callingProcess,
0086                                   G4BiasingAppliedCase                               biasingCase,
0087                                   G4VBiasingOperation*                 occurenceOperationApplied,
0088                                   G4double                         weightForOccurenceInteraction,
0089                                   G4VBiasingOperation*                finalStateOperationApplied,
0090                                   const G4VParticleChange*                particleChangeProduced );
0091     
0092 private:
0093     std::map< const G4BiasingProcessInterface*,
0094     G4BOptnChangeCrossSection*       > fChangeCrossSectionOperations;
0095     G4bool                                  fSetup;
0096     const G4ParticleDefinition*    fParticleToBias;
0097     
0098 private:
0099     std::unordered_map<std::string,G4ChannelingDensityRatio> fProcessToDensity;
0100 };
0101 
0102 #endif