Skip to content

Commit

Permalink
unique test back
Browse files Browse the repository at this point in the history
  • Loading branch information
camilocarrillo committed May 23, 2019
1 parent b0b697b commit da99d25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions L1Trigger/DTPhase2Trigger/src/MPQualityEnhancerFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ void MPQualityEnhancerFilter::filterCousins(std::vector<metaPrimitive> &inMPaths
void MPQualityEnhancerFilter::filterUnique(std::vector<metaPrimitive> &inMPaths,
std::vector<metaPrimitive> &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<inMPaths.size();i++){
bool visto = false;
for (size_t j=i+1; j<inMPaths.size();j++){
Expand Down
8 changes: 5 additions & 3 deletions L1Trigger/DTPhase2Trigger/src/MuonPathAssociator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> 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;

Expand All @@ -158,7 +160,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> 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,
Expand Down Expand Up @@ -248,7 +250,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> 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,
Expand Down Expand Up @@ -352,7 +354,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@
#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
#for the moment the part working in phase2 format is the slice test
#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(
Expand All @@ -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)



Expand Down

0 comments on commit da99d25

Please sign in to comment.