Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:20:10

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 // Previous authors: G. Guerrieri, S. Guatelli and M. G. Pia, INFN Genova, Italy
0027 // Authors (since 2007): S. Guatelli, University of Wollongong, Australia
0028 
0029 #include "G4VisAttributes.hh"
0030 #include "G4HumanPhantomColour.hh"
0031 #include "G4Colour.hh"
0032 
0033 G4HumanPhantomColour::G4HumanPhantomColour()
0034 {
0035   fWhite = G4Colour(1.0, 1.0, 1.0);
0036   fPink = G4Colour(0.94, 0.5, 0.5);
0037   fGrey = G4Colour(0.46, 0.53, 0.6);
0038   fYellow = G4Colour(1.0, 1.0, 0.);
0039   fBlue = G4Colour(0.25,0.41, 0.88 );
0040   fLightBlue = G4Colour(0.28, 0.82, 0.8);
0041   fGreen = G4Colour(0., 1., 0.);
0042   fBrown = G4Colour(0.5, 0.5, 0.);
0043   fPurple = G4Colour(0.85,0.44,0.84);
0044   fRed = G4Colour(1.0, 0.0, 0.0);
0045   fOrange = G4Colour(1.,0.5,0.); 
0046   fBlack =  G4Colour(0.,0.,0.); 
0047 }
0048 
0049 G4Colour G4HumanPhantomColour::GetColour(const G4String& colourName)
0050 {
0051  // Returns the colour
0052   if (colourName == "pink") return fPink;
0053   else if(colourName == "white") return fWhite;
0054   else if (colourName == "grey") return fGrey;
0055   else if (colourName == "yellow") return fYellow;
0056   else if (colourName == "blue") return fBlue;
0057   else if (colourName == "lightBlue") return fLightBlue;
0058   else if (colourName == "green") return fGreen;
0059   else if (colourName == "brown") return fBrown;
0060   else if (colourName == "purple") return fPurple;
0061   else if (colourName == "red") return fRed;
0062   else if (colourName == "orange") return fOrange;
0063   else if  (colourName == "black") return fBlack; 
0064 else {G4cout<< colourName << "does not exist !!!"<< G4endl; return fWhite;}
0065 }