Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Project Juggler
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
EIC
Project Juggler
Commits
12b608ce
Commit
12b608ce
authored
3 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
SmearedFarForwardParticles.cpp: set m_ionBeamEnergy based on input mcparticles proton with status 4
parent
d8ddcd0f
No related branches found
No related tags found
1 merge request
!361
SmearedFarForwardParticles.cpp: set m_ionBeamEnergy based on input mcparticles proton with status 4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
JugFast/src/components/SmearedFarForwardParticles.cpp
+37
-11
37 additions, 11 deletions
JugFast/src/components/SmearedFarForwardParticles.cpp
with
37 additions
and
11 deletions
JugFast/src/components/SmearedFarForwardParticles.cpp
+
37
−
11
View file @
12b608ce
...
@@ -39,7 +39,7 @@ public:
...
@@ -39,7 +39,7 @@ public:
Gaudi
::
Property
<
bool
>
m_enableOMD
{
this
,
"enableOMD"
,
true
};
Gaudi
::
Property
<
bool
>
m_enableOMD
{
this
,
"enableOMD"
,
true
};
// Beam energy, only used to determine the RP/OMD momentum ranges
// Beam energy, only used to determine the RP/OMD momentum ranges
Gaudi
::
Property
<
double
>
m_ionBeamEnergy
{
this
,
"ionBeamEnergy"
,
10
0.
};
Gaudi
::
Property
<
double
>
m_ionBeamEnergy
{
this
,
"ionBeamEnergy"
,
0.
};
// RP default to 10-on-100 setting
// RP default to 10-on-100 setting
// Pz > 60% of beam energy (60% x 100GeV = 60GeV)
// Pz > 60% of beam energy (60% x 100GeV = 60GeV)
// theta from 0.2mrad -> 5mrad
// theta from 0.2mrad -> 5mrad
...
@@ -94,18 +94,44 @@ public:
...
@@ -94,18 +94,44 @@ public:
const
auto
&
mc
=
*
(
m_inputParticles
.
get
());
const
auto
&
mc
=
*
(
m_inputParticles
.
get
());
auto
&
rc
=
*
(
m_outputParticles
.
createAndPut
());
auto
&
rc
=
*
(
m_outputParticles
.
createAndPut
());
double
ionBeamEnergy
=
0
;
if
(
m_ionBeamEnergy
>
0
)
{
ionBeamEnergy
=
m_ionBeamEnergy
;
}
else
{
for
(
const
auto
&
part
:
mc
)
{
if
(
part
.
genStatus
()
==
4
&&
part
.
pdgID
()
==
2212
)
{
auto
E
=
std
::
hypot
(
part
.
ps
().
mag
(),
part
.
mass
());
if
(
33
<
E
&&
E
<
50
)
{
ionBeamEnergy
=
41
;
}
else
if
(
80
<
E
&&
E
<
120
)
{
ionBeamEnergy
=
100
;
}
else
if
(
220
<
E
&&
E
<
330
)
{
ionBeamEnergy
=
275
;
}
else
{
warning
()
<<
"Ion beam energy "
<<
E
<<
" not a standard setting."
<<
endmsg
;
ionBeamEnergy
=
E
;
}
break
;
}
}
if
(
ionBeamEnergy
==
0
)
{
warning
()
<<
"No incoming ion beam; using 100 GeV ion beam energy."
<<
endmsg
;
ionBeamEnergy
=
100
;
}
}
std
::
vector
<
std
::
vector
<
RecData
>>
rc_parts
;
std
::
vector
<
std
::
vector
<
RecData
>>
rc_parts
;
if
(
m_enableZDC
)
{
if
(
m_enableZDC
)
{
rc_parts
.
push_back
(
zdc
(
mc
));
rc_parts
.
push_back
(
zdc
(
mc
,
ionBeamEnergy
));
}
}
if
(
m_enableRP
)
{
if
(
m_enableRP
)
{
rc_parts
.
push_back
(
rp
(
mc
));
rc_parts
.
push_back
(
rp
(
mc
,
ionBeamEnergy
));
}
}
if
(
m_enableB0
)
{
if
(
m_enableB0
)
{
rc_parts
.
push_back
(
b0
(
mc
));
rc_parts
.
push_back
(
b0
(
mc
,
ionBeamEnergy
));
}
}
if
(
m_enableOMD
)
{
if
(
m_enableOMD
)
{
rc_parts
.
push_back
(
omd
(
mc
));
rc_parts
.
push_back
(
omd
(
mc
,
ionBeamEnergy
));
}
}
for
(
const
auto
&
det
:
rc_parts
)
{
for
(
const
auto
&
det
:
rc_parts
)
{
for
(
const
auto
&
part
:
det
)
{
for
(
const
auto
&
part
:
det
)
{
...
@@ -118,7 +144,7 @@ public:
...
@@ -118,7 +144,7 @@ public:
private
:
private
:
// ZDC smearing as in eic_smear
// ZDC smearing as in eic_smear
// https://github.com/eic/eicsmeardetectors/blob/9a1831dd97bf517b80a06043b9ee4bfb96b483d8/SmearMatrixDetector_0_1_FF.cxx#L224
// https://github.com/eic/eicsmeardetectors/blob/9a1831dd97bf517b80a06043b9ee4bfb96b483d8/SmearMatrixDetector_0_1_FF.cxx#L224
std
::
vector
<
RecData
>
zdc
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
)
{
std
::
vector
<
RecData
>
zdc
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
,
const
double
ionBeamEnergy
)
{
std
::
vector
<
RecData
>
rc
;
std
::
vector
<
RecData
>
rc
;
for
(
const
auto
&
part
:
mc
)
{
for
(
const
auto
&
part
:
mc
)
{
if
(
part
.
genStatus
()
>
1
)
{
if
(
part
.
genStatus
()
>
1
)
{
...
@@ -191,7 +217,7 @@ private:
...
@@ -191,7 +217,7 @@ private:
}
}
// Fast B0 as in
// Fast B0 as in
// https://github.com/eic/eicsmeardetectors/blob/9a1831dd97bf517b80a06043b9ee4bfb96b483d8/SmearMatrixDetector_0_1_FF.cxx#L254
// https://github.com/eic/eicsmeardetectors/blob/9a1831dd97bf517b80a06043b9ee4bfb96b483d8/SmearMatrixDetector_0_1_FF.cxx#L254
std
::
vector
<
RecData
>
b0
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
)
{
std
::
vector
<
RecData
>
b0
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
,
const
double
ionBeamEnergy
)
{
std
::
vector
<
RecData
>
rc
;
std
::
vector
<
RecData
>
rc
;
for
(
const
auto
&
part
:
mc
)
{
for
(
const
auto
&
part
:
mc
)
{
if
(
part
.
genStatus
()
>
1
)
{
if
(
part
.
genStatus
()
>
1
)
{
...
@@ -231,7 +257,7 @@ private:
...
@@ -231,7 +257,7 @@ private:
return
rc
;
return
rc
;
}
}
std
::
vector
<
RecData
>
rp
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
)
{
std
::
vector
<
RecData
>
rp
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
,
const
double
ionBeamEnergy
)
{
std
::
vector
<
RecData
>
rc
;
std
::
vector
<
RecData
>
rc
;
for
(
const
auto
&
part
:
mc
)
{
for
(
const
auto
&
part
:
mc
)
{
if
(
part
.
genStatus
()
>
1
)
{
if
(
part
.
genStatus
()
>
1
)
{
...
@@ -246,7 +272,7 @@ private:
...
@@ -246,7 +272,7 @@ private:
}
}
const
auto
mom_ion
=
removeCrossingAngle
(
part
.
ps
());
//rotateLabToIonDirection(part.ps());
const
auto
mom_ion
=
removeCrossingAngle
(
part
.
ps
());
//rotateLabToIonDirection(part.ps());
if
(
mom_ion
.
theta
()
<
m_thetaMinRP
||
mom_ion
.
theta
()
>
m_thetaMaxRP
||
if
(
mom_ion
.
theta
()
<
m_thetaMinRP
||
mom_ion
.
theta
()
>
m_thetaMaxRP
||
mom_ion
.
z
<
m_pMinRigidityRP
*
m_
ionBeamEnergy
)
{
mom_ion
.
z
<
m_pMinRigidityRP
*
ionBeamEnergy
)
{
continue
;
continue
;
}
}
auto
rc_part
=
smearMomentum
(
part
);
auto
rc_part
=
smearMomentum
(
part
);
...
@@ -264,7 +290,7 @@ private:
...
@@ -264,7 +290,7 @@ private:
return
rc
;
return
rc
;
}
}
std
::
vector
<
RecData
>
omd
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
)
{
std
::
vector
<
RecData
>
omd
(
const
dd4pod
::
Geant4ParticleCollection
&
mc
,
const
double
ionBeamEnergy
)
{
std
::
vector
<
RecData
>
rc
;
std
::
vector
<
RecData
>
rc
;
for
(
const
auto
&
part
:
mc
)
{
for
(
const
auto
&
part
:
mc
)
{
if
(
part
.
genStatus
()
>
1
)
{
if
(
part
.
genStatus
()
>
1
)
{
...
@@ -278,7 +304,7 @@ private:
...
@@ -278,7 +304,7 @@ private:
continue
;
continue
;
}
}
const
auto
mom_ion
=
removeCrossingAngle
(
part
.
ps
());
//rotateLabToIonDirection(part.ps());
const
auto
mom_ion
=
removeCrossingAngle
(
part
.
ps
());
//rotateLabToIonDirection(part.ps());
if
(
mom_ion
.
z
<
m_pMinRigidityOMD
*
m_
ionBeamEnergy
||
mom_ion
.
z
>
m_pMaxRigidityOMD
*
m_
ionBeamEnergy
)
{
if
(
mom_ion
.
z
<
m_pMinRigidityOMD
*
ionBeamEnergy
||
mom_ion
.
z
>
m_pMaxRigidityOMD
*
ionBeamEnergy
)
{
continue
;
continue
;
}
}
// angle cut
// angle cut
...
...
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