CMS 3D CMS Logo

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

#include <PLTSensitiveDetector.h>

Inheritance diagram for PLTSensitiveDetector:
SensitiveTkDetector Observer< const BeginOfEvent * > Observer< const BeginOfTrack * > Observer< const BeginOfJob * > SensitiveDetector

Public Member Functions

virtual void EndOfEvent (G4HCofThisEvent *)
 
void fillHits (edm::PSimHitContainer &, std::string use)
 
 PLTSensitiveDetector (std::string, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
virtual bool ProcessHits (G4Step *, G4TouchableHistory *)
 
virtual uint32_t setDetUnitId (G4Step *)
 
virtual ~PLTSensitiveDetector ()
 
- Public Member Functions inherited from SensitiveTkDetector
 SensitiveTkDetector (std::string &iname, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
 
- Public Member Functions inherited from SensitiveDetector
virtual void AssignSD (std::string &vname)
 
Local3DPoint ConvertToLocal3DPoint (const G4ThreeVector &point)
 
Local3DPoint FinalStepPosition (G4Step *s, coordinates)
 
virtual std::vector< std::string > getNames ()
 
virtual void Initialize (G4HCofThisEvent *eventHC)
 
Local3DPoint InitialStepPosition (G4Step *s, coordinates)
 
std::string nameOfSD ()
 
void NaNTrap (G4Step *step)
 
void Register ()
 
 SensitiveDetector (std::string &iname, const DDCompactView &cpv, SensitiveDetectorCatalog &, edm::ParameterSet const &p)
 
virtual ~SensitiveDetector ()
 
- Public Member Functions inherited from Observer< const BeginOfEvent * >
 Observer ()
 
void slotForUpdate (const BeginOfEvent *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfJob * >
 Observer ()
 
void slotForUpdate (const BeginOfJob *iT)
 
virtual ~Observer ()
 

Private Member Functions

virtual void clearHits ()
 
virtual bool closeHit (G4Step *)
 
virtual void createHit (G4Step *)
 
TrackInformationgetOrCreateTrackInformation (const G4Track *)
 
virtual bool newHit (G4Step *)
 
virtual void sendHit ()
 
void update (const BeginOfEvent *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfJob *)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void updateHit (G4Step *)
 

Private Attributes

float energyCut
 
float energyHistoryCut
 
int eventno
 
Local3DPoint globalEntryPoint
 
Local3DPoint globalExitPoint
 
uint32_t lastId
 
unsigned int lastTrack
 
G4TrackToParticleIDmyG4TrackToParticleID
 
std::string myName
 
UpdatablePSimHitmySimHit
 
G4VPhysicalVolume * oldVolume
 
std::string pname
 
TrackingSlaveSDslave
 
G4ProcessTypeEnumeratortheG4ProcessTypeEnumerator
 

Additional Inherited Members

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

Detailed Description

Definition at line 30 of file PLTSensitiveDetector.h.

Constructor & Destructor Documentation

PLTSensitiveDetector::PLTSensitiveDetector ( std::string  name,
const DDCompactView cpv,
SensitiveDetectorCatalog clg,
edm::ParameterSet const &  p,
const SimTrackManager manager 
)

Definition at line 34 of file PLTSensitiveDetector.cc.

References SensitiveDetector::AssignSD(), energyCut, energyHistoryCut, edm::ParameterSet::getParameter(), SensitiveDetectorCatalog::logicalNames(), myG4TrackToParticleID, SensitiveDetector::Register(), slave, and theG4ProcessTypeEnumerator.

38  :
39  SensitiveTkDetector(name, cpv, clg, p), myName(name), mySimHit(0),
40  oldVolume(0), lastId(0), lastTrack(0), eventno(0) {
41 
42  edm::ParameterSet m_TrackerSD = p.getParameter<edm::ParameterSet>("PltSD");
43  energyCut = m_TrackerSD.getParameter<double>("EnergyThresholdForPersistencyInGeV")*GeV; //default must be 0.5
44  energyHistoryCut = m_TrackerSD.getParameter<double>("EnergyThresholdForHistoryInGeV")*GeV;//default must be 0.05
45 
46  edm::LogInfo("PLTSensitiveDetector") <<"Criteria for Saving Tracker SimTracks: \n "
47  <<" History: "<<energyHistoryCut<< " MeV ; Persistency: "<< energyCut<<" MeV\n"
48  <<" Constructing a PLTSensitiveDetector with ";
49 
50  slave = new TrackingSlaveSD(name);
51 
52  // Now attach the right detectors (LogicalVolumes) to me
53  std::vector<std::string> lvNames = clg.logicalNames(name);
54  this->Register();
55  for (std::vector<std::string>::iterator it = lvNames.begin();
56  it != lvNames.end(); it++) {
57  edm::LogInfo("PLTSensitiveDetector")<< name << " attaching LV " << *it;
58  this->AssignSD(*it);
59  }
60 
63 }
T getParameter(std::string const &) const
UpdatablePSimHit * mySimHit
std::vector< std::string > logicalNames(std::string &readoutName)
G4TrackToParticleID * myG4TrackToParticleID
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
G4VPhysicalVolume * oldVolume
SensitiveTkDetector(std::string &iname, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
TrackingSlaveSD * slave
virtual void AssignSD(std::string &vname)
PLTSensitiveDetector::~PLTSensitiveDetector ( )
virtual

Definition at line 65 of file PLTSensitiveDetector.cc.

References myG4TrackToParticleID, slave, and theG4ProcessTypeEnumerator.

65  {
66  delete slave;
68  delete myG4TrackToParticleID;
69 }
G4TrackToParticleID * myG4TrackToParticleID
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
TrackingSlaveSD * slave

Member Function Documentation

void PLTSensitiveDetector::clearHits ( )
privatevirtual

Implements SensitiveDetector.

Definition at line 242 of file PLTSensitiveDetector.cc.

References TrackingSlaveSD::Initialize(), and slave.

Referenced by update().

242  {
243  slave->Initialize();
244 }
virtual void Initialize()
TrackingSlaveSD * slave
bool PLTSensitiveDetector::closeHit ( G4Step *  aStep)
privatevirtual

Definition at line 169 of file PLTSensitiveDetector.cc.

References PSimHit::exitPoint(), SensitiveDetector::InitialStepPosition(), SensitiveDetector::LocalCoordinates, LogDebug, mag(), and mySimHit.

Referenced by newHit().

169  {
170 
171  if (mySimHit == 0) return false;
172  const float tolerance = 0.05 * mm; // 50 micron are allowed between the exit
173  // point of the current hit and the entry point of the new hit
175  LogDebug("PLTSensitiveDetector")<< " closeHit: distance = " << (mySimHit->exitPoint()-theEntryPoint).mag();
176 
177  if ((mySimHit->exitPoint()-theEntryPoint).mag()<tolerance) return true;
178  return false;
179 }
#define LogDebug(id)
UpdatablePSimHit * mySimHit
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
Local3DPoint InitialStepPosition(G4Step *s, coordinates)
void PLTSensitiveDetector::createHit ( G4Step *  aStep)
privatevirtual

Definition at line 181 of file PLTSensitiveDetector.cc.

References SensitiveDetector::ConvertToLocal3DPoint(), PSimHit::detUnitId(), PSimHit::energyLoss(), PSimHit::entryPoint(), PSimHit::exitPoint(), SensitiveDetector::FinalStepPosition(), globalEntryPoint, globalExitPoint, SensitiveDetector::InitialStepPosition(), lastId, lastTrack, SensitiveDetector::LocalCoordinates, LogDebug, myG4TrackToParticleID, mySimHit, oldVolume, G4TrackToParticleID::particleID(), PV3DBase< T, PVType, FrameType >::phi(), pname, G4ProcessTypeEnumerator::processId(), setDetUnitId(), theG4ProcessTypeEnumerator, PV3DBase< T, PVType, FrameType >::theta(), PSimHit::trackId(), findQualityFiles::v, and SensitiveDetector::WorldCoordinates.

Referenced by ProcessHits().

181  {
182 
183  if (mySimHit != 0) {
184  delete mySimHit;
185  mySimHit=0;
186  }
187 
188  G4Track * theTrack = aStep->GetTrack();
189  G4VPhysicalVolume * v = aStep->GetPreStepPoint()->GetPhysicalVolume();
190 
193 
194  float thePabs = aStep->GetPreStepPoint()->GetMomentum().mag()/GeV;
195  float theTof = aStep->GetPreStepPoint()->GetGlobalTime()/nanosecond;
196  float theEnergyLoss = aStep->GetTotalEnergyDeposit()/GeV;
197  int theParticleType = myG4TrackToParticleID->particleID(theTrack);
198  uint32_t theDetUnitId = setDetUnitId(aStep);
199 
202  pname = theTrack->GetDynamicParticle()->GetDefinition()->GetParticleName();
203 
204  unsigned int theTrackID = theTrack->GetTrackID();
205 
206  G4ThreeVector gmd = aStep->GetPreStepPoint()->GetMomentumDirection();
207  // convert it to local frame
208  G4ThreeVector lmd = ((G4TouchableHistory *)(aStep->GetPreStepPoint()->GetTouchable()))->GetHistory()->GetTopTransform().TransformAxis(gmd);
210  float theThetaAtEntry = lnmd.theta();
211  float thePhiAtEntry = lnmd.phi();
212 
213  mySimHit = new UpdatablePSimHit(theEntryPoint,theExitPoint,thePabs,theTof,
214  theEnergyLoss,theParticleType,theDetUnitId,
215  theTrackID,theThetaAtEntry,thePhiAtEntry,
216  theG4ProcessTypeEnumerator->processId(theTrack->GetCreatorProcess()));
217 
218  LogDebug("PLTSensitiveDetector") << " Created PSimHit: " << pname << " "
219  << mySimHit->detUnitId() << " " << mySimHit->trackId()
220  << " " << mySimHit->energyLoss() << " "
221  << mySimHit->entryPoint() << " " << mySimHit->exitPoint();
222  lastId = theDetUnitId;
223  lastTrack = theTrackID;
224  oldVolume = v;
225 }
#define LogDebug(id)
UpdatablePSimHit * mySimHit
G4TrackToParticleID * myG4TrackToParticleID
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
G4VPhysicalVolume * oldVolume
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
Local3DPoint ConvertToLocal3DPoint(const G4ThreeVector &point)
static int particleID(const G4Track *)
virtual uint32_t setDetUnitId(G4Step *)
unsigned int processId(const G4VProcess *)
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:75
unsigned int trackId() const
Definition: PSimHit.h:102
Local3DPoint FinalStepPosition(G4Step *s, coordinates)
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
Local3DPoint InitialStepPosition(G4Step *s, coordinates)
unsigned int detUnitId() const
Definition: PSimHit.h:93
void PLTSensitiveDetector::EndOfEvent ( G4HCofThisEvent *  )
virtual

Reimplemented from SensitiveDetector.

Definition at line 111 of file PLTSensitiveDetector.cc.

References LogDebug, myName, mySimHit, and sendHit().

111  {
112 
113  LogDebug("PLTSensitiveDetector")<< " Saving the last hit in a ROU " << myName;
114 
115  if (mySimHit == 0) return;
116  sendHit();
117 }
#define LogDebug(id)
UpdatablePSimHit * mySimHit
void PLTSensitiveDetector::fillHits ( edm::PSimHitContainer c,
std::string  use 
)
virtual

Implements SensitiveTkDetector.

Definition at line 119 of file PLTSensitiveDetector.cc.

References TrackingSlaveSD::hits(), n, TrackingSlaveSD::name(), and slave.

119  {
120  if (slave->name() == n) c=slave->hits();
121 }
std::string name() const
std::vector< PSimHit > & hits()
TrackingSlaveSD * slave
TrackInformation * PLTSensitiveDetector::getOrCreateTrackInformation ( const G4Track *  gTrack)
private

Definition at line 246 of file PLTSensitiveDetector.cc.

References info(), and groupFilesInBlocks::temp.

Referenced by ProcessHits().

246  {
247  G4VUserTrackInformation* temp = gTrack->GetUserInformation();
248  if (temp == 0){
249  edm::LogError("PLTSensitiveDetector") <<" ERROR: no G4VUserTrackInformation available";
250  abort();
251  }else{
252  TrackInformation* info = dynamic_cast<TrackInformation*>(temp);
253  if (info == 0){
254  edm::LogError("PLTSensitiveDetector") <<" ERROR: TkSimTrackSelection: the UserInformation does not appear to be a TrackInformation";
255  abort();
256  }
257  return info;
258  }
259 }
static const TGPicture * info(bool iBackgroundIsBlack)
bool PLTSensitiveDetector::newHit ( G4Step *  aStep)
privatevirtual

Definition at line 155 of file PLTSensitiveDetector.cc.

References closeHit(), lastId, lastTrack, LogDebug, mySimHit, and setDetUnitId().

Referenced by ProcessHits().

155  {
156 
157  G4Track * theTrack = aStep->GetTrack();
158  uint32_t theDetUnitId = setDetUnitId(aStep);
159  unsigned int theTrackID = theTrack->GetTrackID();
160 
161  LogDebug("PLTSensitiveDetector") << " OLD (d,t) = (" << lastId << "," << lastTrack
162  << "), new = (" << theDetUnitId << "," << theTrackID << ") return "
163  << ((theTrackID == lastTrack) && (lastId == theDetUnitId));
164  if ((mySimHit != 0) && (theTrackID == lastTrack) && (lastId == theDetUnitId) && closeHit(aStep))
165  return false;
166  return true;
167 }
#define LogDebug(id)
UpdatablePSimHit * mySimHit
virtual bool closeHit(G4Step *)
virtual uint32_t setDetUnitId(G4Step *)
bool PLTSensitiveDetector::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *   
)
virtual

Implements SensitiveDetector.

Definition at line 71 of file PLTSensitiveDetector.cc.

References createHit(), energyCut, energyHistoryCut, getOrCreateTrackInformation(), info(), lastTrack, LogDebug, newHit(), TrackInformation::putInHistory(), sendHit(), TrackInformation::storeTrack(), and updateHit().

71  {
72 
73  LogDebug("PLTSensitiveDetector") << " Entering a new Step "
74  << aStep->GetTotalEnergyDeposit() << " "
75  << aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
76 
77  G4Track * gTrack = aStep->GetTrack();
78  if ((unsigned int)(gTrack->GetTrackID()) != lastTrack) {
79 
80  if (gTrack->GetKineticEnergy() > energyCut){
82  info->storeTrack(true);
83  }
84  if (gTrack->GetKineticEnergy() > energyHistoryCut){
86  info->putInHistory();
87  }
88  }
89 
90  if (aStep->GetTotalEnergyDeposit()>0.) {
91  if (newHit(aStep) == true) {
92  sendHit();
93  createHit(aStep);
94  } else {
95  updateHit(aStep);
96  }
97  return true;
98  }
99  return false;
100 }
#define LogDebug(id)
virtual void createHit(G4Step *)
static const TGPicture * info(bool iBackgroundIsBlack)
bool storeTrack() const
TrackInformation * getOrCreateTrackInformation(const G4Track *)
virtual bool newHit(G4Step *)
virtual void updateHit(G4Step *)
void PLTSensitiveDetector::sendHit ( )
privatevirtual

Definition at line 123 of file PLTSensitiveDetector.cc.

References PSimHit::detUnitId(), PSimHit::energyLoss(), PSimHit::entryPoint(), PSimHit::exitPoint(), lastId, lastTrack, LogDebug, mySimHit, pname, TrackingSlaveSD::processHits(), slave, and PSimHit::trackId().

Referenced by EndOfEvent(), and ProcessHits().

123  {
124  if (mySimHit == 0) return;
125  LogDebug("PLTSensitiveDetector") << " Storing PSimHit: " << pname << " " << mySimHit->detUnitId()
126  << " " << mySimHit->trackId() << " " << mySimHit->energyLoss()
127  << " " << mySimHit->entryPoint() << " " << mySimHit->exitPoint();
128 
130 
131  // clean up
132  delete mySimHit;
133  mySimHit = 0;
134  lastTrack = 0;
135  lastId = 0;
136 }
#define LogDebug(id)
UpdatablePSimHit * mySimHit
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
TrackingSlaveSD * slave
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:75
unsigned int trackId() const
Definition: PSimHit.h:102
virtual bool processHits(const PSimHit &)
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
unsigned int detUnitId() const
Definition: PSimHit.h:93
uint32_t PLTSensitiveDetector::setDetUnitId ( G4Step *  )
virtual

Implements SensitiveDetector.

Definition at line 102 of file PLTSensitiveDetector.cc.

References LogDebug.

Referenced by createHit(), and newHit().

102  {
103 
104  unsigned int detId = 0;
105 
106  LogDebug("PLTSensitiveDetector")<< " DetID = "<<detId;
107 
108  return detId;
109 }
#define LogDebug(id)
void PLTSensitiveDetector::update ( const BeginOfEvent )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent * >.

Definition at line 229 of file PLTSensitiveDetector.cc.

References clearHits(), eventno, and mySimHit.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

229  {
230 
231  clearHits();
232  eventno = (*i)()->GetEventID();
233  mySimHit = 0;
234 }
UpdatablePSimHit * mySimHit
void PLTSensitiveDetector::update ( const BeginOfTrack )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 236 of file PLTSensitiveDetector.cc.

References pname.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

236  {
237 
238  const G4Track* gTrack = (*bot)();
239  pname = gTrack->GetDynamicParticle()->GetDefinition()->GetParticleName();
240 }
void PLTSensitiveDetector::update ( const BeginOfJob )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 227 of file PLTSensitiveDetector.cc.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

227 { }
void PLTSensitiveDetector::updateHit ( G4Step *  aStep)
privatevirtual

Definition at line 138 of file PLTSensitiveDetector.cc.

References UpdatablePSimHit::addEnergyLoss(), PSimHit::detUnitId(), PSimHit::energyLoss(), PSimHit::entryPoint(), PSimHit::exitPoint(), SensitiveDetector::FinalStepPosition(), globalExitPoint, SensitiveDetector::LocalCoordinates, LogDebug, mySimHit, pname, UpdatablePSimHit::setExitPoint(), PSimHit::trackId(), and SensitiveDetector::WorldCoordinates.

Referenced by ProcessHits().

138  {
139 
141  float theEnergyLoss = aStep->GetTotalEnergyDeposit()/GeV;
142  mySimHit->setExitPoint(theExitPoint);
143  LogDebug("PLTSensitiveDetector")<< " Before : " << mySimHit->energyLoss();
144  mySimHit->addEnergyLoss(theEnergyLoss);
146 
147  LogDebug("PLTSensitiveDetector") << " Updating: new exitpoint " << pname << " "
148  << theExitPoint << " new energy loss " << theEnergyLoss
149  << "\n Updated PSimHit: " << mySimHit->detUnitId()
150  << " " << mySimHit->trackId()
151  << " " << mySimHit->energyLoss() << " "
152  << mySimHit->entryPoint() << " " << mySimHit->exitPoint();
153 }
#define LogDebug(id)
UpdatablePSimHit * mySimHit
void setExitPoint(const Local3DPoint &exit)
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
void addEnergyLoss(float eloss)
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:75
unsigned int trackId() const
Definition: PSimHit.h:102
Local3DPoint FinalStepPosition(G4Step *s, coordinates)
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
unsigned int detUnitId() const
Definition: PSimHit.h:93

Member Data Documentation

float PLTSensitiveDetector::energyCut
private

Definition at line 68 of file PLTSensitiveDetector.h.

Referenced by PLTSensitiveDetector(), and ProcessHits().

float PLTSensitiveDetector::energyHistoryCut
private

Definition at line 69 of file PLTSensitiveDetector.h.

Referenced by PLTSensitiveDetector(), and ProcessHits().

int PLTSensitiveDetector::eventno
private

Definition at line 76 of file PLTSensitiveDetector.h.

Referenced by update().

Local3DPoint PLTSensitiveDetector::globalEntryPoint
private

Definition at line 71 of file PLTSensitiveDetector.h.

Referenced by createHit().

Local3DPoint PLTSensitiveDetector::globalExitPoint
private

Definition at line 72 of file PLTSensitiveDetector.h.

Referenced by createHit(), and updateHit().

uint32_t PLTSensitiveDetector::lastId
private

Definition at line 74 of file PLTSensitiveDetector.h.

Referenced by createHit(), newHit(), and sendHit().

unsigned int PLTSensitiveDetector::lastTrack
private

Definition at line 75 of file PLTSensitiveDetector.h.

Referenced by createHit(), newHit(), ProcessHits(), and sendHit().

G4TrackToParticleID* PLTSensitiveDetector::myG4TrackToParticleID
private

Definition at line 65 of file PLTSensitiveDetector.h.

Referenced by createHit(), PLTSensitiveDetector(), and ~PLTSensitiveDetector().

std::string PLTSensitiveDetector::myName
private

Definition at line 66 of file PLTSensitiveDetector.h.

Referenced by EndOfEvent().

UpdatablePSimHit* PLTSensitiveDetector::mySimHit
private

Definition at line 67 of file PLTSensitiveDetector.h.

Referenced by closeHit(), createHit(), EndOfEvent(), newHit(), sendHit(), update(), and updateHit().

G4VPhysicalVolume* PLTSensitiveDetector::oldVolume
private

Definition at line 73 of file PLTSensitiveDetector.h.

Referenced by createHit().

std::string PLTSensitiveDetector::pname
private

Definition at line 77 of file PLTSensitiveDetector.h.

Referenced by createHit(), sendHit(), update(), and updateHit().

TrackingSlaveSD* PLTSensitiveDetector::slave
private
G4ProcessTypeEnumerator* PLTSensitiveDetector::theG4ProcessTypeEnumerator
private

Definition at line 64 of file PLTSensitiveDetector.h.

Referenced by createHit(), PLTSensitiveDetector(), and ~PLTSensitiveDetector().