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.23 by ceballos, Tue Mar 15 12:02:49 2011 UTC vs.
Revision 1.27 by bendavid, Mon Apr 18 21:01:12 2011 UTC

# Line 80 | Line 80 | Bool_t ElectronTools::PassCustomID(const
80      {0.0,   0.0,   0,     0,     0,      0,      0,      0    }  //extra cuts fbrem and E_Over_P
81    };            
82  
83 +  Double_t VBTFWorkingPoint80NoHOverEE[6][8] = {
84 +    {0.04,  0.04,  0.04,  0.04,  1.000,  1.000,  1.000,  1.000}, //hovere
85 +    {0.01,  0.01,  0.01,  0.01,  0.03,   0.03,   0.03,   0.03 }, //sigmaetaeta
86 +    {0.06,  0.06,  0.06,  0.06,  0.03,   0.03,   0.03,   0.03 }, //deltaphiin
87 +    {0.004, 0.004, 0.004, 0.004, 0.007,  0.007,  0.007,  0.007}, //deltaetain
88 +    {0.0,   0.0,   0.0,   0.0,   0.0,    0.0,    0.0,    0.0  }, //eoverp
89 +    {0.0,   0.0,   0,     0,     0,      0,      0,      0    }  //extra cuts fbrem and E_Over_P
90 +  };            
91 +
92 +  Double_t VBTFWorkingPoint70NoHOverEE[6][8] = {
93 +    {0.025, 0.025, 0.025, 0.025, 1.000,  1.000,  1.000,  1.000}, //hovere
94 +    {0.01,  0.01,  0.01,  0.01,  0.03,   0.03,   0.03,   0.03 }, //sigmaetaeta
95 +    {0.03,  0.03,  0.03,  0.03,  0.02,   0.02,   0.02,   0.02 }, //deltaphiin
96 +    {0.004, 0.004, 0.004, 0.004, 0.005,  0.005,  0.005,  0.005}, //deltaetain
97 +    {0.0,   0.0,   0.0,   0.0,   0.0,    0.0,    0.0,    0.0  }, //eoverp
98 +    {0.0,   0.0,   0,     0,     0,      0,      0,      0    }  //extra cuts fbrem and E_Over_P
99 +  };            
100 +
101    switch (idType) {
102      case kCustomIdTight:    
103        memcpy(fCuts,tightcuts,sizeof(fCuts));
# Line 99 | Line 117 | Bool_t ElectronTools::PassCustomID(const
117      case kVBTFWorkingPoint80Id:
118        memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts));
119        break;
120 <    case kVBTFWorkingPoint80LowPtId:
121 <      memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts));
120 >    case kVBTFWorkingPointLowPtId:
121 >      if(ele->Pt() < 20)
122 >        memcpy(fCuts,VBTFWorkingPoint70NoHOverEE,sizeof(fCuts));
123 >      else
124 >        memcpy(fCuts,VBTFWorkingPoint80NoHOverEE,sizeof(fCuts));
125        break;
126      case kVBTFWorkingPoint70Id:
127        memcpy(fCuts,VBTFWorkingPoint70,sizeof(fCuts));
# Line 110 | Line 131 | Bool_t ElectronTools::PassCustomID(const
131        break;
132    }
133  
113
134    // Based on RecoEgamma/ElectronIdentification/src/CutBasedElectronID.cc.
135    Double_t eOverP = ele->ESuperClusterOverP();
136    Double_t fBrem  = ele->FBrem();
# Line 138 | Line 158 | Bool_t ElectronTools::PassCustomID(const
158    Int_t eb = 1;
159    if (ele->IsEB())
160      eb = 0;
161 <
161 >
162    if (hOverE>fCuts[0][cat+4*eb])
163      return kFALSE;
164  
# Line 154 | Line 174 | Bool_t ElectronTools::PassCustomID(const
174    if(eSeedOverPin<fCuts[4][cat+4*eb])
175      return kFALSE;
176  
177 <  // Cuts only for pt<20 region and kVBTFWorkingPoint80LowPtId
178 <  if(ele->Pt() < 20 && idType == kVBTFWorkingPoint80LowPtId) {
177 >  // Cuts only for pt<20 region and kVBTFWorkingPointLowPtId
178 >  if(ele->Pt() < 20 && idType == kVBTFWorkingPointLowPtId) {
179      Bool_t isGoodLowPtEl = fBrem > 0.15 ||
180 <                          (ele->AbsEta() < 1.0 && eOverP > 0.95 &&
161 <                           TMath::Abs(ele->Charge()*ele->DeltaPhiSuperClusterTrackAtVtx()) < 0.006);
180 >                          (ele->AbsEta() < 1.0 && eOverP > 0.95);
181      if(!isGoodLowPtEl) return kFALSE;
182    }
183    
# Line 263 | Line 282 | Bool_t ElectronTools::PassConversionFilt
282                                             Double_t probMin,
283                                             Double_t lxyMin,
284                                             Bool_t matchCkf,
285 <                                           Bool_t requireArbitratedMerged)
285 >                                           Bool_t requireArbitratedMerged,
286 >                                           Double_t trkptMin)
287   {
288    Bool_t isGoodConversion = kFALSE;
289  
# Line 289 | Line 309 | Bool_t ElectronTools::PassConversionFilt
309            const Track *trk = dynamic_cast<const ChargedParticle*>
310              (conversions->At(ifc)->Daughter(d))->Trk();
311            if (trk) {
312 +            if (trk->Pt()<trkptMin) isGoodConversion = kFALSE;
313              const StableData *sd = dynamic_cast<const StableData*>
314                (conversions->At(ifc)->DaughterDat(d));
315              if (sd->NWrongHits() > nWrongHitsMax)
# Line 347 | Line 368 | Bool_t ElectronTools::PassD0Cut(const El
368   }
369  
370   //--------------------------------------------------------------------------------------------------
371 < Bool_t ElectronTools::PassDZCut(const Electron *ele, const VertexCol *vertices, Double_t fDZCut)
371 > Bool_t ElectronTools::PassDZCut(const Electron *ele, const VertexCol *vertices, Double_t fDZCut, Int_t nVertex)
372   {
373    Bool_t dzcut = kFALSE;
374  
375    Double_t distVtx = 999.0;
376 <  for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){
377 <    double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv)));
378 <    if(dz < distVtx) {
379 <      distVtx    = dz;
376 >  if(nVertex >= 0) distVtx = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nVertex)));
377 >  else {
378 >    for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){
379 >      double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv)));
380 >      if(dz < distVtx) {
381 >        distVtx  = dz;
382 >      }
383      }
384    }
385 +
386    if(distVtx < fDZCut) dzcut = kTRUE;
387    
388    return dzcut;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines