Back to home page

EIC code displayed by LXR

 
 

    


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

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 //
0028 
0029 #ifndef G4ScoringBox_h
0030 #define G4ScoringBox_h 1
0031 
0032 #include "globals.hh"
0033 #include "G4VScoringMesh.hh"
0034 #include "G4RotationMatrix.hh"
0035 class G4VPhysicalVolume;
0036 class G4LogicalVolume;
0037 class G4VPrimitiveScorer;
0038 class G4VScoreColorMap;
0039 
0040 #include <vector>
0041 
0042 class G4ScoringBox : public G4VScoringMesh
0043 {
0044  public:
0045   G4ScoringBox(G4String wName);
0046   ~G4ScoringBox() override = default;
0047 
0048  public:
0049   void List() const override;
0050   void Draw(RunScore* map, G4VScoreColorMap* colorMap, G4int axflg = 111) override;
0051   void DrawColumn(RunScore* map, G4VScoreColorMap* colorMap, G4int idxProj,
0052                   G4int idxColumn) override;
0053 
0054   // set a direction to segment this mesh
0055   void SetSegmentDirection(G4int dir) { fSegmentDirection = dir; }
0056 
0057  protected:
0058   // construct this mesh
0059   void SetupGeometry(G4VPhysicalVolume* fWorldPhys) override;
0060 
0061  private:
0062   // get replicated position from 3D index (x,y,z)
0063   G4ThreeVector GetReplicaPosition(G4int x, G4int y, G4int z);
0064   // get 3D index (x,y,z) from sequential index
0065   void GetXYZ(G4int index, G4int q[3]) const;
0066   // get sequential index from 3D index (x,y,z)
0067   G4int GetIndex(G4int x, G4int y, G4int z) const;
0068 
0069  private:
0070   G4int fSegmentDirection;  // =1: x, =2: y, =3: z
0071 };
0072 
0073 #endif