Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
FU Chengdong
CEPCSW
Commits
5b10570e
Commit
5b10570e
authored
4 years ago
by
zhangyao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
rename default DCDigiCol name and remove ntuple
parent
72a5acc5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Digitisers/DCHDigi/src/DCHDigiAlg.cpp
+9
-11
9 additions, 11 deletions
Digitisers/DCHDigi/src/DCHDigiAlg.cpp
Digitisers/DCHDigi/src/DCHDigiAlg.h
+1
-1
1 addition, 1 deletion
Digitisers/DCHDigi/src/DCHDigiAlg.h
with
10 additions
and
12 deletions
Digitisers/DCHDigi/src/DCHDigiAlg.cpp
+
9
−
11
View file @
5b10570e
...
@@ -74,14 +74,12 @@ StatusCode DCHDigiAlg::initialize()
...
@@ -74,14 +74,12 @@ StatusCode DCHDigiAlg::initialize()
m_tuple
->
addItem
(
"dca"
,
m_n_digi
,
m_dca
).
ignore
();
m_tuple
->
addItem
(
"dca"
,
m_n_digi
,
m_dca
).
ignore
();
m_tuple
->
addItem
(
"hit_dE"
,
m_n_digi
,
m_hit_dE
).
ignore
();
m_tuple
->
addItem
(
"hit_dE"
,
m_n_digi
,
m_hit_dE
).
ignore
();
m_tuple
->
addItem
(
"hit_dE_dx"
,
m_n_digi
,
m_hit_dE_dx
).
ignore
();
m_tuple
->
addItem
(
"hit_dE_dx"
,
m_n_digi
,
m_hit_dE_dx
).
ignore
();
}
}
else
{
// did not manage to book the N tuple....
else
{
// did not manage to book the N tuple....
info
()
<<
" Cannot book N-tuple:"
<<
long
(
m_tuple
)
<<
endmsg
;
error
()
<<
" Cannot book N-tuple:"
<<
long
(
m_tuple
)
<<
endmsg
;
return
StatusCode
::
FAILURE
;
}
}
}
}
}
}
std
::
cout
<<
"DCHDigiAlg::initialized"
<<
std
::
endl
;
info
()
<<
"DCHDigiAlg::initialized"
<<
endmsg
;
return
GaudiAlgorithm
::
initialize
();
return
GaudiAlgorithm
::
initialize
();
}
}
...
@@ -93,7 +91,7 @@ StatusCode DCHDigiAlg::execute()
...
@@ -93,7 +91,7 @@ StatusCode DCHDigiAlg::execute()
edm4hep
::
TrackerHitCollection
*
Vec
=
w_DigiDCHCol
.
createAndPut
();
edm4hep
::
TrackerHitCollection
*
Vec
=
w_DigiDCHCol
.
createAndPut
();
edm4hep
::
MCRecoTrackerAssociationCollection
*
AssoVec
=
w_AssociationCol
.
createAndPut
();
edm4hep
::
MCRecoTrackerAssociationCollection
*
AssoVec
=
w_AssociationCol
.
createAndPut
();
const
edm4hep
::
SimTrackerHitCollection
*
SimHitCol
=
r_SimDCHCol
.
get
();
const
edm4hep
::
SimTrackerHitCollection
*
SimHitCol
=
r_SimDCHCol
.
get
();
std
::
cout
<<
"input sim hit size="
<<
SimHitCol
->
size
()
<<
std
::
endl
;
debug
()
<<
"input sim hit size="
<<
SimHitCol
->
size
()
<<
endmsg
;
for
(
int
i
=
0
;
i
<
SimHitCol
->
size
();
i
++
)
for
(
int
i
=
0
;
i
<
SimHitCol
->
size
();
i
++
)
{
{
edm4hep
::
SimTrackerHit
SimHit
=
SimHitCol
->
at
(
i
);
edm4hep
::
SimTrackerHit
SimHit
=
SimHitCol
->
at
(
i
);
...
@@ -110,7 +108,7 @@ StatusCode DCHDigiAlg::execute()
...
@@ -110,7 +108,7 @@ StatusCode DCHDigiAlg::execute()
id_hits_map
[
id
]
=
vhit
;
id_hits_map
[
id
]
=
vhit
;
}
}
}
}
if
(
m_WriteAna
){
if
(
m_WriteAna
&&
(
nullptr
!=
m_tuple
)
){
m_n_sim
=
0
;
m_n_sim
=
0
;
m_n_digi
=
0
;
m_n_digi
=
0
;
}
}
...
@@ -164,7 +162,7 @@ StatusCode DCHDigiAlg::execute()
...
@@ -164,7 +162,7 @@ StatusCode DCHDigiAlg::execute()
asso
.
setSim
(
iter
->
second
.
at
(
i
));
asso
.
setSim
(
iter
->
second
.
at
(
i
));
asso
.
setWeight
(
iter
->
second
.
at
(
i
).
getEDep
()
/
tot_edep
);
asso
.
setWeight
(
iter
->
second
.
at
(
i
).
getEDep
()
/
tot_edep
);
if
(
m_WriteAna
){
if
(
m_WriteAna
&&
(
nullptr
!=
m_tuple
)
){
m_simhit_x
[
m_n_sim
]
=
pos
.
x
();
m_simhit_x
[
m_n_sim
]
=
pos
.
x
();
m_simhit_y
[
m_n_sim
]
=
pos
.
y
();
m_simhit_y
[
m_n_sim
]
=
pos
.
y
();
m_simhit_z
[
m_n_sim
]
=
pos
.
z
();
m_simhit_z
[
m_n_sim
]
=
pos
.
z
();
...
@@ -178,7 +176,7 @@ StatusCode DCHDigiAlg::execute()
...
@@ -178,7 +176,7 @@ StatusCode DCHDigiAlg::execute()
trkHit
.
setPosition
(
edm4hep
::
Vector3d
(
pos_x
,
pos_y
,
pos_z
));
//position of closest sim hit
trkHit
.
setPosition
(
edm4hep
::
Vector3d
(
pos_x
,
pos_y
,
pos_z
));
//position of closest sim hit
trkHit
.
setCovMatrix
(
std
::
array
<
float
,
6
>
{
m_res_x
,
0
,
m_res_y
,
0
,
0
,
m_res_z
});
//cov(x,x) , cov(y,x) , cov(y,y) , cov(z,x) , cov(z,y) , cov(z,z) in mm
trkHit
.
setCovMatrix
(
std
::
array
<
float
,
6
>
{
m_res_x
,
0
,
m_res_y
,
0
,
0
,
m_res_z
});
//cov(x,x) , cov(y,x) , cov(y,y) , cov(z,x) , cov(z,y) , cov(z,z) in mm
if
(
m_WriteAna
){
if
(
m_WriteAna
&&
(
nullptr
!=
m_tuple
)
){
m_chamber
[
m_n_digi
]
=
chamber
;
m_chamber
[
m_n_digi
]
=
chamber
;
m_layer
[
m_n_digi
]
=
layer
;
m_layer
[
m_n_digi
]
=
layer
;
m_cell
[
m_n_digi
]
=
cellID
;
m_cell
[
m_n_digi
]
=
cellID
;
...
@@ -195,10 +193,10 @@ StatusCode DCHDigiAlg::execute()
...
@@ -195,10 +193,10 @@ StatusCode DCHDigiAlg::execute()
}
}
std
::
cout
<<
"output digi DCHhit size="
<<
Vec
->
size
()
<<
std
::
endl
;
debug
()
<<
"output digi DCHhit size="
<<
Vec
->
size
()
<<
endmsg
;
_nEvt
++
;
_nEvt
++
;
if
(
m_WriteAna
){
if
(
m_WriteAna
&&
(
nullptr
!=
m_tuple
)
){
StatusCode
status
=
m_tuple
->
write
();
StatusCode
status
=
m_tuple
->
write
();
if
(
status
.
isFailure
()
)
{
if
(
status
.
isFailure
()
)
{
error
()
<<
" Cannot fill N-tuple:"
<<
long
(
m_tuple
)
<<
endmsg
;
error
()
<<
" Cannot fill N-tuple:"
<<
long
(
m_tuple
)
<<
endmsg
;
...
...
This diff is collapsed.
Click to expand it.
Digitisers/DCHDigi/src/DCHDigiAlg.h
+
1
−
1
View file @
5b10570e
...
@@ -81,7 +81,7 @@ protected:
...
@@ -81,7 +81,7 @@ protected:
// Input collections
// Input collections
DataHandle
<
edm4hep
::
SimTrackerHitCollection
>
r_SimDCHCol
{
"DriftChamberHitsCollection"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
DataHandle
<
edm4hep
::
SimTrackerHitCollection
>
r_SimDCHCol
{
"DriftChamberHitsCollection"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
// Output collections
// Output collections
DataHandle
<
edm4hep
::
TrackerHitCollection
>
w_DigiDCHCol
{
"DigiDCHit
s
Collection"
,
Gaudi
::
DataHandle
::
Writer
,
this
};
DataHandle
<
edm4hep
::
TrackerHitCollection
>
w_DigiDCHCol
{
"DigiDCHitCollection"
,
Gaudi
::
DataHandle
::
Writer
,
this
};
DataHandle
<
edm4hep
::
MCRecoTrackerAssociationCollection
>
w_AssociationCol
{
"DCHitAssociationCollection"
,
Gaudi
::
DataHandle
::
Writer
,
this
};
DataHandle
<
edm4hep
::
MCRecoTrackerAssociationCollection
>
w_AssociationCol
{
"DCHitAssociationCollection"
,
Gaudi
::
DataHandle
::
Writer
,
this
};
};
};
...
...
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