Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-19 08:37:53

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 BiasingOperator.hh
0027 /// \brief Definition of the BiasingOperator class
0028 
0029 #ifndef BiasingOperator_hh
0030 #define BiasingOperator_hh 1
0031 
0032 #include "G4VBiasingOperator.hh"
0033 
0034 #include <vector>
0035 
0036 class G4ParticleDefinition;
0037 class BiasingOperation;
0038 
0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0040 
0041 class BiasingOperator : public G4VBiasingOperator
0042 {
0043     // When a proton, or neutron, or pion+ or pion- inelastic process occurs
0044     // (naturally, without any biasing) in the logical volume(s) where this
0045     // biasing operator has been attached to, this class uses the biasing "trick"
0046     // of calling FTFP+INCLXX instead of FTFP+BERT for determining the final-state.
0047     // Note that the weights of the produced secondaries are left to their default values, 1.0.
0048   public:
0049     BiasingOperator();
0050     virtual ~BiasingOperator() {}
0051     void AddParticle(G4String particleName);
0052     virtual G4VBiasingOperation*
0053     ProposeFinalStateBiasingOperation(const G4Track* track,
0054                                       const G4BiasingProcessInterface* callingProcess) final;
0055     // Not used:
0056     virtual G4VBiasingOperation* ProposeNonPhysicsBiasingOperation(const G4Track*,
0057                                                                    const G4BiasingProcessInterface*)
0058     {
0059       return 0;
0060     }
0061     virtual G4VBiasingOperation* ProposeOccurenceBiasingOperation(const G4Track*,
0062                                                                   const G4BiasingProcessInterface*)
0063     {
0064       return 0;
0065     }
0066 
0067   private:
0068     std::vector<const G4ParticleDefinition*> fParticlesToBias;
0069     BiasingOperation* fBiasingOperation;
0070 };
0071 
0072 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0073 
0074 #endif