Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:20:45

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 GB02/include/GB02BOptrMultiParticleForceCollision.hh
0027 /// \brief Definition of the GB02BOptrMultiParticleForceCollision class
0028 //
0029 #ifndef GB02BOptrMultiParticleForceCollision_hh
0030 #define GB02BOptrMultiParticleForceCollision_hh 1
0031 
0032 #include "G4VBiasingOperator.hh"
0033 class G4BOptrForceCollision;
0034 class G4ParticleDefinition;
0035 
0036 #include <map>
0037 
0038 class GB02BOptrMultiParticleForceCollision : public G4VBiasingOperator
0039 {
0040   public:
0041     GB02BOptrMultiParticleForceCollision();
0042     virtual ~GB02BOptrMultiParticleForceCollision() {}
0043 
0044     // --------------------------
0045     // -- Specific to this class:
0046     // --------------------------
0047     // -- Declare particles to be biased:
0048     void AddParticle(G4String particleName);
0049 
0050   private:
0051     // -----------------------------
0052     // -- Mandatory from base class:
0053     // -----------------------------
0054     virtual G4VBiasingOperation*
0055     ProposeNonPhysicsBiasingOperation(const G4Track* track,
0056                                       const G4BiasingProcessInterface* callingProcess) final;
0057     virtual G4VBiasingOperation*
0058     ProposeOccurenceBiasingOperation(const G4Track* track,
0059                                      const G4BiasingProcessInterface* callingProcess) final;
0060     virtual G4VBiasingOperation*
0061     ProposeFinalStateBiasingOperation(const G4Track* track,
0062                                       const G4BiasingProcessInterface* callingProcess) final;
0063 
0064   private:
0065     // -------------------------------
0066     // -- Optionnal, from base class :
0067     // -------------------------------
0068     // -- Here, these are needed implementions to forward calls to the underneath
0069     // -- G4BOptrForceCollision biasing operator
0070     void OperationApplied(const G4BiasingProcessInterface* callingProcess,
0071                           G4BiasingAppliedCase biasingCase, G4VBiasingOperation* operationApplied,
0072                           const G4VParticleChange* particleChangeProduced) final;
0073     void OperationApplied(const G4BiasingProcessInterface* callingProcess,
0074                           G4BiasingAppliedCase biasingCase,
0075                           G4VBiasingOperation* occurenceOperationApplied,
0076                           G4double weightForOccurenceInteraction,
0077                           G4VBiasingOperation* finalStateOperationApplied,
0078                           const G4VParticleChange* particleChangeProduced) final;
0079 
0080     void ExitBiasing(const G4Track*, const G4BiasingProcessInterface*) final;
0081 
0082   public:
0083     virtual void StartTracking(const G4Track* track) final;
0084 
0085   private:
0086     std::map<const G4ParticleDefinition*, G4BOptrForceCollision*> fBOptrForParticle;
0087     std::vector<const G4ParticleDefinition*> fParticlesToBias;
0088     G4BOptrForceCollision* fCurrentOperator;
0089 };
0090 
0091 #endif