diff --git a/L1Trigger/DTPhase2Trigger/src/MPQualityEnhancerFilter.cc b/L1Trigger/DTPhase2Trigger/src/MPQualityEnhancerFilter.cc index 69d7248550dce..85d7e2127c9ec 100644 --- a/L1Trigger/DTPhase2Trigger/src/MPQualityEnhancerFilter.cc +++ b/L1Trigger/DTPhase2Trigger/src/MPQualityEnhancerFilter.cc @@ -133,9 +133,9 @@ void MPQualityEnhancerFilter::filterCousins(std::vector &inMPaths void MPQualityEnhancerFilter::filterUnique(std::vector &inMPaths, std::vector &outMPaths) { - double xTh = 0; - double tPhiTh = 0; - double t0Th = 0; + double xTh = 0.; + double tPhiTh = 0.; + double t0Th = 0.; for (size_t i=0; i dtdigis, double newChi2 = (x1reco-x1)*(x1reco-x1)+(x2reco-x2)*(x2reco-x2)+(x3reco-x3)*(x3reco-x3)+(x4reco-x4)*(x4reco-x4)+(x5reco-x5)*(x5reco-x5)+(x6reco-x6)*(x6reco-x6)+(x7reco-x7)*(x7reco-x7)+(x8reco-x8)*(x8reco-x8); + //if(newChi2>chi2corTh) continue; + int quality = 0; if(SL3metaPrimitive->quality <= 2 and SL1metaPrimitive->quality <=2) quality=6; @@ -158,7 +160,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, double phi= jm_x_cmssw_global.phi()-0.5235988*(thisec-1); double psi=atan(NewSlope); double phiB=hasPosRF(ChId.wheel(),ChId.sector()) ? psi-phi :-psi-phi ; - + outMPaths.push_back(metaPrimitive({ChId.rawId(),MeanT0,MeanPos,NewSlope,phi,phiB,newChi2,quality, SL1metaPrimitive->wi1,SL1metaPrimitive->tdc1,SL1metaPrimitive->lat1, SL1metaPrimitive->wi2,SL1metaPrimitive->tdc2,SL1metaPrimitive->lat2, @@ -248,7 +250,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, if(best_layer==2) {wi2=best_wire; tdc2=best_tdc; lat2=best_lat;} if(best_layer==3) {wi3=best_wire; tdc3=best_tdc; lat3=best_lat;} if(best_layer==4) {wi4=best_wire; tdc4=best_tdc; lat4=best_lat;} - + outMPaths.push_back(metaPrimitive({ChId.rawId(),SL1metaPrimitive->t0,SL1metaPrimitive->x,SL1metaPrimitive->tanPhi,SL1metaPrimitive->phi,SL1metaPrimitive->phiB,SL1metaPrimitive->chi2, new_quality, SL1metaPrimitive->wi1,SL1metaPrimitive->tdc1,SL1metaPrimitive->lat1, @@ -352,7 +354,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, if(best_layer==2) {wi2=best_wire; tdc2=best_tdc; lat2=best_lat;} if(best_layer==3) {wi3=best_wire; tdc3=best_tdc; lat3=best_lat;} if(best_layer==4) {wi4=best_wire; tdc4=best_tdc; lat4=best_lat;} - + outMPaths.push_back(metaPrimitive({ChId.rawId(),SL3metaPrimitive->t0,SL3metaPrimitive->x,SL3metaPrimitive->tanPhi,SL3metaPrimitive->phi,SL3metaPrimitive->phiB,SL3metaPrimitive->chi2, new_quality, wi1,tdc1,lat1, diff --git a/L1Trigger/DTPhase2Trigger/test/primitivesPhase2Prod_over_mc_cfg.py b/L1Trigger/DTPhase2Trigger/test/primitivesPhase2Prod_over_mc_cfg.py index 80517116f48d5..5e38a5da1c711 100644 --- a/L1Trigger/DTPhase2Trigger/test/primitivesPhase2Prod_over_mc_cfg.py +++ b/L1Trigger/DTPhase2Trigger/test/primitivesPhase2Prod_over_mc_cfg.py @@ -18,8 +18,6 @@ #process.CalibratedDigis.flat_calib = 325 #turn to 0 to use the DB , 325 for JM and Jorge benchmark process.CalibratedDigis.dtDigiTag = "simMuonDTDigis" #turn to 0 to use the DB , 325 for JM and Jorge benchmark - - #DTTriggerPhase2 process.load("L1Trigger.DTPhase2Trigger.dtTriggerPhase2PrimitiveDigis_cfi") #process.dtTriggerPhase2PrimitiveDigis.trigger_with_sl = 3 #4 means SL 1 and 3 @@ -27,8 +25,8 @@ #process.dtTriggerPhase2PrimitiveDigis.p2_df = True #process.dtTriggerPhase2PrimitiveDigis.filter_primos = True #for debugging -process.dtTriggerPhase2PrimitiveDigis.pinta = True -process.dtTriggerPhase2PrimitiveDigis.min_phinhits_match_segment = 4 +#process.dtTriggerPhase2PrimitiveDigis.pinta = True +#process.dtTriggerPhase2PrimitiveDigis.min_phinhits_match_segment = 4 #process.dtTriggerPhase2PrimitiveDigis.debug = True process.source = cms.Source("PoolSource",fileNames = cms.untracked.vstring( @@ -48,16 +46,16 @@ ) ) process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(-1) + input = cms.untracked.int32(1000) ) process.out = cms.OutputModule("PoolOutputModule", outputCommands = cms.untracked.vstring('keep *'), - fileName = cms.untracked.string('/tmp/carrillo/DTTriggerPhase2Primitives.root') + fileName = cms.untracked.string('/tmp/carrillo/mc/DTTriggerPhase2Primitives.root') ) process.p = cms.Path(process.CalibratedDigis*process.dtTriggerPhase2PrimitiveDigis) -#process.this_is_the_end = cms.EndPath(process.out) +process.this_is_the_end = cms.EndPath(process.out)