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

Comparing UserCode/MitHzz4l/LeptonSelection/src/FSR.cc (file contents):
Revision 1.5 by khahn, Thu Jun 7 10:10:55 2012 UTC vs.
Revision 1.7 by anlevin, Wed Oct 17 01:31:22 2012 UTC

# Line 27 | Line 27 | bool recover_typeI_Photon( ControlFlags
27  
28    vector<int> photonIndices;
29    for( int i=0; i<pfArr->GetEntries(); i++ ) {
30 +    
31      if( !(PFnoPUflag[i])) continue; // my PF no PU hack
32      const mithep::PFCandidate *pf = (mithep::PFCandidate*)((*pfArr)[i]);
33      if( abs(pf->PFType()) == mithep::PFCandidate::eGamma &&
# Line 63 | Line 64 | bool recover_typeI_Photon( ControlFlags
64        if( flagEleSC ) continue;
65        if( ctrl.debug ) std::cerr << "FSR :: not matched to an ele SC ... " << std::endl;
66  
66
67        //
68        // check that input electron is the closest lepton to this photon
69        //
# Line 108 | Line 108 | bool recover_typeI_Photon( ControlFlags
108        //      
109        // "need tighter cuts for other photons ..."
110        //
111 <      //      if( dR < 0.5 && pf->Pt() > 4. && dbetaCorrectedIsoDr03(ctrl, pf, el, pfArr) < 1.0) {
111 >      //if( dR < 0.5 && pf->Pt() > 4. && dbetaCorrectedIsoDr03(ctrl, pf, el, pfArr) < 1.0) {
112        if( dR < 0.5 && pf->Pt() > 4. && nonCorrectedIsoDr03(ctrl, pf, el, pfArr) < 1.0) {
113          if( ctrl.debug ) std::cerr << "FSR :: tighter cuts, pushing  ... " << std::endl;
114          photonIndices.push_back(i);
# Line 183 | Line 183 | bool recover_typeI_Photon( ControlFlags
183                             vector<const mithep::PFCandidate*> &photonsToVeto )
184   //--------------------------------------------------------------------------------------------------
185   {
186 +
187    if( lepvec[muonIndex].fsrRecoveryAttempted ) return false;
188  
189    vector<int> photonIndices;
190    for( int i=0; i<pfArr->GetEntries(); i++ ) {
191 +    
192      if( !(PFnoPUflag[i])) continue; // my PF no PU hack
193 +        
194      const mithep::PFCandidate *pf = (mithep::PFCandidate*)((*pfArr)[i]);
195      if( abs(pf->PFType()) == mithep::PFCandidate::eGamma &&
196          pf->Pt() > 2.0 && fabs(pf->Eta()) < 2.4 ) {
197 <
197 >            
198        if( ctrl.debug ) std::cerr << "FSR :: pass preselection ... pt: "<< pf->Pt() << std::endl;
199        //      float dR = mithep::MathUtils::DeltaR(pf->Phi(),pf->Eta(), mu->Phi(), mu->Eta());
200        float dR = mithep::MathUtils::DeltaR(pf->Phi(),pf->Eta(),
201                                             lepvec[muonIndex].vec.Phi(), lepvec[muonIndex].vec.Eta());
202        if( ctrl.debug ) std::cerr << "FSR :: dR = " << dR << std::endl;
200
203        //
204        // veto if close to an electron SC
205        //
# Line 215 | Line 217 | bool recover_typeI_Photon( ControlFlags
217                              << "\tetaELH: " << eeta
218                              << "\tdR:" << dR << endl;
219          if( (dPhi<2.&& dEta<0.05) || dR<0.15 ) {
220 <            flagEleSC = true;
221 <            break;
220 >          flagEleSC = true;
221 >          break;
222          }
223          if( flagEleSC ) break;
224        }
225        if( flagEleSC ) continue;
226        if( ctrl.debug ) std::cerr << "FSR :: not matched to an ele SC ... " << std::endl;
227 <
228 <
227 >      
228 >      
229        //
230        // check that input muon is the closest lepton to this photon
231        //
# Line 242 | Line 244 | bool recover_typeI_Photon( ControlFlags
244        }
245        if( found_closer_lepton ) continue;
246  
247 <
248 <
247 >      
248 >      
249        //
250        // Z mass OK?
251        //
# Line 256 | Line 258 | bool recover_typeI_Photon( ControlFlags
258               ) ) continue;
259        if( ctrl.debug ) std::cerr << "FSR :: improved Zmass  ... " <<
260          Zvec->M() << " -> " << newMass << std::endl;
261 <
261 >      
262        //
263        // "keep all photons close to one of the 4L muons ..."
264        //
# Line 270 | Line 272 | bool recover_typeI_Photon( ControlFlags
272        //
273        if( ctrl.debug ) std::cerr << "FSR :: pass tighter?, pT: " << pf->Pt() << std::endl;
274        //      if( dR < 0.5 && pf->Pt() > 4. && dbetaCorrectedIsoDr03(ctrl, pf, mu, pfArr) < 1.0) {
275 +
276 +
277        if( dR < 0.5 && pf->Pt() > 4. && nonCorrectedIsoDr03(ctrl, pf, mu, pfArr) < 1.0) {
278          if( ctrl.debug ) std::cerr << "FSR :: tighter cuts, pushing index= " << i  << std::endl;
279          photonIndices.push_back(i);
280        }
281      }
282    }    
283 <
283 >  
284    float highest_pt  = -1;   int highest_pt_index=-1;
285    float smallest_dR = 999.; int smallest_dR_index=-1;
286    for( int i=0; i<photonIndices.size(); i++ ) {
# Line 350 | Line 354 | bool recover_typeII_Photon( ControlFlags
354    bool foundPF=false;
355    const mithep::PFCandidate * thepf;
356    for( int i=0; i<pfArr->GetEntries(); i++ ) {
357 +
358      if( !(PFnoPUflag[i]) ) continue; // my PF no PU hack
359      const mithep::PFCandidate *pf = (mithep::PFCandidate*)((*pfArr)[i]);
360      if( abs(pf->PFType()) == mithep::PFCandidate::eMuon

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines