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
6e984807
Commit
6e984807
authored
7 years ago
by
Vardan Tadevosyan
Committed by
Stephen A. Wood
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add Preshower energy of the best track.
parent
70f7edde
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
src/THcShower.cxx
+15
-5
15 additions, 5 deletions
src/THcShower.cxx
src/THcShower.h
+6
-4
6 additions, 4 deletions
src/THcShower.h
with
21 additions
and
9 deletions
src/THcShower.cxx
+
15
−
5
View file @
6e984807
...
@@ -516,6 +516,8 @@ Int_t THcShower::DefineVariables( EMode mode )
...
@@ -516,6 +516,8 @@ Int_t THcShower::DefineVariables( EMode mode )
{
"etotnorm"
,
"Total energy divided by Central Momentum"
,
"fEtotNorm"
},
{
"etotnorm"
,
"Total energy divided by Central Momentum"
,
"fEtotNorm"
},
{
"etrack"
,
"Track energy"
,
"fEtrack"
},
{
"etrack"
,
"Track energy"
,
"fEtrack"
},
{
"etracknorm"
,
"Total energy divided by track momentum"
,
"fEtrackNorm"
},
{
"etracknorm"
,
"Total energy divided by track momentum"
,
"fEtrackNorm"
},
{
"eprtrack"
,
"Track Preshower energy"
,
"fEPRtrack"
},
{
"eprtracknorm"
,
"Preshower energy divided by track momentum"
,
"fEPRtrackNorm"
},
{
"ntracks"
,
"Number of shower tracks"
,
"fNtracks"
},
{
"ntracks"
,
"Number of shower tracks"
,
"fNtracks"
},
{
0
}
{
0
}
};
};
...
@@ -597,6 +599,8 @@ void THcShower::Clear(Option_t* opt)
...
@@ -597,6 +599,8 @@ void THcShower::Clear(Option_t* opt)
fEtotNorm
=
0.
;
fEtotNorm
=
0.
;
fEtrack
=
0.
;
fEtrack
=
0.
;
fEtrackNorm
=
0.
;
fEtrackNorm
=
0.
;
fEPRtrack
=
0.
;
fEPRtrackNorm
=
0.
;
fSizeClustArray
=
0
;
fSizeClustArray
=
0
;
fNblockHighEnergy
=
0.
;
fNblockHighEnergy
=
0.
;
...
@@ -767,13 +771,15 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
...
@@ -767,13 +771,15 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
// Do same for Array.
// Do same for Array.
if
(
fHasArray
)
fArray
->
CoarseProcess
(
tracks
);
if
(
fHasArray
)
fArray
->
CoarseProcess
(
tracks
);
//
//
Int_t
Ntracks
=
tracks
.
GetLast
()
+
1
;
// Number of reconstructed tracks
Int_t
Ntracks
=
tracks
.
GetLast
()
+
1
;
// Number of reconstructed tracks
Double_t
save_energy
=
0
;
Double_t
save_energy
=
0
;
for
(
Int_t
itrk
=
0
;
itrk
<
Ntracks
;
itrk
++
)
{
for
(
Int_t
itrk
=
0
;
itrk
<
Ntracks
;
itrk
++
)
{
THaTrack
*
theTrack
=
static_cast
<
THaTrack
*>
(
tracks
[
itrk
]
);
THaTrack
*
theTrack
=
static_cast
<
THaTrack
*>
(
tracks
[
itrk
]
);
save_energy
=
GetShEnergy
(
theTrack
);
// save_energy = GetShEnergy(theTrack);
save_energy
=
GetShEnergy
(
theTrack
,
fNLayers
);
if
(
fHasArray
)
save_energy
+=
fArray
->
GetShEnergy
(
theTrack
);
if
(
fHasArray
)
save_energy
+=
fArray
->
GetShEnergy
(
theTrack
);
theTrack
->
SetEnergy
(
save_energy
);
theTrack
->
SetEnergy
(
save_energy
);
}
//over tracks
}
//over tracks
...
@@ -1046,10 +1052,10 @@ Int_t THcShower::MatchCluster(THaTrack* Track,
...
@@ -1046,10 +1052,10 @@ Int_t THcShower::MatchCluster(THaTrack* Track,
}
}
//_____________________________________________________________________________
//_____________________________________________________________________________
Float_t
THcShower
::
GetShEnergy
(
THaTrack
*
Track
)
{
Float_t
THcShower
::
GetShEnergy
(
THaTrack
*
Track
,
UInt_t
NLayers
,
UInt_t
L0
)
{
// Get
total
energy deposited in the cluster matched to the given
// Get
part of
energy deposited in the cluster matched to the given
// spectrometer Track.
// spectrometer Track
, limited by range of layers from L0 to L0+NLayers-1
.
// Track coordinates at front of the calorimeter, initialize out of
// Track coordinates at front of the calorimeter, initialize out of
// acceptance.
// acceptance.
...
@@ -1071,7 +1077,8 @@ Float_t THcShower::GetShEnergy(THaTrack* Track) {
...
@@ -1071,7 +1077,8 @@ Float_t THcShower::GetShEnergy(THaTrack* Track) {
// Correct track energy depositions for the impact coordinate.
// Correct track energy depositions for the impact coordinate.
for
(
UInt_t
ip
=
0
;
ip
<
fNLayers
;
ip
++
)
{
// for (UInt_t ip=0; ip<fNLayers; ip++) {
for
(
UInt_t
ip
=
L0
;
ip
<
L0
+
NLayers
;
ip
++
)
{
// Coordinate correction factors for positive and negative sides,
// Coordinate correction factors for positive and negative sides,
// different for double PMT counters in the 1-st two layes and for
// different for double PMT counters in the 1-st two layes and for
...
@@ -1110,6 +1117,7 @@ Float_t THcShower::GetShEnergy(THaTrack* Track) {
...
@@ -1110,6 +1117,7 @@ Float_t THcShower::GetShEnergy(THaTrack* Track) {
else
else
cout
<<
", no matched cluster found."
<<
endl
;
cout
<<
", no matched cluster found."
<<
endl
;
cout
<<
" Layers from "
<<
L0
+
1
<<
" to "
<<
L0
+
NLayers
<<
".
\n
"
;
cout
<<
" Coordinate corrected track energy = "
<<
Etrk
<<
"."
<<
endl
;
cout
<<
" Coordinate corrected track energy = "
<<
Etrk
<<
"."
<<
endl
;
cout
<<
"---------------------------------------------------------------
\n
"
;
cout
<<
"---------------------------------------------------------------
\n
"
;
}
}
...
@@ -1132,6 +1140,8 @@ Int_t THcShower::FineProcess( TClonesArray& tracks )
...
@@ -1132,6 +1140,8 @@ Int_t THcShower::FineProcess( TClonesArray& tracks )
if
(
theTrack
->
GetIndex
()
==
0
)
{
if
(
theTrack
->
GetIndex
()
==
0
)
{
fEtrack
=
theTrack
->
GetEnergy
();
fEtrack
=
theTrack
->
GetEnergy
();
fEtrackNorm
=
fEtrack
/
theTrack
->
GetP
();
fEtrackNorm
=
fEtrack
/
theTrack
->
GetP
();
fEPRtrack
=
GetShEnergy
(
theTrack
,
1
);
fEPRtrackNorm
=
fEPRtrack
/
theTrack
->
GetP
();
Xtr
=
-
100.
;
Xtr
=
-
100.
;
Ytr
=
-
100.
;
Ytr
=
-
100.
;
fNclustTrack
=
MatchCluster
(
theTrack
,
Xtr
,
Ytr
);
fNclustTrack
=
MatchCluster
(
theTrack
,
Xtr
,
Ytr
);
...
...
This diff is collapsed.
Click to expand it.
src/THcShower.h
+
6
−
4
View file @
6e984807
...
@@ -111,10 +111,10 @@ public:
...
@@ -111,10 +111,10 @@ public:
return
(
fCcor
[
side
]
+
sign
*
y
)
/
(
fCcor
[
side
]
+
sign
*
y
/
fDcor
[
side
]);
return
(
fCcor
[
side
]
+
sign
*
y
)
/
(
fCcor
[
side
]
+
sign
*
y
/
fDcor
[
side
]);
}
}
// Get
total
energy deposited in the cluster matched to the given
// Get
part of
energy deposited in the cluster matched to the given
// spectrometer Track.
// spectrometer Track
, limited by a range of layers
.
Float_t
GetShEnergy
(
THaTrack
*
);
Float_t
GetShEnergy
(
THaTrack
*
,
UInt_t
NLayers
,
UInt_t
L0
=
0
);
THcShower
();
// for ROOT I/O
THcShower
();
// for ROOT I/O
...
@@ -163,7 +163,9 @@ protected:
...
@@ -163,7 +163,9 @@ protected:
Double_t
fEtot
;
// Total energy
Double_t
fEtot
;
// Total energy
Double_t
fEtotNorm
;
// Total energy divided by spec central momentum
Double_t
fEtotNorm
;
// Total energy divided by spec central momentum
Double_t
fEtrack
;
// Cluster energy associated to the best track
Double_t
fEtrack
;
// Cluster energy associated to the best track
Double_t
fEtrackNorm
;
// Cluster energy associated to the best track
Double_t
fEtrackNorm
;
// Normalized to momentum cluster energy associated to the best track
Double_t
fEPRtrack
;
// Cluster's Preshower energy of the best track
Double_t
fEPRtrackNorm
;
// Normalized to momentum cluster's Preshower energy of the best track
THcShowerClusterList
*
fClusterList
;
// List of hit clusters
THcShowerClusterList
*
fClusterList
;
// List of hit clusters
...
...
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