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
c6445aae
Commit
c6445aae
authored
11 years ago
by
Vardan Tadevosyan
Browse files
Options
Downloads
Patches
Plain Diff
Added cluster-to track association (w/o fid. volume)
parent
81bb983e
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
src/THcShower.cxx
+64
-11
64 additions, 11 deletions
src/THcShower.cxx
src/THcShower.h
+2
-1
2 additions, 1 deletion
src/THcShower.h
with
66 additions
and
12 deletions
src/THcShower.cxx
+
64
−
11
View file @
c6445aae
...
...
@@ -693,7 +693,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
// << " Phi = " << theTrack->GetPhi()
// << endl;
MatchCluster
(
theTrack
);
MatchCluster
(
theTrack
,
ClusterList
);
}
if
(
fdbg_clusters_cal
)
...
...
@@ -704,7 +704,8 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
//-----------------------------------------------------------------------------
void
THcShower
::
MatchCluster
(
THaTrack
*
Track
)
Int_t
THcShower
::
MatchCluster
(
THaTrack
*
Track
,
THcShowerClusterList
*
ClusterList
)
{
// Match a cluster to a given track.
...
...
@@ -715,21 +716,73 @@ void THcShower::MatchCluster(THaTrack* Track)
<<
" Phi = "
<<
Track
->
GetPhi
()
<<
endl
;
Double_t
x
c
=
1.e8
;
Double_t
y
c
=
1.e8
;
Double_t
pathl
=
1.e8
;
Double_t
x
trk
=
kBig
;
Double_t
y
trk
=
kBig
;
Double_t
pathl
=
kBig
;
CalcTrackIntercept
(
Track
,
pathl
,
xc
,
yc
);
// Track interception with face of the calorimeter. The coordinates are
// in the calorimeter's local system.
// Double_t dx = 0.;
// Int_t pad = -1;
// new ( (*fTrackProj)[0]) THaTrackProj(xc,yc,pathl,dx,pad,this);
CalcTrackIntercept
(
Track
,
pathl
,
xtrk
,
ytrk
);
// Transform coordiantes to the spectrometer's coordinate system.
xtrk
+=
GetOrigin
().
X
();
ytrk
+=
GetOrigin
().
Y
();
cout
<<
"Track at Calorimeter:"
<<
" X = "
<<
x
c
<<
" Y = "
<<
y
c
<<
" X = "
<<
x
trk
<<
" Y = "
<<
y
trk
<<
" Pathl = "
<<
pathl
<<
endl
;
// Match a cluster to the track.
Int_t
mclust
=
-
1
;
// The match cluster #, initialize with a bogus value.
Double_t
deltaX
=
kBig
;
// Track to cluster distance
// hcal_zmin= hcal_1pr_zpos
// hcal_zmax= hcal_4ta_zpos
// hcal_fv_xmin=hcal_xmin+5.
// hcal_fv_xmax=hcal_xmax-5.
// hcal_fv_ymin=hcal_ymin+5.
// hcal_fv_ymax=hcal_ymax-5.
// hcal_fv_zmin=hcal_zmin
// hcal_fv_zmax=hcal_zmax
// dz_f=hcal_zmin-hz_fp(nt)
// dz_b=hcal_zmax-hz_fp(nt)
// xf=hx_fp(nt)+hxp_fp(nt)*dz_f
// xb=hx_fp(nt)+hxp_fp(nt)*dz_b
// yf=hy_fp(nt)+hyp_fp(nt)*dz_f
// yb=hy_fp(nt)+hyp_fp(nt)*dz_b
// track_in_fv = (xf.le.hcal_fv_xmax .and. xf.ge.hcal_fv_xmin .and.
// & xb.le.hcal_fv_xmax .and. xb.ge.hcal_fv_xmin .and.
// & yf.le.hcal_fv_ymax .and. yf.ge.hcal_fv_ymin .and.
// & yb.le.hcal_fv_ymax .and. yb.ge.hcal_fv_ymin)
for
(
Int_t
i
=
0
;
i
<
fNclust
;
i
++
)
{
THcShowerCluster
*
cluster
=
(
*
ClusterList
).
ListedCluster
(
i
);
Double_t
dx
=
TMath
::
Abs
(
(
*
cluster
).
clX
()
-
xtrk
);
if
(
dx
<=
(
0.5
*
BlockThick
[
0
]
+
fSlop
))
{
if
(
dx
<=
deltaX
)
{
mclust
=
i
;
deltaX
=
dx
;
}
}
}
cout
<<
"MatchCluster: mclust= "
<<
mclust
<<
" delatX= "
<<
deltaX
<<
endl
;
return
mclust
;
}
...
...
This diff is collapsed.
Click to expand it.
src/THcShower.h
+
2
−
1
View file @
c6445aae
...
...
@@ -11,6 +11,7 @@
#include
"THaNonTrackingDetector.h"
#include
"THcHitList.h"
#include
"THcShowerPlane.h"
#include
"THcShowerCluster.h"
class
THaScCalib
;
...
...
@@ -123,7 +124,7 @@ public:
void
Setup
(
const
char
*
name
,
const
char
*
description
);
void
MatchCluster
(
THaTrack
*
);
Int_t
MatchCluster
(
THaTrack
*
,
THcShowerClusterList
*
);
ClassDef
(
THcShower
,
0
)
// Generic class
};
...
...
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