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.29 by khahn, Thu May 24 17:56:51 2012 UTC vs.
Revision 1.35 by khahn, Tue Jun 5 19:35:48 2012 UTC

# Line 59 | Line 59 | using namespace std;
59   #include "InfoStruct.h"
60   #include "GenInfoStruct.h"
61   #include "WeightStruct.h"
62 //#include "GlobalDataAndFuncs.h"
63 #include "RunLumiRangeMap.h"
64
62   #include "AngleTuple.h"
63   #include "FOTuple.h"
64  
65 + #include "RunLumiRangeMap.h"
66   #include "SampleWeight.h"
67   #include "EfficiencyWeightsInterface.h"
68  
# Line 219 | Line 217 | int main(int argc, char** argv)
217    nt.makeKinematicsBranch(kinematics);
218    nt.makeInfoBranch(evtinfo);
219  
220 +  
221    FOTuple foTree( nt.getFile(), (const char*)"FOtree");
222    foTree.makeFailedLeptonBranch(failingLeptons);
223 <  foTree.makeZLeptonBranch(passingLeptons);
223 >  foTree.makePassedLeptonBranch(passingLeptons);
224  
225    TH1F * h_wf11_hpt;
226    if(ctrl.mc) {
227      nt.makeWeightBranch(weights);
228 <    nt.makeGenInfoBranch(geninfo);
228 >    if(ctrl.fillGen ) nt.makeGenInfoBranch(geninfo);
229      initEfficiencyWeights();
230      initPUWeights();
231  
# Line 245 | Line 244 | int main(int argc, char** argv)
244    }
245  
246    //  initMuonIDMVA();
247 <  initMuonIsoMVA();
249 <  initElectronIDMVA();
250 <  initElectronIsoMVA();
247 >  initElectronIDMVAV1();
248    initTrigger();
249  
250    // hack
# Line 331 | Line 328 | int main(int argc, char** argv)
328        chain->GetEntry(ientry);
329        if(!(ientry%1000)) cerr << "entry: " << ientry << endl;
330  
331 < #ifdef HACKED_RHOS
332 <      float rho = evtrhoMap[info->EvtNum()];
333 < #endif
331 >      //if( info->EvtNum() != 217998 ) continue;
332 >      //      if( info->EvtNum() != 238893 ) continue;
333 >      //      if( info->EvtNum() != 289066 ) continue;
334 >
335        string fname = string(chain->GetFile()->GetEndpointUrl()->GetFile());
336        setEra( fname, ctrl );
337  
# Line 353 | Line 351 | int main(int argc, char** argv)
351          //
352          // gen info
353          //
354 <        if(ctrl.fillGen)
354 >        if( ctrl.fillGen )
355            fillGenInfo( mcArr, mcEvtInfo, geninfo, ESampleType::kHZZ, ctrl);
356  
357          //
# Line 389 | Line 387 | int main(int argc, char** argv)
387            hltchain->SetBranchAddress(fTriggerTableName, &hltTableStrings);
388            hltchain->GetEntry(0);
389            hltTable->Clear();
390 <          fillTriggerBits(hltTable, hltTableStrings );
390 >          fillTriggerNames(hltTable, hltTableStrings );
391          }
392          if( ctrl.debug ) cout << "file is : " << currentFile  << endl;
393          fillTriggerBits( hltTable, trigMask, triggerBits );
# Line 416 | Line 414 | int main(int argc, char** argv)
414            hltchain->SetBranchAddress(fTriggerTableName, &hltTableStrings);
415            hltchain->GetEntry(0);
416            hltTable->Clear();
417 <          fillTriggerBits(hltTable, hltTableStrings );
417 >          fillTriggerNames(hltTable, hltTableStrings );
418          }
419          if( ctrl.debug ) cout << "file is : " << currentFile  << endl;
420          /*
# Line 438 | Line 436 | int main(int argc, char** argv)
436  
437          // reference
438          apply_HZZ4L_reference_selection(ctrl, info,
439 <                                         vtxArr,
440 <                                         pfArr,
441 < #ifdef HACKED_RHOS
442 <                                         rho,
443 < #else
444 <                                         puDArr,
445 < #endif
446 <                                         electronArr,
447 <                                         &electronReferencePreSelection,
448 <                                         &electronReferenceIDMVASelectionV1,
449 <                                         &electronReferenceIsoSelection,
450 <                                         muonArr,
453 <                                         &muonReferencePreSelection,
454 <                                         &muonIDPFSelection,
455 <                                         &muonReferenceIsoSelection);
456 <
457 <      /*
458 <        // evolved
459 <        apply_HZZ4L_reference2_selection(ctrl, info,
460 <                                         vtx,
461 <                                         pfArr,
462 <                                         //rho,
463 <                                         puDArr,
464 <                                         electronArr,
465 <                                         &electronReferencePreSelection,
466 <                                         //&electronPreSelection,
467 <                                         &electronReferenceIDMVASelection,
468 <                                         &electronIsoMVASelection,
469 <                                         muonArr,
470 <                                         &muonReferencePreSelection,
471 <                                         //&muonPreSelection,
472 <                                         &muonIDPFSelection,
473 <                                         &muonIsoMVASelection);
474 <      */
475 <
439 >                                        vtxArr,
440 >                                        pfArr,
441 >                                        puDArr,
442 >                                        electronArr,
443 >                                        &electronReferencePreSelection,
444 >                                        &electronReferenceIDMVASelectionV1,
445 >                                        &electronReferenceIsoSelection,
446 >                                        muonArr,
447 >                                        &muonReferencePreSelection,
448 >                                        &muonIDPFSelection,
449 >                                        &muonReferenceIsoSelection);
450 >      
451        if( ctrl.debug ) cout << endl;
452  
453  
# Line 496 | Line 471 | int main(int argc, char** argv)
471        if( ret4l.status.pass() ) {
472          fillAngles(ret4l,angles);
473          fillKinematics(ret4l,kinematics);
474 +        fillMassErrors(ret4l,muonArr,electronArr,kinematics);
475          fillEventInfo(info,evtinfo);
476          if( ctrl.mc) {
501        // fillGenInfo(ginfo,geninfo);
477            setEffiencyWeights(ret4l, weights);
478             if(ctrl.debug)
479               cout << "w: " << weights.w << "\t"
# Line 521 | Line 496 | int main(int argc, char** argv)
496          pass++;
497          //      if( pass > 3 ) break;
498  
499 <      } else if( ret4l.status.selectionBits.test(PASS_GOODZ1) ) { // save for fakes ...
499 >      } else if( ret4l.status.selectionBits.test(PASS_GOODZ1) &&
500 >                 ret4l.status.selectionBits.to_ulong() < PASS_4L) { // save for fakes ...
501          //      if(ctrl.debug) {
502            cout << "failingLeptons : " << failingLeptons.size() << endl;
503            for( int f=0; f<failingLeptons.size(); f++ ) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines