test
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
TrackingVerboseAction Class Reference

#include <TrackingVerboseAction.h>

Inheritance diagram for TrackingVerboseAction:
SimWatcher Observer< const BeginOfRun * > Observer< const BeginOfEvent * > Observer< const BeginOfTrack * > Observer< const EndOfTrack * > Observer< const G4Step * >

Public Member Functions

 TrackingVerboseAction (edm::ParameterSet const &p)
 
void update (const BeginOfRun *)
 This routine will be called when the appropriate signal arrives. More...
 
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 EndOfTrack *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *)
 This routine will be called when the appropriate signal arrives. More...
 
 ~TrackingVerboseAction ()
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
virtual ~SimWatcher ()
 
- 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 BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfTrack * >
 Observer ()
 
void slotForUpdate (const EndOfTrack *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const G4Step * >
 Observer ()
 
void slotForUpdate (const G4Step *iT)
 
virtual ~Observer ()
 

Private Member Functions

bool checkTrackingVerbose (const G4Track *)
 
void printTrackInfo (const G4Track *)
 
void setTrackingVerbose (int verblev)
 

Private Attributes

bool fDEBUG
 
bool fG4Verbose
 
bool fHighEtPhotons
 
int fLarge
 
std::vector< int > fPdgIds
 
bool fTkVerbThisEventON
 
bool fTrackingVerboseON
 
int fTVEventMax
 
int fTVEventMin
 
int fTVEventStep
 
int fTVTrackMax
 
int fTVTrackMin
 
int fTVTrackStep
 
G4VSteppingVerbose * fVerbose
 
int fVerboseLevel
 
G4TrackingManager * theTrackingManager
 

Additional Inherited Members

Detailed Description

Definition at line 37 of file TrackingVerboseAction.h.

Constructor & Destructor Documentation

TrackingVerboseAction::TrackingVerboseAction ( edm::ParameterSet const &  p)

Definition at line 29 of file TrackingVerboseAction.cc.

References fDEBUG, fG4Verbose, fHighEtPhotons, fLarge, fPdgIds, fTkVerbThisEventON, fTrackingVerboseON, fTVEventMax, fTVEventMin, fTVEventStep, fTVTrackMax, fTVTrackMin, fTVTrackStep, fVerboseLevel, edm::ParameterSet::getUntrackedParameter(), and cuy::ii.

29  :
31 
32  fLarge = int(1E10);
33  fDEBUG = p.getUntrackedParameter<bool>("DEBUG",false);
34  fHighEtPhotons = p.getUntrackedParameter<bool>("CheckForHighEtPhotons",false);
35  fG4Verbose = p.getUntrackedParameter<bool>("G4Verbose",false);
36 
37  //----- Set which events are verbose
38  fTVEventMin = p.getUntrackedParameter<int>("EventMin",0);
39  fTVEventMax = p.getUntrackedParameter<int>("EventMax",fLarge);
40  fTVEventStep = p.getUntrackedParameter<int>("EventStep",1);
41 
42  //----- Set which tracks of those events are verbose
43  fTVTrackMin = p.getUntrackedParameter<int>("TrackMin",0);
44  fTVTrackMax = p.getUntrackedParameter<int>("TrackMax",fLarge);
45  fTVTrackStep = p.getUntrackedParameter<int>("TrackStep",1);
46 
47  //----- Set the verbosity level
48  fVerboseLevel = p.getUntrackedParameter<int>("VerboseLevel",1);
49  fPdgIds = p.getUntrackedParameter<std::vector<int> >("PDGids");
50  if (fDEBUG) {
51  G4cout << "TV: fTVTrackMin " << fTVTrackMin
52  << " fTVTrackMax " << fTVTrackMax
53  << " fTVTrackStep " << fTVTrackStep
54  << " fTVEventMin " << fTVEventMin
55  << " fTVEventMax " << fTVEventMax
56  << " fTVEventStep " << fTVEventStep
57  << " fVerboseLevel " << fVerboseLevel
58  << " fG4Verbose " << fG4Verbose
59  << " PDGIds " << fPdgIds.size() << G4endl;
60  for (unsigned int ii=0; ii<fPdgIds.size(); ++ii)
61  G4cout << "TV: PDGId[" << ii << "] = " << fPdgIds[ii] << G4endl;
62  }
63 
64  //----- Set verbosity off to start
65  fTrackingVerboseON = false;
66  fTkVerbThisEventON = false;
67 
68  G4cout << " TrackingVerbose constructed " << G4endl;
69 }
std::vector< int > fPdgIds
int ii
Definition: cuy.py:588
G4TrackingManager * theTrackingManager
G4VSteppingVerbose * fVerbose
TrackingVerboseAction::~TrackingVerboseAction ( )

Definition at line 71 of file TrackingVerboseAction.cc.

71 {}

Member Function Documentation

bool TrackingVerboseAction::checkTrackingVerbose ( const G4Track *  aTrack)
private

Definition at line 285 of file TrackingVerboseAction.cc.

References KineDebug3::count(), fPdgIds, fTVTrackMax, fTVTrackMin, fTVTrackStep, and SingleMuPt40Fwdv2_cfi_GEN_SIM::pdgId.

Referenced by update().

285  {
286  int trackNo = aTrack->GetTrackID();
287  bool trackingVerboseThisTrack = false;
288  //----- Check if track is in the selected range
289  if (trackNo >= fTVTrackMin && trackNo <= fTVTrackMax) {
290  if ((trackNo-fTVTrackMin) % fTVTrackStep == 0) trackingVerboseThisTrack = true;
291  }
292  if (trackingVerboseThisTrack && (fPdgIds.size()>0)) {
293  int pdgId = aTrack->GetDefinition()->GetPDGEncoding();
294  if (std::count(fPdgIds.begin(),fPdgIds.end(),pdgId) == 0) trackingVerboseThisTrack = false;
295  }
296  return trackingVerboseThisTrack;
297 }
std::vector< int > fPdgIds
void TrackingVerboseAction::printTrackInfo ( const G4Track *  aTrack)
private

Definition at line 299 of file TrackingVerboseAction.cc.

References fVerbose.

Referenced by update().

299  {
300  G4cout << G4endl
301  << "*******************************************************"
302  << "**************************************************" << G4endl
303  << "* G4Track Information: "
304  << " Particle = " << aTrack->GetDefinition()->GetParticleName()
305  << ","
306  << " Track ID = " << aTrack->GetTrackID()
307  << ","
308  << " Parent ID = " << aTrack->GetParentID() << G4endl
309  << "*******************************************************"
310  << "**************************************************"
311  << G4endl << G4endl;
312  if (fVerbose) fVerbose->TrackingStarted();
313 }
G4VSteppingVerbose * fVerbose
void TrackingVerboseAction::setTrackingVerbose ( int  verblev)
private

Definition at line 280 of file TrackingVerboseAction.cc.

References fDEBUG, and theTrackingManager.

Referenced by update().

280  {
281  if (fDEBUG) G4cout << " setting verbose level " << verblev << G4endl;
282  if (theTrackingManager!=0) theTrackingManager->SetVerboseLevel(verblev);
283 }
G4TrackingManager * theTrackingManager
void TrackingVerboseAction::update ( const BeginOfRun )
virtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 73 of file TrackingVerboseAction.cc.

References fDEBUG, fVerbose, TrackingAction::getTrackManager(), and theTrackingManager.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.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(), MatrixUtil.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().

73  {
74  TrackingAction * ta =
75  dynamic_cast<TrackingAction*>(G4EventManager::GetEventManager()->GetUserTrackingAction());
77  fVerbose = G4VSteppingVerbose::GetInstance();
78  if (fDEBUG)
79  G4cout << " TV: Get the Tracking Manager: " << theTrackingManager
80  << " and the SteppingVerbose: " << fVerbose << G4endl;
81 }
G4TrackingManager * theTrackingManager
G4TrackingManager * getTrackManager()
G4VSteppingVerbose * fVerbose
void TrackingVerboseAction::update ( const BeginOfEvent )
virtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent * >.

Definition at line 83 of file TrackingVerboseAction.cc.

References fDEBUG, fLarge, fTkVerbThisEventON, fTrackingVerboseON, fTVEventMax, fTVEventMin, fTVEventStep, fTVTrackMax, fTVTrackMin, fTVTrackStep, fVerboseLevel, and setTrackingVerbose().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.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(), MatrixUtil.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().

83  {
84  if (evt==0) return;
85  const G4Event * anEvent = (*evt)();
86  if (anEvent==0) return;
87 
88  //----------- Set /tracking/verbose for this event
89  int eventNo = anEvent->GetEventID();
90  if (fDEBUG) G4cout << "TV: trackID: NEW EVENT " << eventNo << G4endl;
91 
92  fTkVerbThisEventON = false;
93  //----- Check if event is in the selected range
94  if (eventNo >= fTVEventMin && eventNo <= fTVEventMax) {
95  if ((eventNo-fTVEventMin) % fTVEventStep == 0) fTkVerbThisEventON = true;
96  }
97 
98  if (fDEBUG)
99  G4cout << " TV: fTkVerbThisEventON " << fTkVerbThisEventON
100  << " fTrackingVerboseON " << fTrackingVerboseON
101  << " fTVEventMin " << fTVEventMin << " fTVEventMax " << fTVEventMax << G4endl;
102  //----- check if verbosity has to be changed
104  if (fTVTrackMin == 0 && fTVTrackMax == fLarge && fTVTrackStep != 1) {
106  fTrackingVerboseON = true;
107  if (fDEBUG) G4cout << "TV: VERBOSEet1 " << eventNo << G4endl;
108  }
109  } else if ((!fTkVerbThisEventON) && (fTrackingVerboseON) ) {
111  fTrackingVerboseON = false;
112  if (fDEBUG) G4cout << "TV: VERBOSEet0 " << eventNo << G4endl;
113  }
114 
115 }
void setTrackingVerbose(int verblev)
void TrackingVerboseAction::update ( const BeginOfTrack )
virtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 117 of file TrackingVerboseAction.cc.

References checkTrackingVerbose(), fDEBUG, fHighEtPhotons, fTkVerbThisEventON, fTrackingVerboseON, fVerboseLevel, GeV, dqm-mbProfile::log, visualization-live-secondInstance_cfg::m, printTrackInfo(), proc, setTrackingVerbose(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, and funct::tan().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.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(), MatrixUtil.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().

117  {
118  const G4Track * aTrack = (*trk)();
119 
120  //----- High ET photon printout
121  //---------- Set /tracking/verbose
122  //----- track is verbose only if event is verbose
123  double tkP = aTrack->GetMomentum().mag();
124  double tkPx = aTrack->GetMomentum().x();
125  double tkPy = aTrack->GetMomentum().y();
126  double tkPz = aTrack->GetMomentum().z();
127 
128  double tvtx = aTrack->GetVertexPosition().x();
129  double tvty = aTrack->GetVertexPosition().y();
130  double tvtz = aTrack->GetVertexPosition().z();
131 
132  double g4t_phi=atan2(tkPy,tkPx);
133 
134  double drpart=sqrt(tkPx*tkPx + tkPy*tkPy);
135 
136  double mythetapart=acos(tkPz/sqrt(drpart*drpart+tkPz*tkPz));
137 
138  double g4t_eta=-log(tan(mythetapart/2.));
139  G4int MytrackNo = aTrack->GetTrackID();
140 
141  if (fHighEtPhotons) {
142  if (aTrack->GetDefinition()->GetParticleName() == "gamma" && aTrack->GetParentID() !=0) {
143  if((tkPx*tkPx + tkPy*tkPy + tkPz*tkPz)>1000.0*1000.0 &&
144  aTrack->GetCreatorProcess()->GetProcessName() == "LCapture") {
145  G4cout << "MY NEW GAMMA " << G4endl;
146  G4cout << "**********************************************************************" << G4endl;
147  G4cout << "MY NEW TRACK ID = " << MytrackNo << "("
148  << aTrack->GetDefinition()->GetParticleName()
149  <<")"<< " PARENT ="<< aTrack->GetParentID() << G4endl;
150  G4cout << "Primary particle: "
151  << aTrack->GetDynamicParticle()->GetPrimaryParticle() << G4endl;
152  G4cout << "Process type: " << aTrack->GetCreatorProcess()->GetProcessType()
153  << " Process name: "
154  << aTrack->GetCreatorProcess()->GetProcessName() << G4endl;
155  G4cout << "ToT E = " << aTrack->GetTotalEnergy()
156  << " KineE = " << aTrack->GetKineticEnergy()
157  << " Tot P = " << tkP << " Pt = " << sqrt(tkPx*tkPx + tkPy*tkPy)
158  << " VTX=(" << tvtx << "," << tvty << "," << tvtz << ")" << G4endl;
159  if (aTrack->GetKineticEnergy() > 1.*GeV
160  && aTrack->GetCreatorProcess()->GetProcessName() != "LCapture")
161  G4cout << " KineE > 1 GeV !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << G4endl;
162  const G4VTouchable* touchable=aTrack->GetTouchable();
163  if (touchable!=0 && touchable->GetVolume()!=0 &&
164  touchable->GetVolume()->GetLogicalVolume()!=0) {
165  G4Material* material=touchable->GetVolume()->GetLogicalVolume()->GetMaterial();
166  G4cout << "G4LCapture Gamma E(GeV) "
167  << aTrack->GetTotalEnergy()/GeV << " "
168  << material->GetName()<< " "
169  << touchable->GetVolume()->GetName() << G4endl;
170  G4cout << "G4LCapture Gamma position(m): "
171  << aTrack->GetPosition()/m << G4endl;
172  G4cout << "G4LCapture created Gamma direction "
173  << aTrack->GetMomentumDirection() << G4endl;
174  G4cout << "G4LCapture gamma (eta,phi) = "
175  << "(" << g4t_eta << "," << g4t_phi << ")" << G4endl;
176  }
177  aTrack->GetUserInformation()->Print();
178  G4cout << "**********************************************************************" << G4endl;
179  }
180  }
181 
182  if (aTrack->GetDefinition()->GetParticleName() == "gamma") {
183  const G4VProcess * proc = aTrack->GetCreatorProcess();
184  double Tgamma = aTrack->GetKineticEnergy();
185  std::string ProcName;
186  const std::string nullstr ("Null_prc");
187  if (proc) ProcName = proc->GetProcessName();
188  else ProcName = nullstr;
189  if (Tgamma > 2.5*GeV ) { //&& ProcName!="Decay" && ProcName!="eBrem")
190  std::string volumeName("_Unknown_Vol_");
191  std::string materialName("_Unknown_Mat_");
192  G4Material * material = 0;
193  G4VPhysicalVolume * pvolume = 0;
194  G4LogicalVolume * lvolume = 0;
195  const G4VTouchable * touchable = aTrack->GetTouchable();
196  if (touchable) pvolume = touchable->GetVolume();
197  if (pvolume) {
198  volumeName = pvolume->GetName();
199  lvolume = pvolume->GetLogicalVolume();
200  }
201  if (lvolume) material = lvolume->GetMaterial();
202  if (material) materialName = material->GetName();
203  G4cout << "**** ALL photons > 2.5 GeV ****" << G4endl;
204  G4cout << ProcName << "**** ALL photons: gamma E(GeV) "
205  << aTrack->GetTotalEnergy()/GeV << " "
206  << materialName << " " << volumeName << G4endl;
207  G4cout << ProcName << "**** ALL photons: gamma position(m): "
208  << aTrack->GetPosition()/m << G4endl;
209  G4cout << ProcName << "**** ALL photons: gamma direction "
210  << aTrack->GetMomentumDirection() << G4endl;
211  G4cout << "**********************************************************************" << G4endl;
212  }
213  }
214  }
215 
216  //---------- Set /tracking/verbose
217  //----- track is verbose only if event is verbose
218  if (fTkVerbThisEventON) {
219  bool trackingVerboseThisTrack = checkTrackingVerbose(aTrack);
220 
221  //----- Set the /tracking/verbose for this track
222  if ((trackingVerboseThisTrack) && (!fTrackingVerboseON) ) {
224  fTrackingVerboseON = true;
225  if (fDEBUG) G4cout << "TV: VERBOSEtt1 " << aTrack->GetTrackID()
226  << G4endl;
227  printTrackInfo(aTrack);
228  } else if ((!trackingVerboseThisTrack) && ( fTrackingVerboseON )) {
230  fTrackingVerboseON = false;
231  if (fDEBUG) G4cout << "TV: VERBOSEtt0 " << aTrack->GetTrackID()
232  << G4endl;
233  }
234  }
235 }
const double GeV
Definition: MathUtil.h:16
TrainProcessor *const proc
Definition: MVATrainer.cc:101
bool checkTrackingVerbose(const G4Track *)
void printTrackInfo(const G4Track *)
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void setTrackingVerbose(int verblev)
void TrackingVerboseAction::update ( const EndOfTrack )
virtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 237 of file TrackingVerboseAction.cc.

References checkTrackingVerbose(), fDEBUG, fLarge, fTkVerbThisEventON, fTrackingVerboseON, fTVTrackMax, fTVTrackStep, and setTrackingVerbose().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.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(), MatrixUtil.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().

237  {
238  const G4Track * aTrack = (*trk)();
239  if (fTkVerbThisEventON) {
240  bool trackingVerboseThisTrack = checkTrackingVerbose(aTrack);
241  if ((trackingVerboseThisTrack) && (fTrackingVerboseON ) &&
242  (fTVTrackMax < fLarge || fTVTrackStep != 1)) {
244  fTrackingVerboseON = false;
245  if (fDEBUG) G4cout << "TV: VERBOSEtt0 " << aTrack->GetTrackID()
246  << G4endl;
247  }
248  }
249 }
bool checkTrackingVerbose(const G4Track *)
void setTrackingVerbose(int verblev)
void TrackingVerboseAction::update ( const G4Step *  )
virtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 251 of file TrackingVerboseAction.cc.

References fG4Verbose, fTrackingVerboseON, and NULL.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.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(), MatrixUtil.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().

251  {
252 
253  if ((fG4Verbose) && (fTrackingVerboseON)) {
254  G4Track* fTrack = fStep->GetTrack();
255  G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
256  << std::setw( 8) << G4BestUnit(fTrack->GetPosition().x() , "Length") << " "
257  << std::setw( 8) << G4BestUnit(fTrack->GetPosition().y() , "Length") << " "
258  << std::setw( 8) << G4BestUnit(fTrack->GetPosition().z() , "Length") << " "
259  << std::setw( 9) << G4BestUnit(fTrack->GetKineticEnergy() , "Energy") << " "
260  << std::setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
261  << std::setw( 8) << G4BestUnit(fStep->GetStepLength() , "Length") << " "
262  << std::setw( 9) << G4BestUnit(fTrack->GetTrackLength() , "Length") << " "
263  << std::setw( 9) << G4BestUnit(fTrack->GetGlobalTime(), "Time") << " ";
264 
265  // Put cut comment here
266  if( fTrack->GetNextVolume() != 0 ) {
267  G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
268  } else {
269  G4cout << std::setw(11) << "OutOfWorld" << " ";
270  }
271  if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
272  G4cout << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
273  } else {
274  G4cout << "User Limit";
275  }
276  G4cout << G4endl;
277  }
278 }
#define NULL
Definition: scimark2.h:8

Member Data Documentation

bool TrackingVerboseAction::fDEBUG
private

Definition at line 58 of file TrackingVerboseAction.h.

Referenced by setTrackingVerbose(), TrackingVerboseAction(), and update().

bool TrackingVerboseAction::fG4Verbose
private

Definition at line 59 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

bool TrackingVerboseAction::fHighEtPhotons
private

Definition at line 60 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

int TrackingVerboseAction::fLarge
private

Definition at line 57 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

std::vector<int> TrackingVerboseAction::fPdgIds
private

Definition at line 70 of file TrackingVerboseAction.h.

Referenced by checkTrackingVerbose(), and TrackingVerboseAction().

bool TrackingVerboseAction::fTkVerbThisEventON
private

Definition at line 69 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

bool TrackingVerboseAction::fTrackingVerboseON
private

Definition at line 68 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

int TrackingVerboseAction::fTVEventMax
private

Definition at line 65 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

int TrackingVerboseAction::fTVEventMin
private

Definition at line 64 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

int TrackingVerboseAction::fTVEventStep
private

Definition at line 66 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

int TrackingVerboseAction::fTVTrackMax
private

Definition at line 62 of file TrackingVerboseAction.h.

Referenced by checkTrackingVerbose(), TrackingVerboseAction(), and update().

int TrackingVerboseAction::fTVTrackMin
private

Definition at line 61 of file TrackingVerboseAction.h.

Referenced by checkTrackingVerbose(), TrackingVerboseAction(), and update().

int TrackingVerboseAction::fTVTrackStep
private

Definition at line 63 of file TrackingVerboseAction.h.

Referenced by checkTrackingVerbose(), TrackingVerboseAction(), and update().

G4VSteppingVerbose* TrackingVerboseAction::fVerbose
private

Definition at line 72 of file TrackingVerboseAction.h.

Referenced by printTrackInfo(), and update().

int TrackingVerboseAction::fVerboseLevel
private

Definition at line 67 of file TrackingVerboseAction.h.

Referenced by TrackingVerboseAction(), and update().

G4TrackingManager* TrackingVerboseAction::theTrackingManager
private

Definition at line 71 of file TrackingVerboseAction.h.

Referenced by setTrackingVerbose(), and update().