CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Private Attributes
TkSimHitPrinter Class Reference

#include <TkSimHitPrinter.h>

Public Member Functions

void printGlobal (const Local3DPoint &, const Local3DPoint &) const
 
void printGlobalMomentum (float, float, float) const
 
void printHitData (const std::string &, float, float, float) const
 
void printLocal (const Local3DPoint &, const Local3DPoint &) const
 
void startNewSimHit (const std::string &, const std::string &, int, int, int, int)
 
 TkSimHitPrinter (const std::string &)
 
 ~TkSimHitPrinter ()
 

Static Private Attributes

static std::ofstream * theFile
 

Detailed Description

Definition at line 12 of file TkSimHitPrinter.h.

Constructor & Destructor Documentation

TkSimHitPrinter::TkSimHitPrinter ( const std::string &  filename)

Definition at line 10 of file TkSimHitPrinter.cc.

References submitPVResolutionJobs::out, and theFile.

10  {
11  if (theFile)
12  return;
13  const char* theName = filename.c_str();
14  theFile = new std::ofstream(theName, std::ios::out);
15 }
static std::ofstream * theFile
tuple filename
Definition: lut2db_cfg.py:20
TkSimHitPrinter::~TkSimHitPrinter ( )

Definition at line 17 of file TkSimHitPrinter.cc.

17 {}

Member Function Documentation

void TkSimHitPrinter::printGlobal ( const Local3DPoint p,
const Local3DPoint e 
) const

Definition at line 28 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().

28  {
29  (*theFile) << "\n Global(mm): " << p.x() << " " << p.y() << " " << p.z() << " ; " << e.x() << " " << e.y() << " "
30  << e.z();
31 }
T y() const
Definition: PV3DBase.h:60
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
void TkSimHitPrinter::printGlobalMomentum ( float  px,
float  py,
float  pz 
) const

Definition at line 36 of file TkSimHitPrinter.cc.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

36  {
37  (*theFile) << " Momentum " << px << " " << py << " " << pz << "\n";
38 }
void TkSimHitPrinter::printHitData ( const std::string &  nam,
float  p,
float  de,
float  tof 
) const

Definition at line 33 of file TkSimHitPrinter.cc.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

33  {
34  (*theFile) << "\n " << nam << " p(GeV): " << p << " Edep(GeV): " << de << " ToF: " << tof;
35 }
void TkSimHitPrinter::printLocal ( const Local3DPoint p,
const Local3DPoint e 
) const

Definition at line 23 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().

23  {
24  (*theFile) << "\n Local(cm): " << p.x() << " " << p.y() << " " << p.z() << " ; " << e.x() << " " << e.y() << " "
25  << e.z();
26 }
T y() const
Definition: PV3DBase.h:60
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
void TkSimHitPrinter::startNewSimHit ( const std::string &  s,
const std::string &  d,
int  i,
int  j,
int  k,
int  eve 
)

Definition at line 19 of file TkSimHitPrinter.cc.

References isotrackApplyRegressor::k.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

19  {
20  (*theFile) << "Event: " << eve << " " << s << " " << d << " " << i << " Track " << j << " " << k;
21 }
tuple d
Definition: ztail.py:151

Member Data Documentation

std::ofstream * TkSimHitPrinter::theFile
staticprivate

Definition at line 23 of file TkSimHitPrinter.h.

Referenced by TkSimHitPrinter().