Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
therwig committed Aug 15, 2023
1 parent 14e0d2e commit c5ee6c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Recon/include/Recon/DBScanClusterBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DBScanClusterBuilder {
float dist(const ldmx::CalorimeterHit * a, const ldmx::CalorimeterHit * b){
return sqrt( pow(a->getXPos() - b->getXPos(),2) // distance
+ pow(a->getYPos() - b->getYPos(),2)
+ pow(a->getZPos() - b->getZPos(),2)/clusterZBias_); // divide by the z bias
+ pow((a->getZPos() - b->getZPos())/clusterZBias_,2) ); // divide by the z bias
}

// specific verbosity of this producer
Expand Down
3 changes: 2 additions & 1 deletion Recon/src/Recon/PFTrackProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ void PFTrackProducer::produce(framework::Event& event) {
if(truthTracking_){
for(const auto &spHit : ecalSpHits){
if ( spHit.getTrackID()!=1 || fabs(240-spHit.getPosition()[2])>0.1 || spHit.getMomentum()[2] <= 0 ) continue;
if ( spHit.getPdgID() == 22 || spHit.getPdgID() == 2112 ) continue
pfTracks.push_back(spHit);
break;
}
Expand Down Expand Up @@ -62,4 +63,4 @@ void PFTrackProducer::onProcessEnd() {

} // namespace recon

DECLARE_PRODUCER_NS(recon, PFTrackProducer);
DECLARE_PRODUCER_NS(recon, PFTrackProducer);
5 changes: 3 additions & 2 deletions Recon/src/Recon/ParticleFlow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void ParticleFlow::produce(framework::Event& event) {
// std::vector<ldmx::PFCandidate> chargedMatch;
// std::vector<ldmx::PFCandidate> chargedUnmatch;
for(int i=0; i<tracks.size(); i++){
if (tracks[i].getPdgID()==22 || tracks[i].getPdgID()==2112) continue; // abandon build track if photon or neutron
//if (tracks[i].getPdgID()==22 || tracks[i].getPdgID()==2112) continue; // abandon build track if photon or neutron
ldmx::PFCandidate cand;
FillCandTrack(cand, tracks[i]); // append track info to candidate

Expand All @@ -258,7 +258,8 @@ void ParticleFlow::produce(framework::Event& event) {
// std::vector<ldmx::PFCandidate> emUnmatch;
for(int i=0; i<ecalClusters.size(); i++){
// already linked with ECal in the previous step
if((EMIsTkLinked[i]) && (!(tracks[i].getPdgID()==22 || tracks[i].getPdgID()==2112))) continue; // must also be charged for EMIsTkLinked to make sense
if(EMIsTkLinked[i]) continue;
//if((EMIsTkLinked[i]) && (!(tracks[i].getPdgID()==22 || tracks[i].getPdgID()==2112))) continue; // must also be charged for EMIsTkLinked to make sense

ldmx::PFCandidate cand;
FillCandEMCalo(cand, ecalClusters[i]);
Expand Down

0 comments on commit c5ee6c4

Please sign in to comment.