CMS 3D CMS Logo

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

#include <CMSSQLoopProcess.h>

Inheritance diagram for CMSSQLoopProcess:

Public Member Functions

virtual G4VParticleChange * AlongStepDoIt (const G4Track &, const G4Step &)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
 CMSSQLoopProcess (const G4String &name="SQLooper", G4ProcessType type=fUserDefined)
 
virtual void StartTracking (G4Track *aTrack)
 
virtual ~CMSSQLoopProcess ()
 

Protected Member Functions

virtual G4double GetContinuousStepLimit (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety)
 

Protected Attributes

G4ParticleChange * fParticleChange
 

Private Member Functions

 CMSSQLoopProcess (CMSSQLoopProcess &)
 
CMSSQLoopProcessoperator= (const CMSSQLoopProcess &right)
 

Private Attributes

G4ThreeVector posini
 

Detailed Description

Definition at line 12 of file CMSSQLoopProcess.h.

Constructor & Destructor Documentation

◆ CMSSQLoopProcess() [1/2]

CMSSQLoopProcess::CMSSQLoopProcess ( const G4String &  name = "SQLooper",
G4ProcessType  type = fUserDefined 
)

Definition at line 10 of file CMSSQLoopProcess.cc.

References fParticleChange.

10  : G4VContinuousProcess(name, type) {
11  fParticleChange = new G4ParticleChange();
12 }
G4ParticleChange * fParticleChange

◆ ~CMSSQLoopProcess()

CMSSQLoopProcess::~CMSSQLoopProcess ( )
virtual

Definition at line 14 of file CMSSQLoopProcess.cc.

References fParticleChange.

14 { delete fParticleChange; }
G4ParticleChange * fParticleChange

◆ CMSSQLoopProcess() [2/2]

CMSSQLoopProcess::CMSSQLoopProcess ( CMSSQLoopProcess )
private

Member Function Documentation

◆ AlongStepDoIt()

G4VParticleChange * CMSSQLoopProcess::AlongStepDoIt ( const G4Track &  track,
const G4Step &  step 
)
virtual

Definition at line 16 of file CMSSQLoopProcess.cc.

References fParticleChange, visualization-live-secondInstance_cfg::m, posini, and HLT_2024v14_cff::track.

16  {
17  if (track.GetPosition() == posini)
18  edm::LogInfo("CMSSQLoopProcess::AlongStepDoIt")
19  << "CMSSQLoopProcess::AlongStepDoIt: CMSSQLoopProcess::AlongStepDoIt MomentumDirection "
20  << track.GetMomentumDirection().eta() << " track GetPostion " << track.GetPosition() / cm << " trackId "
21  << track.GetTrackID() << " parentId: " << track.GetParentID() << " GlobalTime " << track.GetGlobalTime() / ns
22  << " TotalEnergy: " << track.GetTotalEnergy() / GeV << " Velocity " << track.GetVelocity() / m / ns
23  << std::endl;
24 
25  fParticleChange->Clear();
26  fParticleChange->Initialize(track);
27  fParticleChange->ProposeWeight(track.GetWeight());
28  //Sbar not passing the following criteria are not of interest. They will not be reconstructable. A cut like this is required otherwise you will get Sbar infinitely looping.
29  if (fabs(track.GetMomentumDirection().eta()) > 999. || fabs(track.GetPosition().z()) > 160 * centimeter) {
30  edm::LogInfo("CMSSQLoopProcess::AlongStepDoIt") << "Particle getting killed because too large z" << std::endl;
31  fParticleChange->ProposeTrackStatus(fStopAndKill);
32  }
33 
34  return fParticleChange;
35 }
Log< level::Info, false > LogInfo
G4ThreeVector posini
G4ParticleChange * fParticleChange

◆ AlongStepGetPhysicalInteractionLength()

G4double CMSSQLoopProcess::AlongStepGetPhysicalInteractionLength ( const G4Track &  track,
G4double  previousStepSize,
G4double  currentMinimumStep,
G4double &  proposedSafety,
G4GPILSelection *  selection 
)
virtual

Definition at line 37 of file CMSSQLoopProcess.cc.

41  {
42  return 1. * centimeter;
43 }

◆ GetContinuousStepLimit()

G4double CMSSQLoopProcess::GetContinuousStepLimit ( const G4Track &  track,
G4double  previousStepSize,
G4double  currentMinimumStep,
G4double &  currentSafety 
)
protectedvirtual

Definition at line 45 of file CMSSQLoopProcess.cc.

45  {
46  return 1. * centimeter; // seems irrelevant
47 }

◆ operator=()

CMSSQLoopProcess& CMSSQLoopProcess::operator= ( const CMSSQLoopProcess right)
private

◆ StartTracking()

void CMSSQLoopProcess::StartTracking ( G4Track *  aTrack)
virtual

Definition at line 49 of file CMSSQLoopProcess.cc.

References posini.

49 { posini = aTrack->GetPosition(); }
G4ThreeVector posini

Member Data Documentation

◆ fParticleChange

G4ParticleChange* CMSSQLoopProcess::fParticleChange
protected

Definition at line 37 of file CMSSQLoopProcess.h.

Referenced by AlongStepDoIt(), CMSSQLoopProcess(), and ~CMSSQLoopProcess().

◆ posini

G4ThreeVector CMSSQLoopProcess::posini
private

Definition at line 40 of file CMSSQLoopProcess.h.

Referenced by AlongStepDoIt(), and StartTracking().