Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zdcLG
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chad Lantz
zdcLG
Commits
6b2d3b71
Commit
6b2d3b71
authored
5 years ago
by
Chad Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Started changing StackingAction to EventAction
parent
4742b8d4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/OpNoviceEventAction.hh
+50
-0
50 additions, 0 deletions
include/OpNoviceEventAction.hh
src/OpNoviceEventAction.cc
+64
-0
64 additions, 0 deletions
src/OpNoviceEventAction.cc
with
114 additions
and
0 deletions
include/OpNoviceEventAction.hh
0 → 100644
+
50
−
0
View file @
6b2d3b71
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
// @Author Chad Lantz
#ifndef OpNoviceEventAction_H
#define OpNoviceEventAction_H 1
#include
"globals.hh"
#include
"G4UserEventAction.hh"
class
OpNoviceEventAction
:
public
G4UserEventAction
{
public:
OpNoviceEventAction
();
virtual
~
OpNoviceEventAction
();
virtual
void
BeginOfEventAction
(
const
G4Event
*
event
);
virtual
void
EndOfEventAction
(
const
G4Event
*
event
);
private:
G4THitsMap
<
G4double
>*
GetHitsCollection
(
G4int
hcID
,
const
G4Event
*
event
)
const
;
G4double
GetSum
(
G4THitsMap
<
G4double
>*
hitsMap
)
const
;
void
PrintEventStatistics
(
G4double
absoEdep
,
G4double
absoTrackLength
,
G4double
gapEdep
,
G4double
gapTrackLength
)
const
;
G4int
hitsCollID
;
};
#endif
This diff is collapsed.
Click to expand it.
src/OpNoviceEventAction.cc
0 → 100644
+
64
−
0
View file @
6b2d3b71
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// @Author Chad Lantz
#include
"OpNoviceEventAction.hh"
#include
"G4VProcess.hh"
#include
"G4ParticleDefinition.hh"
#include
"G4ParticleTypes.hh"
#include
"G4Track.hh"
#include
"G4ios.hh"
OpNoviceEventgAction
::
OpNoviceStackingAction
()
:
G4UserEventAction
(),
hitsCollID
(
0
){
}
OpNoviceEventAction
::~
OpNoviceStackingAction
(){
}
void
OpNoviceEventAction
::
BeginOfEventAction
(
const
G4Event
*
event
){
fEventNo
=
evt
->
GetEventID
();
// G4SDManager * SDman = G4SDManager::GetSDMpointer();
hitsCollID
=
0
;
}
void
OpNoviceEventAction
::
EndOfEventAction
(
const
G4Event
*
event
){
G4AnalysisManager
*
analysisManager
=
G4AnalysisManager
::
Instance
();
// fill ntuple //
analysisManager
->
FillNtupleDColumn
(
0
,
absoEdep
);
analysisManager
->
FillNtupleDColumn
(
1
,
gapEdep
);
analysisManager
->
FillNtupleDColumn
(
2
,
absoTrackLength
);
analysisManager
->
FillNtupleDColumn
(
3
,
gapTrackLength
);
analysisManager
->
AddNtupleRow
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment