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

Comparing UserCode/MitHzz4l/Selection/src/applySelection.cc (file contents):
Revision 1.22 by khahn, Mon May 14 17:27:34 2012 UTC vs.
Revision 1.23 by khahn, Sun May 20 19:08:59 2012 UTC

# Line 37 | Line 37 | using namespace std;
37   #include "PFCandidateCol.h"
38   #include "PileupInfoCol.h"
39   #include "PileupEnergyDensity.h"
40 + #include "MCParticle.h"
41   #include "TriggerMask.h"
42   #include "TriggerTable.h"
43   #include "Names.h"
# Line 272 | Line 273 | int main(int argc, char** argv)
273    mithep::Array<mithep::PileupInfo>           *puArr         = new mithep::Array<mithep::PileupInfo>();
274    mithep::Array<mithep::PileupEnergyDensity>  *puDArr        = new mithep::Array<mithep::PileupEnergyDensity>();
275    mithep::Array<mithep::Track>                *trkArr        = new mithep::Array<mithep::Track>();
276 +  mithep::Array<mithep::MCParticle>           *mcArr         = new mithep::Array<mithep::MCParticle>();
277    mithep::TriggerMask                         *trigMask      = new mithep::TriggerMask();
278    mithep::TriggerTable                        *hltTable      = new mithep::TriggerTable();
279    vector<string>                              *hltTableStrings  = new vector<string>();
# Line 284 | Line 286 | int main(int argc, char** argv)
286    TString fPileupInfoName(Names::gkPileupInfoBrn);
287    TString fPileupEnergyDensityName(Names::gkPileupEnergyDensityBrn);
288    TString fTrackName(Names::gkTrackBrn);
289 +  TString fMCParticleName(Names::gkMCPartBrn);
290    TString fTriggerMaskName(Names::gkHltBitBrn);
291    TString fTriggerTableName(Names::gkHltTableBrn);
292    
# Line 292 | Line 295 | int main(int argc, char** argv)
295    chain->SetBranchAddress(fMuonName,        &muonArr);
296    chain->SetBranchAddress(fPrimVtxName,     &vtxArr);
297    chain->SetBranchAddress(fPFCandidateName, &pfArr);
298 <  if( ctrl.mc ) chain->SetBranchAddress(fPileupInfoName,  &puArr);
298 >  if( ctrl.mc ) {
299 >    chain->SetBranchAddress(fPileupInfoName,  &puArr);
300 >    chain->SetBranchAddress(fMCParticleName,  &mcArr);
301 >  }
302    chain->SetBranchAddress(fPileupEnergyDensityName, &puDArr);
303    chain->SetBranchAddress(fTrackName, &trkArr);
304    chain->SetBranchAddress(fTriggerMaskName, &trigMask);
# Line 325 | Line 331 | int main(int argc, char** argv)
331      {
332        chain->GetEntry(ientry);
333  
334 +      /*
335 +      bool found_tau=false;
336 +      if( ctrl.mc) {  // && ctrl.debug
337 +        cout << "nparticles: " << mcArr->GetEntries() << endl;
338 +        cout << "-----------------------------------" << endl;
339 +        for( int i=0; i<mcArr->GetEntries(); i++ ) {
340 +          const mithep::MCParticle *mc = mcArr->At(i);
341 +          cout << "i: " << i << "\t"
342 +               << "id: " << mc->AbsPdgId()
343 +               << endl;
344 +          if( mc->Is(MCParticle::kTau) ) {
345 +            found_tau=true;
346 +          }
347 +        }
348 +      }
349 +      cout << "-----------------------------------" << endl;
350 +      cout << "found tau: " << found_tau << endl;
351 +      */
352 +
353        // events that fail bc ele overlaps w/ reco mu
354        /*
355        if( info->EvtNum() != 67315 &&
# Line 361 | Line 386 | int main(int argc, char** argv)
386          // xsec & PU weights
387          //
388          weights.w = getWeight(xstab,entrymap,chain)/ctrl.totalMC;
389 +        cout << "xsec weight: " << weights.w << endl;
390          int npu = -1;
391          for(int i=0;i<puArr->GetEntries();i++) {
392            if(puArr->At(i)->GetBunchCrossing() == 0)
# Line 424 | Line 450 | int main(int argc, char** argv)
450        passingLeptons.clear();
451        EventData ret4l =
452  
453 +
454 +        // reference
455          /*
456          apply_HZZ4L_reference2_selection(ctrl, info,
457                                           vtx,
# Line 439 | Line 467 | int main(int argc, char** argv)
467                                           &muonIDPFSelection,
468                                           &muonReferenceIsoSelection);
469          */
470 +
471 +        // evolved
472          apply_HZZ4L_reference2_selection(ctrl, info,
473                                           vtx,
474                                           pfArr,
# Line 446 | Line 476 | int main(int argc, char** argv)
476                                           puDArr,
477                                           electronArr,
478                                           &electronReferencePreSelection,
479 +                                         //&electronPreSelection,
480                                           &electronReferenceIDMVASelection,
481                                           &electronIsoMVASelection,
482                                           muonArr,
483                                           &muonReferencePreSelection,
484 +                                         //&muonPreSelection,
485                                           &muonIDPFSelection,
486                                           &muonIsoMVASelection);
487  
488  
457
458
489        if( ctrl.debug ) cout << endl;
490  
491  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines