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.

10  {
11  if (theFile)
12  return;
13  const char* theName = filename.c_str();
14  theFile = new std::ofstream(theName, std::ios::out);
15 }

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

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

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

Referenced by TkAccumulatingSensitiveDetector::sendHit().

◆ printGlobalMomentum()

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

Definition at line 36 of file TkSimHitPrinter.cc.

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

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

Referenced by TkAccumulatingSensitiveDetector::sendHit().

◆ printHitData()

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

Definition at line 33 of file TkSimHitPrinter.cc.

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

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

◆ printLocal()

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

Definition at line 23 of file TkSimHitPrinter.cc.

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

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

Referenced by TkAccumulatingSensitiveDetector::sendHit().

◆ 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.

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

References ztail::d, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, and alignCSCRings::s.

Referenced by TkAccumulatingSensitiveDetector::sendHit().

Member Data Documentation

◆ theFile

std::ofstream * TkSimHitPrinter::theFile
staticprivate

Definition at line 23 of file TkSimHitPrinter.h.

Referenced by TkSimHitPrinter().

mps_fire.i
i
Definition: mps_fire.py:355
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
alignCSCRings.s
s
Definition: alignCSCRings.py:92
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
dqmdumpme.k
k
Definition: dqmdumpme.py:60
TkSimHitPrinter::theFile
static std::ofstream * theFile
Definition: TkSimHitPrinter.h:23
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
ztail.d
d
Definition: ztail.py:151
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37