ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/treeWriter.cc
(Generate patch)

Comparing UserCode/kiesel/TreeWriter/treeWriter.cc (file contents):
Revision 1.12 by kiesel, Tue Apr 16 15:11:20 2013 UTC vs.
Revision 1.13 by kiesel, Tue Apr 16 18:53:55 2013 UTC

# Line 365 | Line 365 | void TreeWriter::Loop() {
365                  } else {
366                          for(vector<susy::Electron>::iterator it = eleMap->second.begin(); it < eleMap->second.end(); ++it) {
367                                  // for cuts see https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaCutBasedIdentification
368 +                                if( loggingVerbosity > 0)
369 +                                        std::cout << "TODO: piAtVtx is not calculated correctly" << std::endl;
370 +                                //float pAtVtx = it->trackMomentums.find("AtVtxWithConstraint")->second.P();
371 +                                float pAtVtx = it->ecalEnergy;
372 +                                if( it->momentum.Pt() < 1  || it->momentum.Pt() > 1e6 || pAtVtx == 0 )
373 +                                        continue;
374                                  float iso = ( it->chargedHadronIso + max(it->neutralHadronIso+it->photonIso
375 <                                                                                                                        -effectiveAreaElectron(it->momentum.Eta())*event->rho25, (Float_t)0. )
375 >                                                                                                                        - effectiveAreaElectron(it->momentum.Eta())*event->rho25, (Float_t)0. )
376                                                          ) / it->momentum.Pt();
377                                  if ( it->isEE() ){
378                                          if ( fabs(it->deltaEtaSuperClusterTrackAtVtx) > 0.007
# Line 375 | Line 381 | void TreeWriter::Loop() {
381                                                          || it->hcalOverEcalBc > 0.12
382                                                          || it->vertex.Perp() > 0.02
383                                                          || it->vertex.Z() > 0.2
384 <                                                        || fabs(1./(it->ecalEnergy) - 1./(it->trackMomentums["AtVtx"].P())) > 0.05
379 <                                                        || it->convFlags() // not official, but perhaps substitude?
384 >                                                        || fabs(1./it->ecalEnergy - 1./pAtVtx ) > 0.05
385                                                          || iso > 0.15 )
386                                                  continue;
387                                          }
# Line 387 | Line 392 | void TreeWriter::Loop() {
392                                                          || it->hcalOverEcalBc > 0.10
393                                                          || it->vertex.Perp() > 0.02
394                                                          || it->vertex.Z() > 0.2
395 <                                                        || fabs(1./(it->ecalEnergy) - 1./(it->trackMomentums["AtVtx"].P())) > 0.05
391 <                                                        || it->convFlags() // not official, but perhaps substitude?
395 >                                                        || fabs(1./it->ecalEnergy - 1./pAtVtx) > 0.05
396                                                          || iso > 0.15 )
397                                                  continue;
398                                          }
# Line 396 | Line 400 | void TreeWriter::Loop() {
400                                          continue;
401                                  // TODO: conversion rejection information not implemented yet, see twiki for more details
402  
403 <                                thiselectron->pt = it->momentum.Et();
403 >                                thiselectron->pt = it->momentum.Pt();
404                                  if( thiselectron->pt < 20 )
405                                          continue;
406                                  if( loggingVerbosity > 2 )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines