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
John William Spencer
calypso
Commits
c8c4c519
Commit
c8c4c519
authored
4 years ago
by
Savannah Rose Shively
Browse files
Options
Downloads
Patches
Plain Diff
add veto and trigger
parent
8c10d27b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx
+23
-20
23 additions, 20 deletions
Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx
with
23 additions
and
20 deletions
Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx
+
23
−
20
View file @
c8c4c519
...
@@ -18,7 +18,7 @@ StatusCode SimHitAlg::initialize()
...
@@ -18,7 +18,7 @@ StatusCode SimHitAlg::initialize()
ATH_CHECK
(
histSvc
()
->
regHist
(
"/HIST/modulesSide1"
,
m_moduleSide1
));
ATH_CHECK
(
histSvc
()
->
regHist
(
"/HIST/modulesSide1"
,
m_moduleSide1
));
ATH_CHECK
(
histSvc
()
->
regHist
(
"/HIST/modulesSide2"
,
m_moduleSide2
));
ATH_CHECK
(
histSvc
()
->
regHist
(
"/HIST/modulesSide2"
,
m_moduleSide2
));
m_plate
=
new
TH2D
(
"plate"
,
"Scint Hit Plate"
,
3
,
-
1
.5
,
1
.5
,
4
,
-
0.5
,
3.5
);
m_plate
=
new
TH2D
(
"plate"
,
"Scint Hit Plate"
,
3
,
-
1
,
1
,
4
,
0
,
1
);
ATH_CHECK
(
histSvc
()
->
regHist
(
"/HIST/plates"
,
m_plate
));
ATH_CHECK
(
histSvc
()
->
regHist
(
"/HIST/plates"
,
m_plate
));
// initialize data handle keys
// initialize data handle keys
...
@@ -54,11 +54,11 @@ StatusCode SimHitAlg::execute()
...
@@ -54,11 +54,11 @@ StatusCode SimHitAlg::execute()
ATH_MSG_INFO
(
"Read FaserSiHitCollection with "
<<
h_siHits
->
size
()
<<
" hits"
);
ATH_MSG_INFO
(
"Read FaserSiHitCollection with "
<<
h_siHits
->
size
()
<<
" hits"
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_preshowerHits
(
m_preshowerHitKey
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_preshowerHits
(
m_preshowerHitKey
);
ATH_MSG_INFO
(
"Read ScintHitCollection with "
<<
h_preshowerHits
->
size
()
<<
" hits"
);
ATH_MSG_INFO
(
"Read ScintHitCollection
/Preshower
with "
<<
h_preshowerHits
->
size
()
<<
" hits"
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_triggerHits
(
m_triggerHitKey
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_triggerHits
(
m_triggerHitKey
);
ATH_MSG_INFO
(
"Read ScintHitCollection with "
<<
h_triggerHits
->
size
()
<<
" hits"
);
ATH_MSG_INFO
(
"Read ScintHitCollection
/Trigger
with "
<<
h_triggerHits
->
size
()
<<
" hits"
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_vetoHits
(
m_vetoHitKey
);
SG
::
ReadHandle
<
ScintHitCollection
>
h_vetoHits
(
m_vetoHitKey
);
ATH_MSG_INFO
(
"Read ScintHitCollection with "
<<
h_vetoHits
->
size
()
<<
" hits"
);
ATH_MSG_INFO
(
"Read ScintHitCollection
Veto
with "
<<
h_vetoHits
->
size
()
<<
" hits"
);
// Since we have no pile-up, there should always be a single GenEvent in the container
// Since we have no pile-up, there should always be a single GenEvent in the container
...
@@ -71,8 +71,9 @@ StatusCode SimHitAlg::execute()
...
@@ -71,8 +71,9 @@ StatusCode SimHitAlg::execute()
ATH_MSG_INFO
(
"Event contains "
<<
ev
->
particles_size
()
<<
" truth particles"
);
ATH_MSG_INFO
(
"Event contains "
<<
ev
->
particles_size
()
<<
" truth particles"
);
// The hit container might be empty because particles missed the wafers
// The hit container might be empty because particles missed the wafers
if
(
h_siHits
->
size
()
==
0
)
return
StatusCode
::
SUCCESS
;
//if (h_siHits->size() == 0) return StatusCode::SUCCESS;
else
{
if
(
h_siHits
->
size
()
!=
0
){
// Loop over all hits; print and fill histogram
// Loop over all hits; print and fill histogram
for
(
const
FaserSiHit
&
hit
:
*
h_siHits
)
for
(
const
FaserSiHit
&
hit
:
*
h_siHits
)
{
{
...
@@ -94,31 +95,33 @@ StatusCode SimHitAlg::execute()
...
@@ -94,31 +95,33 @@ StatusCode SimHitAlg::execute()
if
(
h_preshowerHits
->
size
()
!=
0
){
if
(
h_preshowerHits
->
size
()
!=
0
){
for
(
const
ScintHit
&
hit
:
*
h_preshowerHits
)
for
(
const
ScintHit
&
hit
:
*
h_preshowerHits
)
{
{
hit
.
print
();
m_hist
->
Fill
(
hit
.
energyLoss
());
m_hist
->
Fill
(
hit
.
energyLoss
());
m_plate
->
Fill
(
hit
.
getStation
(),
hit
.
getPlate
());
m_plate
->
Fill
(
hit
.
getStation
(),
hit
.
getPlate
());
}
}
}
}
if
(
h_triggerHits
->
size
()
!=
0
){
for
(
const
ScintHit
&
hit
:
*
h_triggerHits
)
{
hit
.
print
();
m_hist
->
Fill
(
hit
.
energyLoss
());
m_plate
->
Fill
(
hit
.
getStation
(),
hit
.
getPlate
());
/*if (h_scintHits->size()!=0){
}
for (const ScintHit& hit : *h_scintHits)
}
if
(
h_vetoHits
->
size
()
!=
0
){
for
(
const
ScintHit
&
hit
:
*
h_vetoHits
)
{
{
hit
.
print
();
hit
.
print
();
m_hist->Fill( hit.energyLoss() );
m_hist
->
Fill
(
hit
.
energyLoss
());
m_plate->Fill( hit.getStation(), hit.getPlate() );
m_plate
->
Fill
(
hit
.
getStation
(),
hit
.
getPlate
());
/*if (hit.getSensor() == 0)
{
m_moduleSide1->Fill( hit.getModule(), hit.getRow());
}
else
{
m_moduleSide2->Fill( hit.getModule(), hit.getRow());
}//
}
}
}*/
}
return
StatusCode
::
SUCCESS
;
return
StatusCode
::
SUCCESS
;
}
}
...
...
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