ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/src/ElectronTools.cc
(Generate patch)

Comparing UserCode/MitPhysics/Utils/src/ElectronTools.cc (file contents):
Revision 1.6 by ceballos, Thu May 27 09:24:50 2010 UTC vs.
Revision 1.9 by bendavid, Sat May 29 11:56:17 2010 UTC

# Line 218 | Line 218 | Bool_t ElectronTools::PassCustomIso(cons
218    Double_t ecalIso = ele->EcalRecHitIsoDr03();
219    Double_t hcalIso = ele->HcalTowerSumEtDr03();
220    Double_t combinedIso = trkIso + ecalIso + hcalIso;
221 <  if(ele->IsEB()) combinedIso = combinedIso - 1.0;
221 >  if(ele->IsEB()) combinedIso = trkIso + TMath::Max(ecalIso - 1.0, 0.0) + hcalIso;
222    combinedIso = combinedIso / ele->Pt();
223  
224    Int_t eb = 1;
# Line 366 | Line 366 | Bool_t ElectronTools::PassSpikeRemovalFi
366    return passSpikeRemovalFilter;
367   }
368  
369 + Bool_t ElectronTools::PassTriggerMatching(const Electron *ele, const TriggerObjectCol *trigobjs)
370 + {
371 +  
372 +  for (UInt_t i=0; i<trigobjs->GetEntries(); ++i) {
373 +    const TriggerObject *trigobj = trigobjs->At(i);
374 +    if (trigobj->TriggerType()==TriggerObject::TriggerCluster || trigobj->TriggerType()==TriggerObject::TriggerElectron) {
375 +      if (MathUtils::DeltaR(ele,trigobj)<0.3) {
376 +        return kTRUE;
377 +      }
378 +    }
379 +  }
380 +  
381 +  return kFALSE;
382 +  
383 +  
384 + }
385 +
386   //--------------------------------------------------------------------------------------------------
387   Int_t ElectronTools::Classify(const Electron *ele) {
388    
# Line 649 | Line 666 | Int_t ElectronTools::PassTightId(const E
666  
667      // CAREFUL, I HAVE COMMENTED OUT WHAT SANI IS DOING
668      //Double_t iso_sum = tkIso + ecalIso + hcalIso;
669 <    Double_t iso_sum = (ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr03() +
670 <                        ele->HcalTowerSumEtDr03() - 1.0) / ele->Pt();
669 >    Double_t iso_sum = (ele->TrackIsolationDr03() + TMath::Max(ele->EcalRecHitIsoDr03() - 1.0, 0.0) +
670 >                        ele->HcalTowerSumEtDr03()) / ele->Pt();
671      Double_t iso_sum_corrected = iso_sum*pow(40./scEt, 2);
672      if ((iso_sum < cutiso_sum[cat+bin*9]) &&
673          (iso_sum_corrected < cutiso_sumoet[cat+bin*9]))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines