Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
np
nptool
Commits
e8ccf3e0
Commit
e8ccf3e0
authored
7 years ago
by
Greg Christian
Browse files
Options
Downloads
Patches
Plain Diff
Added code to allow disabling of ring+sector matching.
parent
c3f716d2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx
+45
-14
45 additions, 14 deletions
NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx
with
45 additions
and
14 deletions
NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx
+
45
−
14
View file @
e8ccf3e0
...
@@ -250,20 +250,51 @@ vector < TVector2 > TTiaraHyballPhysics :: Match_Ring_Sector(){
...
@@ -250,20 +250,51 @@ vector < TVector2 > TTiaraHyballPhysics :: Match_Ring_Sector(){
unsigned
int
sizeR
=
m_PreTreatedData
->
GetRingEMult
();
unsigned
int
sizeR
=
m_PreTreatedData
->
GetRingEMult
();
unsigned
int
sizeS
=
m_PreTreatedData
->
GetSectorEMult
();
unsigned
int
sizeS
=
m_PreTreatedData
->
GetSectorEMult
();
for
(
unsigned
int
i
=
0
;
i
<
sizeR
;
i
++
)
{
// GAC - 02122018
for
(
unsigned
int
j
=
0
;
j
<
sizeS
;
j
++
){
// If StripEnergyMatchingNumberOfSigma is set to zero,
// if same detector check energy
// do not require ring+sector matching
if
(
m_PreTreatedData
->
GetRingEDetectorNbr
(
i
)
==
m_PreTreatedData
->
GetSectorEDetectorNbr
(
j
)
){
if
(
m_StripEnergyMatchingNumberOfSigma
==
0
){
// Look if energy match
// Check whether it's ring or sector we're getting the energy from
if
(
abs
(
(
m_PreTreatedData
->
GetRingEEnergy
(
i
)
-
m_PreTreatedData
->
GetSectorEEnergy
(
j
))
/
2.
)
//
<
m_StripEnergyMatchingNumberOfSigma
*
m_StripEnergyMatchingSigma
)
{
if
(
m_Take_E_Ring_Sector_Average
){
ArrayOfGoodCouple
.
push_back
(
TVector2
(
i
,
j
)
)
;
// Incompatible option - can't average w/o both ring+sector
}
std
::
cerr
<<
"ERROR - Can't take ring and sector average without ring+sector matching
\n
"
}
<<
"Either set STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA > 0
\n
OR"
}
<<
"set TAKE_E_RING or TAKE_E_SECTOR in config/ConfigTiaraHyball.dat
\n
"
;
}
exit
(
1
);
// Prevent to treat event with ambiguous matchin beetween X and Y
}
if
(
ArrayOfGoodCouple
.
size
()
>
m_PreTreatedData
->
GetRingEMult
()
)
ArrayOfGoodCouple
.
clear
()
;
else
if
(
m_Take_E_Ring
){
// Take energy from ring only
for
(
unsigned
int
i
=
0
;
i
<
sizeR
;
i
++
)
{
// n.b. - sector number ignored
ArrayOfGoodCouple
.
push_back
(
TVector2
(
i
,
0
)
)
;
}
}
else
{
// Take energy from sector only
for
(
unsigned
int
j
=
0
;
j
<
sizeS
;
j
++
)
{
// n.b. - ring number ignored
ArrayOfGoodCouple
.
push_back
(
TVector2
(
0
,
j
)
)
;
}
}
}
else
{
// Standard case with ring+sector matching
for
(
unsigned
int
i
=
0
;
i
<
sizeR
;
i
++
)
{
for
(
unsigned
int
j
=
0
;
j
<
sizeS
;
j
++
){
// if same detector check energy
if
(
m_PreTreatedData
->
GetRingEDetectorNbr
(
i
)
==
m_PreTreatedData
->
GetSectorEDetectorNbr
(
j
)
){
// Look if energy match
if
(
abs
(
(
m_PreTreatedData
->
GetRingEEnergy
(
i
)
-
m_PreTreatedData
->
GetSectorEEnergy
(
j
))
/
2.
)
<
m_StripEnergyMatchingNumberOfSigma
*
m_StripEnergyMatchingSigma
)
{
ArrayOfGoodCouple
.
push_back
(
TVector2
(
i
,
j
)
)
;
}
}
}
}
// Prevent to treat event with ambiguous matchin beetween X and Y
if
(
ArrayOfGoodCouple
.
size
()
>
m_PreTreatedData
->
GetRingEMult
()
)
ArrayOfGoodCouple
.
clear
()
;
}
return
ArrayOfGoodCouple
;
return
ArrayOfGoodCouple
;
}
}
...
...
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