Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:24

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  * G4VITSteppingVerbose.hh
0028  *
0029  *  Created on: Jun 22, 2015
0030  *      Author: mkaramit
0031  */
0032 
0033 #ifndef SOURCE_PROCESSES_ELECTROMAGNETIC_DNA_MANAGEMENT_INCLUDE_G4VITSTEPPINGVERBOSE_HH_
0034 #define SOURCE_PROCESSES_ELECTROMAGNETIC_DNA_MANAGEMENT_INCLUDE_G4VITSTEPPINGVERBOSE_HH_
0035 
0036 #include "globals.hh"                 // Include from 'global'
0037 #include <vector>
0038 
0039 class G4Navigator;
0040 class G4VPhysicalVolume;
0041 class G4VSensitiveDetector;
0042 #include "G4VProcess.hh"
0043 class G4ProcessVector;
0044 class G4Track;
0045 
0046 //#include "G4TrackVector.hh"           // Include from 'tracking'
0047 #include "G4StepStatus.hh"            // Include from 'track'
0048 class G4UserSteppingAction;
0049 class G4StepPoint;
0050 #include "G4TouchableHandle.hh"
0051 
0052 #include "G4ForceCondition.hh"  //enum 'track'
0053 #include "G4GPILSelection.hh"   //enum 'track'
0054 #include "G4ITStepProcessor.hh"
0055 #include "G4VITProcess.hh"
0056 
0057 class G4VParticleChange;
0058 class G4ITStepProcessorState;
0059 //class ProcessGeneralInfo;
0060 //class G4VPhysicalVolume;
0061 //class G4ProcessVector;
0062 
0063 #include <G4UImessenger.hh>
0064 
0065 class G4UIcmdWithAnInteger;
0066 
0067 class G4VITSteppingVerbose : G4UImessenger
0068 {
0069 public:
0070   G4VITSteppingVerbose();
0071   ~G4VITSteppingVerbose() override;
0072 
0073 public:
0074 
0075   virtual void TrackingStarted(G4Track* track);
0076   virtual void TrackingEnded(G4Track* track);
0077 
0078   virtual void DoItStarted() = 0;
0079   virtual void PreStepVerbose(G4Track*) = 0;
0080   virtual void PostStepVerbose(G4Track*) = 0;
0081 
0082   // these methods are invoked in the SteppingManager
0083   virtual void NewStep() = 0;
0084   void CopyState();
0085 
0086   virtual void StepInfoForLeadingTrack() = 0;
0087 
0088   virtual void AtRestDoItInvoked() = 0;
0089   virtual void AtRestDoItOneByOne() = 0;
0090 
0091   virtual void PostStepDoItAllDone() = 0;
0092   virtual void PostStepDoItOneByOne() = 0;
0093 
0094   virtual void AlongStepDoItAllDone() = 0;
0095   virtual void AlongStepDoItOneByOne() = 0;
0096 
0097   virtual void StepInfo() = 0;
0098   virtual void DPSLStarted() = 0;
0099   virtual void DPSLUserLimit() = 0;
0100   virtual void DPSLPostStep() = 0;
0101   virtual void DPSLAlongStep() = 0;
0102   virtual void VerboseTrack() = 0;
0103   virtual void VerboseParticleChange() = 0;
0104 
0105   //____________________________________________________________________________
0106 
0107   inline void SetVerbose(int flag)
0108   {
0109     fVerboseLevel = flag;
0110   }
0111 
0112   inline G4int GetVerbose()
0113   {
0114     return fVerboseLevel;
0115   }
0116 
0117   //____________________________________________________________________________
0118 
0119   void SetNewValue(G4UIcommand * command,
0120                            G4String newValue) override;
0121 
0122   G4String GetCurrentValue(G4UIcommand * command) override;
0123 
0124 
0125   //____________________________________________________________________________
0126 
0127   void SetStepProcessor(const G4ITStepProcessor* stepProcessor)
0128   {
0129     this->fpStepProcessor = stepProcessor;
0130   }
0131 
0132   void TrackBanner(G4Track* track, const G4String& message);
0133 
0134 protected:
0135   const G4ITStepProcessor* fpStepProcessor;
0136 
0137   G4UIcmdWithAnInteger* fpVerboseUI;
0138   G4ITStepProcessorState* fpState;
0139   const ProcessGeneralInfo* fpProcessGeneralInfo;
0140 
0141   G4double PhysicalStep;
0142   G4StepStatus fStepStatus;
0143 
0144   const G4VParticleChange* fParticleChange;
0145   const G4Track* fTrack;
0146   const G4TrackVector* fSecondary;
0147   const G4Step* fStep;
0148   G4StepPoint* fPreStepPoint;
0149   G4StepPoint* fPostStepPoint;
0150 
0151   const G4VPhysicalVolume* fCurrentVolume;
0152 //  G4VSensitiveDetector* fSensitive;
0153   const G4VITProcess* fCurrentProcess;
0154   // The pointer to the process of which DoIt or
0155   // GetPhysicalInteractionLength has been just executed.
0156 
0157   G4ProcessVector* fAtRestDoItVector;
0158   G4ProcessVector* fAlongStepDoItVector;
0159   G4ProcessVector* fPostStepDoItVector;
0160 
0161   G4ProcessVector* fAtRestGetPhysIntVector;
0162   G4ProcessVector* fAlongStepGetPhysIntVector;
0163   G4ProcessVector* fPostStepGetPhysIntVector;
0164 
0165   size_t MAXofAtRestLoops;
0166   size_t MAXofAlongStepLoops;
0167   size_t MAXofPostStepLoops;
0168 
0169   size_t fAtRestDoItProcTriggered;
0170   size_t fPostStepDoItProcTriggered;
0171 
0172   G4int fN2ndariesAtRestDoIt;
0173   G4int fN2ndariesAlongStepDoIt;
0174   G4int fN2ndariesPostStepDoIt;
0175   // These are the numbers of secondaries generated by the process
0176   // just executed.
0177 
0178 //  G4Navigator *fNavigator;
0179 
0180   G4int fVerboseLevel;
0181 
0182   using G4SelectedAtRestDoItVector = std::vector<G4int>;
0183   using G4SelectedAlongStepDoItVector = std::vector<G4int>;
0184   using G4SelectedPostStepDoItVector = std::vector<G4int>;
0185   G4SelectedAtRestDoItVector* fSelectedAtRestDoItVector;
0186   G4SelectedPostStepDoItVector* fSelectedPostStepDoItVector;
0187 
0188   G4double fPreviousStepSize;
0189 
0190   G4TouchableHandle fTouchableHandle;
0191 
0192 //  G4SteppingControl StepControlFlag;
0193 
0194   G4double physIntLength;
0195   G4ForceCondition fCondition;
0196   G4GPILSelection fGPILSelection;
0197   // Above three variables are for the method
0198   // DefinePhysicalStepLength(). To pass these information to
0199   // the method Verbose, they are kept at here. Need a more
0200   // elegant mechanism.
0201 };
0202 
0203 #endif /* SOURCE_PROCESSES_ELECTROMAGNETIC_DNA_MANAGEMENT_INCLUDE_G4VITSTEPPINGVERBOSE_HH_ */