CMS 3D CMS Logo

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

#include <FP420SD.h>

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

Public Member Functions

void clear () override
 
void clearHits () override
 
void DrawAll () override
 
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
void fillHits (edm::PSimHitContainer &, const std::string &) override
 
 FP420SD (const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
virtual double getEnergyDeposit (G4Step *step)
 
void Initialize (G4HCofThisEvent *HCE) override
 
void PrintAll () override
 
bool ProcessHits (G4Step *, G4TouchableHistory *) override
 
uint32_t setDetUnitId (const G4Step *) override
 
 ~FP420SD () override
 
- Public Member Functions inherited from SensitiveTkDetector
 SensitiveTkDetector (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
 
- 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 edm::EventSetup &es, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, bool calo)
 
 ~SensitiveDetector () override
 
- Public Member Functions inherited from Observer< const BeginOfRun * >
 Observer ()
 
void slotForUpdate (const BeginOfRun * iT)
 
virtual ~Observer ()
 
- 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 Attributes

float edepositEM
 
float edepositHAD
 
G4int emPDG
 
G4int epPDG
 
G4int gammaPDG
 

Private Member Functions

void CreateNewHit ()
 
void GetStepInfo (G4Step *aStep)
 
G4bool HitExists ()
 
void ResetForNewPrimary ()
 
G4ThreeVector SetToLocal (const G4ThreeVector &global)
 
G4ThreeVector SetToLocalExit (const G4ThreeVector &globalPoint)
 
void StoreHit (FP420G4Hit *)
 
void Summarize ()
 
void update (const ::EndOfEvent *) override
 
void update (const BeginOfEvent *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void UpdateHit ()
 

Private Attributes

FP420G4HitcurrentHit
 
G4VPhysicalVolume * currentPV
 
float edeposit
 
float Eloss
 
G4ThreeVector entrancePoint
 
int eventno
 
G4ThreeVector exitPoint
 
G4int hcID
 
G4ThreeVector hitPoint
 
G4ThreeVector hitPointExit
 
G4ThreeVector hitPointLocal
 
G4ThreeVector hitPointLocalExit
 
float incidentEnergy
 
FP420NumberingSchemenumberingScheme
 
float Pabs
 
int ParentId
 
short ParticleType
 
float PhiAtEntry
 
G4StepPoint * postStepPoint
 
G4StepPoint * preStepPoint
 
uint32_t previousUnitID
 
unsigned int primaryID
 
unsigned int primID
 
TrackingSlaveSDslave
 
G4ThreeVector theEntryPoint
 
G4ThreeVector theExitPoint
 
FP420G4HitCollectiontheHC
 
const SimTrackManagertheManager
 
float ThetaAtEntry
 
G4Track * theTrack
 
float Tof
 
G4int tsID
 
G4double tSlice
 
G4int tSliceID
 
uint32_t unitID
 
float Vx
 
float Vy
 
float Vz
 
float X
 
float Y
 
float Z
 

Additional Inherited Members

- Protected Types inherited from SensitiveDetector
enum  coordinates { WorldCoordinates, LocalCoordinates }
 
- 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...
 

Detailed Description

Definition at line 41 of file FP420SD.h.

Constructor & Destructor Documentation

◆ FP420SD()

FP420SD::FP420SD ( const std::string &  name,
const edm::EventSetup es,
const SensitiveDetectorCatalog clg,
edm::ParameterSet const &  p,
const SimTrackManager manager 
)

Definition at line 46 of file FP420SD.cc.

51  : SensitiveTkDetector(name, es, clg, p),
52  numberingScheme(nullptr),
53  hcID(-1),
54  theHC(nullptr),
55  theManager(manager),
56  currentHit(nullptr),
57  theTrack(nullptr),
58  currentPV(nullptr),
59  unitID(0),
60  previousUnitID(0),
61  preStepPoint(nullptr),
62  postStepPoint(nullptr),
63  eventno(0) {
64  //Parameters
65  edm::ParameterSet m_p = p.getParameter<edm::ParameterSet>("FP420SD");
66  int verbn = m_p.getUntrackedParameter<int>("Verbosity");
67  //int verbn = 1;
68 
69  SetVerboseLevel(verbn);
70 
71  slave = new TrackingSlaveSD(name);
72 
73  if (name == "FP420SI") {
74  if (verbn > 0) {
75  edm::LogInfo("FP420Sim") << "name = FP420SI and new FP420NumberingSchem";
76  }
78  } else {
79  edm::LogWarning("FP420Sim") << "FP420SD: ReadoutName not supported\n";
80  }
81 }

References edm::ParameterSet::getUntrackedParameter(), Skims_PA_cff::name, numberingScheme, AlCaHLTBitMon_ParallelJobs::p, and slave.

◆ ~FP420SD()

FP420SD::~FP420SD ( )
override

Definition at line 83 of file FP420SD.cc.

83  {
84  delete slave;
85  delete numberingScheme;
86 }

References numberingScheme, and slave.

Member Function Documentation

◆ clear()

void FP420SD::clear ( void  )
override

Definition at line 403 of file FP420SD.cc.

403 {}

◆ clearHits()

void FP420SD::clearHits ( )
overridevirtual

Implements SensitiveDetector.

Definition at line 442 of file FP420SD.cc.

442  {
443  //AZ:
444  slave->Initialize();
445 }

References TrackingSlaveSD::Initialize(), and slave.

Referenced by update().

◆ CreateNewHit()

void FP420SD::CreateNewHit ( )
private

Definition at line 234 of file FP420SD.cc.

234  {
235 #ifdef debug
236  // << " MVid = " << currentPV->GetMother()->GetCopyNo()
237  LogDebug("FP420Sim") << "FP420SD CreateNewHit for"
238  << " PV " << currentPV->GetName() << " PVid = " << currentPV->GetCopyNo() << " Unit " << unitID
239  << std::endl;
240  LogDebug("FP420Sim") << " primary " << primaryID << " time slice " << tSliceID << " For Track "
241  << theTrack->GetTrackID() << " which is a " << theTrack->GetDefinition()->GetParticleName();
242 
243  if (theTrack->GetTrackID() == 1) {
244  LogDebug("FP420Sim") << " of energy " << theTrack->GetTotalEnergy();
245  } else {
246  LogDebug("FP420Sim") << " daughter of part. " << theTrack->GetParentID();
247  }
248 
249  LogDebug("FP420Sim") << " and created by ";
250  if (theTrack->GetCreatorProcess() != NULL)
251  LogDebug("FP420Sim") << theTrack->GetCreatorProcess()->GetProcessName();
252  else
253  LogDebug("FP420Sim") << "NO process";
254  LogDebug("FP420Sim") << std::endl;
255 #endif
256 
257  currentHit = new FP420G4Hit;
262 
269 
270  // currentHit->setEntry(entrancePoint);
272 
275 
277  currentHit->setVx(Vx);
278  currentHit->setVy(Vy);
279  currentHit->setVz(Vz);
280 
281  currentHit->setX(X);
282  currentHit->setY(Y);
283  currentHit->setZ(Z);
284  //AZ:12.10.2007
285  // UpdateHit();
286  // buffer for next steps:
287  tsID = tSliceID;
288  primID = primaryID;
290 
292 }

References currentHit, currentPV, Eloss, hitPoint, hitPointLocal, hitPointLocalExit, incidentEnergy, LogDebug, NULL, Pabs, ParentId, ParticleType, PhiAtEntry, previousUnitID, primaryID, primID, FP420G4Hit::setEnergyLoss(), FP420G4Hit::setEntry(), FP420G4Hit::setEntryLocalP(), FP420G4Hit::setExitLocalP(), FP420G4Hit::setIncidentEnergy(), FP420G4Hit::setPabs(), FP420G4Hit::setParentId(), FP420G4Hit::setParticleType(), FP420G4Hit::setPhiAtEntry(), FP420G4Hit::setThetaAtEntry(), FP420G4Hit::setTimeSlice(), FP420G4Hit::setTof(), FP420G4Hit::setTrackID(), FP420G4Hit::setUnitID(), FP420G4Hit::setVx(), FP420G4Hit::setVy(), FP420G4Hit::setVz(), FP420G4Hit::setX(), FP420G4Hit::setY(), FP420G4Hit::setZ(), StoreHit(), ThetaAtEntry, theTrack, Tof, tsID, tSlice, tSliceID, unitID, Vx, Vy, Vz, X, Y, and Z.

Referenced by ProcessHits().

◆ DrawAll()

void FP420SD::DrawAll ( )
override

Definition at line 405 of file FP420SD.cc.

405 {}

◆ EndOfEvent()

void FP420SD::EndOfEvent ( G4HCofThisEvent *  eventHC)
override

Definition at line 327 of file FP420SD.cc.

327  {
328  // here we loop over transient hits and make them persistent
329 
330  // if(theHC->entries() > 100){
331  // LogDebug("FP420Sim") << "FP420SD: warning!!! Number of hits exceed 100 and =" << theHC->entries() << "\n";
332  // }
333  // for (int j=0; j<theHC->entries() && j<100; j++) {
334  int nhitsHPS240 = 0;
335  int nhitsFP420 = 0;
336  int nhits = theHC->entries();
337  for (int j = 0; j < nhits; j++) {
338  FP420G4Hit* aHit = (*theHC)[j];
339  if ((fabs(aHit->getTof()) > 780. && fabs(aHit->getTof()) < 840.))
340  ++nhitsHPS240;
341  if ((fabs(aHit->getTof()) > 1380. && fabs(aHit->getTof()) < 1450.))
342  ++nhitsFP420;
343  // if(fabs(aHit->getTof()) < 1700.) {
344  if ((fabs(aHit->getTof()) > 780. && fabs(aHit->getTof()) < 840. && nhitsHPS240 < 200.) ||
345  (fabs(aHit->getTof()) > 1380. && fabs(aHit->getTof()) < 1450. && nhitsFP420 < 200.)) {
346 #ifdef ddebug
347  // LogDebug("FP420SD") << " FP420Hit " << j << " " << *aHit << std::endl;
348  LogDebug("FP420Sim") << "hit number" << j << "unit ID = " << aHit->getUnitID() << "\n";
349  LogDebug("FP420Sim") << "entry z " << aHit->getEntry().z() << "\n";
350  LogDebug("FP420Sim") << "entr theta " << aHit->getThetaAtEntry() << "\n";
351 #endif
352 
353  // Local3DPoint locExitPoint(0,0,0);
354  // Local3DPoint locEntryPoint(aHit->getEntry().x(),
355  // aHit->getEntry().y(),
356  // aHit->getEntry().z());
357  Local3DPoint locExitPoint(aHit->getExitLocalP().x(), aHit->getExitLocalP().y(), aHit->getExitLocalP().z());
358  Local3DPoint locEntryPoint(aHit->getEntryLocalP().x(), aHit->getEntryLocalP().y(), aHit->getEntryLocalP().z());
359  // implicit conversion (slicing) to PSimHit!!!
360  slave->processHits(PSimHit(locEntryPoint,
361  locExitPoint, //entryPoint(), exitPoint() Local3DPoint
362  aHit->getPabs(), // pabs() float
363  aHit->getTof(), // tof() float
364  aHit->getEnergyLoss(), // energyLoss() float
365  aHit->getParticleType(), // particleType() int
366  aHit->getUnitID(), // detUnitId() unsigned int
367  aHit->getTrackID(), // trackId() unsigned int
368  aHit->getThetaAtEntry(), // thetaAtEntry() float
369  aHit->getPhiAtEntry())); // phiAtEntry() float
370 
371  //PSimHit( const Local3DPoint& entry, const Local3DPoint& exit,
372  // float pabs, float tof, float eloss, int particleType,
373  // unsigned int detId, unsigned int trackId,
374  // float theta, float phi, unsigned short processType=0) :
375 
376  // LocalVector direction = hit.exitPoint() - hit.entryPoint();
377  //hit.energyLoss
378 
379  /*
380  aHit->getEM(), -
381  aHit->getHadr(), -
382  aHit->getIncidentEnergy(), -
383  aHit->getTimeSlice(), -
384  aHit->getEntry(), -
385  aHit->getParentId(),
386  aHit->getEntryLocalP(), -
387  aHit->getExitLocalP(), -
388  aHit->getX(), -
389  aHit->getY(), -
390  aHit->getZ(), -
391  aHit->getVx(), -
392  aHit->getVy(), -
393  aHit->getVz())); -
394  */
395  } //if Tof<1600. if nhits<100
396  } // for loop on hits
397 
398  Summarize();
399 }

References FP420G4Hit::getEnergyLoss(), FP420G4Hit::getEntry(), FP420G4Hit::getEntryLocalP(), FP420G4Hit::getExitLocalP(), FP420G4Hit::getPabs(), FP420G4Hit::getParticleType(), FP420G4Hit::getPhiAtEntry(), FP420G4Hit::getThetaAtEntry(), FP420G4Hit::getTof(), FP420G4Hit::getTrackID(), FP420G4Hit::getUnitID(), dqmiolumiharvest::j, LogDebug, nhits, TrackingSlaveSD::processHits(), slave, Summarize(), and theHC.

◆ fillHits()

void FP420SD::fillHits ( edm::PSimHitContainer cc,
const std::string &  hname 
)
overridevirtual

Implements SensitiveTkDetector.

Definition at line 420 of file FP420SD.cc.

420  {
421  if (slave->name() == hname) {
422  cc = slave->hits();
423  }
424 }

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

◆ getEnergyDeposit()

double FP420SD::getEnergyDeposit ( G4Step *  step)
virtual

Definition at line 88 of file FP420SD.cc.

88 { return aStep->GetTotalEnergyDeposit(); }

Referenced by GetStepInfo().

◆ GetStepInfo()

void FP420SD::GetStepInfo ( G4Step *  aStep)
private

Definition at line 127 of file FP420SD.cc.

127  {
128  preStepPoint = aStep->GetPreStepPoint();
129  postStepPoint = aStep->GetPostStepPoint();
130  theTrack = aStep->GetTrack();
131  hitPoint = preStepPoint->GetPosition();
132  currentPV = preStepPoint->GetPhysicalVolume();
133  hitPointExit = postStepPoint->GetPosition();
134 
135  hitPointLocal = preStepPoint->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(hitPoint);
136  hitPointLocalExit = preStepPoint->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(hitPointExit);
137 
138  G4int particleCode = theTrack->GetDefinition()->GetPDGEncoding();
139  if (particleCode == emPDG || particleCode == epPDG || particleCode == gammaPDG) {
140  edepositEM = getEnergyDeposit(aStep);
141  edepositHAD = 0.;
142  } else {
143  edepositEM = 0.;
144  edepositHAD = getEnergyDeposit(aStep);
145  }
146  edeposit = aStep->GetTotalEnergyDeposit();
147  tSlice = (postStepPoint->GetGlobalTime()) / nanosecond;
148  tSliceID = (int)tSlice;
149  unitID = setDetUnitId(aStep);
150 #ifdef debug
151  LogDebug("FP420Sim") << "unitID=" << unitID << std::endl;
152 #endif
153  primaryID = theTrack->GetTrackID();
154  // Position = hitPoint;
155  Pabs = aStep->GetPreStepPoint()->GetMomentum().mag() / GeV;
156  //Tof = 1400. + aStep->GetPostStepPoint()->GetGlobalTime()/nanosecond;
157  Tof = aStep->GetPostStepPoint()->GetGlobalTime() / nanosecond;
158  Eloss = aStep->GetTotalEnergyDeposit() / GeV;
159  ParticleType = theTrack->GetDefinition()->GetPDGEncoding();
160  ThetaAtEntry = aStep->GetPreStepPoint()->GetPosition().theta() / deg;
161  PhiAtEntry = aStep->GetPreStepPoint()->GetPosition().phi() / deg;
162 
163  ParentId = theTrack->GetParentID();
164  Vx = theTrack->GetVertexPosition().x();
165  Vy = theTrack->GetVertexPosition().y();
166  Vz = theTrack->GetVertexPosition().z();
167  X = hitPoint.x();
168  Y = hitPoint.y();
169  Z = hitPoint.z();
170 }

References currentPV, edeposit, edepositEM, edepositHAD, Eloss, emPDG, epPDG, gammaPDG, getEnergyDeposit(), GeV, hitPoint, hitPointExit, hitPointLocal, hitPointLocalExit, createfilelist::int, LogDebug, Pabs, ParentId, ParticleType, PhiAtEntry, postStepPoint, preStepPoint, primaryID, setDetUnitId(), ThetaAtEntry, theTrack, Tof, tSlice, tSliceID, unitID, Vx, Vy, Vz, X, Y, and Z.

Referenced by ProcessHits().

◆ HitExists()

G4bool FP420SD::HitExists ( )
private

Definition at line 176 of file FP420SD.cc.

176  {
177  if (primaryID < 1) {
178  edm::LogWarning("FP420Sim") << "***** FP420SD error: primaryID = " << primaryID << " maybe detector name changed";
179  }
180 
181  // Update if in the same detector, time-slice and for same track
182  // if (primaryID == primID && tSliceID == tsID && unitID==previousUnitID) {
183  if (tSliceID == tsID && unitID == previousUnitID) {
184  //AZ:
185  UpdateHit();
186  return true;
187  }
188  // Reset entry point for new primary
189  if (primaryID != primID)
191 
192  //look in the HitContainer whether a hit with the same primID, unitID,
193  //tSliceID already exists:
194 
195  G4bool found = false;
196 
197  // LogDebug("FP420Sim") << "FP420SD: HCollection= " << theHC->entries() <<std::endl;
198  int nhits = theHC->entries();
199  for (int j = 0; j < nhits && !found; j++) {
200  FP420G4Hit* aPreviousHit = (*theHC)[j];
201  if (aPreviousHit->getTrackID() == primaryID && aPreviousHit->getTimeSliceID() == tSliceID &&
202  aPreviousHit->getUnitID() == unitID) {
203  //AZ:
204  currentHit = aPreviousHit;
205  found = true;
206  }
207  }
208 
209  if (found) {
210  //AZ:
211  UpdateHit();
212  return true;
213  } else {
214  return false;
215  }
216 }

References currentHit, newFWLiteAna::found, FP420G4Hit::getTimeSliceID(), FP420G4Hit::getTrackID(), FP420G4Hit::getUnitID(), dqmiolumiharvest::j, nhits, previousUnitID, primaryID, primID, ResetForNewPrimary(), theHC, tsID, tSliceID, unitID, and UpdateHit().

Referenced by ProcessHits().

◆ Initialize()

void FP420SD::Initialize ( G4HCofThisEvent *  HCE)
override

Definition at line 90 of file FP420SD.cc.

90  {
91 #ifdef debug
92  LogDebug("FP420Sim") << "FP420SD : Initialize called for " << name << std::endl;
93 #endif
94 
95  theHC = new FP420G4HitCollection(GetName(), collectionName[0]);
96  if (hcID < 0)
97  hcID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
98  HCE->AddHitsCollection(hcID, theHC);
99 
100  tsID = -2;
101  // primID = -2;
102  primID = 0;
103 
105 }

References bysipixelclustmulteventfilter_cfi::collectionName, hcID, LogDebug, Skims_PA_cff::name, primID, theHC, and tsID.

◆ PrintAll()

void FP420SD::PrintAll ( )
override

Definition at line 407 of file FP420SD.cc.

407  {
408  LogDebug("FP420Sim") << "FP420SD: Collection " << theHC->GetName() << "\n";
409  theHC->PrintAllHits();
410 }

References LogDebug, and theHC.

◆ ProcessHits()

bool FP420SD::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *   
)
overridevirtual

Implements SensitiveDetector.

Definition at line 107 of file FP420SD.cc.

107  {
108  if (aStep == nullptr) {
109  return true;
110  } else {
111  GetStepInfo(aStep);
112  // LogDebug("FP420Sim") << edeposit <<std::endl;
113 
114  //AZ
115 #ifdef debug
116  LogDebug("FP420Sim") << "FP420SD : number of hits = " << theHC->entries() << std::endl;
117 #endif
118 
119  if (HitExists() == false && edeposit > 0. && theHC->entries() < 200) {
120  CreateNewHit();
121  return true;
122  }
123  }
124  return true;
125 }

References CreateNewHit(), edeposit, GetStepInfo(), HitExists(), LogDebug, and theHC.

◆ ResetForNewPrimary()

void FP420SD::ResetForNewPrimary ( )
private

Definition at line 218 of file FP420SD.cc.

218  {
221  incidentEnergy = preStepPoint->GetKineticEnergy();
222 }

References entrancePoint, exitPoint, hitPoint, hitPointExit, incidentEnergy, preStepPoint, SetToLocal(), and SetToLocalExit().

Referenced by HitExists().

◆ setDetUnitId()

uint32_t FP420SD::setDetUnitId ( const G4Step *  aStep)
overridevirtual

Implements SensitiveDetector.

Definition at line 172 of file FP420SD.cc.

172  {
173  return (numberingScheme == nullptr ? 0 : numberingScheme->getUnitID(aStep));
174 }

References FP420NumberingScheme::getUnitID(), and numberingScheme.

Referenced by GetStepInfo().

◆ SetToLocal()

G4ThreeVector FP420SD::SetToLocal ( const G4ThreeVector &  global)
private

Definition at line 315 of file FP420SD.cc.

315  {
316  const G4VTouchable* touch = preStepPoint->GetTouchable();
317  theEntryPoint = touch->GetHistory()->GetTopTransform().TransformPoint(global);
318  return theEntryPoint;
319 }

References preStepPoint, and theEntryPoint.

Referenced by ResetForNewPrimary().

◆ SetToLocalExit()

G4ThreeVector FP420SD::SetToLocalExit ( const G4ThreeVector &  globalPoint)
private

Definition at line 321 of file FP420SD.cc.

321  {
322  const G4VTouchable* touch = postStepPoint->GetTouchable();
323  theExitPoint = touch->GetHistory()->GetTopTransform().TransformPoint(globalPoint);
324  return theExitPoint;
325 }

References postStepPoint, and theExitPoint.

Referenced by ResetForNewPrimary().

◆ StoreHit()

void FP420SD::StoreHit ( FP420G4Hit hit)
private

Definition at line 224 of file FP420SD.cc.

224  {
225  // if (primID<0) return;
226  if (hit == nullptr) {
227  edm::LogWarning("FP420Sim") << "FP420SD: hit to be stored is NULL !!";
228  return;
229  }
230 
231  theHC->insert(hit);
232 }

References theHC.

Referenced by CreateNewHit().

◆ Summarize()

void FP420SD::Summarize ( )
private

Definition at line 401 of file FP420SD.cc.

401 {}

Referenced by EndOfEvent().

◆ update() [1/3]

void FP420SD::update ( const ::EndOfEvent )
overrideprivate

◆ update() [2/3]

void FP420SD::update ( const BeginOfEvent )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent * >.

Definition at line 426 of file FP420SD.cc.

426  {
427  LogDebug("ForwardSim") << " Dispatched BeginOfEvent for " << GetName() << " !";
428  clearHits();
429  eventno = (*i)()->GetEventID();
430 }

References clearHits(), eventno, and LogDebug.

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

◆ update() [3/3]

void FP420SD::update ( const BeginOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 432 of file FP420SD.cc.

432  {
433  G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
434  G4String particleName;
435  emPDG = theParticleTable->FindParticle(particleName = "e-")->GetPDGEncoding();
436  epPDG = theParticleTable->FindParticle(particleName = "e+")->GetPDGEncoding();
437  gammaPDG = theParticleTable->FindParticle(particleName = "gamma")->GetPDGEncoding();
438 }

References emPDG, epPDG, gammaPDG, and HiggsValidation_cfi::particleName.

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

◆ UpdateHit()

void FP420SD::UpdateHit ( )
private

Definition at line 294 of file FP420SD.cc.

294  {
295  //
296  if (Eloss > 0.) {
298 
299 #ifdef debug
300  LogDebug("FP420Sim") << "updateHit: add eloss " << Eloss << std::endl;
301  LogDebug("FP420Sim") << "CurrentHit=" << currentHit << ", PostStepPoint=" << postStepPoint->GetPosition()
302  << std::endl;
303 #endif
304  //AZ
305  // currentHit->setEnergyLoss(Eloss);
307  }
308 
309  // buffer for next steps:
310  tsID = tSliceID;
311  primID = primaryID;
313 }

References FP420G4Hit::addEnergyDeposit(), FP420G4Hit::addEnergyLoss(), currentHit, edepositEM, edepositHAD, Eloss, LogDebug, postStepPoint, previousUnitID, primaryID, primID, tsID, tSliceID, and unitID.

Referenced by HitExists().

Member Data Documentation

◆ currentHit

FP420G4Hit* FP420SD::currentHit
private

Definition at line 98 of file FP420SD.h.

Referenced by CreateNewHit(), HitExists(), and UpdateHit().

◆ currentPV

G4VPhysicalVolume* FP420SD::currentPV
private

Definition at line 100 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ edeposit

float FP420SD::edeposit
private

Definition at line 110 of file FP420SD.h.

Referenced by GetStepInfo(), and ProcessHits().

◆ edepositEM

float FP420SD::edepositEM
protected

Definition at line 134 of file FP420SD.h.

Referenced by GetStepInfo(), and UpdateHit().

◆ edepositHAD

float FP420SD::edepositHAD
protected

Definition at line 134 of file FP420SD.h.

Referenced by GetStepInfo(), and UpdateHit().

◆ Eloss

float FP420SD::Eloss
private

Definition at line 118 of file FP420SD.h.

Referenced by CreateNewHit(), GetStepInfo(), and UpdateHit().

◆ emPDG

G4int FP420SD::emPDG
protected

Definition at line 135 of file FP420SD.h.

Referenced by GetStepInfo(), and update().

◆ entrancePoint

G4ThreeVector FP420SD::entrancePoint
private

Definition at line 87 of file FP420SD.h.

Referenced by ResetForNewPrimary().

◆ epPDG

G4int FP420SD::epPDG
protected

Definition at line 136 of file FP420SD.h.

Referenced by GetStepInfo(), and update().

◆ eventno

int FP420SD::eventno
private

Definition at line 131 of file FP420SD.h.

Referenced by update().

◆ exitPoint

G4ThreeVector FP420SD::exitPoint
private

Definition at line 87 of file FP420SD.h.

Referenced by ResetForNewPrimary().

◆ gammaPDG

G4int FP420SD::gammaPDG
protected

Definition at line 137 of file FP420SD.h.

Referenced by GetStepInfo(), and update().

◆ hcID

G4int FP420SD::hcID
private

Definition at line 93 of file FP420SD.h.

Referenced by Initialize().

◆ hitPoint

G4ThreeVector FP420SD::hitPoint
private

Definition at line 112 of file FP420SD.h.

Referenced by CreateNewHit(), GetStepInfo(), and ResetForNewPrimary().

◆ hitPointExit

G4ThreeVector FP420SD::hitPointExit
private

Definition at line 113 of file FP420SD.h.

Referenced by GetStepInfo(), and ResetForNewPrimary().

◆ hitPointLocal

G4ThreeVector FP420SD::hitPointLocal
private

Definition at line 114 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ hitPointLocalExit

G4ThreeVector FP420SD::hitPointLocalExit
private

Definition at line 115 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ incidentEnergy

float FP420SD::incidentEnergy
private

Definition at line 91 of file FP420SD.h.

Referenced by CreateNewHit(), and ResetForNewPrimary().

◆ numberingScheme

FP420NumberingScheme* FP420SD::numberingScheme
private

Definition at line 85 of file FP420SD.h.

Referenced by FP420SD(), setDetUnitId(), and ~FP420SD().

◆ Pabs

float FP420SD::Pabs
private

Definition at line 116 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ ParentId

int FP420SD::ParentId
private

Definition at line 124 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ ParticleType

short FP420SD::ParticleType
private

Definition at line 119 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ PhiAtEntry

float FP420SD::PhiAtEntry
private

Definition at line 122 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ postStepPoint

G4StepPoint* FP420SD::postStepPoint
private

Definition at line 109 of file FP420SD.h.

Referenced by GetStepInfo(), SetToLocalExit(), and UpdateHit().

◆ preStepPoint

G4StepPoint* FP420SD::preStepPoint
private

Definition at line 108 of file FP420SD.h.

Referenced by GetStepInfo(), ResetForNewPrimary(), and SetToLocal().

◆ previousUnitID

uint32_t FP420SD::previousUnitID
private

Definition at line 102 of file FP420SD.h.

Referenced by CreateNewHit(), HitExists(), and UpdateHit().

◆ primaryID

unsigned int FP420SD::primaryID
private

Definition at line 104 of file FP420SD.h.

Referenced by CreateNewHit(), GetStepInfo(), HitExists(), and UpdateHit().

◆ primID

unsigned int FP420SD::primID
private

Definition at line 104 of file FP420SD.h.

Referenced by CreateNewHit(), HitExists(), Initialize(), and UpdateHit().

◆ slave

TrackingSlaveSD* FP420SD::slave
private

Definition at line 84 of file FP420SD.h.

Referenced by clearHits(), EndOfEvent(), fillHits(), FP420SD(), and ~FP420SD().

◆ theEntryPoint

G4ThreeVector FP420SD::theEntryPoint
private

Definition at line 88 of file FP420SD.h.

Referenced by SetToLocal().

◆ theExitPoint

G4ThreeVector FP420SD::theExitPoint
private

Definition at line 89 of file FP420SD.h.

Referenced by SetToLocalExit().

◆ theHC

FP420G4HitCollection* FP420SD::theHC
private

Definition at line 94 of file FP420SD.h.

Referenced by EndOfEvent(), HitExists(), Initialize(), PrintAll(), ProcessHits(), and StoreHit().

◆ theManager

const SimTrackManager* FP420SD::theManager
private

Definition at line 95 of file FP420SD.h.

◆ ThetaAtEntry

float FP420SD::ThetaAtEntry
private

Definition at line 121 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ theTrack

G4Track* FP420SD::theTrack
private

Definition at line 99 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ Tof

float FP420SD::Tof
private

Definition at line 117 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ tsID

G4int FP420SD::tsID
private

Definition at line 97 of file FP420SD.h.

Referenced by CreateNewHit(), HitExists(), Initialize(), and UpdateHit().

◆ tSlice

G4double FP420SD::tSlice
private

Definition at line 106 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ tSliceID

G4int FP420SD::tSliceID
private

Definition at line 103 of file FP420SD.h.

Referenced by CreateNewHit(), GetStepInfo(), HitExists(), and UpdateHit().

◆ unitID

uint32_t FP420SD::unitID
private

Definition at line 102 of file FP420SD.h.

Referenced by CreateNewHit(), GetStepInfo(), HitExists(), and UpdateHit().

◆ Vx

float FP420SD::Vx
private

Definition at line 125 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ Vy

float FP420SD::Vy
private

Definition at line 125 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ Vz

float FP420SD::Vz
private

Definition at line 125 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ X

float FP420SD::X
private

Definition at line 126 of file FP420SD.h.

Referenced by svgfig.Curve.Sample::__repr__(), CreateNewHit(), and GetStepInfo().

◆ Y

float FP420SD::Y
private

Definition at line 126 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

◆ Z

float FP420SD::Z
private

Definition at line 126 of file FP420SD.h.

Referenced by CreateNewHit(), and GetStepInfo().

FP420SD::PhiAtEntry
float PhiAtEntry
Definition: FP420SD.h:122
FP420SD::hitPointLocalExit
G4ThreeVector hitPointLocalExit
Definition: FP420SD.h:115
FP420G4Hit::getEnergyLoss
float getEnergyLoss() const
Definition: FP420G4Hit.cc:140
FP420SD::primaryID
unsigned int primaryID
Definition: FP420SD.h:104
FP420G4Hit::setY
void setY(float t)
Definition: FP420G4Hit.cc:159
FP420SD::X
float X
Definition: FP420SD.h:126
FP420G4Hit::setParentId
void setParentId(int p)
Definition: FP420G4Hit.cc:165
FP420G4Hit::getThetaAtEntry
float getThetaAtEntry() const
Definition: FP420G4Hit.cc:149
FP420G4Hit::getParticleType
int getParticleType() const
Definition: FP420G4Hit.cc:141
FP420SD::Y
float Y
Definition: FP420SD.h:126
FP420SD::Vy
float Vy
Definition: FP420SD.h:125
FP420G4Hit::setVx
void setVx(float p)
Definition: FP420G4Hit.cc:168
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FP420G4HitCollection
G4THitsCollection< FP420G4Hit > FP420G4HitCollection
Definition: FP420G4HitCollection.h:14
FP420SD::theEntryPoint
G4ThreeVector theEntryPoint
Definition: FP420SD.h:88
FP420SD::Tof
float Tof
Definition: FP420SD.h:117
FP420SD::postStepPoint
G4StepPoint * postStepPoint
Definition: FP420SD.h:109
FP420SD::tsID
G4int tsID
Definition: FP420SD.h:97
FP420SD::currentHit
FP420G4Hit * currentHit
Definition: FP420SD.h:98
FP420SD::hitPointExit
G4ThreeVector hitPointExit
Definition: FP420SD.h:113
FP420SD::hitPoint
G4ThreeVector hitPoint
Definition: FP420SD.h:112
FP420SD::Summarize
void Summarize()
Definition: FP420SD.cc:401
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
FP420SD::hitPointLocal
G4ThreeVector hitPointLocal
Definition: FP420SD.h:114
FP420SD::Eloss
float Eloss
Definition: FP420SD.h:118
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
FP420SD::HitExists
G4bool HitExists()
Definition: FP420SD.cc:176
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
FP420G4Hit::setEntry
void setEntry(const G4ThreeVector &xyz)
Definition: FP420G4Hit.cc:104
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
FP420SD::edeposit
float edeposit
Definition: FP420SD.h:110
FP420SD::slave
TrackingSlaveSD * slave
Definition: FP420SD.h:84
FP420G4Hit::getUnitID
unsigned int getUnitID() const
Definition: FP420G4Hit.cc:124
FP420G4Hit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition: FP420G4Hit.cc:131
FP420G4Hit::getEntry
G4ThreeVector getEntry() const
Definition: FP420G4Hit.cc:103
FP420SD::GetStepInfo
void GetStepInfo(G4Step *aStep)
Definition: FP420SD.cc:127
FP420G4Hit::setVz
void setVz(float p)
Definition: FP420G4Hit.cc:174
FP420NumberingScheme::getUnitID
virtual unsigned int getUnitID(const G4Step *aStep) const
Definition: FP420NumberingScheme.cc:45
SensitiveTkDetector::SensitiveTkDetector
SensitiveTkDetector(const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
Definition: SensitiveTkDetector.h:10
FP420SD::getEnergyDeposit
virtual double getEnergyDeposit(G4Step *step)
Definition: FP420SD.cc:88
FP420G4Hit::setX
void setX(float t)
Definition: FP420G4Hit.cc:156
FP420SD::primID
unsigned int primID
Definition: FP420SD.h:104
HiggsValidation_cfi.particleName
particleName
Definition: HiggsValidation_cfi.py:7
FP420G4Hit::setExitLocalP
void setExitLocalP(const G4ThreeVector &xyz1)
Definition: FP420G4Hit.cc:110
Point3DBase< float, LocalTag >
bysipixelclustmulteventfilter_cfi.collectionName
collectionName
Definition: bysipixelclustmulteventfilter_cfi.py:5
FP420SD::numberingScheme
FP420NumberingScheme * numberingScheme
Definition: FP420SD.h:85
nhits
Definition: HIMultiTrackSelector.h:42
FP420G4Hit::setTrackID
void setTrackID(int i)
Definition: FP420G4Hit.cc:122
FP420G4Hit::getTof
float getTof() const
Definition: FP420G4Hit.cc:139
TrackingSlaveSD::Initialize
virtual void Initialize()
Definition: TrackingSlaveSD.cc:17
FP420SD::entrancePoint
G4ThreeVector entrancePoint
Definition: FP420SD.h:87
FP420SD::currentPV
G4VPhysicalVolume * currentPV
Definition: FP420SD.h:100
FP420G4Hit::setVy
void setVy(float p)
Definition: FP420G4Hit.cc:171
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
FP420SD::ResetForNewPrimary
void ResetForNewPrimary()
Definition: FP420SD.cc:218
FP420SD::theHC
FP420G4HitCollection * theHC
Definition: FP420SD.h:94
FP420G4Hit::getTimeSliceID
int getTimeSliceID() const
Definition: FP420G4Hit.cc:129
FP420G4Hit::setTof
void setTof(float e)
Definition: FP420G4Hit.cc:144
TrackingSlaveSD::processHits
virtual bool processHits(const PSimHit &)
Definition: TrackingSlaveSD.cc:52
FP420SD::theTrack
G4Track * theTrack
Definition: FP420SD.h:99
FP420G4Hit::getEntryLocalP
G4ThreeVector getEntryLocalP() const
Definition: FP420G4Hit.cc:106
GeV
const double GeV
Definition: MathUtil.h:16
createfilelist.int
int
Definition: createfilelist.py:10
FP420SD::epPDG
G4int epPDG
Definition: FP420SD.h:136
FP420G4Hit::getExitLocalP
G4ThreeVector getExitLocalP() const
Definition: FP420G4Hit.cc:109
FP420G4Hit::setUnitID
void setUnitID(unsigned int i)
Definition: FP420G4Hit.cc:125
FP420G4Hit::setEntryLocalP
void setEntryLocalP(const G4ThreeVector &xyz1)
Definition: FP420G4Hit.cc:107
TrackingSlaveSD
Definition: TrackingSlaveSD.h:11
FP420SD::exitPoint
G4ThreeVector exitPoint
Definition: FP420SD.h:87
FP420SD::tSlice
G4double tSlice
Definition: FP420SD.h:106
FP420SD::ParticleType
short ParticleType
Definition: FP420SD.h:119
FP420G4Hit::getPabs
float getPabs() const
Definition: FP420G4Hit.cc:138
FP420G4Hit::setParticleType
void setParticleType(short i)
Definition: FP420G4Hit.cc:147
FP420SD::StoreHit
void StoreHit(FP420G4Hit *)
Definition: FP420SD.cc:224
cc
FP420SD::SetToLocal
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: FP420SD.cc:315
FP420SD::clearHits
void clearHits() override
Definition: FP420SD.cc:442
NULL
#define NULL
Definition: scimark2.h:8
FP420SD::edepositHAD
float edepositHAD
Definition: FP420SD.h:134
FP420SD::incidentEnergy
float incidentEnergy
Definition: FP420SD.h:91
FP420SD::Vz
float Vz
Definition: FP420SD.h:125
FP420G4Hit::setZ
void setZ(float t)
Definition: FP420G4Hit.cc:162
FP420G4Hit
Definition: FP420G4Hit.h:18
FP420SD::gammaPDG
G4int gammaPDG
Definition: FP420SD.h:137
FP420SD::preStepPoint
G4StepPoint * preStepPoint
Definition: FP420SD.h:108
FP420G4Hit::getPhiAtEntry
float getPhiAtEntry() const
Definition: FP420G4Hit.cc:150
FP420SD::emPDG
G4int emPDG
Definition: FP420SD.h:135
FP420SD::CreateNewHit
void CreateNewHit()
Definition: FP420SD.cc:234
FP420SD::unitID
uint32_t unitID
Definition: FP420SD.h:102
FP420SD::theManager
const SimTrackManager * theManager
Definition: FP420SD.h:95
FP420SD::SetToLocalExit
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: FP420SD.cc:321
FP420SD::tSliceID
G4int tSliceID
Definition: FP420SD.h:103
FP420SD::hcID
G4int hcID
Definition: FP420SD.h:93
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
FP420SD::ThetaAtEntry
float ThetaAtEntry
Definition: FP420SD.h:121
FP420G4Hit::setPabs
void setPabs(float e)
Definition: FP420G4Hit.cc:143
FP420G4Hit::setPhiAtEntry
void setPhiAtEntry(float f)
Definition: FP420G4Hit.cc:153
FP420SD::ParentId
int ParentId
Definition: FP420SD.h:124
TrackingSlaveSD::name
std::string name() const
Definition: TrackingSlaveSD.h:21
TrackingSlaveSD::hits
std::vector< PSimHit > & hits()
Definition: TrackingSlaveSD.h:22
PSimHit
Definition: PSimHit.h:15
FP420SD::previousUnitID
uint32_t previousUnitID
Definition: FP420SD.h:102
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
FP420SD::Vx
float Vx
Definition: FP420SD.h:125
FP420G4Hit::addEnergyLoss
void addEnergyLoss(float e)
Definition: FP420G4Hit.cc:145
FP420SD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: FP420SD.cc:172
FP420G4Hit::setTimeSlice
void setTimeSlice(double d)
Definition: FP420G4Hit.cc:128
FP420SD::eventno
int eventno
Definition: FP420SD.h:131
FP420SD::Pabs
float Pabs
Definition: FP420SD.h:116
FP420SD::Z
float Z
Definition: FP420SD.h:126
FP420G4Hit::getTrackID
unsigned int getTrackID() const
Definition: FP420G4Hit.cc:121
FP420G4Hit::setEnergyLoss
void setEnergyLoss(float e)
Definition: FP420G4Hit.cc:146
FP420NumberingScheme
Definition: FP420NumberingScheme.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88
FP420SD::theExitPoint
G4ThreeVector theExitPoint
Definition: FP420SD.h:89
FP420G4Hit::setThetaAtEntry
void setThetaAtEntry(float t)
Definition: FP420G4Hit.cc:152
FP420SD::UpdateHit
void UpdateHit()
Definition: FP420SD.cc:294
FP420G4Hit::setIncidentEnergy
void setIncidentEnergy(double e)
Definition: FP420G4Hit.cc:119
FP420SD::edepositEM
float edepositEM
Definition: FP420SD.h:134