Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
12
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
cepc
CEPCSW
Commits
e5deaab3
Commit
e5deaab3
authored
4 years ago
by
FU Chengdong
Browse files
Options
Downloads
Patches
Plain Diff
seperate pixel and strip by resolution
parent
be3226db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp
+9
-7
9 additions, 7 deletions
Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp
with
9 additions
and
7 deletions
Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp
+
9
−
7
View file @
e5deaab3
...
@@ -110,7 +110,9 @@ StatusCode PlanarDigiAlg::execute()
...
@@ -110,7 +110,9 @@ StatusCode PlanarDigiAlg::execute()
unsigned
int
thisSeed
=
_SEEDER
->
getSeed
(
this
,
_nEvt
,
0
);
unsigned
int
thisSeed
=
_SEEDER
->
getSeed
(
this
,
_nEvt
,
0
);
gsl_rng_set
(
_rng
,
thisSeed
)
;
gsl_rng_set
(
_rng
,
thisSeed
)
;
debug
()
<<
"seed set to "
<<
thisSeed
<<
endmsg
;
debug
()
<<
"seed set to "
<<
thisSeed
<<
endmsg
;
auto
trkhitVec
=
_outColHdl
.
createAndPut
();
auto
relCol
=
_outRelColHdl
.
createAndPut
();
//auto STHcol = _inColHdl.get();
//auto STHcol = _inColHdl.get();
//if ( STHcol == nullptr ) {
//if ( STHcol == nullptr ) {
// debug() << "Collection " << _inColHdl.fullKey() << " is unavailable in event " << _nEvt << endmsg;
// debug() << "Collection " << _inColHdl.fullKey() << " is unavailable in event " << _nEvt << endmsg;
...
@@ -133,9 +135,6 @@ StatusCode PlanarDigiAlg::execute()
...
@@ -133,9 +135,6 @@ StatusCode PlanarDigiAlg::execute()
unsigned
nCreatedHits
=
0
;
unsigned
nCreatedHits
=
0
;
unsigned
nDismissedHits
=
0
;
unsigned
nDismissedHits
=
0
;
auto
trkhitVec
=
_outColHdl
.
createAndPut
();
auto
relCol
=
_outRelColHdl
.
createAndPut
();
//CellIDEncoder<TrackerHitPlaneImpl> cellid_encoder( lcio::ILDCellID0::encoder_string , trkhitVec ) ;
//CellIDEncoder<TrackerHitPlaneImpl> cellid_encoder( lcio::ILDCellID0::encoder_string , trkhitVec ) ;
int
nSimHits
=
STHcol
->
size
()
;
int
nSimHits
=
STHcol
->
size
()
;
...
@@ -205,7 +204,10 @@ StatusCode PlanarDigiAlg::execute()
...
@@ -205,7 +204,10 @@ StatusCode PlanarDigiAlg::execute()
// << endmsg;
// << endmsg;
// continue;
// continue;
// }
// }
if
(
(
_resU
.
size
()
>
1
&&
layer
>
_resU
.
size
()
-
1
)
||
(
_resV
.
size
()
>
1
&&
layer
>
_resV
.
size
()
-
1
)
)
{
fatal
()
<<
"layer exceeds resolution vector, please check input parameters ResolutionU and ResolutionV"
<<
endmsg
;
return
StatusCode
::
FAILURE
;
}
float
resU
=
(
_resU
.
size
()
>
1
?
_resU
.
value
().
at
(
layer
)
:
_resU
.
value
().
at
(
0
)
)
;
float
resU
=
(
_resU
.
size
()
>
1
?
_resU
.
value
().
at
(
layer
)
:
_resU
.
value
().
at
(
0
)
)
;
float
resV
=
(
_resV
.
size
()
>
1
?
_resV
.
value
().
at
(
layer
)
:
_resV
.
value
().
at
(
0
)
)
;
float
resV
=
(
_resV
.
size
()
>
1
?
_resV
.
value
().
at
(
layer
)
:
_resV
.
value
().
at
(
0
)
)
;
...
@@ -267,7 +269,7 @@ StatusCode PlanarDigiAlg::execute()
...
@@ -267,7 +269,7 @@ StatusCode PlanarDigiAlg::execute()
}
}
// for 1D strip measurements: set v to 0! Only the measurement in u counts!
// for 1D strip measurements: set v to 0! Only the measurement in u counts!
if
(
_isStrip
)
localPointSmeared
[
1
]
=
0.
;
if
(
_isStrip
||
(
resU
!=
0
&&
resV
==
0
)
)
localPointSmeared
[
1
]
=
0.
;
// convert back to global position for TrackerHitPlaneImpl
// convert back to global position for TrackerHitPlaneImpl
CLHEP
::
Hep3Vector
globalPointSmeared
=
ms
->
getCoordinateSystem
()
->
getGlobalPoint
(
localPointSmeared
);
CLHEP
::
Hep3Vector
globalPointSmeared
=
ms
->
getCoordinateSystem
()
->
getGlobalPoint
(
localPointSmeared
);
...
@@ -324,7 +326,7 @@ StatusCode PlanarDigiAlg::execute()
...
@@ -324,7 +326,7 @@ StatusCode PlanarDigiAlg::execute()
else trkHit->setdV( resV ) ;
else trkHit->setdV( resV ) ;
*/
*/
trkHit
.
setType
(
8
);
trkHit
.
setType
(
8
);
if
(
_isStrip
){
if
(
_isStrip
||
(
resU
!=
0
&&
resV
==
0
)
){
trkHit
.
setType
(
UTIL
::
set_bit
(
trkHit
.
getType
()
,
UTIL
::
ILDTrkHitTypeBit
::
ONE_DIMENSIONAL
)
)
;
trkHit
.
setType
(
UTIL
::
set_bit
(
trkHit
.
getType
()
,
UTIL
::
ILDTrkHitTypeBit
::
ONE_DIMENSIONAL
)
)
;
}
}
...
...
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