![]() |
|
|||
File indexing completed on 2025-02-23 09:22: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 /// \file optical/wls/include/WLSUserTrackInformation.hh 0028 /// \brief Definition of the WLSUserTrackInformation class 0029 // 0030 0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0032 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0033 0034 #ifndef WLSUserTrackInformation_h 0035 #define WLSUserTrackInformation_h 1 0036 0037 #include "G4ThreeVector.hh" 0038 #include "G4VUserTrackInformation.hh" 0039 0040 enum TrackStatus 0041 { 0042 undefined = 0, 0043 left = 1, // track is going -z 0044 right = 2, // track is going +z 0045 defined = 3, // left or right flag is on (Can't be Set) 0046 EscapedFromSide = 4, // photon escaped through the side of the fiber 0047 EscapedFromReadOut = 8, // photon escaped through read-out end of the fiber 0048 ReflectedAtMirror = 16, // photon has been reflected by mirror at far end 0049 ReflectedAtReadOut = 32, // photon has been reflected at the read-out end 0050 murderee = 64, // photon is artificially killed 0051 InsideOfFiber = 128, // Flag is on if the photon is inside of fiber 0052 OutsideOfFiber = 256 // Flag is on if the photon is outside of fiber 0053 }; 0054 0055 class WLSUserTrackInformation : public G4VUserTrackInformation 0056 { 0057 public: 0058 WLSUserTrackInformation() = default; 0059 ~WLSUserTrackInformation() override = default; 0060 0061 const G4ThreeVector& GetExitPosition() const { return fExitPosition; } 0062 void SetExitPosition(const G4ThreeVector& pos) { fExitPosition = pos; } 0063 0064 // Try adding a status flag and return if it is successful or not 0065 // Cannot Add Undefine or a flag that conflicts with another flag 0066 // Return true if the addition of flag is successful, false otherwise 0067 G4bool AddStatusFlag(TrackStatus s); 0068 0069 // Check if a certain flag is on 0070 G4bool IsStatus(TrackStatus s) { return s == undefined ? !(fStatus &= defined) : fStatus & s; } 0071 0072 private: 0073 G4int fStatus = undefined; 0074 G4ThreeVector fExitPosition; 0075 }; 0076 0077 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |