ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/LeptonSelection/src/MuonSelection.cc
(Generate patch)

Comparing UserCode/MitHzz4l/LeptonSelection/src/MuonSelection.cc (file contents):
Revision 1.12 by khahn, Sat May 5 13:09:05 2012 UTC vs.
Revision 1.16 by khahn, Wed May 9 20:03:49 2012 UTC

# Line 74 | Line 74 | SelectionStatus muonPreSelection( Contro
74    if(ctrl.debug) cout << "iS fo? ... " << ret << endl;  
75    ret &= ( fabs(mu->Ip3dPVSignificance()) < 4 );
76    if(ctrl.debug) cout << "and pass IP (" << mu->Ip3dPVSignificance() << ") ? ... " << ret << endl;  
77 <  ret &= ( mu->Pt() > 5 );
77 >  ret &= ( mu->Pt() >= 5 );
78    if(ctrl.debug) cout << "and >5 GeV (" << mu->Pt() << ") ? ... " << ret << endl;  
79    ret &= ( fabs(mu->Eta()) <= 2.4 );
80    if(ctrl.debug) cout << "and < 2.4 eta (" << mu->Eta() << ")? ... " << ret << endl;  
# Line 83 | Line 83 | SelectionStatus muonPreSelection( Contro
83    if( mu->IsTrackerMuon() && mu->HasTrackerTrk() && !mu->IsGlobalMuon() )  
84      ret &=  ( mu->Quality().QualityMask().Mask() & mithep::MuonQuality::AllArbitrated);
85    if(ctrl.debug) cout << "if isTrackerMuon, arbitrated ? ... " << ret << endl;  
86 <  ret &= ( mu->BestTrk()->DzCorrected(vtx) < 0.1);  
86 >  ret &= ( fabs(mu->BestTrk()->DzCorrected(vtx)) < 0.1 );  
87    if( ctrl.debug ) cout << "elepresel : ret after dZcorr : " << ret <<  endl;
88  
89  
# Line 95 | Line 95 | SelectionStatus muonPreSelection( Contro
95  
96  
97  
98 + //--------------------------------------------------------------------------------------------------
99 + SelectionStatus muonReferencePreSelection( ControlFlags &ctrl,  
100 +                                           const mithep::Muon * mu,
101 +                                           const mithep::Vertex & vtx,
102 +                                           const mithep::Array<mithep::PFCandidate> * pfCandidates )
103 + //--------------------------------------------------------------------------------------------------
104 + {
105 +  bool ret = true;
106 +  if(ctrl.debug) cout << "inside muonpresel ... " << endl;
107 +  ret &= ( fabs(mu->Ip3dPVSignificance()) < 100 );
108 +  if(ctrl.debug) cout << "and pass IP (" << mu->Ip3dPVSignificance() << ") ? ... " << ret << endl;  
109 +  ret &= ( mu->Pt() >= 5 );
110 +  if(ctrl.debug) cout << "and >5 GeV (" << mu->Pt() << ") ? ... " << ret << endl;  
111 +  ret &= ( fabs(mu->Eta()) <= 2.4 );
112 +  if(ctrl.debug) cout << "and < 2.4 eta (" << mu->Eta() << ")? ... " << ret << endl;  
113 +  ret &= ( mu->IsTrackerMuon() || mu->IsGlobalMuon() );
114 +  if(ctrl.debug) cout << "is Tracker or Global? ... " << ret << endl;  
115 +  //  if( mu->IsTrackerMuon() && mu->HasTrackerTrk() && !mu->IsGlobalMuon() )  
116 +  //    ret &=  ( mu->Quality().QualityMask().Mask() & mithep::MuonQuality::AllArbitrated);
117 +  //  if(ctrl.debug) cout << "if isTrackerMuon, arbitrated ? ... " << ret << endl;  
118 +  //  ret &= ( mu->BestTrk()->DzCorrected(vtx) < 0.1);  
119 +  //  if( ctrl.debug ) cout << "elepresel : ret after dZcorr : " << ret <<  endl;
120 +
121 +
122 +  SelectionStatus status;
123 +  if( ret ) status.setStatus(SelectionStatus::PRESELECTION);
124 +  if(ctrl.debug) cout << "muon presel returning status : " << status.getStatus() << endl;  
125 +  return status;
126 + }
127 +
128 +
129 +
130  
131   //--------------------------------------------------------------------------------------------------
132   SelectionStatus muonIDMVASelection(ControlFlags &ctrl,
# Line 104 | Line 136 | SelectionStatus muonIDMVASelection(Contr
136   {
137    double global_rchi2 = (mu->IsGlobalMuon()) ? mu->GlobalTrk()->RChi2() : 0.;
138  
139 +  //
140 +  // WARNING !!! KH hacked out to sync
141 +  //
142 +  /*
143    double mvaval = muIDMVA->MVAValue_ID(mu->Pt(),
144                                      mu->Eta(),
145                                      mu->IsGlobalMuon(),
# Line 122 | Line 158 | SelectionStatus muonIDMVASelection(Contr
158                                      mu->HadS9Energy(),
159                                      mu->EmS9Energy(),
160                                      (Bool_t)(ctrl.debug) );
161 <
161 >  */
162 >  double mvaval = 0.0;
163  
164    SelectionStatus status;
165    bool pass = false;
# Line 186 | Line 223 | SelectionStatus muonIDPFSelection(Contro
223      }
224    }
225  
226 <  if( pass ) {
226 >  //
227 >  // NB : ipsig here for reference synch ...
228 >  //
229 >  if( pass && fabs(mu->Ip3dPVSignificance()) < 4 ) {
230      status.orStatus(SelectionStatus::LOOSEID);
231      status.orStatus(SelectionStatus::TIGHTID);
232    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines