Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
97678b52
Commit
97678b52
authored
6 years ago
by
Stephen A. Wood
Committed by
Stephen Wood
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Save readout side information in THcDCWire objects
Determine readout side in THcDriftChamberPlane at initialization time.
parent
c30ccb09
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/THcDCHit.h
+1
-84
1 addition, 84 deletions
src/THcDCHit.h
src/THcDCWire.h
+6
-2
6 additions, 2 deletions
src/THcDCWire.h
src/THcDriftChamberPlane.cxx
+82
-1
82 additions, 1 deletion
src/THcDriftChamberPlane.cxx
src/THcDriftChamberPlane.h
+2
-1
2 additions, 1 deletion
src/THcDriftChamberPlane.h
with
91 additions
and
88 deletions
src/THcDCHit.h
+
1
−
84
View file @
97678b52
...
@@ -58,90 +58,7 @@ public:
...
@@ -58,90 +58,7 @@ public:
Int_t
GetChamberNum
()
const
{
return
fWirePlane
->
GetChamberNum
();
}
Int_t
GetChamberNum
()
const
{
return
fWirePlane
->
GetChamberNum
();
}
void
SetCorrectedStatus
(
Int_t
c
)
{
fCorrected
=
c
;
}
void
SetCorrectedStatus
(
Int_t
c
)
{
fCorrected
=
c
;
}
Int_t
GetReadoutSide
()
{
Int_t
GetReadoutSide
()
{
return
(
fWire
->
GetReadoutSide
());
}
Int_t
pln
=
fWirePlane
->
GetPlaneNum
();
Int_t
tb
=
fWirePlane
->
GetReadoutTB
();
Int_t
wn
=
fWire
->
GetNum
();
Int_t
version
=
fWirePlane
->
GetVersion
();
//if new HMS
if
(
version
==
1
)
{
if
((
pln
>=
3
&&
pln
<=
4
)
||
(
pln
>=
9
&&
pln
<=
10
))
{
if
(
tb
>
0
)
{
if
(
wn
<
60
)
{
fReadoutSide
=
2
;
}
else
{
fReadoutSide
=
4
;
}
}
else
{
if
(
wn
<
44
)
{
fReadoutSide
=
4
;
}
else
{
fReadoutSide
=
2
;
}
}
}
else
{
if
(
tb
>
0
)
{
if
(
wn
<
51
)
{
fReadoutSide
=
2
;
}
else
if
(
wn
>=
51
&&
wn
<=
64
)
{
fReadoutSide
=
1
;
}
else
{
fReadoutSide
=
4
;
}
}
else
{
if
(
wn
<
33
)
{
fReadoutSide
=
4
;
}
else
if
(
wn
>=
33
&&
wn
<=
46
)
{
fReadoutSide
=
1
;
}
else
{
fReadoutSide
=
2
;
}
}
}
}
else
{
//appplies SHMS DC configuration
//check if x board
if
((
pln
>=
3
&&
pln
<=
4
)
||
(
pln
>=
9
&&
pln
<=
10
))
{
if
(
tb
>
0
)
{
if
(
wn
<
49
)
{
fReadoutSide
=
4
;
}
else
{
fReadoutSide
=
2
;
}
}
else
{
if
(
wn
<
33
)
{
fReadoutSide
=
2
;
}
else
{
fReadoutSide
=
4
;
}
}
}
else
{
//else is u board
if
(
tb
>
0
)
{
if
(
wn
<
41
)
{
fReadoutSide
=
4
;
}
else
if
(
wn
>=
41
&&
wn
<=
63
)
{
fReadoutSide
=
3
;
}
else
if
(
wn
>=
64
&&
wn
<=
69
)
{
fReadoutSide
=
1
;
}
else
{
fReadoutSide
=
2
;
}
}
else
{
if
(
wn
<
39
)
{
fReadoutSide
=
2
;
}
else
if
(
wn
>=
39
&&
wn
<=
44
)
{
fReadoutSide
=
1
;
}
else
if
(
wn
>=
45
&&
wn
<=
67
)
{
fReadoutSide
=
3
;
}
else
{
fReadoutSide
=
4
;
}
}
}
}
return
fReadoutSide
;
}
protected
:
protected
:
static
const
Double_t
kBig
;
//!
static
const
Double_t
kBig
;
//!
...
...
This diff is collapsed.
Click to expand it.
src/THcDCWire.h
+
6
−
2
View file @
97678b52
...
@@ -15,8 +15,10 @@ class THcDCWire : public TObject {
...
@@ -15,8 +15,10 @@ class THcDCWire : public TObject {
public:
public:
THcDCWire
(
Int_t
num
=
0
,
Double_t
pos
=
0.0
,
Double_t
offset
=
0.0
,
Double_t
sigma
=
0.0
,
THcDCWire
(
Int_t
num
=
0
,
Double_t
pos
=
0.0
,
Double_t
offset
=
0.0
,
Double_t
sigma
=
0.0
,
THcDCTimeToDistConv
*
ttd
=
NULL
)
:
Int_t
readoutside
=
0
,
fNum
(
num
),
fFlag
(
0
),
fPos
(
pos
),
fTOffset
(
offset
),
fSigmaWire
(
sigma
),
fTTDConv
(
ttd
)
{}
THcDCTimeToDistConv
*
ttd
=
NULL
)
:
fNum
(
num
),
fFlag
(
0
),
fPos
(
pos
),
fTOffset
(
offset
),
fSigmaWire
(
sigma
),
fReadoutSide
(
readoutside
),
fTTDConv
(
ttd
)
{}
virtual
~
THcDCWire
()
{}
virtual
~
THcDCWire
()
{}
// Get and Set Functions
// Get and Set Functions
...
@@ -25,6 +27,7 @@ public:
...
@@ -25,6 +27,7 @@ public:
Double_t
GetPos
()
const
{
return
fPos
;
}
Double_t
GetPos
()
const
{
return
fPos
;
}
Double_t
GetTOffset
()
const
{
return
fTOffset
;
}
Double_t
GetTOffset
()
const
{
return
fTOffset
;
}
Double_t
GetSigma
()
const
{
return
fSigmaWire
;
}
Double_t
GetSigma
()
const
{
return
fSigmaWire
;
}
Int_t
GetReadoutSide
()
{
return
fReadoutSide
;
}
THcDCTimeToDistConv
*
GetTTDConv
()
{
return
fTTDConv
;
}
THcDCTimeToDistConv
*
GetTTDConv
()
{
return
fTTDConv
;
}
void
SetNum
(
Int_t
num
)
{
fNum
=
num
;}
void
SetNum
(
Int_t
num
)
{
fNum
=
num
;}
...
@@ -40,6 +43,7 @@ protected:
...
@@ -40,6 +43,7 @@ protected:
Double_t
fPos
;
//Position within the plane
Double_t
fPos
;
//Position within the plane
Double_t
fTOffset
;
//Timing Offset
Double_t
fTOffset
;
//Timing Offset
Double_t
fSigmaWire
;
//Added SIgma per Wire --Carlos
Double_t
fSigmaWire
;
//Added SIgma per Wire --Carlos
Int_t
fReadoutSide
;
// Side where wire is read out. 1-4 is T/R/B/L from beam view for new chambers.
THcDCTimeToDistConv
*
fTTDConv
;
//!Time to Distance Converter
THcDCTimeToDistConv
*
fTTDConv
;
//!Time to Distance Converter
private
:
private
:
...
...
This diff is collapsed.
Click to expand it.
src/THcDriftChamberPlane.cxx
+
82
−
1
View file @
97678b52
...
@@ -256,7 +256,8 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date )
...
@@ -256,7 +256,8 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date )
for
(
int
i
=
0
;
i
<
nWires
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nWires
;
i
++
)
{
Double_t
pos
=
fPitch
*
(
(
fWireOrder
==
0
?
(
i
+
1
)
:
fNWires
-
i
)
Double_t
pos
=
fPitch
*
(
(
fWireOrder
==
0
?
(
i
+
1
)
:
fNWires
-
i
)
-
fCentralWire
)
-
fCenter
;
-
fCentralWire
)
-
fCenter
;
new
((
*
fWires
)[
i
])
THcDCWire
(
i
+
1
,
pos
,
fTzeroWire
[
i
],
fSigmaWire
[
i
],
fTTDConv
);
//added fTzeroWire/fSigmaWire to be read in as fTOffset --Carlos
Int_t
readoutside
=
GetReadoutSide
(
i
+
1
);
new
((
*
fWires
)[
i
])
THcDCWire
(
i
+
1
,
pos
,
fTzeroWire
[
i
],
fSigmaWire
[
i
],
readoutside
,
fTTDConv
);
//added fTzeroWire/fSigmaWire to be read in as fTOffset --Carlos
}
}
THaApparatus
*
app
=
GetApparatus
();
THaApparatus
*
app
=
GetApparatus
();
...
@@ -388,3 +389,83 @@ Int_t THcDriftChamberPlane::SubtractStartTime()
...
@@ -388,3 +389,83 @@ Int_t THcDriftChamberPlane::SubtractStartTime()
}
}
return
0
;
return
0
;
}
}
Int_t
THcDriftChamberPlane
::
GetReadoutSide
(
Int_t
wirenum
)
{
Int_t
readoutside
;
//if new HMS
if
(
fVersion
==
1
)
{
if
((
fPlaneNum
>=
3
&&
fPlaneNum
<=
4
)
||
(
fPlaneNum
>=
9
&&
fPlaneNum
<=
10
))
{
if
(
fReadoutTB
>
0
)
{
if
(
wirenum
<
60
)
{
readoutside
=
2
;
}
else
{
readoutside
=
4
;
}
}
else
{
if
(
wirenum
<
44
)
{
readoutside
=
4
;
}
else
{
readoutside
=
2
;
}
}
}
else
{
if
(
fReadoutTB
>
0
)
{
if
(
wirenum
<
51
)
{
readoutside
=
2
;
}
else
if
(
wirenum
>=
51
&&
wirenum
<=
64
)
{
readoutside
=
1
;
}
else
{
readoutside
=
4
;
}
}
else
{
if
(
wirenum
<
33
)
{
readoutside
=
4
;
}
else
if
(
wirenum
>=
33
&&
wirenum
<=
46
)
{
readoutside
=
1
;
}
else
{
readoutside
=
2
;
}
}
}
}
else
{
//appplies SHMS DC configuration
//check if x board
if
((
fPlaneNum
>=
3
&&
fPlaneNum
<=
4
)
||
(
fPlaneNum
>=
9
&&
fPlaneNum
<=
10
))
{
if
(
fReadoutTB
>
0
)
{
if
(
wirenum
<
49
)
{
readoutside
=
4
;
}
else
{
readoutside
=
2
;
}
}
else
{
if
(
wirenum
<
33
)
{
readoutside
=
2
;
}
else
{
readoutside
=
4
;
}
}
}
else
{
//else is u board
if
(
fReadoutTB
>
0
)
{
if
(
wirenum
<
41
)
{
readoutside
=
4
;
}
else
if
(
wirenum
>=
41
&&
wirenum
<=
63
)
{
readoutside
=
3
;
}
else
if
(
wirenum
>=
64
&&
wirenum
<=
69
)
{
readoutside
=
1
;
}
else
{
readoutside
=
2
;
}
}
else
{
if
(
wirenum
<
39
)
{
readoutside
=
2
;
}
else
if
(
wirenum
>=
39
&&
wirenum
<=
44
)
{
readoutside
=
1
;
}
else
if
(
wirenum
>=
45
&&
wirenum
<=
67
)
{
readoutside
=
3
;
}
else
{
readoutside
=
4
;
}
}
}
}
return
(
readoutside
);
}
This diff is collapsed.
Click to expand it.
src/THcDriftChamberPlane.h
+
2
−
1
View file @
97678b52
...
@@ -44,7 +44,8 @@ public:
...
@@ -44,7 +44,8 @@ public:
virtual
Int_t
SubtractStartTime
();
virtual
Int_t
SubtractStartTime
();
virtual
Int_t
GetReadoutSide
(
Int_t
wirenum
);
// Get and Set functions
// Get and Set functions
Int_t
GetNWires
()
const
{
return
fWires
->
GetLast
()
+
1
;
}
Int_t
GetNWires
()
const
{
return
fWires
->
GetLast
()
+
1
;
}
THcDCWire
*
GetWire
(
Int_t
i
)
const
THcDCWire
*
GetWire
(
Int_t
i
)
const
...
...
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