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
6bd30070
Commit
6bd30070
authored
11 years ago
by
Stephen A. Wood
Browse files
Options
Downloads
Patches
Plain Diff
Put residuals in an RVarDef and make a script to histogram them.
parent
5e124f83
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
examples/dcresiduals.C
+33
-0
33 additions, 0 deletions
examples/dcresiduals.C
src/THcDC.cxx
+12
-1
12 additions, 1 deletion
src/THcDC.cxx
src/THcDC.h
+6
-5
6 additions, 5 deletions
src/THcDC.h
with
51 additions
and
6 deletions
examples/dcresiduals.C
0 → 100644
+
33
−
0
View file @
6bd30070
{
TFile
*
f
=
new
TFile
(
"hodtest.root"
);
TTree
*
T
=
(
TTree
*
)
f
->
Get
(
"T"
);
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"Drift Chamber Residuals"
,
800
,
1000
);
c1
->
Divide
(
2
,
6
);
TH1F
*
h
=
new
TH1F
(
"h"
,
"Residual"
,
100
,
-
1
.
0
,
1
.
0
);
c1
->
cd
(
1
);
T
->
Draw
(
"H.dc.residual[0]"
,
"H.dc.residual[0] < 999"
);
c1
->
cd
(
2
);
T
->
Draw
(
"H.dc.residual[1]"
,
"H.dc.residual[1] < 999"
);
c1
->
cd
(
3
);
T
->
Draw
(
"H.dc.residual[2]"
,
"H.dc.residual[2] < 999"
);
c1
->
cd
(
4
);
T
->
Draw
(
"H.dc.residual[3]"
,
"H.dc.residual[3] < 999"
);
c1
->
cd
(
5
);
T
->
Draw
(
"H.dc.residual[4]"
,
"H.dc.residual[4] < 999"
);
c1
->
cd
(
6
);
T
->
Draw
(
"H.dc.residual[5]"
,
"H.dc.residual[5] < 999"
);
c1
->
cd
(
7
);
T
->
Draw
(
"H.dc.residual[6]"
,
"H.dc.residual[6] < 999"
);
c1
->
cd
(
8
);
T
->
Draw
(
"H.dc.residual[7]"
,
"H.dc.residual[7] < 999"
);
c1
->
cd
(
9
);
T
->
Draw
(
"H.dc.residual[8]"
,
"H.dc.residual[8] < 999"
);
c1
->
cd
(
10
);
T
->
Draw
(
"H.dc.residual[9]"
,
"H.dc.residual[9] < 999"
);
c1
->
cd
(
11
);
T
->
Draw
(
"H.dc.residual[10]"
,
"H.dc.residual[10] < 999"
);
c1
->
cd
(
12
);
T
->
Draw
(
"H.dc.residual[11]"
,
"H.dc.residual[11] < 999"
);
}
This diff is collapsed.
Click to expand it.
src/THcDC.cxx
+
12
−
1
View file @
6bd30070
...
...
@@ -191,6 +191,8 @@ THaAnalysisObject::EStatus THcDC::Init( const TDatime& date )
fPlaneCoeffs
[
ip
]
=
fPlanes
[
ip
]
->
GetPlaneCoef
();
}
fResiduals
=
new
Double_t
[
fNPlanes
];
// Replace with what we need for Hall C
// const DataDest tmp[NDEST] = {
// { &fRTNhit, &fRANhit, fRT, fRT_c, fRA, fRA_p, fRA_c, fROff, fRPed, fRGain },
...
...
@@ -333,7 +335,7 @@ Int_t THcDC::DefineVariables( EMode mode )
{
"y"
,
"Y at focal plane"
,
"fDCTracks.THcDCTrack.GetY()"
},
{
"xp"
,
"YP at focal plane"
,
"fDCTracks.THcDCTrack.GetXP()"
},
{
"yp"
,
"YP at focal plane"
,
"fDCTracks.THcDCTrack.GetYP()"
},
{
"
p1
residual"
,
"
Plane 1
Residual"
,
"f
DCTracks.THcDCTrack.Get
Residual
1()
"
},
{
"residual"
,
"Residual
s
"
,
"fResidual
s
"
},
{
0
}
};
return
DefineVarsFromList
(
vars
,
mode
);
...
...
@@ -406,6 +408,9 @@ void THcDC::ClearEvent()
fChambers
[
i
]
->
Clear
();
}
for
(
Int_t
i
=
0
;
i
<
fNPlanes
;
i
++
)
{
fResiduals
[
i
]
=
1000.0
;
}
// fTrackProj->Clear();
}
...
...
@@ -859,6 +864,12 @@ void THcDC::TrackFit()
}
}
}
if
(
fNDCTracks
>
0
)
{
for
(
Int_t
ip
=
0
;
ip
<
fNPlanes
;
ip
++
)
{
THcDCTrack
*
theDCTrack
=
static_cast
<
THcDCTrack
*>
(
fDCTracks
->
At
(
0
));
fResiduals
[
ip
]
=
theDCTrack
->
GetResidual
(
ip
);
}
}
// print tracks if hdebugtrackprint is on
}
Double_t
THcDC
::
DpsiFun
(
Double_t
ray
[
4
],
Int_t
plane
)
...
...
This diff is collapsed.
Click to expand it.
src/THcDC.h
+
6
−
5
View file @
6bd30070
...
...
@@ -80,14 +80,15 @@ protected:
TClonesArray
*
fDCTracks
;
// Tracks found from stubs (THcDCTrack obj)
// Calibration
// Hall C Parameters
Int_t
fNPlanes
;
// Total number of DC planes
char
**
fPlaneNames
;
Int_t
fNChambers
;
// Per-event data
Int_t
fNhits
;
Int_t
ntracks_fp
;
/* Change this to fN something */
// Potential Hall C parameters. Mostly here for demonstration
Int_t
fNPlanes
;
char
**
fPlaneNames
;
Int_t
fNChambers
;
Double_t
*
fResiduals
;
//[fNPlanes] Array of residuals
Double_t
fNSperChan
;
/* TDC bin size */
Double_t
fWireVelocity
;
...
...
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