Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:32

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 /// \file Par02FastSimModelTracker.hh
0028 /// \brief Definition of the Par02FastSimModelTracker class
0029 
0030 #ifndef PAR02_TRACKER_FAST_SIM_MODEL_H
0031 #define PAR02_TRACKER_FAST_SIM_MODEL_H
0032 
0033 #include "Par02DetectorParametrisation.hh"
0034 
0035 #include "G4Navigator.hh"
0036 #include "G4Step.hh"
0037 #include "G4VFastSimulationModel.hh"
0038 
0039 /// Shortcut to the ordinary tracking for tracking detectors.
0040 ///
0041 /// The fast simulation model describes what should be done instead of a
0042 /// normal tracking. Instead of the ordinary tracking, a particle momentum
0043 /// at the entrance of the tracking detector is smeared
0044 /// (by Par02Smearer::SmearMomentum()) and the particle is placed at the
0045 /// tracking detector exit, at the place it would reach without the change
0046 /// of its momentum. Based on G4
0047 /// examples/extended/parametrisations/Par01/include/Par01EMShowerModel.hh .
0048 /// @author Anna Zaborowska
0049 
0050 class Par02FastSimModelTracker : public G4VFastSimulationModel
0051 {
0052   public:
0053     /// A constructor.
0054     /// @param aModelName A name of the fast simulation model.
0055     /// @param aEnvelope A region where the model can take over the ordinary tracking.
0056     /// @param aParamType A parametrisation type.
0057     Par02FastSimModelTracker(G4String aModelName, G4Region* aEnvelope,
0058                              Par02DetectorParametrisation::Parametrisation aParamType);
0059 
0060     /// A constructor.
0061     /// @param aModelName A name of the fast simulation model.
0062     /// @param aEnvelope A region where the model can take over the ordinary tracking.
0063     Par02FastSimModelTracker(G4String aModelName, G4Region* aEnvelope);
0064 
0065     /// A constructor.
0066     /// @param aModelName A name of the fast simulation model.
0067     Par02FastSimModelTracker(G4String aModelName);
0068 
0069     ~Par02FastSimModelTracker();
0070 
0071     /// Checks if this model should be applied to this particle type.
0072     /// @param aParticle A particle definition (type).
0073     virtual G4bool IsApplicable(const G4ParticleDefinition& aParticle);
0074 
0075     /// Checks if the model should be applied taking into account the kinematics
0076     /// of a track.
0077     /// @param aFastTrack A track.
0078     virtual G4bool ModelTrigger(const G4FastTrack& aFastTrack);
0079 
0080     /// Calculates the final position (at the outer boundary of the tracking detector)
0081     /// of a particle with the momentum at the entrance of the tracking detector.
0082     /// Smears the particle momentum and saves it, together with the tracking detector
0083     /// resolution and efficiency to the Par02PrimaryParticleInformation.
0084     /// @param aFastTrack A track.
0085     /// @param aFastStep A step.
0086     virtual void DoIt(const G4FastTrack& aFastTrack, G4FastStep& aFastStep);
0087 
0088   private:
0089     /// A pointer to Par02DetectorParametrisation used to get the efficiency and
0090     /// resolution of the tracking detector for a given particle and
0091     /// parametrisation type.
0092     Par02DetectorParametrisation* fCalculateParametrisation;
0093 
0094     /// A parametrisation type.
0095     Par02DetectorParametrisation::Parametrisation fParametrisation;
0096 };
0097 
0098 #endif