Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
Boole
Commits
f0897517
Commit
f0897517
authored
Oct 02, 2017
by
Jeroen van Tilburg
Browse files
Changed MCFTDepositCreator to determine air gap inefficiencies by Boole
parent
9c0e47bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
FT/FTDigitisation/src/MCFTDepositCreator.cpp
View file @
f0897517
...
...
@@ -120,31 +120,65 @@ std::tuple<LHCb::MCFTDeposits,LHCb::MCFTPhotons> MCFTDepositCreator::operator()(
for
(
const
LHCb
::
MCHit
*
mchit
:
*
mchits
){
// get sensDetID of MCHit
const
int
sensDetID
=
mchit
->
sensDetID
();
//const int sensDetID = mchit->sensDetID();
double
dZ
=
0.5
*
(
mchit
->
exit
().
z
()
-
mchit
->
entry
().
z
()
);
const
int
sensDetID
=
m_deFT
->
sensitiveVolumeID
(
Gaudi
::
XYZPoint
{
mchit
->
entry
().
x
(),
mchit
->
entry
().
y
(),
mchit
->
entry
().
z
()
+
dZ
});
const
int
sensDetID2
=
m_deFT
->
sensitiveVolumeID
(
Gaudi
::
XYZPoint
{
mchit
->
exit
().
x
(),
mchit
->
exit
().
y
(),
mchit
->
exit
().
z
()
-
dZ
});
if
(
sensDetID
!=
-
1
)
{
const
DeFTMat
*
mat_ptr
=
m_deFT
->
findMat
(
sensDetID
);
if
(
mat_ptr
==
nullptr
)
{
error
()
<<
"FT module not found for sensDetID = "
<<
sensDetID
<<
endmsg
;
return
returnContainers
;
}
const
DeFTMat
&
mat
=
*
mat_ptr
;
// choose which function to call depending on simulation type
switch
(
m_simulationType
){
case
SimulationType
::
detailed
:
convertHitToPhotons
(
mchit
,
mat
,
spill
.
first
,
photons
);
break
;
case
SimulationType
::
improved
:
convertHitToPhotons
(
mchit
,
mat
,
spill
.
first
,
photons
);
break
;
case
SimulationType
::
effective
:
convertHitToDepositsEffective
(
mchit
,
mat
,
spill
.
first
,
deposits
);
break
;
}
}
if
(
sensDetID2
!=
-
1
and
sensDetID
!=
sensDetID2
)
{
const
DeFTMat
*
mat_ptr
=
m_deFT
->
findMat
(
sensDetID2
);
if
(
mat_ptr
==
nullptr
)
{
error
()
<<
"FT module not found for sensDetID = "
<<
sensDetID
<<
endmsg
;
return
returnContainers
;
}
const
DeFTMat
&
mat
=
*
mat_ptr
;
// choose which function to call depending on simulation type
switch
(
m_simulationType
){
case
SimulationType
::
detailed
:
convertHitToPhotons
(
mchit
,
mat
,
spill
.
first
,
photons
);
break
;
case
SimulationType
::
improved
:
convertHitToPhotons
(
mchit
,
mat
,
spill
.
first
,
photons
);
break
;
case
SimulationType
::
effective
:
convertHitToDepositsEffective
(
mchit
,
mat
,
spill
.
first
,
deposits
);
break
;
}
}
// Check if sensDetID is filled and if a mat can be associated
if
(
sensDetID
==
-
1
)
{
if
(
sensDetID
==
-
1
and
sensDetID2
==
-
1
)
{
counter
(
"NbOfMissedMCHits"
)
+=
1
;
debug
()
<<
"Empty sensDetID of MCHit (happens <1 times/event)"
<<
endmsg
;
continue
;
}
const
DeFTMat
*
mat_ptr
=
m_deFT
->
findMat
(
sensDetID
);
if
(
mat_ptr
==
nullptr
)
{
error
()
<<
"FT module not found for sensDetID = "
<<
sensDetID
<<
endmsg
;
return
returnContainers
;
}
const
DeFTMat
&
mat
=
*
mat_ptr
;
// choose which function to call depending on simulation type
switch
(
m_simulationType
){
case
SimulationType
::
detailed
:
convertHitToPhotons
(
mchit
,
mat
,
spill
.
first
,
photons
);
break
;
case
SimulationType
::
improved
:
convertHitToPhotons
(
mchit
,
mat
,
spill
.
first
,
photons
);
break
;
case
SimulationType
::
effective
:
convertHitToDepositsEffective
(
mchit
,
mat
,
spill
.
first
,
deposits
);
break
;
}
}
// loop on hits
}
// loop on spills
...
...
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