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
9
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
a669fa1e
Commit
a669fa1e
authored
4 years ago
by
zhangyao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
Add a number of DC digi cut in TruthTrackerAlg
parent
bc1f2275
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.cpp
+7
-4
7 additions, 4 deletions
Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.cpp
Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.h
+2
-1
2 additions, 1 deletion
Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.h
with
9 additions
and
5 deletions
Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.cpp
+
7
−
4
View file @
a669fa1e
...
@@ -22,7 +22,8 @@
...
@@ -22,7 +22,8 @@
DECLARE_COMPONENT
(
TruthTrackerAlg
)
DECLARE_COMPONENT
(
TruthTrackerAlg
)
TruthTrackerAlg
::
TruthTrackerAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
svcLoc
)
TruthTrackerAlg
::
TruthTrackerAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
svcLoc
)
:
GaudiAlgorithm
(
name
,
svcLoc
),
m_dd4hep
(
nullptr
),
m_gridDriftChamber
(
nullptr
),
m_decoder
(
nullptr
)
:
GaudiAlgorithm
(
name
,
svcLoc
),
m_dd4hep
(
nullptr
),
m_gridDriftChamber
(
nullptr
),
m_decoder
(
nullptr
)
{
{
declareProperty
(
"MCParticle"
,
m_mcParticleCol
,
declareProperty
(
"MCParticle"
,
m_mcParticleCol
,
"Handle of the input MCParticle collection"
);
"Handle of the input MCParticle collection"
);
...
@@ -34,7 +35,8 @@ TruthTrackerAlg::TruthTrackerAlg(const std::string& name, ISvcLocator* svcLoc)
...
@@ -34,7 +35,8 @@ TruthTrackerAlg::TruthTrackerAlg(const std::string& name, ISvcLocator* svcLoc)
"Handle of association collection"
);
"Handle of association collection"
);
declareProperty
(
"DCRecParticleCollection"
,
m_dcRecParticleCol
,
declareProperty
(
"DCRecParticleCollection"
,
m_dcRecParticleCol
,
"Handle of drift chamber reconstructed particle collection"
);
"Handle of drift chamber reconstructed particle collection"
);
declareProperty
(
"DCRecParticleAssociationCollection"
,
m_dcRecParticleAssociationCol
,
declareProperty
(
"DCRecParticleAssociationCollection"
,
m_dcRecParticleAssociationCol
,
"Handle of drift chamber reconstructed particle collection"
);
"Handle of drift chamber reconstructed particle collection"
);
declareProperty
(
"debug"
,
m_debug
=
false
);
declareProperty
(
"debug"
,
m_debug
=
false
);
}
}
...
@@ -90,6 +92,7 @@ StatusCode TruthTrackerAlg::execute()
...
@@ -90,6 +92,7 @@ StatusCode TruthTrackerAlg::execute()
debug
()
<<
"TrackerHitCollection not found"
<<
endmsg
;
debug
()
<<
"TrackerHitCollection not found"
<<
endmsg
;
//return StatusCode::SUCCESS;
//return StatusCode::SUCCESS;
}
}
if
((
int
)
digiDCHitsCol
->
size
()
>
m_maxDCDigiCut
)
return
StatusCode
::
SUCCESS
;
///Output Track collection
///Output Track collection
edm4hep
::
TrackCollection
*
dcTrackCol
=
m_dcTrackCol
.
createAndPut
();
edm4hep
::
TrackCollection
*
dcTrackCol
=
m_dcTrackCol
.
createAndPut
();
...
@@ -112,7 +115,7 @@ StatusCode TruthTrackerAlg::execute()
...
@@ -112,7 +115,7 @@ StatusCode TruthTrackerAlg::execute()
//if(fabs(mcParticle.getCharge()<1e-6) continue;//Skip neutral particles
//if(fabs(mcParticle.getCharge()<1e-6) continue;//Skip neutral particles
edm4hep
::
Vector3d
posV
=
mcParticle
.
getVertex
();
edm4hep
::
Vector3d
posV
=
mcParticle
.
getVertex
();
edm4hep
::
Vector3f
momV
=
mcParticle
.
getMomentum
();
//GeV
edm4hep
::
Vector3f
momV
=
mcParticle
.
getMomentum
();
//GeV
float
pos
[
3
]
=
{
posV
.
x
,
posV
.
y
,
posV
.
z
};
float
pos
[
3
]
=
{
(
float
)
posV
.
x
,
(
float
)
posV
.
y
,
(
float
)
posV
.
z
};
float
mom
[
3
]
=
{
momV
.
x
,
momV
.
y
,
momV
.
z
};
float
mom
[
3
]
=
{
momV
.
x
,
momV
.
y
,
momV
.
z
};
//FIXME
//FIXME
//pivotToFirstLayer(mcPocaPos,mcPocaMom,firstLayerPos,firstLayerMom);
//pivotToFirstLayer(mcPocaPos,mcPocaMom,firstLayerPos,firstLayerMom);
...
@@ -155,7 +158,7 @@ StatusCode TruthTrackerAlg::execute()
...
@@ -155,7 +158,7 @@ StatusCode TruthTrackerAlg::execute()
track
.
setNdf
(
digiDCHitsCol
->
size
()
-
5
);
track
.
setNdf
(
digiDCHitsCol
->
size
()
-
5
);
//track.setDEdx();//TODO
//track.setDEdx();//TODO
//track.setRadiusOfInnermostHit();//TODO
//track.setRadiusOfInnermostHit();//TODO
for
(
int
i
=
0
;
i
<
digiDCHitsCol
->
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
digiDCHitsCol
->
size
();
i
++
){
edm4hep
::
TrackerHit
digiDC
=
digiDCHitsCol
->
at
(
i
);
edm4hep
::
TrackerHit
digiDC
=
digiDCHitsCol
->
at
(
i
);
//if(Sim->MCParti!=current) continue;//TODO
//if(Sim->MCParti!=current) continue;//TODO
track
.
addToTrackerHits
(
digiDC
);
track
.
addToTrackerHits
(
digiDC
);
...
...
This diff is collapsed.
Click to expand it.
Reconstruction/Tracking/src/TruthTracker/TruthTrackerAlg.h
+
2
−
1
View file @
a669fa1e
...
@@ -59,7 +59,8 @@ class TruthTrackerAlg: public GaudiAlgorithm
...
@@ -59,7 +59,8 @@ class TruthTrackerAlg: public GaudiAlgorithm
Gaudi
::
Property
<
std
::
string
>
m_readout_name
{
this
,
"readout"
,
Gaudi
::
Property
<
std
::
string
>
m_readout_name
{
this
,
"readout"
,
"DriftChamberHitsCollection"
};
"DriftChamberHitsCollection"
};
Gaudi
::
Property
<
int
>
m_debug
{
this
,
"debug"
,
false
};
Gaudi
::
Property
<
int
>
m_debug
{
this
,
"debug"
,
false
};
Gaudi
::
Property
<
int
>
m_maxDCDigiCut
{
this
,
"maxDCDigiCut"
,
150
};
};
};
#endif
#endif
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