Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
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
Container Registry
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
jlab
hallc
analyzer_software
hcana
Commits
c543140a
Commit
c543140a
authored
9 years ago
by
Vardan Tadevosyan
Browse files
Options
Downloads
Patches
Plain Diff
Add tracking in THcShowerArray.
parent
b25add04
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/THcShower.cxx
+1
-0
1 addition, 0 deletions
src/THcShower.cxx
src/THcShowerArray.cxx
+49
-0
49 additions, 0 deletions
src/THcShowerArray.cxx
src/THcShowerArray.h
+6
-1
6 additions, 1 deletion
src/THcShowerArray.h
with
56 additions
and
1 deletion
src/THcShower.cxx
+
1
−
0
View file @
c543140a
...
...
@@ -1069,6 +1069,7 @@ Int_t THcShower::FineProcess( TClonesArray& tracks )
THaTrack
*
theTrack
=
static_cast
<
THaTrack
*>
(
tracks
[
itrk
]
);
Float_t
energy
=
GetShEnergy
(
theTrack
);
if
(
fHasArray
)
energy
+=
fArray
->
GetShEnergy
(
theTrack
);
theTrack
->
SetEnergy
(
energy
);
}
//over tracks
...
...
This diff is collapsed.
Click to expand it.
src/THcShowerArray.cxx
+
49
−
0
View file @
c543140a
...
...
@@ -531,6 +531,55 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track,
return
mclust
;
}
//_____________________________________________________________________________
Float_t
THcShowerArray
::
GetShEnergy
(
THaTrack
*
Track
)
{
// Get total energy deposited in the Array cluster matched to the given
// spectrometer Track.
// Track coordinates at the front of Array, initialize out of acceptance.
Double_t
Xtr
=
-
100.
;
Double_t
Ytr
=
-
100.
;
// Associate a cluster to the track.
Int_t
mclust
=
MatchCluster
(
Track
,
Xtr
,
Ytr
);
// Coordinate corrected total energy deposition in the cluster.
Float_t
Etrk
=
0.
;
if
(
mclust
>=
0
)
{
// if there is a matched cluster
// Get matched cluster.
THcShowerCluster
*
cluster
=
*
(
fClusterList
->
begin
()
+
mclust
);
// No coordinate correction for now.
Etrk
=
clE
(
cluster
);
}
//mclust>=0
//Debug output.
THcShower
*
fParent
=
(
THcShower
*
)
GetParent
();
if
(
fParent
->
fdbg_tracks_cal
)
{
cout
<<
"---------------------------------------------------------------
\n
"
;
cout
<<
"Debug output from THcShowerArray::GetShEnergy for "
<<
GetName
()
<<
endl
;
cout
<<
" Track at Array: X = "
<<
Xtr
<<
" Y = "
<<
Ytr
;
if
(
mclust
>=
0
)
cout
<<
", matched cluster #"
<<
mclust
<<
"."
<<
endl
;
else
cout
<<
", no matched cluster found."
<<
endl
;
cout
<<
" Track's Array energy = "
<<
Etrk
<<
"."
<<
endl
;
cout
<<
"---------------------------------------------------------------
\n
"
;
}
return
Etrk
;
}
//_____________________________________________________________________________
Int_t
THcShowerArray
::
FineProcess
(
TClonesArray
&
tracks
)
{
...
...
This diff is collapsed.
Click to expand it.
src/THcShowerArray.h
+
6
−
1
View file @
c543140a
...
...
@@ -52,6 +52,11 @@ public:
// Cluster to track association method.
Int_t
MatchCluster
(
THaTrack
*
,
Double_t
&
,
Double_t
&
);
// Get total energy deposited in the cluster matched to the given
// spectrometer Track.
Float_t
GetShEnergy
(
THaTrack
*
);
// Double_t fSpacing; not used
TClonesArray
*
fParentHitList
;
...
...
@@ -125,7 +130,7 @@ protected:
Double_t
fEarray
;
// Total Energy deposition in the array.
Int_t
fNhits
;
// Total number of hits
Int_t
fNclust
;
// Number of clusters
Int_t
fNclust
;
// Number of clusters
Int_t
fNtracks
;
// Number of shower tracks, i.e. number of
// cluster-to-track association
...
...
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