CMS 3D CMS Logo

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

#include <MaterialBudgetAction.h>

Inheritance diagram for MaterialBudgetAction:
SimWatcher Observer< const BeginOfRun * > Observer< const BeginOfTrack * > Observer< const G4Step * > Observer< const EndOfTrack * > Observer< const EndOfRun * >

Public Member Functions

 MaterialBudgetAction (const edm::ParameterSet &)
 
 ~MaterialBudgetAction () override
 
- 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 BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const G4Step * >
 Observer ()
 
void slotForUpdate (const G4Step * 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 EndOfRun * >
 Observer ()
 
void slotForUpdate (const EndOfRun * iT)
 
virtual ~Observer ()
 

Private Member Functions

bool CheckTouchableInSelectedVolumes (const G4VTouchable *touch)
 
std::string getPartName (G4StepPoint *aStepPoint)
 
std::string getSubDetectorName (G4StepPoint *aStepPoint)
 
 MaterialBudgetAction (const MaterialBudgetAction &)
 
const MaterialBudgetActionoperator= (const MaterialBudgetAction &)
 
void save (const G4Step *aStep)
 
bool StopAfterProcess (const G4Step *aStep)
 
void update (const BeginOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

double Ekin
 
bool firstParticle
 
bool saveToHistos
 
bool saveToTree
 
bool saveToTxt
 
bool storeDecay
 
std::shared_ptr< MaterialBudgetDatatheData
 
std::string theHistoList
 
std::shared_ptr< TestHistoMgrtheHistoMgr
 
std::shared_ptr< MaterialBudgetFormattheHistos
 
G4String theProcessToStop
 
std::shared_ptr< MaterialBudgetTreetheTree
 
std::shared_ptr< MaterialBudgetTxttheTxt
 
std::vector< G4String > theVolumeList
 

Additional Inherited Members

Detailed Description

Definition at line 32 of file MaterialBudgetAction.h.

Constructor & Destructor Documentation

MaterialBudgetAction::MaterialBudgetAction ( const edm::ParameterSet iPSet)

Definition at line 31 of file MaterialBudgetAction.cc.

References gather_cfg::cout, Ekin, firstParticle, edm::ParameterSet::getParameter(), saveToHistos, saveToTree, saveToTxt, storeDecay, AlCaHLTBitMon_QueryRunRegistry::string, theData, theHistoList, theHistoMgr, theHistos, theProcessToStop, theTree, theTxt, and theVolumeList.

32 {
33  theData = std::make_shared<MaterialBudgetData>();
34 
35  edm::ParameterSet m_Anal = iPSet.getParameter<edm::ParameterSet>("MaterialBudgetAction");
36 
37  //---- Accumulate material budget only inside selected volumes
38  std::string theHistoList = m_Anal.getParameter<std::string>("HistogramList");
39  std::vector<std::string> volList = m_Anal.getParameter< std::vector<std::string> >("SelectedVolumes");
40  std::vector<std::string>::const_iterator ite;
41  std::cout << "TestGeometry: List of the selected volumes: " << std::endl;
42  for( ite = volList.begin(); ite != volList.end(); ite++ ){
43  if( (*ite) != "None" ) {
44  theVolumeList.push_back( *ite );
45  std::cout << (*ite) << std::endl;
46  }
47  }
48  // log
49  if(theHistoList == "Tracker" ) {
50  std::cout << "TestGeometry: MaterialBudgetAction running in Tracker Mode" << std::endl;
51  }
52  else if(theHistoList == "ECAL" ) {
53  std::cout << "TestGeometry: MaterialBudgetAction running in Ecal Mode" << std::endl;
54  }
55  else if(theHistoList == "HGCal" ) {
56  std::cout << "TestGeometry: MaterialBudgetAction running in HGCal Mode" << std::endl;
57  }
58  else {
59  std::cout << "TestGeometry: MaterialBudgetAction running in General Mode" << std::endl;
60  }
61  //
62 
63  //---- Stop track when a process occurs
64  theProcessToStop = m_Anal.getParameter<std::string>("StopAfterProcess");
65  std::cout << "TestGeometry: stop at process " << theProcessToStop << std::endl;
66 
67  //---- Save histos to ROOT file
68  std::string saveToHistosFile = m_Anal.getParameter<std::string>("HistosFile");
69  if( saveToHistosFile != "None" ) {
70  saveToHistos = true;
71  std::cout << "TestGeometry: saving histograms to " << saveToHistosFile << std::endl;
72  theHistoMgr = std::make_shared<TestHistoMgr>();
73  // rr
74  if(theHistoList == "Tracker" ) {
75  theHistos = std::make_shared<MaterialBudgetTrackerHistos>(theData, theHistoMgr, saveToHistosFile);
76  }
77  else if (theHistoList == "ECAL") {
78  theHistos = std::make_shared<MaterialBudgetEcalHistos>(theData, theHistoMgr, saveToHistosFile);
79  }
80  else if (theHistoList == "HGCal") {
81  theHistos = std::make_shared<MaterialBudgetHGCalHistos>( theData, theHistoMgr, saveToHistosFile );
82  //In HGCal mode, so tell data class
83  theData->setHGCalmode(true);
84  }
85  else {
86  theHistos = std::make_shared<MaterialBudgetHistos>( theData, theHistoMgr, saveToHistosFile );
87  }
88  // rr
89  } else {
90  saveToHistos = false;
91  }
92 
93  //---- Save material budget info to TEXT file
94  std::string saveToTxtFile = m_Anal.getParameter<std::string>("TextFile");
95  if( saveToTxtFile != "None" ) {
96  saveToTxt = true;
97  std::cout << "TestGeometry: saving text info to " << saveToTxtFile << std::endl;
98  theTxt = std::make_shared<MaterialBudgetTxt>( theData, saveToTxtFile );
99  } else {
100  saveToTxt = false;
101  }
102 
103  //---- Compute all the steps even if not stored on file
104  bool allSteps = m_Anal.getParameter<bool>("AllStepsToTree");
105  std::cout << "TestGeometry: all steps are computed " << allSteps << std::endl;
106  if( allSteps ) theData->SetAllStepsToTree();
107 
108  //---- Save tree to ROOT file
109  std::string saveToTreeFile = m_Anal.getParameter<std::string>("TreeFile");
110  // std::string saveToTreeFile = "";
111  if( saveToTreeFile != "None" ) {
112  saveToTree = true;
113  theTree = std::make_shared<MaterialBudgetTree>( theData, saveToTreeFile );
114  } else {
115  saveToTree = false;
116  }
117  std::cout << "TestGeometry: saving ROOT TREE to " << saveToTreeFile << std::endl;
118 
119  //---- Track the first decay products of the main particle
120  // if their kinetic energy is greater than Ekin
121  storeDecay = m_Anal.getUntrackedParameter<bool>("storeDecay",false);
122  Ekin = m_Anal.getUntrackedParameter<double>("EminDecayProd",1000.0); // MeV
123  std::cout << "TestGeometry: decay products steps are stored " << storeDecay;
124  if(storeDecay) std::cout << " if their kinetic energy is greater than " << Ekin << " MeV";
125  std::cout << std::endl;
126  firstParticle = false;
127  }
T getParameter(std::string const &) const
std::shared_ptr< MaterialBudgetFormat > theHistos
std::shared_ptr< TestHistoMgr > theHistoMgr
std::shared_ptr< MaterialBudgetTxt > theTxt
std::shared_ptr< MaterialBudgetTree > theTree
std::vector< G4String > theVolumeList
std::shared_ptr< MaterialBudgetData > theData
MaterialBudgetAction::~MaterialBudgetAction ( )
override

Definition at line 131 of file MaterialBudgetAction.cc.

132 {
133 }
MaterialBudgetAction::MaterialBudgetAction ( const MaterialBudgetAction )
private

Member Function Documentation

bool MaterialBudgetAction::CheckTouchableInSelectedVolumes ( const G4VTouchable *  touch)
private

Definition at line 322 of file MaterialBudgetAction.cc.

References spr::find(), cuy::ii, and theVolumeList.

Referenced by update().

323 {
324  // std::vector<G4String>::const_iterator ite;
325  size_t volh = touch->GetHistoryDepth();
326 // for( ite = theVolumeList.begin(); ite != theVolumeList.end(); ite++ ){
327 // //- std::cout << " CheckTouchableInSelectedVolumes vol " << *ite << std::endl;
328  for( int ii = volh; ii >= 0; ii-- ){
329 // //- std::cout << ii << " CheckTouchableInSelectedVolumes parent " << touch->GetVolume(ii)->GetName() << std::endl;
330  if (
331  std::find(theVolumeList.begin(),
332  theVolumeList.end(),
333  touch->GetVolume(ii)->GetName()) != theVolumeList.end() )
334  return true;
335  }
336 // }
337 
338  return false;
339 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
ii
Definition: cuy.py:590
std::vector< G4String > theVolumeList
std::string MaterialBudgetAction::getPartName ( G4StepPoint *  aStepPoint)
private

Definition at line 285 of file MaterialBudgetAction.cc.

286 {
287  const G4TouchableHistory* theTouchable
288  = (const G4TouchableHistory*)(aStepPoint->GetTouchable());
289  G4int num_levels = theTouchable->GetHistoryDepth();
290  // theTouchable->MoveUpHistory(num_levels-3);
291 
292  if( theTouchable->GetVolume() ) {
293  return theTouchable->GetVolume(num_levels-3)->GetName();
294  } else {
295  return "OutOfWorld";
296  }
297 }
std::string MaterialBudgetAction::getSubDetectorName ( G4StepPoint *  aStepPoint)
private

Definition at line 270 of file MaterialBudgetAction.cc.

271 {
272  const G4TouchableHistory* theTouchable
273  = (const G4TouchableHistory*)(aStepPoint->GetTouchable());
274  G4int num_levels = theTouchable->GetHistoryDepth();
275 
276  if( theTouchable->GetVolume() ) {
277  return theTouchable->GetVolume(num_levels-1)->GetName();
278  } else {
279  return "OutOfWorld";
280  }
281 }
const MaterialBudgetAction& MaterialBudgetAction::operator= ( const MaterialBudgetAction )
private
void MaterialBudgetAction::save ( const G4Step *  aStep)
private
bool MaterialBudgetAction::StopAfterProcess ( const G4Step *  aStep)
private

Definition at line 342 of file MaterialBudgetAction.cc.

References gather_cfg::cout, and theProcessToStop.

Referenced by update().

343 {
344  if( theProcessToStop.empty() ) return false;
345 
346  if(aStep->GetPostStepPoint()->GetProcessDefinedStep() == nullptr) return false;
347  if( aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() == theProcessToStop ) {
348  std::cout << " MaterialBudgetAction::StopAfterProcess " << aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() << std::endl;
349  return true;
350  } else {
351  return false;
352  }
353 }
void MaterialBudgetAction::update ( const BeginOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 136 of file MaterialBudgetAction.cc.

References MessageLogger_cfi::cerr, cuy::ii, findQualityFiles::jj, theProcessToStop, and theVolumeList.

Referenced by 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(), 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().

137 {
138  //----- Check that selected volumes are indeed part of the geometry
139  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
140  std::vector<G4LogicalVolume*>::const_iterator lvcite;
141  std::vector<G4String>::const_iterator volcite;
142 
143  for( volcite = theVolumeList.begin(); volcite != theVolumeList.end(); volcite++ ){
144  bool volFound = false;
145  for( lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++ ) {
146  if( (*lvcite)->GetName() == *volcite ) {
147  volFound = true;
148  break;
149  }
150  }
151  if( !volFound ) {
152  std::cerr << " @@@@@@@ WARNING at MaterialBudgetAction: selected volume not found in geometry " << *volcite << std::endl;
153  }
154  }
155 
156 
157  //----- Check process selected is one of the available ones
158  bool procFound = false;
159  if( theProcessToStop == "None" ) {
160  procFound = true;
161  } else {
162  G4ParticleTable * partTable = G4ParticleTable::GetParticleTable();
163  int siz = partTable->size();
164  for (int ii= 0; ii < siz; ii++) {
165  G4ParticleDefinition * particle = partTable->GetParticle(ii);
166 
167  //--- All processes of this particle
168  G4ProcessManager * pmanager = particle->GetProcessManager();
169  G4ProcessVector * pvect = pmanager->GetProcessList();
170  int sizproc = pvect->size();
171  for (int jj = 0; jj < sizproc; jj++) {
172  if( (*pvect)[jj]->GetProcessName() == theProcessToStop ) {
173  procFound = true;
174  break;
175  }
176  }
177  }
178  }
179 
180  if( !procFound ) {
181  std::cerr << " @@@@@@@ WARNING at MaterialBudgetAction: selected process to stop tracking not found " << theProcessToStop << std::endl;
182  }
183 
184 }
ii
Definition: cuy.py:590
std::vector< G4String > theVolumeList
void MaterialBudgetAction::update ( const BeginOfTrack )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 188 of file MaterialBudgetAction.cc.

References gather_cfg::cout, Ekin, firstParticle, saveToHistos, saveToTree, saveToTxt, storeDecay, theData, theHistos, theTree, and theTxt.

Referenced by 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(), 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().

189 {
190  const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted
191 
192  // that was a temporary action while we're sorting out
193  // about # of secondaries (produced if CutsPerRegion=true)
194  //
195  std::cout << "Track ID " << aTrack->GetTrackID() << " Track parent ID " << aTrack->GetParentID()
196  << " PDG Id. = " << aTrack->GetDefinition()->GetPDGEncoding()
197  << " Ekin = " << aTrack->GetKineticEnergy() << " MeV" << std::endl;
198  if( aTrack->GetCreatorProcess() ) std::cout << " produced through " << aTrack->GetCreatorProcess()->GetProcessType() << std::endl;
199 
200  if(aTrack->GetTrackID() == 1) {
201  firstParticle = true;
202  } else {
203  firstParticle = false;
204  }
205 
206  if( storeDecay ) { // if record of the decay is requested
207  if( aTrack->GetCreatorProcess() ) {
208  if (
209  aTrack->GetParentID() == 1
210  &&
211  // aTrack->GetCreatorProcess()->GetProcessType() == 6
212  // &&
213  aTrack->GetKineticEnergy() > Ekin
214  ) {
215  // continue
216  } else {
217  G4Track * aTracknc = const_cast<G4Track*>(aTrack);
218  aTracknc->SetTrackStatus(fStopAndKill);
219  return;
220  }
221  } // particles produced from a decay (type=6) of the main particle (ID=1) with Kinetic Energy [MeV] > Ekin
222  } else { // kill all the other particles (take only the main one until it disappears) if decay not stored
223  if( aTrack->GetParentID() != 0) {
224  G4Track * aTracknc = const_cast<G4Track*>(aTrack);
225  aTracknc->SetTrackStatus(fStopAndKill);
226  return;
227  }
228  }
229 
230 
231  // if(firstParticle) {
232  //--------- start of track
233  //- std::cout << " Data Start Track " << std::endl;
234  theData->dataStartTrack( aTrack );
235  if (saveToTree) theTree->fillStartTrack();
236  if (saveToHistos) theHistos->fillStartTrack();
237  if (saveToTxt) theTxt->fillStartTrack();
238  // }
239 }
std::shared_ptr< MaterialBudgetFormat > theHistos
std::shared_ptr< MaterialBudgetTxt > theTxt
std::shared_ptr< MaterialBudgetTree > theTree
std::shared_ptr< MaterialBudgetData > theData
void MaterialBudgetAction::update ( const G4Step *  )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 243 of file MaterialBudgetAction.cc.

References CheckTouchableInSelectedVolumes(), saveToHistos, saveToTree, saveToTxt, StopAfterProcess(), theData, theHistos, theTree, theTxt, theVolumeList, and HiIsolationCommonParameters_cff::track.

Referenced by 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(), 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().

244 {
245  //----- Check it is inside one of the volumes selected
246  if( !theVolumeList.empty() ) {
247  if( !CheckTouchableInSelectedVolumes( aStep->GetTrack()->GetTouchable() ) ) return;
248  }
249 
250  //---------- each step
251  theData->dataPerStep( aStep );
252  //- std::cout << " aStep->GetPostStepPoint()->GetTouchable() " << aStep->GetPostStepPoint()->GetTouchable()->GetVolume() << " " << aStep->GetPreStepPoint()->GetTouchable()->GetVolume() << std::endl;
253  if (saveToTree) theTree->fillPerStep();
254  if (saveToHistos) theHistos->fillPerStep();
255  if (saveToTxt) theTxt->fillPerStep();
256 
257 
258  //----- Stop tracking after selected process
259  if( StopAfterProcess( aStep ) ) {
260  G4Track* track = aStep->GetTrack();
261  track->SetTrackStatus( fStopAndKill );
262  }
263 
264  return;
265 
266 }
bool CheckTouchableInSelectedVolumes(const G4VTouchable *touch)
std::shared_ptr< MaterialBudgetFormat > theHistos
std::shared_ptr< MaterialBudgetTxt > theTxt
std::shared_ptr< MaterialBudgetTree > theTree
bool StopAfterProcess(const G4Step *aStep)
std::vector< G4String > theVolumeList
std::shared_ptr< MaterialBudgetData > theData
void MaterialBudgetAction::update ( const EndOfTrack )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 300 of file MaterialBudgetAction.cc.

References saveToHistos, saveToTree, saveToTxt, theData, theHistos, theTree, and theTxt.

Referenced by 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(), 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().

301 {
302  const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted
303  // if( aTrack->GetParentID() != 0 ) return;
304 
305  //---------- end of track (OutOfWorld)
306  //- std::cout << " Data End Track " << std::endl;
307  theData->dataEndTrack( aTrack );
308 
309  //- std::cout << " Data End Event " << std::endl;
310  if (saveToTree) theTree->fillEndTrack();
311  if (saveToHistos) theHistos->fillEndTrack();
312  if (saveToTxt) theTxt->fillEndTrack();
313 }
std::shared_ptr< MaterialBudgetFormat > theHistos
std::shared_ptr< MaterialBudgetTxt > theTxt
std::shared_ptr< MaterialBudgetTree > theTree
std::shared_ptr< MaterialBudgetData > theData
void MaterialBudgetAction::update ( const EndOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfRun * >.

Definition at line 316 of file MaterialBudgetAction.cc.

Referenced by 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(), 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().

317 {
318  return;
319 }

Member Data Documentation

double MaterialBudgetAction::Ekin
private

Definition at line 69 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

bool MaterialBudgetAction::firstParticle
private

Definition at line 70 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

bool MaterialBudgetAction::saveToHistos
private

Definition at line 67 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

bool MaterialBudgetAction::saveToTree
private

Definition at line 67 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

bool MaterialBudgetAction::saveToTxt
private

Definition at line 67 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

bool MaterialBudgetAction::storeDecay
private

Definition at line 68 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

std::shared_ptr<MaterialBudgetData> MaterialBudgetAction::theData
private

Definition at line 61 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

std::string MaterialBudgetAction::theHistoList
private

Definition at line 74 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction().

std::shared_ptr<TestHistoMgr> MaterialBudgetAction::theHistoMgr
private

Definition at line 65 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction().

std::shared_ptr<MaterialBudgetFormat> MaterialBudgetAction::theHistos
private

Definition at line 63 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

G4String MaterialBudgetAction::theProcessToStop
private

Definition at line 73 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), StopAfterProcess(), and update().

std::shared_ptr<MaterialBudgetTree> MaterialBudgetAction::theTree
private

Definition at line 62 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

std::shared_ptr<MaterialBudgetTxt> MaterialBudgetAction::theTxt
private

Definition at line 64 of file MaterialBudgetAction.h.

Referenced by MaterialBudgetAction(), and update().

std::vector<G4String> MaterialBudgetAction::theVolumeList
private