CMS 3D CMS Logo

VisG4Details.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "VisGeant4/VisG4Volumes/interface/VisG4Details.h"
00004 #include "Iguana/Framework/interface/IgRep.h"
00005 
00006 
00007 #include <G4Material.hh>
00008 #include <G4VPhysicalVolume.hh>
00009 #include <G4LogicalVolume.hh>
00010 
00011 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00012 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00013 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00014 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00015 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00016 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00017 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00018 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00019 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00020 
00021 VisG4RepDetails::VisG4RepDetails (void)
00022 {
00023 }
00024 
00025 VisG4RepDetails::VisG4RepDetails (const IgRep */*t*/)
00026 {
00027 }
00028 
00029 VisG4RepDetails::VisG4RepDetails (const VisG4RepDetails &/*t*/)
00030 {
00031 }
00032 
00033 bool 
00034 VisG4RepDetails::less::operator() (const VisG4RepDetails& /*x*/, 
00035                                    const VisG4RepDetails& /*y*/) const
00036 {
00037     return false;           
00038 }
00039 
00040 bool 
00041 VisG4RepDetails::operator== (const VisG4RepDetails &t) const
00042 {
00043     less comparison;
00044     return !(comparison (*this, t) || comparison (t, *this));    
00045 }
00046 
00047 bool 
00048 VisG4RepDetails::operator< (const VisG4RepDetails &t) const
00049 {
00050     less comparison;
00051     return comparison (*this, t);    
00052 }
00053 
00054 
00058 
00059 
00060 VisG4MaterialDetails::VisG4MaterialDetails (void)
00061 {
00062 }
00063 
00064 VisG4MaterialDetails::VisG4MaterialDetails (const G4Material *t)
00065 {
00066     m_name = t->GetName ();    
00067     m_density = t->GetDensity ();    
00068 }
00069 
00070 VisG4MaterialDetails::VisG4MaterialDetails (const VisG4MaterialDetails &t)
00071 {
00072     m_name = t.m_name;
00073     m_density = t.m_density;    
00074 }
00075 
00076 std::string
00077 VisG4MaterialDetails::name (void) const
00078 {
00079     return m_name;          
00080 }
00081     
00082 float 
00083 VisG4MaterialDetails::density (void) const
00084 {
00085     return m_density;       
00086 }
00087 
00088 
00089 bool 
00090 VisG4MaterialDetails::less::operator() (const VisG4MaterialDetails& x,
00091                                         const VisG4MaterialDetails& y) const
00092 {
00093     if (x.name () == y.name ())
00094         return x.density () < y.density ();
00095     return x.name () < y.name ();    
00096 }
00097 
00098 bool
00099 VisG4MaterialDetails::operator== (const VisG4MaterialDetails &t) const
00100 {
00101     less comparison;
00102     return !(comparison (*this, t) || comparison (t, *this));    
00103 }        
00104 
00105 bool
00106 VisG4MaterialDetails::operator< (const VisG4MaterialDetails &t) const
00107 {
00108     less comparison;
00109     return comparison (*this, t);    
00110 }        
00111 
00115 
00116 VisG4PVDetails::VisG4PVDetails (void)
00117     :m_sensitive (false)
00118 {
00119 }
00120 
00121 VisG4PVDetails::VisG4PVDetails (const VisG4PVDetails &t)
00122     :m_sensitive (t.sensitive ())
00123 {    
00124 }
00125 
00126 VisG4PVDetails::VisG4PVDetails (const G4VPhysicalVolume *pv)
00127     :m_sensitive (pv->GetLogicalVolume ()->GetSensitiveDetector ())
00128 {
00129 }
00130 
00131 bool 
00132 VisG4PVDetails::sensitive (void) const
00133 {
00134     return m_sensitive;
00135 }
00136 
00137 bool 
00138 VisG4PVDetails::less::operator() (const VisG4PVDetails& x, 
00139                                        const VisG4PVDetails& y)
00140 {
00141     return x.sensitive () < y.sensitive ();
00142 }               
00143 
00144 bool 
00145 VisG4PVDetails::operator== (const VisG4PVDetails &t) const
00146 {
00147     less comparison;
00148     return !(comparison (*this, t) || comparison (t, *this));    
00149 }
00150 
00151 bool 
00152 VisG4PVDetails::operator< (const VisG4PVDetails &t) const
00153 {
00154     less comparison;
00155     return comparison (*this, t);    
00156 }
00157 
00161 
00162 VisSoMaterialDetails::VisSoMaterialDetails (void)
00163 {
00164 }
00165 
00166 VisSoMaterialDetails &
00167 VisSoMaterialDetails::operator<< (const VisG4RepDetails &detail)
00168 {
00169     m_repDetails = detail;    
00170     return *this;    
00171 }
00172 
00173 VisSoMaterialDetails &
00174 VisSoMaterialDetails::operator<< (const VisG4MaterialDetails &detail)
00175 {
00176     m_g4MaterialDetails = detail;    
00177     return *this;    
00178 }
00179 
00180 VisSoMaterialDetails &
00181 VisSoMaterialDetails::operator<< (const VisG4PVDetails &detail)
00182 {
00183     m_pvDetails = detail;    
00184     return *this;    
00185 }
00186 
00187 VisSoMaterialDetails &
00188 VisSoMaterialDetails::operator<< (const VisG4PathDetails &detail)
00189 {
00190     m_pathDetails = detail;    
00191     return *this;    
00192 }
00193 
00194 VisG4RepDetails
00195 VisSoMaterialDetails::repDetails (void) const
00196 {
00197     return m_repDetails;
00198 }
00199 
00200 VisG4MaterialDetails
00201 VisSoMaterialDetails::g4MaterialDetails (void) const
00202 {
00203     return m_g4MaterialDetails;
00204 }
00205 
00206 VisG4PVDetails 
00207 VisSoMaterialDetails::pvDetails (void) const
00208 {
00209     return m_pvDetails;
00210 }
00211 
00212 VisG4PathDetails 
00213 VisSoMaterialDetails::pathDetails (void) const
00214 {
00215     return m_pathDetails;
00216 }
00217 
00218 bool 
00219 VisSoMaterialDetails::less::operator() (const VisSoMaterialDetails& x, const VisSoMaterialDetails& y)
00220 {       
00221     if (x.m_repDetails == y.m_repDetails)
00222         if (x.m_pathDetails == y.m_pathDetails)
00223             if (x.m_g4MaterialDetails == y.m_g4MaterialDetails)
00224                 return x.m_pvDetails < y.m_pvDetails;
00225             else
00226                 return x.m_g4MaterialDetails < y.m_g4MaterialDetails;
00227         else
00228             return x.m_pathDetails < y.m_pathDetails;
00229     else
00230         return x.m_repDetails < y.m_repDetails;
00231 }
00232 
00233 bool 
00234 VisSoMaterialDetails::operator== (const VisSoMaterialDetails &t) const
00235 {
00236     less comparison;
00237     
00238     return !(comparison (t, *this) || comparison (*this, t));
00239 }
00240 
00241 
00245 
00246 VisG4PathDetails::VisG4PathDetails (void)
00247     :m_path ("")
00248 {
00249 }
00250 
00251 VisG4PathDetails::VisG4PathDetails (const VisG4PathDetails &t)
00252 {
00253     this->m_path = t.path ();       
00254 }        
00255 
00256 VisG4PathDetails::VisG4PathDetails (const std::string &path)
00257 {
00258     this->m_path = path;            
00259 }
00260 
00261 const std::string &
00262 VisG4PathDetails::path (void) const
00263 {
00264     return m_path;
00265 }    
00266 
00267 bool 
00268 VisG4PathDetails::less::operator() (const VisG4PathDetails& x, 
00269                                     const VisG4PathDetails& y)
00270 {
00271     if (x.path () < y.path ())
00272         return true;
00273     return false;
00274 }
00275     
00276 bool 
00277 VisG4PathDetails::operator== (const VisG4PathDetails &t) const
00278 {
00279     less comparison;
00280     return !(comparison (t, *this) || comparison (*this, t));
00281 }
00282 
00283 bool 
00284 VisG4PathDetails::operator< (const VisG4PathDetails &t) const
00285 {
00286     less comparison;
00287     return comparison (*this, t);
00288 }
00289     

Generated on Tue Jun 9 17:50:07 2009 for CMSSW by  doxygen 1.5.4