Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
calypso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Markus Tobias Prim
calypso
Commits
35503c92
Commit
35503c92
authored
4 years ago
by
Savannah Rose Shively
Browse files
Options
Downloads
Patches
Plain Diff
sg fix
parent
5629f0b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx
+24
-7
24 additions, 7 deletions
Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx
Control/CalypsoExample/SimHitExample/src/SimHitAlg.h
+6
-1
6 additions, 1 deletion
Control/CalypsoExample/SimHitExample/src/SimHitAlg.h
with
30 additions
and
8 deletions
Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx
+
24
−
7
View file @
35503c92
...
...
@@ -24,11 +24,23 @@ StatusCode SimHitAlg::initialize()
// initialize data handle keys
ATH_CHECK
(
m_mcEventKey
.
initialize
()
);
ATH_CHECK
(
m_faserSiHitKey
.
initialize
()
);
ATH_CHECK
(
m_scintHitKey
.
initialize
()
);
//Sav things
ATH_CHECK
(
m_preshowerHitKey
.
initialize
()
);
ATH_CHECK
(
m_triggerHitKey
.
initialize
()
);
ATH_CHECK
(
m_vetoHitKey
.
initialize
()
);
ATH_MSG_INFO
(
"Using GenEvent collection with key "
<<
m_mcEventKey
.
key
());
ATH_MSG_INFO
(
"Using Faser SiHit collection with key "
<<
m_faserSiHitKey
.
key
());
ATH_MSG_INFO
(
"Using ScintHit collection with key "
<<
m_scintHitKey
.
key
());
ATH_MSG_INFO
(
"Using ScintHit collection with key "
<<
m_preshowerHitKey
.
key
());
ATH_MSG_INFO
(
"Using ScintHit collection with key "
<<
m_triggerHitKey
.
key
());
ATH_MSG_INFO
(
"Using ScintHit collection with key "
<<
m_vetoHitKey
.
key
());
return
StatusCode
::
SUCCESS
;
}
StatusCode
SimHitAlg
::
execute
()
...
...
@@ -41,8 +53,13 @@ StatusCode SimHitAlg::execute()
SG
::
ReadHandle
<
FaserSiHitCollection
>
h_siHits
(
m_faserSiHitKey
);
ATH_MSG_INFO
(
"Read FaserSiHitCollection with "
<<
h_siHits
->
size
()
<<
" hits"
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_scintHits
(
m_scintHitKey
);
ATH_MSG_INFO
(
"Read ScintHitCollection with "
<<
h_scintHits
->
size
()
<<
" hits"
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_preshowerHits
(
m_preshowerHitKey
);
ATH_MSG_INFO
(
"Read ScintHitCollection with "
<<
h_preshowerHits
->
size
()
<<
" hits"
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_triggerHits
(
m_triggerHitKey
);
ATH_MSG_INFO
(
"Read ScintHitCollection with "
<<
h_triggerHits
->
size
()
<<
" hits"
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_vetoHits
(
m_vetoHitKey
);
ATH_MSG_INFO
(
"Read ScintHitCollection with "
<<
h_vetoHits
->
size
()
<<
" hits"
);
// Since we have no pile-up, there should always be a single GenEvent in the container
const
HepMC
::
GenEvent
*
ev
=
(
*
h_mcEvents
)[
0
];
...
...
@@ -76,7 +93,7 @@ StatusCode SimHitAlg::execute()
if
(
h_scintHits
->
size
()
!=
0
){
/*
if (h_scintHits->size()!=0){
for (const ScintHit& hit : *h_scintHits)
{
hit.print();
...
...
@@ -89,10 +106,10 @@ StatusCode SimHitAlg::execute()
else
{
m_moduleSide2->Fill( hit.getModule(), hit.getRow());
}
*
/
}
/
/
}
}
}
*/
return
StatusCode
::
SUCCESS
;
}
...
...
This diff is collapsed.
Click to expand it.
Control/CalypsoExample/SimHitExample/src/SimHitAlg.h
+
6
−
1
View file @
35503c92
...
...
@@ -32,5 +32,10 @@ class SimHitAlg : public AthHistogramAlgorithm
// Note the key names ("GEN_EVENT" or "SCT_Hits") are Gaudi properties and can be configured at run-time
SG
::
ReadHandleKey
<
McEventCollection
>
m_mcEventKey
{
this
,
"McEventCollection"
,
"GEN_EVENT"
};
SG
::
ReadHandleKey
<
FaserSiHitCollection
>
m_faserSiHitKey
{
this
,
"FaserSiHitCollection"
,
"SCT_Hits"
};
SG
::
ReadHandleKey
<
ScintHitCollection
>
m_scintHitKey
{
this
,
"ScintHitCollection"
,
"Scint_Hits"
};
//PreshowerHits, TriggerHits, VetoHits Sav new stuff
SG
::
ReadHandleKey
<
ScintHitCollection
>
m_scintHitKey
{
this
,
"ScintHitCollection"
,
"Scint_Hits"
};
//template. remove later
SG
::
ReadHandleKey
<
ScintHitCollection
>
m_preshowerHitKey
{
this
,
"ScintHitCollection"
,
"PreshowerHits"
};
SG
::
ReadHandleKey
<
ScintHitCollection
>
m_triggerHitKey
{
this
,
"ScintHitCollection"
,
"TriggerHits"
};
SG
::
ReadHandleKey
<
ScintHitCollection
>
m_vetoHitKey
{
this
,
"ScintHitCollection"
,
"VetoHits"
};
};
\ No newline at end of file
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