G4NeutronHPInelasticCompFS.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 #ifndef G4NeutronHPInelasticCompFS_h
00030 #define G4NeutronHPInelasticCompFS_h 1
00031 
00032 #include "globals.hh"
00033 #include "G4HadProjectile.hh"
00034 #include "G4HadFinalState.hh"
00035 #include "G4NeutronHPFinalState.hh"
00036 #include "G4NeutronHPAngular.hh"
00037 #include "G4NeutronHPEnergyDistribution.hh"
00038 #include "G4NeutronHPEnAngCorrelation.hh"
00039 #include "G4NeutronHPPhotonDist.hh"
00040 #include "G4NeutronHPDeExGammas.hh"
00041 
00042 class G4NeutronHPInelasticCompFS : public G4NeutronHPFinalState
00043 {
00044   public:
00045   
00046   G4NeutronHPInelasticCompFS()
00047   {
00048 
00049     QI.resize(51);
00050     LR.resize(51);
00051     for(G4int i=0; i<51; i++)
00052     {
00053       hasXsec = true; 
00054       theXsection[i] = 0;
00055       theEnergyDistribution[i] = 0;
00056       theAngularDistribution[i] = 0;
00057       theEnergyAngData[i] = 0;
00058       theFinalStatePhotons[i] = 0;
00059       QI[i]=0.0;
00060       LR[i]=0;
00061     }
00062 
00063   }
00064   virtual ~G4NeutronHPInelasticCompFS()
00065   {
00066     for(G4int i=0; i<51; i++)
00067     {
00068       if(theXsection[i] != 0) delete theXsection[i];
00069       if(theEnergyDistribution[i] != 0) delete theEnergyDistribution[i];
00070       if(theAngularDistribution[i] != 0) delete theAngularDistribution[i];
00071       if(theEnergyAngData[i] != 0) delete theEnergyAngData[i];
00072       if(theFinalStatePhotons[i] != 0) delete theFinalStatePhotons[i];
00073     }
00074   }
00075   void Init (G4double A, G4double Z, G4int M, G4String & dirName, G4String & aSFType);
00076   void InitGammas(G4double AR, G4double ZR);
00077   virtual G4HadFinalState * ApplyYourself(const G4HadProjectile & theTrack) = 0;
00078   virtual G4NeutronHPFinalState * New() = 0;
00079   virtual G4double GetXsec(G4double anEnergy)
00080   {
00081     return std::max(0., theXsection[50]->GetY(anEnergy));
00082   }
00083   virtual G4NeutronHPVector * GetXsec() { return theXsection[50]; }
00084   G4int SelectExitChannel(G4double eKinetic);
00085   void CompositeApply(const G4HadProjectile & theTrack, G4ParticleDefinition * aHadron);
00086   inline void InitDistributionInitialState(G4ReactionProduct & aNeutron, 
00087                                            G4ReactionProduct & aTarget, 
00088                                            G4int it)
00089   {
00090     if(theAngularDistribution[it]!=0) 
00091     {
00092       theAngularDistribution[it]->SetTarget(aTarget);
00093       theAngularDistribution[it]->SetNeutron(aNeutron);
00094     }
00095     if(theEnergyAngData[it]!=0)
00096     {
00097       theEnergyAngData[it]->SetTarget(aTarget);
00098       theEnergyAngData[it]->SetNeutron(aNeutron);
00099     }
00100   }
00101   
00102   protected:
00103   
00104   G4NeutronHPVector * theXsection[51];
00105   G4NeutronHPEnergyDistribution * theEnergyDistribution[51];
00106   G4NeutronHPAngular * theAngularDistribution[51];
00107   G4NeutronHPEnAngCorrelation * theEnergyAngData[51];
00108   
00109   G4NeutronHPPhotonDist * theFinalStatePhotons[51];
00110   
00111   G4NeutronHPDeExGammas theGammas;
00112   G4String gammaPath;
00113   
00114   G4double theCurrentA;
00115   G4double theCurrentZ;
00116 
00117    protected:
00118       std::vector < G4double >  QI;
00119       std::vector <G4int > LR;
00120 
00121    private:
00122       //                       proj                 targ                 had                  mu of had   
00123       void two_body_reaction ( G4DynamicParticle* , G4DynamicParticle* , G4DynamicParticle* , G4double mu ); 
00124 
00125 };
00126 #endif

Generated on Mon May 27 17:49:01 2013 for Geant4 by  doxygen 1.4.7