Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-10 08:05:40

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 /// \file eventgenerator/HepMC/HepMCEx01/src/ExN04CalorimeterHit.cc
0027 /// \brief Implementation of the ExN04CalorimeterHit class
0028 //
0029 //
0030 
0031 #include "ExN04CalorimeterHit.hh"
0032 
0033 #include "G4Colour.hh"
0034 #include "G4LogicalVolume.hh"
0035 #include "G4VVisManager.hh"
0036 #include "G4VisAttributes.hh"
0037 
0038 G4Allocator<ExN04CalorimeterHit> ExN04CalorimeterHitAllocator;
0039 
0040 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0041 ExN04CalorimeterHit::ExN04CalorimeterHit() : G4VHit(), fpLogV(NULL) {}
0042 
0043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0044 ExN04CalorimeterHit::ExN04CalorimeterHit(G4LogicalVolume* logVol, G4int z, G4int phi)
0045   : fZCellID(z), fPhiCellID(phi), fpLogV(logVol)
0046 {}
0047 
0048 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0049 ExN04CalorimeterHit::ExN04CalorimeterHit(const ExN04CalorimeterHit& right) : G4VHit()
0050 {
0051   fZCellID = right.fZCellID;
0052   fPhiCellID = right.fPhiCellID;
0053   fedep = right.fedep;
0054   fpos = right.fpos;
0055   frot = right.frot;
0056   fpLogV = right.fpLogV;
0057 }
0058 
0059 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0060 ExN04CalorimeterHit::~ExN04CalorimeterHit() {}
0061 
0062 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0063 const ExN04CalorimeterHit& ExN04CalorimeterHit::operator=(const ExN04CalorimeterHit& right)
0064 {
0065   fZCellID = right.fZCellID;
0066   fPhiCellID = right.fPhiCellID;
0067   fedep = right.fedep;
0068   fpos = right.fpos;
0069   frot = right.frot;
0070   fpLogV = right.fpLogV;
0071 
0072   return *this;
0073 }
0074 
0075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0076 G4bool ExN04CalorimeterHit::operator==(const ExN04CalorimeterHit& right) const
0077 {
0078   return ((fZCellID == right.fZCellID) && (fPhiCellID == right.fPhiCellID));
0079 }
0080 
0081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0082 void ExN04CalorimeterHit::Draw()
0083 {
0084   G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
0085 
0086   if (pVVisManager) {
0087     G4Transform3D trans(frot, fpos);
0088     G4VisAttributes attribs;
0089     const G4VisAttributes* pVA = fpLogV->GetVisAttributes();
0090     if (pVA) attribs = *pVA;
0091     G4Colour colour(1., 0., 0.);
0092     attribs.SetColour(colour);
0093     attribs.SetForceWireframe(false);
0094     attribs.SetForceSolid(true);
0095     pVVisManager->Draw(*fpLogV, attribs, trans);
0096   }
0097 }
0098 
0099 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0100 void ExN04CalorimeterHit::Print() {}