Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
np
nptool
Commits
b83e5695
Commit
b83e5695
authored
Dec 06, 2016
by
moukaddam
Browse files
Adding variables/functions to handle time from TACS
parent
f579868d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
6 deletions
+38
-6
NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx
NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx
+23
-4
NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h
NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h
+3
-2
NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx
NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx
+11
-0
NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h
NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h
+1
-0
No files found.
NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx
View file @
b83e5695
...
...
@@ -99,7 +99,7 @@ void TFPDTamuPhysics::BuildPhysicalEvent() {
unsigned
int
mysizeT
=
m_PreTreatedData
->
Get_Micro_Time_Mult
();
for
(
UShort_t
t
=
0
;
t
<
mysizeT
;
t
++
)
{
MicroTime
.
push_back
(
m_EventData
->
Get_Micro_Time
(
t
));
MicroTime
OR
.
push_back
(
m_EventData
->
Get_Micro_Time
(
t
));
}
//AWire
...
...
@@ -203,6 +203,23 @@ void TFPDTamuPhysics::BuildPhysicalEvent() {
//m_PreTreatedData->Dump();
//cin.get();
}
//separate Left and right detectors
vector
<
double
>
PlastRightTime
,
PlastLeftTime
;
mysizeT
=
m_PreTreatedData
->
Get_Plast_Time_Mult
();
for
(
UShort_t
t
=
0
;
t
<
mysizeT
;
t
++
)
{
//collect info
int
side
=
m_PreTreatedData
->
Get_Plast_T_DetectorSide
(
t
);
double
time
=
m_PreTreatedData
->
Get_Plast_Time
(
t
);
// skip values lower than a certain threshold
if
(
time
<
0
)
continue
;
//redistribute
if
(
side
==
1
)
PlastRightTime
.
push_back
(
time
);
else
PlastLeftTime
.
push_back
(
time
);
}
/*
//model
// match energy and time together
...
...
@@ -494,7 +511,7 @@ void TFPDTamuPhysics::Clear() {
MicroPositionZ
.
clear
();
MicroCharge
.
clear
();
MicroEnergy
.
clear
();
MicroTime
.
clear
();
MicroTime
OR
.
clear
();
//Avalanche wire
AWireDetNumber
.
clear
();
AWireLeftCharge
.
clear
();
...
...
@@ -504,11 +521,11 @@ void TFPDTamuPhysics::Clear() {
//Plastic scintillator
PlastLeftCharge
.
clear
();
PlastRightCharge
.
clear
();
PlastTimeLeft
.
clear
();
PlastTimeRight
.
clear
();
PlastCharge
.
clear
();
PlastPositionX
.
clear
();
PlastPositionZ
.
clear
();
PlastTime
.
clear
();
//Calculated
PlastPositionX_AW
=
-
99
;
//from AWire and Plastic Z
IonDirection
.
SetXYZ
(
0
,
0
,
0
);
// from AWire
...
...
@@ -1138,6 +1155,8 @@ void TFPDTamuPhysics::InitializeRootInputPhysics() {
//Plastic scintillator
inputChain
->
SetBranchStatus
(
"PlastLeftCharge"
,
true
);
inputChain
->
SetBranchStatus
(
"PlastRightCharge"
,
true
);
inputChain
->
SetBranchStatus
(
"PlastLeftTime"
,
true
);
inputChain
->
SetBranchStatus
(
"PlastRightTime"
,
true
);
inputChain
->
SetBranchStatus
(
"PlastCharge"
,
true
);
inputChain
->
SetBranchStatus
(
"PlastPositionX"
,
true
);
inputChain
->
SetBranchStatus
(
"PlastPositionZ"
,
true
);
...
...
NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h
View file @
b83e5695
...
...
@@ -77,7 +77,7 @@ class TFPDTamuPhysics : public TObject, public NPL::VDetector {
vector
<
double
>
MicroPositionZ
;
vector
<
double
>
MicroCharge
;
vector
<
double
>
MicroEnergy
;
vector
<
double
>
MicroTime
;
vector
<
double
>
MicroTime
OR
;
//Avalanche wire
vector
<
int
>
AWireDetNumber
;
vector
<
double
>
AWireLeftCharge
;
...
...
@@ -87,10 +87,11 @@ class TFPDTamuPhysics : public TObject, public NPL::VDetector {
//Plastic scintillator
vector
<
double
>
PlastLeftCharge
;
vector
<
double
>
PlastRightCharge
;
vector
<
double
>
PlastTimeLeft
;
vector
<
double
>
PlastTimeRight
;
vector
<
double
>
PlastCharge
;
vector
<
double
>
PlastPositionX
;
vector
<
double
>
PlastPositionZ
;
vector
<
double
>
PlastTime
;
//Calculated AWire and Plastic
double
PlastPositionX_AW
;
...
...
NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx
View file @
b83e5695
...
...
@@ -97,6 +97,11 @@ void TGeTAMUPhysics::BuildPhysicalEvent(){
AddBack_Crystal
.
push_back
(
clv_crystal
[
clv
]);
AddBack_Segment
.
push_back
(
clv_segment
[
clv
]);
}
//Fill the time OR
for
(
unsigned
i
=
0
;
i
<
m_PreTreatedData
->
GetMultiplicityCoreT
();
i
++
)
GeTimeOR
.
push_back
(
m_PreTreatedData
->
GetCoreTime
(
i
));
}
/////////////////////////////////////////////////
...
...
@@ -108,6 +113,7 @@ void TGeTAMUPhysics::PreTreat(){
double
Eraw
,
Energy
;
double
Traw
,
Time
;
int
clover
,
crystal
,
segment
;
for
(
unsigned
int
i
=
0
;
i
<
mysizeE
;
i
++
){
Eraw
=
m_EventData
->
GetCoreEnergy
(
i
);
if
(
Eraw
>
0
){
...
...
@@ -118,6 +124,7 @@ void TGeTAMUPhysics::PreTreat(){
m_PreTreatedData
->
SetCoreE
(
clover
,
crystal
,
Energy
);
}
}
for
(
unsigned
int
i
=
0
;
i
<
mysizeT
;
i
++
){
Traw
=
m_EventData
->
GetCoreTime
(
i
);
if
(
Traw
>
0
){
...
...
@@ -140,6 +147,7 @@ void TGeTAMUPhysics::PreTreat(){
m_PreTreatedData
->
SetSegmentE
(
clover
,
crystal
,
Energy
);
}
}
mysizeT
=
m_EventData
->
GetMultiplicitySegmentT
();
for
(
unsigned
int
i
=
0
;
i
<
mysizeT
;
i
++
){
Traw
=
m_EventData
->
GetSegmentTime
(
i
);
...
...
@@ -151,6 +159,7 @@ void TGeTAMUPhysics::PreTreat(){
m_PreTreatedData
->
SetSegmentT
(
clover
,
crystal
,
Time
);
}
}
}
/////////////////////////////////////////////////
...
...
@@ -374,6 +383,8 @@ void TGeTAMUPhysics::Clear() {
AddBack_Clover
.
clear
();
AddBack_Crystal
.
clear
();
AddBack_Segment
.
clear
();
AddBack_T
.
clear
();
GeTimeOR
.
clear
();
}
///////////////////////////////////////////////////////////////////////////
void
TGeTAMUPhysics
::
ClearEventData
()
{
...
...
NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h
View file @
b83e5695
...
...
@@ -95,6 +95,7 @@ class TGeTAMUPhysics : public TObject, public NPL::VDetector{
vector
<
int
>
AddBack_Clover
;
vector
<
int
>
AddBack_Crystal
;
vector
<
int
>
AddBack_Segment
;
vector
<
double
>
GeTimeOR
;
// OR of all time signals, can be used for array or or clover only
private:
// use for anlysis
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment