#include <SimG4CMS/Tracker/interface/TkSimHitPrinter.h>
Public Member Functions | |
int | getPropagationSign (Local3DPoint, Local3DPoint) |
void | printGlobal (Local3DPoint, Local3DPoint) const |
void | printGlobalMomentum (float, float, float) const |
void | printHitData (float, float) const |
void | printLocal (Local3DPoint, Local3DPoint) const |
void | printMomentumOfTrack (float, std::string, int sign) const |
void | startNewSimHit (std::string, std::string, int, int, int) |
TkSimHitPrinter (std::string) | |
~TkSimHitPrinter () | |
Private Attributes | |
int | eventno |
Static Private Attributes | |
static std::ofstream * | theFile |
Definition at line 12 of file TkSimHitPrinter.h.
TkSimHitPrinter::TkSimHitPrinter | ( | std::string | filename | ) |
Definition at line 10 of file TkSimHitPrinter.cc.
00010 { 00011 if (theFile) return; 00012 const char* theName = filename.c_str(); 00013 theFile = new std::ofstream(theName, std::ios::out); 00014 }
TkSimHitPrinter::~TkSimHitPrinter | ( | ) |
int TkSimHitPrinter::getPropagationSign | ( | Local3DPoint | p, | |
Local3DPoint | e | |||
) |
Definition at line 43 of file TkSimHitPrinter.cc.
References PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.
Referenced by TkAccumulatingSensitiveDetector::sendHit().
00043 { 00044 float dr; 00045 dr = p.x()*(e-p).x()+ p.y()*(e-p).y()+p.z()*(e-p).z(); 00046 if (dr>0) return +1; 00047 return -1; 00048 }
void TkSimHitPrinter::printGlobal | ( | Local3DPoint | p, | |
Local3DPoint | e | |||
) | const |
Definition at line 29 of file TkSimHitPrinter.cc.
References PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by TkAccumulatingSensitiveDetector::sendHit().
00029 { 00030 (*theFile) << " Global: "<<p.x()<<" "<<p.y()<<" "<<p.z() 00031 <<" ; "<<e.x()<<" "<<e.y()<<" "<<e.z(); 00032 }
void TkSimHitPrinter::printGlobalMomentum | ( | float | px, | |
float | py, | |||
float | pz | |||
) | const |
Definition at line 40 of file TkSimHitPrinter.cc.
References lat::endl().
Referenced by TkAccumulatingSensitiveDetector::sendHit().
00040 { 00041 (*theFile)<<" Momentum "<<px<<" "<<py<<" "<<pz<<std::endl; 00042 }
void TkSimHitPrinter::printHitData | ( | float | energy, | |
float | tof | |||
) | const |
Definition at line 34 of file TkSimHitPrinter.cc.
Referenced by TkAccumulatingSensitiveDetector::sendHit().
00034 { 00035 (*theFile)<< " Energy: "<<energy<<" ToF: "<<tof; 00036 }
void TkSimHitPrinter::printLocal | ( | Local3DPoint | p, | |
Local3DPoint | e | |||
) | const |
Definition at line 24 of file TkSimHitPrinter.cc.
References PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by TkAccumulatingSensitiveDetector::sendHit().
00024 { 00025 (*theFile) << " Local: "<<p.x()<<" "<<p.y()<<" "<<p.z() 00026 <<" ; "<<e.x()<<" "<<e.y()<<" "<<e.z(); 00027 }
Definition at line 37 of file TkSimHitPrinter.cc.
Referenced by TkAccumulatingSensitiveDetector::sendHit().
Definition at line 20 of file TkSimHitPrinter.cc.
Referenced by TkAccumulatingSensitiveDetector::sendHit().
int TkSimHitPrinter::eventno [private] |
Definition at line 25 of file TkSimHitPrinter.h.
std::ofstream * TkSimHitPrinter::theFile [static, private] |