/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/MdcSim/MdcSim-00-00-73/src/BesMdcHit.cc

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //      BOOST --- BESIII Object_Oriented Simulation Tool                     //
00003 //---------------------------------------------------------------------------//
00004 //Description: Track type hit class for BESIII MDC
00005 //Author: Yuan Ye(yuany@mail.ihep.ac.cn)
00006 //Created: 4 Dec, 2003
00007 //Modified:
00008 //Comment: 
00009 //---------------------------------------------------------------------------//
00010 
00011 #include "BesMdcHit.hh"
00012 #include "G4UnitsTable.hh"
00013 #include "G4VVisManager.hh"
00014 #include "G4Circle.hh"
00015 #include "G4Colour.hh"
00016 #include "G4VisAttributes.hh"
00017 
00018 G4Allocator<BesMdcHit> BesMdcHitAllocator;
00019 
00020 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00021 
00022 BesMdcHit::BesMdcHit() {}
00023 
00024 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00025 
00026 BesMdcHit::~BesMdcHit() {}
00027 
00028 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00029 
00030 BesMdcHit::BesMdcHit(const BesMdcHit& right)
00031   : G4VHit()
00032 {
00033   trackID   = right.trackID;
00034   layerNo   = right.layerNo;
00035   cellNo    = right.cellNo;
00036   edep      = right.edep;
00037   pos       = right.pos;
00038   driftD    = right.driftD;
00039   driftT    = right.driftT;
00040   globalT   = right.globalT;
00041   theta     = right.theta;
00042   enterAngle= right.enterAngle;
00043   posFlag   = right.posFlag;  
00044 }
00045 
00046 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00047 
00048 const BesMdcHit& BesMdcHit::operator=(const BesMdcHit& right)
00049 {
00050   trackID   = right.trackID;
00051   layerNo   = right.layerNo;
00052   cellNo    = right.cellNo;
00053   edep      = right.edep;
00054   pos       = right.pos;
00055   driftD    = right.driftD;
00056   driftT    = right.driftT;
00057   globalT   = right.globalT;
00058   theta     = right.theta;
00059   enterAngle= right.enterAngle;
00060   posFlag   = right.posFlag;  
00061   return *this;
00062 }
00063 
00064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00065 
00066 int BesMdcHit::operator==(const BesMdcHit& right) const
00067 {
00068   return (this==&right) ? 1 : 0;
00069 }
00070 
00071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00072 
00073 void BesMdcHit::Draw()
00074 {
00075   G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
00076   if(pVVisManager)
00077   {
00078     G4Circle circle(pos);
00079     circle.SetScreenSize(2.);
00080     circle.SetFillStyle(G4Circle::filled);
00081     G4Colour colour(1.,0.,0.);
00082     G4VisAttributes attribs(colour);
00083     circle.SetVisAttributes(attribs);
00084     pVVisManager->Draw(circle);
00085   }
00086 }
00087 
00088 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00089 
00090 void BesMdcHit::Print()
00091 {
00092   G4cout << "  trackID: " << trackID 
00093          << "  layerNo: " << layerNo
00094          << "  cellNo:  " << cellNo
00095          << "  energy deposit: " << G4BestUnit(edep,"Energy")
00096          << "  position: " << G4BestUnit(pos,"Length") 
00097          << "  driftD: " << G4BestUnit(driftD,"Length")
00098          << "  driftT: " << G4BestUnit(driftT,"Time")
00099          << "  globalT: " << G4BestUnit(globalT,"Time")
00100          << "  theta: " << G4BestUnit(theta,"Angle")
00101          << "  enterAngle: " << G4BestUnit(enterAngle,"Angle")
00102          << "  posFlag: " << posFlag
00103          <<G4endl;
00104 }
00105 
00106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00107 

Generated on Tue Nov 29 23:14:27 2016 for BOSS_7.0.2 by  doxygen 1.4.7