From d747509626687dd4a53cd5e109da9694a29446f5 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 24 Jul 2013 12:01:20 +0200 Subject: [PATCH 1/2] Switch from triplet only tracks to all tracks, to avoid problems with tracking particles (and b/c it makes more sense) --- Validation/RecoHI/plugins/HitPixelLayersTPSelector.h | 6 ++++-- .../RecoHI/python/TrackValidationHeavyIons_cff.py | 12 ++++++------ Validation/RecoHI/python/selectSimTracks_cff.py | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h b/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h index 4a84d5c712c2d..aac9abec2ba6b 100644 --- a/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h +++ b/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h @@ -96,7 +96,7 @@ class HitPixelLayersTPSelector std::vector pixelHitPattern( const TrackingParticleRef& simTrack, const TrackerTopology *tTopo ) { std::vector hitpattern(5,false); // PXB 0,1,2 PXF 0,1 - + /* #warning "This file has been modified just to get it to compile without any regard as to whether it still functions as intended" #ifdef REMOVED_JUST_TO_GET_IT_TO_COMPILE__THIS_CODE_NEEDS_TO_BE_CHECKED for(std::vector::const_iterator simHit = simTrack->pSimHit_begin();simHit!= simTrack->pSimHit_end();simHit++){ @@ -114,7 +114,9 @@ class HitPixelLayersTPSelector }// end simhit loop #endif - + */ + // Indeed this no longer functions as intended, but this code should no longer be accessed, since tripletSeedOnly_ has been changed to False. We will clean up when we figure out how to do this properly - Matt Nguyen, 24/7/2013 + return hitpattern; } diff --git a/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py b/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py index 0e13257daf20a..060ffe6bf13ed 100644 --- a/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py +++ b/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py @@ -24,7 +24,7 @@ # setup multi-track validator from Validation.RecoTrack.MultiTrackValidator_cff import * hiTrackValidator = multiTrackValidator.clone( - label_tp_effic = cms.InputTag("findableSimTracks"), + label_tp_effic = cms.InputTag("primaryChgSimTracks"), label_tp_fake = cms.InputTag("cutsTPFake"), signalOnlyTP = cms.bool(False), skipHistoFit = cms.untracked.bool(True), # done in post-processing @@ -40,11 +40,11 @@ # track prevalidation hiTrackPrevalidation = cms.Sequence( - findableSimTracks - * cutsTPFake - * cutsRecoTracks - * cutsRecoTracksHP -) + primaryChgSimTracks + * cutsTPFake + * cutsRecoTracks + * cutsRecoTracksHP + ) # track validation sequence hiTrackValidation = cms.Sequence( hiTrackValidator ) diff --git a/Validation/RecoHI/python/selectSimTracks_cff.py b/Validation/RecoHI/python/selectSimTracks_cff.py index 4442aa26f497c..262455a52b502 100644 --- a/Validation/RecoHI/python/selectSimTracks_cff.py +++ b/Validation/RecoHI/python/selectSimTracks_cff.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms +# Not actually functioning at the moment, use primaryChgSimTracks - Matt Nguyen, 24/7/2013 findableSimTracks = cms.EDFilter("HitPixelLayersTPSelection", src = cms.InputTag("mix","MergedTrackTruth"), tripletSeedOnly = cms.bool(True), From 5c02aaef48f23775fb796d8c19d92cd25a903dc6 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 24 Jul 2013 16:10:03 +0200 Subject: [PATCH 2/2] Clean up --- .../RecoHI/plugins/HitPixelLayersTPSelector.h | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h b/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h index aac9abec2ba6b..90441bbc14731 100644 --- a/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h +++ b/Validation/RecoHI/plugins/HitPixelLayersTPSelector.h @@ -96,26 +96,7 @@ class HitPixelLayersTPSelector std::vector pixelHitPattern( const TrackingParticleRef& simTrack, const TrackerTopology *tTopo ) { std::vector hitpattern(5,false); // PXB 0,1,2 PXF 0,1 - /* -#warning "This file has been modified just to get it to compile without any regard as to whether it still functions as intended" -#ifdef REMOVED_JUST_TO_GET_IT_TO_COMPILE__THIS_CODE_NEEDS_TO_BE_CHECKED - for(std::vector::const_iterator simHit = simTrack->pSimHit_begin();simHit!= simTrack->pSimHit_end();simHit++){ - - DetId id = DetId(simHit->detUnitId()); - uint32_t detid = id.det(); - uint32_t subdet = id.subdetId(); - - if (detid == DetId::Tracker) { - if (subdet == PixelSubdetector::PixelBarrel) - hitpattern[tTopo->pxbLayer(id)-1]=true; - else if (subdet == PixelSubdetector::PixelEndcap) - hitpattern[tTopo->pxfDisk(id)+2]=true; - } - - }// end simhit loop -#endif - */ - // Indeed this no longer functions as intended, but this code should no longer be accessed, since tripletSeedOnly_ has been changed to False. We will clean up when we figure out how to do this properly - Matt Nguyen, 24/7/2013 + // This currently will always return false, since we can no loger use the sim hits to check for triplets. This would need to be fixed if we want to enable this feature, but it's not being used at the moment, since tripletSeedOnly is always set to False - Matt Nguyen, 24/7/2013 return hitpattern; }