CMS 3D CMS Logo

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::TkSimHitPrinter ( const std::string &  filename)

Definition at line 10 of file TkSimHitPrinter.cc.

References corrVsCorr::filename, MillePedeFileConverter_cfg::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

◆ ~TkSimHitPrinter()

TkSimHitPrinter::~TkSimHitPrinter ( )

Definition at line 17 of file TkSimHitPrinter.cc.

17 {}

Member Function Documentation

◆ printGlobal()

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

Definition at line 28 of file TkSimHitPrinter.cc.

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

28  {
29  (*theFile) << "\n Global(mm): " << p.x() << " " << p.y() << " " << p.z() << " ; " << e.x() << " " << e.y() << " "
30  << e.z();
31 }

◆ printGlobalMomentum()

void TkSimHitPrinter::printGlobalMomentum ( float  px,
float  py,
float  pz 
) const

Definition at line 36 of file TkSimHitPrinter.cc.

References multPhiCorr_741_25nsDY_cfi::px, and multPhiCorr_741_25nsDY_cfi::py.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

36  {
37  (*theFile) << " Momentum " << px << " " << py << " " << pz << "\n";
38 }

◆ printHitData()

void TkSimHitPrinter::printHitData ( const std::string &  nam,
float  p,
float  de,
float  tof 
) const

Definition at line 33 of file TkSimHitPrinter.cc.

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

33  {
34  (*theFile) << "\n " << nam << " p(GeV): " << p << " Edep(GeV): " << de << " ToF: " << tof;
35 }

◆ printLocal()

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

Definition at line 23 of file TkSimHitPrinter.cc.

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

23  {
24  (*theFile) << "\n Local(cm): " << p.x() << " " << p.y() << " " << p.z() << " ; " << e.x() << " " << e.y() << " "
25  << e.z();
26 }

◆ startNewSimHit()

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 ztail::d, mps_fire::i, dqmiolumiharvest::j, isotrackApplyRegressor::k, and alignCSCRings::s.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

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

Member Data Documentation

◆ theFile

std::ofstream * TkSimHitPrinter::theFile
staticprivate

Definition at line 23 of file TkSimHitPrinter.h.

Referenced by TkSimHitPrinter().