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.7 by ceballos, Fri May 28 15:45:45 2010 UTC vs.
Revision 1.10 by ceballos, Fri Jun 4 20:07:29 2010 UTC

# Line 214 | Line 214 | Bool_t ElectronTools::PassCustomIso(cons
214        break;
215    }
216  
217 <  Double_t trkIso  = ele->TrackIsolationDr03();
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;
222 <  combinedIso = combinedIso / ele->Pt();
217 >  Double_t trkIso  = ele->TrackIsolationDr03() / ele->Pt();
218 >  Double_t ecalIso = ele->EcalRecHitIsoDr03() / ele->Pt();
219 >  Double_t hcalIso = ele->HcalTowerSumEtDr03() / ele->Pt();
220 >  Double_t combinedIso = ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr03() + ele->HcalTowerSumEtDr03();
221 >  if(ele->IsEB()) combinedIso = ele->TrackIsolationDr03() + TMath::Max(ele->EcalRecHitIsoDr03() - 1.0, 0.0) + ele->HcalTowerSumEtDr03();
222  
223    Int_t eb = 1;
224    if (ele->IsEB())
# Line 366 | Line 365 | Bool_t ElectronTools::PassSpikeRemovalFi
365    return passSpikeRemovalFilter;
366   }
367  
368 + Bool_t ElectronTools::PassTriggerMatching(const Electron *ele, const TriggerObjectCol *trigobjs)
369 + {
370 +  
371 +  for (UInt_t i=0; i<trigobjs->GetEntries(); ++i) {
372 +    const TriggerObject *trigobj = trigobjs->At(i);
373 +    if (trigobj->TriggerType()==TriggerObject::TriggerCluster || trigobj->TriggerType()==TriggerObject::TriggerElectron) {
374 +      if (MathUtils::DeltaR(ele,trigobj)<0.3) {
375 +        return kTRUE;
376 +      }
377 +    }
378 +  }
379 +  
380 +  return kFALSE;
381 +  
382 +  
383 + }
384 +
385   //--------------------------------------------------------------------------------------------------
386   Int_t ElectronTools::Classify(const Electron *ele) {
387    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines