CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
TotemRPSD Class Reference

#include <TotemRPSD.h>

Inheritance diagram for TotemRPSD:
SensitiveTkDetector Observer< const BeginOfEvent *> Observer< const EndOfEvent *> SensitiveDetector

Public Member Functions

void clearHits () override
 
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
void fillHits (edm::PSimHitContainer &, const std::string &) override
 
void Initialize (G4HCofThisEvent *HCE) override
 
void PrintAll () override
 
bool ProcessHits (G4Step *step, G4TouchableHistory *tHistory) override
 
uint32_t setDetUnitId (const G4Step *step) override
 
 TotemRPSD (const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
 ~TotemRPSD () override
 
- Public Member Functions inherited from SensitiveTkDetector
 SensitiveTkDetector (const std::string &iname, const SensitiveDetectorCatalog &clg)
 
- Public Member Functions inherited from SensitiveDetector
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
const std::vector< std::string > & getNames () const
 
void Initialize (G4HCofThisEvent *eventHC) override
 
bool isCaloSD () const
 
 SensitiveDetector (const std::string &iname, const SensitiveDetectorCatalog &, bool calo, const std::string &newcollname="")
 
 ~SensitiveDetector () override
 
- Public Member Functions inherited from Observer< const BeginOfEvent *>
 Observer ()
 
void slotForUpdate (const BeginOfEvent * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfEvent *>
 Observer ()
 
void slotForUpdate (const EndOfEvent * iT)
 
virtual ~Observer ()
 

Protected Member Functions

void update (const BeginOfEvent *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const ::EndOfEvent *) override
 
- Protected Member Functions inherited from SensitiveDetector
TrackInformationcmsTrackInformation (const G4Track *aTrack)
 
Local3DPoint ConvertToLocal3DPoint (const G4ThreeVector &point) const
 
Local3DPoint FinalStepPosition (const G4Step *step, coordinates) const
 
Local3DPoint InitialStepPosition (const G4Step *step, coordinates) const
 
Local3DPoint LocalPostStepPosition (const G4Step *step) const
 
Local3DPoint LocalPreStepPosition (const G4Step *step) const
 
void NaNTrap (const G4Step *step) const
 
void setNames (const std::vector< std::string > &)
 
- Protected Member Functions inherited from Observer< const EndOfEvent *>
virtual void update (const EndOfEvent *)=0
 This routine will be called when the appropriate signal arrives. More...
 

Private Member Functions

void createNewHit ()
 
void printHitInfo ()
 
G4ThreeVector setToLocal (const G4ThreeVector &globalPoint)
 
void stepInfo (const G4Step *aStep)
 
void storeHit (TotemRPG4Hit *)
 

Private Attributes

TotemRPG4HitcurrentHit_ = nullptr
 
G4VPhysicalVolume * currentPV_ = nullptr
 
double eloss_ = 0.0
 
int eventno_ = 0
 
G4ThreeVector exitPoint_
 
G4int hcID_ = -1
 
G4ThreeVector hitPoint_
 
double incidentEnergy_ = 0.0
 
std::unique_ptr< TotemRPVDetectorOrganizationnumberingScheme_
 
double pabs_ = 0.0
 
G4int parentID_ = 0
 
short particleType_ = 0
 
double phiAtEntry_ = 0.0
 
G4StepPoint * postStepPoint_ = nullptr
 
G4StepPoint * preStepPoint_ = nullptr
 
G4int primaryID_ = 0
 
std::unique_ptr< TrackingSlaveSDslave_
 
TotemRPG4HitCollectiontheHC_ = nullptr
 
G4ThreeVector theLocalEntryPoint_
 
G4ThreeVector theLocalExitPoint_
 
double thePx_ = 0.0
 
double thePy_ = 0.0
 
double thePz_ = 0.0
 
double thetaAtEntry_ = 0.0
 
G4Track * theTrack_ = nullptr
 
double tof_ = 0.0
 
G4double tSlice_ = 0.0
 
G4int tSliceID_ = 0
 
unsigned int unitID_ = 0
 
int verbosity_
 
double vx_ = 0.0
 
double vy_ = 0.0
 
double vz_ = 0.0
 

Additional Inherited Members

- Protected Types inherited from SensitiveDetector
enum  coordinates { WorldCoordinates, LocalCoordinates }
 

Detailed Description

Definition at line 30 of file TotemRPSD.h.

Constructor & Destructor Documentation

◆ TotemRPSD()

TotemRPSD::TotemRPSD ( const std::string &  pname,
const SensitiveDetectorCatalog clg,
edm::ParameterSet const &  p,
const SimTrackManager manager 
)

Definition at line 35 of file TotemRPSD.cc.

References bysipixelclustmulteventfilter_cfi::collectionName, edm::ParameterSet::getParameter(), numberingScheme_, AlCaHLTBitMon_ParallelJobs::p, unpackData-CaloStage2::pname, slave_, and verbosity_.

39  : SensitiveTkDetector(pname, clg) {
40  collectionName.insert(pname);
41 
42  edm::ParameterSet m_Anal = p.getParameter<edm::ParameterSet>("TotemRPSD");
43  verbosity_ = m_Anal.getParameter<int>("Verbosity");
44 
45  slave_ = std::make_unique<TrackingSlaveSD>(pname);
46 
47  if (pname == "TotemHitsRP") {
48  numberingScheme_ = std::make_unique<PPSStripOrganization>();
49  } else {
50  edm::LogWarning("TotemRP") << "TotemRPSD: ReadoutName " << pname << " not supported";
51  }
52 
53  edm::LogVerbatim("TotemRP") << "TotemRPSD: Instantiation completed for " << pname;
54 }
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< TotemRPVDetectorOrganization > numberingScheme_
Definition: TotemRPSD.h:59
int verbosity_
Definition: TotemRPSD.h:94
Log< level::Warning, false > LogWarning
SensitiveTkDetector(const std::string &iname, const SensitiveDetectorCatalog &clg)
std::unique_ptr< TrackingSlaveSD > slave_
Definition: TotemRPSD.h:58

◆ ~TotemRPSD()

TotemRPSD::~TotemRPSD ( )
override

Definition at line 56 of file TotemRPSD.cc.

56 {}

Member Function Documentation

◆ clearHits()

void TotemRPSD::clearHits ( )
overridevirtual

Implements SensitiveDetector.

Definition at line 244 of file TotemRPSD.cc.

References slave_.

Referenced by update().

244 { slave_->Initialize(); }
std::unique_ptr< TrackingSlaveSD > slave_
Definition: TotemRPSD.h:58

◆ createNewHit()

void TotemRPSD::createNewHit ( )
private

Definition at line 161 of file TotemRPSD.cc.

References funct::abs(), currentHit_, eloss_, exitPoint_, hitPoint_, incidentEnergy_, pabs_, parentID_, particleType_, phiAtEntry_, primaryID_, rp_garage_position_, TotemRPG4Hit::setEnergyLoss(), TotemRPG4Hit::setEntry(), TotemRPG4Hit::setExit(), TotemRPG4Hit::setIncidentEnergy(), TotemRPG4Hit::setLocalEntry(), TotemRPG4Hit::setLocalExit(), TotemRPG4Hit::setP(), TotemRPG4Hit::setParentId(), TotemRPG4Hit::setParticleType(), TotemRPG4Hit::setPhiAtEntry(), TotemRPG4Hit::setPx(), TotemRPG4Hit::setPy(), TotemRPG4Hit::setPz(), TotemRPG4Hit::setThetaAtEntry(), TotemRPG4Hit::setTimeSlice(), TotemRPG4Hit::setTof(), TotemRPG4Hit::setTrackID(), TotemRPG4Hit::setUnitID(), TotemRPG4Hit::setVx(), TotemRPG4Hit::setVy(), TotemRPG4Hit::setVz(), storeHit(), theLocalEntryPoint_, theLocalExitPoint_, thePx_, thePy_, thePz_, thetaAtEntry_, tof_, tSlice_, unitID_, vx_, vy_, and vz_.

Referenced by ProcessHits().

161  {
162  // Protect against creating hits in detectors not inserted
163  double outrangeX = hitPoint_.x();
164  double outrangeY = hitPoint_.y();
165  if (std::abs(outrangeX) > rp_garage_position_ || std::abs(outrangeY) > rp_garage_position_)
166  return;
167  // end protection
168 
174 
181 
186 
191 
195 
197 }
void setEntry(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:76
void setTof(double e)
double pabs_
Definition: TotemRPSD.h:79
void setP(double e)
void setIncidentEnergy(double e)
Definition: TotemRPG4Hit.cc:87
void storeHit(TotemRPG4Hit *)
Definition: TotemRPSD.cc:152
double vx_
Definition: TotemRPSD.h:89
void setVx(double p)
G4int parentID_
Definition: TotemRPSD.h:67
void setPy(double p)
G4double tSlice_
Definition: TotemRPSD.h:69
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
Definition: TotemRPG4Hit.cc:82
void setExit(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:79
double vz_
Definition: TotemRPSD.h:91
G4ThreeVector theLocalEntryPoint_
Definition: TotemRPSD.h:75
double vy_
Definition: TotemRPSD.h:90
unsigned int unitID_
Definition: TotemRPSD.h:93
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
G4int primaryID_
Definition: TotemRPSD.h:66
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
Definition: TotemRPG4Hit.cc:84
double thetaAtEntry_
Definition: TotemRPSD.h:86
void setThetaAtEntry(double t)
void setUnitID(unsigned int i)
Definition: TotemRPG4Hit.cc:93
G4ThreeVector theLocalExitPoint_
Definition: TotemRPSD.h:76
void setPhiAtEntry(double f)
double thePz_
Definition: TotemRPSD.h:82
void setVz(double p)
double thePx_
Definition: TotemRPSD.h:80
double incidentEnergy_
Definition: TotemRPSD.h:78
double eloss_
Definition: TotemRPSD.h:84
void setParentId(int p)
void setTrackID(int i)
Definition: TotemRPG4Hit.cc:90
G4ThreeVector exitPoint_
Definition: TotemRPSD.h:74
double tof_
Definition: TotemRPSD.h:83
void setPz(double p)
static constexpr double rp_garage_position_
Definition: TotemRPSD.cc:33
void setParticleType(short i)
short particleType_
Definition: TotemRPSD.h:96
void setEnergyLoss(double e)
double phiAtEntry_
Definition: TotemRPSD.h:87
void setVy(double p)
double thePy_
Definition: TotemRPSD.h:81
void setPx(double p)
G4ThreeVector hitPoint_
Definition: TotemRPSD.h:73
TotemRPG4Hit * currentHit_
Definition: TotemRPSD.h:62
void setTimeSlice(double d)
Definition: TotemRPG4Hit.cc:96

◆ EndOfEvent()

void TotemRPSD::EndOfEvent ( G4HCofThisEvent *  eventHC)
override

Definition at line 206 of file TotemRPSD.cc.

References TotemRPG4Hit::energyLoss(), mps_splice::entry, beamvalidation::exit(), createfilelist::int, dqmiolumiharvest::j, TotemRPG4Hit::localEntry(), TotemRPG4Hit::localExit(), TotemRPG4Hit::p(), TotemRPG4Hit::particleType(), TotemRPG4Hit::phiAtEntry(), slave_, theHC_, TotemRPG4Hit::thetaAtEntry(), TotemRPG4Hit::tof(), TotemRPG4Hit::trackID(), and TotemRPG4Hit::unitID().

206  {
207  // here we loop over transient hits and make them persistent
208  for (unsigned int j = 0; j < (unsigned int)theHC_->entries(); ++j) {
209  TotemRPG4Hit* aHit = (*theHC_)[j];
210 
211  Local3DPoint entry(aHit->localEntry().x(), aHit->localEntry().y(), aHit->localEntry().z());
212  Local3DPoint exit(aHit->localExit().x(), aHit->localExit().y(), aHit->localExit().z());
213  slave_->processHits(PSimHit(entry,
214  exit,
215  aHit->p(),
216  aHit->tof(),
217  aHit->energyLoss(),
218  aHit->particleType(),
219  aHit->unitID(),
220  aHit->trackID(),
221  aHit->thetaAtEntry(),
222  aHit->phiAtEntry()));
223  }
224 }
G4ThreeVector localExit() const
Definition: TotemRPG4Hit.cc:83
G4ThreeVector localEntry() const
Definition: TotemRPG4Hit.cc:81
int unitID() const
Definition: TotemRPG4Hit.cc:92
double energyLoss() const
TotemRPG4HitCollection * theHC_
Definition: TotemRPSD.h:61
int particleType() const
double thetaAtEntry() const
double phiAtEntry() const
double tof() const
double p() const
Definition: TotemRPG4Hit.cc:99
std::unique_ptr< TrackingSlaveSD > slave_
Definition: TotemRPSD.h:58
unsigned int trackID() const
Definition: TotemRPG4Hit.cc:89
def exit(msg="")

◆ fillHits()

void TotemRPSD::fillHits ( edm::PSimHitContainer c,
const std::string &  n 
)
overridevirtual

Implements SensitiveTkDetector.

Definition at line 231 of file TotemRPSD.cc.

References HltBtagPostValidation_cff::c, dqmiodumpmetadata::n, and slave_.

231  {
232  if (slave_->name() == n) {
233  c = slave_->hits();
234  }
235 }
std::unique_ptr< TrackingSlaveSD > slave_
Definition: TotemRPSD.h:58

◆ Initialize()

void TotemRPSD::Initialize ( G4HCofThisEvent *  HCE)
override

Definition at line 58 of file TotemRPSD.cc.

References bysipixelclustmulteventfilter_cfi::collectionName, hcID_, LogDebug, and theHC_.

58  {
59  LogDebug("TotemRP") << "TotemRPSD : Initialize called for " << GetName();
60 
61  theHC_ = new TotemRPG4HitCollection(GetName(), collectionName[0]);
62  G4SDManager::GetSDMpointer()->AddNewCollection(GetName(), collectionName[0]);
63 
64  if (hcID_ < 0)
65  hcID_ = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
66  HCE->AddHitsCollection(hcID_, theHC_);
67  LogDebug("TotemRP") << "TotemRPSD: is initialized for " << GetName();
68 }
G4THitsCollection< TotemRPG4Hit > TotemRPG4HitCollection
TotemRPG4HitCollection * theHC_
Definition: TotemRPSD.h:61
G4int hcID_
Definition: TotemRPSD.h:65
#define LogDebug(id)

◆ PrintAll()

void TotemRPSD::PrintAll ( )
override

Definition at line 226 of file TotemRPSD.cc.

References LogDebug, and theHC_.

226  {
227  LogDebug("TotemRP") << "TotemRPSD: Collection " << theHC_->GetName() << std::endl;
228  theHC_->PrintAllHits();
229 }
TotemRPG4HitCollection * theHC_
Definition: TotemRPSD.h:61
#define LogDebug(id)

◆ printHitInfo()

void TotemRPSD::printHitInfo ( )
private

Definition at line 70 of file TotemRPSD.cc.

References currentPV_, eloss_, exitPoint_, hitPoint_, LogDebug, parentID_, primaryID_, theTrack_, tSliceID_, and unitID_.

70  {
71  LogDebug("TotemRP") << theTrack_->GetDefinition()->GetParticleName() << " TotemRPSD CreateNewHit for"
72  << " PV " << currentPV_->GetName() << " PVid = " << currentPV_->GetCopyNo() << " Unit "
73  << unitID_;
74  LogDebug("TotemRP") << " primary " << primaryID_ << " time slice " << tSliceID_ << " of energy "
75  << theTrack_->GetTotalEnergy() << " Eloss_ " << eloss_ << " position pre: " << hitPoint_
76  << " post: " << exitPoint_;
77 
78  if (parentID_ == 0) {
79  LogDebug("TotemRP") << " primary particle ";
80  } else {
81  LogDebug("TotemRP") << " daughter of part. " << parentID_;
82  }
83 
84  LogDebug("TotemRP") << " and created by ";
85 
86  if (theTrack_->GetCreatorProcess() != nullptr)
87  LogDebug("TotemRP") << theTrack_->GetCreatorProcess()->GetProcessName();
88  else
89  LogDebug("TotemRP") << "NO process";
90 }
G4Track * theTrack_
Definition: TotemRPSD.h:63
G4int tSliceID_
Definition: TotemRPSD.h:68
G4VPhysicalVolume * currentPV_
Definition: TotemRPSD.h:64
G4int parentID_
Definition: TotemRPSD.h:67
unsigned int unitID_
Definition: TotemRPSD.h:93
G4int primaryID_
Definition: TotemRPSD.h:66
double eloss_
Definition: TotemRPSD.h:84
G4ThreeVector exitPoint_
Definition: TotemRPSD.h:74
G4ThreeVector hitPoint_
Definition: TotemRPSD.h:73
#define LogDebug(id)

◆ ProcessHits()

bool TotemRPSD::ProcessHits ( G4Step *  step,
G4TouchableHistory *  tHistory 
)
overridevirtual

Implements SensitiveDetector.

Definition at line 92 of file TotemRPSD.cc.

References createNewHit(), eloss_, stepInfo(), and theTrack_.

92  {
93  eloss_ = aStep->GetTotalEnergyDeposit();
94  if (eloss_ > 0.0) {
95  eloss_ /= GeV;
96  stepInfo(aStep);
97  edm::LogVerbatim("TotemRP") << "TotemRPSD: ProcessHits 1: Eloss=" << eloss_ << " "
98  << theTrack_->GetDefinition()->GetParticleName();
99  createNewHit();
100  }
101  return true;
102 }
Log< level::Info, true > LogVerbatim
G4Track * theTrack_
Definition: TotemRPSD.h:63
void createNewHit()
Definition: TotemRPSD.cc:161
void stepInfo(const G4Step *aStep)
Definition: TotemRPSD.cc:104
double eloss_
Definition: TotemRPSD.h:84

◆ setDetUnitId()

uint32_t TotemRPSD::setDetUnitId ( const G4Step *  step)
overridevirtual

Implements SensitiveDetector.

Definition at line 148 of file TotemRPSD.cc.

References numberingScheme_.

Referenced by stepInfo().

148  {
149  return (numberingScheme_ == nullptr ? 0 : numberingScheme_->unitID(aStep));
150 }
std::unique_ptr< TotemRPVDetectorOrganization > numberingScheme_
Definition: TotemRPSD.h:59

◆ setToLocal()

G4ThreeVector TotemRPSD::setToLocal ( const G4ThreeVector &  globalPoint)
private

Definition at line 199 of file TotemRPSD.cc.

References preStepPoint_.

Referenced by stepInfo().

199  {
200  G4ThreeVector localPoint;
201  const G4VTouchable* touch = preStepPoint_->GetTouchable();
202  localPoint = touch->GetHistory()->GetTopTransform().TransformPoint(global);
203  return localPoint;
204 }
G4StepPoint * preStepPoint_
Definition: TotemRPSD.h:71

◆ stepInfo()

void TotemRPSD::stepInfo ( const G4Step *  aStep)
private

Definition at line 104 of file TotemRPSD.cc.

References SensitiveDetector::ConvertToLocal3DPoint(), currentPV_, exitPoint_, hitPoint_, incidentEnergy_, createfilelist::int, LogDebug, pabs_, parentID_, particleType_, PV3DBase< T, PVType, FrameType >::phi(), phiAtEntry_, postStepPoint_, preStepPoint_, primaryID_, setDetUnitId(), setToLocal(), theLocalEntryPoint_, theLocalExitPoint_, thePx_, thePy_, thePz_, PV3DBase< T, PVType, FrameType >::theta(), thetaAtEntry_, theTrack_, tof_, tSlice_, tSliceID_, unitID_, verbosity_, vx_, vy_, and vz_.

Referenced by ProcessHits().

104  {
105  preStepPoint_ = aStep->GetPreStepPoint();
106  postStepPoint_ = aStep->GetPostStepPoint();
107  theTrack_ = aStep->GetTrack();
108  hitPoint_ = preStepPoint_->GetPosition();
109  exitPoint_ = postStepPoint_->GetPosition();
110  currentPV_ = preStepPoint_->GetPhysicalVolume();
113 
114  tSlice_ = (postStepPoint_->GetGlobalTime()) / nanosecond;
115  tSliceID_ = (int)tSlice_;
116  unitID_ = setDetUnitId(aStep);
117 
118  if (verbosity_)
119  LogDebug("TotemRP") << "UNIT " << unitID_;
120 
121  primaryID_ = theTrack_->GetTrackID();
122  parentID_ = theTrack_->GetParentID();
123 
124  incidentEnergy_ = theTrack_->GetTotalEnergy() / GeV;
125 
126  pabs_ = preStepPoint_->GetMomentum().mag() / GeV;
127  thePx_ = preStepPoint_->GetMomentum().x() / GeV;
128  thePy_ = preStepPoint_->GetMomentum().y() / GeV;
129  thePz_ = preStepPoint_->GetMomentum().z() / GeV;
130 
131  tof_ = postStepPoint_->GetGlobalTime() / nanosecond;
132  particleType_ = theTrack_->GetDefinition()->GetPDGEncoding();
133 
134  //corrected phi and theta treatment
135  G4ThreeVector gmd = preStepPoint_->GetMomentumDirection();
136  // convert it to local frame
137  G4ThreeVector lmd =
138  ((G4TouchableHistory*)(preStepPoint_->GetTouchable()))->GetHistory()->GetTopTransform().TransformAxis(gmd);
140  thetaAtEntry_ = lnmd.theta();
141  phiAtEntry_ = lnmd.phi();
142 
143  vx_ = theTrack_->GetVertexPosition().x() / mm;
144  vy_ = theTrack_->GetVertexPosition().y() / mm;
145  vz_ = theTrack_->GetVertexPosition().z() / mm;
146 }
G4Track * theTrack_
Definition: TotemRPSD.h:63
double pabs_
Definition: TotemRPSD.h:79
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
Definition: TotemRPSD.cc:199
G4int tSliceID_
Definition: TotemRPSD.h:68
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
G4VPhysicalVolume * currentPV_
Definition: TotemRPSD.h:64
double vx_
Definition: TotemRPSD.h:89
G4int parentID_
Definition: TotemRPSD.h:67
G4double tSlice_
Definition: TotemRPSD.h:69
double vz_
Definition: TotemRPSD.h:91
Local3DPoint ConvertToLocal3DPoint(const G4ThreeVector &point) const
G4ThreeVector theLocalEntryPoint_
Definition: TotemRPSD.h:75
uint32_t setDetUnitId(const G4Step *step) override
Definition: TotemRPSD.cc:148
G4StepPoint * postStepPoint_
Definition: TotemRPSD.h:72
int verbosity_
Definition: TotemRPSD.h:94
double vy_
Definition: TotemRPSD.h:90
unsigned int unitID_
Definition: TotemRPSD.h:93
G4int primaryID_
Definition: TotemRPSD.h:66
double thetaAtEntry_
Definition: TotemRPSD.h:86
G4StepPoint * preStepPoint_
Definition: TotemRPSD.h:71
G4ThreeVector theLocalExitPoint_
Definition: TotemRPSD.h:76
double thePz_
Definition: TotemRPSD.h:82
double thePx_
Definition: TotemRPSD.h:80
double incidentEnergy_
Definition: TotemRPSD.h:78
G4ThreeVector exitPoint_
Definition: TotemRPSD.h:74
double tof_
Definition: TotemRPSD.h:83
short particleType_
Definition: TotemRPSD.h:96
double phiAtEntry_
Definition: TotemRPSD.h:87
double thePy_
Definition: TotemRPSD.h:81
G4ThreeVector hitPoint_
Definition: TotemRPSD.h:73
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
#define LogDebug(id)

◆ storeHit()

void TotemRPSD::storeHit ( TotemRPG4Hit hit)
private

Definition at line 152 of file TotemRPSD.cc.

References LogDebug, theHC_, and verbosity_.

Referenced by createNewHit().

152  {
153  if (hit == nullptr) {
154  if (verbosity_)
155  LogDebug("TotemRP") << "TotemRPSD: hit to be stored is NULL !!" << std::endl;
156  } else {
157  theHC_->insert(hit);
158  }
159 }
TotemRPG4HitCollection * theHC_
Definition: TotemRPSD.h:61
int verbosity_
Definition: TotemRPSD.h:94
#define LogDebug(id)

◆ update() [1/2]

void TotemRPSD::update ( const BeginOfEvent )
overrideprotectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent *>.

Definition at line 237 of file TotemRPSD.cc.

References clearHits(), and eventno_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

237  {
238  clearHits();
239  eventno_ = (*ptr)()->GetEventID();
240 }
int eventno_
Definition: TotemRPSD.h:95
void clearHits() override
Definition: TotemRPSD.cc:244

◆ update() [2/2]

void TotemRPSD::update ( const ::EndOfEvent )
overrideprotected

Member Data Documentation

◆ currentHit_

TotemRPG4Hit* TotemRPSD::currentHit_ = nullptr
private

Definition at line 62 of file TotemRPSD.h.

Referenced by createNewHit().

◆ currentPV_

G4VPhysicalVolume* TotemRPSD::currentPV_ = nullptr
private

Definition at line 64 of file TotemRPSD.h.

Referenced by printHitInfo(), and stepInfo().

◆ eloss_

double TotemRPSD::eloss_ = 0.0
private

Definition at line 84 of file TotemRPSD.h.

Referenced by createNewHit(), printHitInfo(), and ProcessHits().

◆ eventno_

int TotemRPSD::eventno_ = 0
private

Definition at line 95 of file TotemRPSD.h.

Referenced by update().

◆ exitPoint_

G4ThreeVector TotemRPSD::exitPoint_
private

Definition at line 74 of file TotemRPSD.h.

Referenced by createNewHit(), printHitInfo(), and stepInfo().

◆ hcID_

G4int TotemRPSD::hcID_ = -1
private

Definition at line 65 of file TotemRPSD.h.

Referenced by Initialize().

◆ hitPoint_

G4ThreeVector TotemRPSD::hitPoint_
private

Definition at line 73 of file TotemRPSD.h.

Referenced by createNewHit(), printHitInfo(), and stepInfo().

◆ incidentEnergy_

double TotemRPSD::incidentEnergy_ = 0.0
private

Definition at line 78 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ numberingScheme_

std::unique_ptr<TotemRPVDetectorOrganization> TotemRPSD::numberingScheme_
private

Definition at line 59 of file TotemRPSD.h.

Referenced by setDetUnitId(), and TotemRPSD().

◆ pabs_

double TotemRPSD::pabs_ = 0.0
private

Definition at line 79 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ parentID_

G4int TotemRPSD::parentID_ = 0
private

Definition at line 67 of file TotemRPSD.h.

Referenced by createNewHit(), printHitInfo(), and stepInfo().

◆ particleType_

short TotemRPSD::particleType_ = 0
private

Definition at line 96 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ phiAtEntry_

double TotemRPSD::phiAtEntry_ = 0.0
private

Definition at line 87 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ postStepPoint_

G4StepPoint* TotemRPSD::postStepPoint_ = nullptr
private

Definition at line 72 of file TotemRPSD.h.

Referenced by stepInfo().

◆ preStepPoint_

G4StepPoint* TotemRPSD::preStepPoint_ = nullptr
private

Definition at line 71 of file TotemRPSD.h.

Referenced by setToLocal(), and stepInfo().

◆ primaryID_

G4int TotemRPSD::primaryID_ = 0
private

Definition at line 66 of file TotemRPSD.h.

Referenced by createNewHit(), printHitInfo(), and stepInfo().

◆ slave_

std::unique_ptr<TrackingSlaveSD> TotemRPSD::slave_
private

Definition at line 58 of file TotemRPSD.h.

Referenced by clearHits(), EndOfEvent(), fillHits(), and TotemRPSD().

◆ theHC_

TotemRPG4HitCollection* TotemRPSD::theHC_ = nullptr
private

Definition at line 61 of file TotemRPSD.h.

Referenced by EndOfEvent(), Initialize(), PrintAll(), and storeHit().

◆ theLocalEntryPoint_

G4ThreeVector TotemRPSD::theLocalEntryPoint_
private

Definition at line 75 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ theLocalExitPoint_

G4ThreeVector TotemRPSD::theLocalExitPoint_
private

Definition at line 76 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ thePx_

double TotemRPSD::thePx_ = 0.0
private

Definition at line 80 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ thePy_

double TotemRPSD::thePy_ = 0.0
private

Definition at line 81 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ thePz_

double TotemRPSD::thePz_ = 0.0
private

Definition at line 82 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ thetaAtEntry_

double TotemRPSD::thetaAtEntry_ = 0.0
private

Definition at line 86 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ theTrack_

G4Track* TotemRPSD::theTrack_ = nullptr
private

Definition at line 63 of file TotemRPSD.h.

Referenced by printHitInfo(), ProcessHits(), and stepInfo().

◆ tof_

double TotemRPSD::tof_ = 0.0
private

Definition at line 83 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ tSlice_

G4double TotemRPSD::tSlice_ = 0.0
private

Definition at line 69 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ tSliceID_

G4int TotemRPSD::tSliceID_ = 0
private

Definition at line 68 of file TotemRPSD.h.

Referenced by printHitInfo(), and stepInfo().

◆ unitID_

unsigned int TotemRPSD::unitID_ = 0
private

Definition at line 93 of file TotemRPSD.h.

Referenced by createNewHit(), printHitInfo(), and stepInfo().

◆ verbosity_

int TotemRPSD::verbosity_
private

Definition at line 94 of file TotemRPSD.h.

Referenced by stepInfo(), storeHit(), and TotemRPSD().

◆ vx_

double TotemRPSD::vx_ = 0.0
private

Definition at line 89 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ vy_

double TotemRPSD::vy_ = 0.0
private

Definition at line 90 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().

◆ vz_

double TotemRPSD::vz_ = 0.0
private

Definition at line 91 of file TotemRPSD.h.

Referenced by createNewHit(), and stepInfo().