![]() |
![]() |
#include <SimG4CMS/Muon/interface/SimHitPrinter.h>
Public Member Functions | |
void | printEloss (float) const |
void | printGlobal (GlobalPoint) const |
void | printId (int) const |
void | printLocal (LocalPoint, LocalPoint) const |
void | printPabs (float) const |
void | printTrack (int) const |
SimHitPrinter (std::string) | |
void | startNewEvent (int) |
void | startNewSimHit (std::string) |
~SimHitPrinter () | |
Static Private Attributes | |
static std::ofstream * | theFile |
Modification:
Definition at line 22 of file SimHitPrinter.h.
SimHitPrinter::SimHitPrinter | ( | std::string | filename | ) |
Definition at line 8 of file SimHitPrinter.cc.
00008 { 00009 if (theFile) return; 00010 const char* theName = filename.c_str(); 00011 theFile = new std::ofstream(theName, std::ios::out); 00012 }
SimHitPrinter::~SimHitPrinter | ( | ) |
void SimHitPrinter::printEloss | ( | float | eloss | ) | const |
Definition at line 56 of file SimHitPrinter.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
void SimHitPrinter::printGlobal | ( | GlobalPoint | global | ) | const |
Definition at line 74 of file SimHitPrinter.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by MuonSensitiveDetector::saveHit().
00074 { 00075 (*theFile).width(10); 00076 (*theFile).setf(std::ios::right,std::ios::adjustfield); 00077 (*theFile).setf(std::ios::floatfield); 00078 (*theFile).precision(6); 00079 std::cout << " Global(en): "<<global.x()<<" "<< global.y()<<" " 00080 <<global.z()<<std::endl; 00081 (*theFile) << " gl "<<global.x()<<" "<< global.y()<<" " 00082 <<global.z()<<std::endl; 00083 }
Definition at line 35 of file SimHitPrinter.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
Referenced by MuonSensitiveDetector::saveHit().
00035 { 00036 std::cout << " Id: "<<id<<std::endl; 00037 (*theFile) << " id "; 00038 (*theFile).width(10); 00039 (*theFile).setf(std::ios::right,std::ios::adjustfield); 00040 (*theFile) <<id; 00041 }
void SimHitPrinter::printLocal | ( | LocalPoint | localen, | |
LocalPoint | localex | |||
) | const |
Definition at line 61 of file SimHitPrinter.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by MuonSensitiveDetector::saveHit().
00061 { 00062 (*theFile).width(10); 00063 (*theFile).setf(std::ios::right,std::ios::adjustfield); 00064 (*theFile).setf(std::ios::floatfield); 00065 (*theFile).precision(6); 00066 std::cout << " Local(en/ex): "<<localen.x()<<" "<< localen.y()<<" " 00067 <<localen.z()<<" / "<<localex.x()<<" "<< localex.y()<<" " 00068 <<localex.z()<<std::endl; 00069 (*theFile) << " en/ex "<<localen.x()<<" "<< localen.y()<<" " 00070 <<localen.z()<<" / "<<localex.x()<<" "<< localex.y()<<" " 00071 <<localex.z(); 00072 }
void SimHitPrinter::printPabs | ( | float | pabs | ) | const |
Definition at line 51 of file SimHitPrinter.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
Definition at line 43 of file SimHitPrinter.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
00043 { 00044 std::cout << " Track: "<<id<<std::endl; 00045 (*theFile) << " trk "; 00046 (*theFile).width(10); 00047 (*theFile).setf(std::ios::right,std::ios::adjustfield); 00048 (*theFile) << id; 00049 }
void SimHitPrinter::startNewSimHit | ( | std::string | s | ) |
Definition at line 18 of file SimHitPrinter.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
Referenced by MuonSensitiveDetector::saveHit().
00018 { 00019 std::cout.width(10); 00020 std::cout.setf(std::ios::right,std::ios::adjustfield); 00021 std::cout.setf(std::ios::scientific,std::ios::floatfield); 00022 std::cout.precision(6); 00023 std::cout << "SimHit in "<<s<<std::endl; 00024 (*theFile).width(10); 00025 (*theFile).setf(std::ios::right,std::ios::adjustfield); 00026 (*theFile).setf(std::ios::scientific|std::ios::uppercase|std::ios::showpos,std::ios::floatfield); 00027 (*theFile).precision(5); 00028 (*theFile) << "SimHit in "<<s; 00029 }
std::ofstream * SimHitPrinter::theFile [static, private] |