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

Comparing UserCode/MitHzz4l/Selection/src/Selection.cc (file contents):
Revision 1.4 by dkralph, Wed Oct 12 17:25:15 2011 UTC vs.
Revision 1.5 by khahn, Thu Oct 13 14:18:55 2011 UTC

# Line 19 | Line 19 | unsigned fails_HZZ4L_selection(ControlFl
19                                 TClonesArray *electronArr,    // input electrons
20                                 TClonesArray *muonArr,        // input muons
21                                 double eventweight,           // weight
22 <                               TNtuple * passtuple ) {
22 >                               TTree * passtuple ) {
23  
24    fails_HZZ4L_selection( ctrl, info, electronArr, muonArr, eventweight, passtuple, NULL );
25  
# Line 42 | Line 42 | unsigned fails_HZZ4L_selection(ControlFl
42                                 TClonesArray *electronArr,    // input electrons
43                                 TClonesArray *muonArr,        // input muons
44                                 double eventweight,           // weight
45 <                               TNtuple * passtuple,
45 >                               TTree * passtuple,
46                                 LabVectors * l) {       // output ntuple
47  
48    unsigned evtfail = 0x0;
49  
50 +  if( info->runNum == 163817 && info->evtNum == 155679856 ) {
51 +    cout << "found it? YES " << endl;
52 +  } else {
53 +    cout << "found it? NO " << endl;
54 +  }
55 +
56 +  if( ctrl.debug ) {
57 +    cout << "Run: " << info->runNum
58 +         << "\tEvt: " << info->evtNum
59 +         << "\tLumi: " << info->lumiSec
60 +         << endl;
61 +  }
62 +
63    if( !ctrl.mc ) {
64      // not accounting for overlap atm
65      RunLumiRangeMap::RunLumiPairType rl(info->runNum, info->lumiSec);      
66      if( !(rlrm.HasRunLumi(rl)) )  {
67 +      if( ctrl.debug ) cout << "\tfails JSON" << endl;
68        evtfail |= (1<<EVTFAIL_JSON);
69        return evtfail;
70      }
71    }
72    
73    
74 <  if( ctrl.debug ) {
61 <    cout << "Run: " << info->runNum
62 <         << "\tEvt: " << info->evtNum
63 <         << "\tLumi: " << info->lumiSec
64 <         << endl;
65 <  }
74 >
75    
76    
77    //********************************************************
# Line 570 | Line 579 | unsigned fails_HZZ4L_selection(ControlFl
579              (lepvec[Z1LeptonMinusIndex].type == 13 && lepvec[Z2LeptonMinusIndex].type == 11)) channel=2;
580          
581  
582 <        
582 >
583          if( passtuple != NULL ) {
584 <          passtuple->Fill( info->runNum,
585 <                           info->evtNum,
586 <                           info->lumiSec,
587 <                           channel,
588 <                           Z1Candidate.M(),
589 <                           Z2Candidate.M(),
590 <                           ZZSystem.M(),
591 <                           ZZSystem.Pt(),
592 <                           eventweight);
584 >          unsigned run   = info->runNum;
585 >          unsigned evt   = info->evtNum;
586 >          unsigned lumi  = info->lumiSec;
587 >          unsigned chan  = channel;
588 >          float mZ1      = Z1Candidate.M() ;
589 >          float mZ2      = Z2Candidate.M() ;
590 >          float m4l      = ZZSystem.M() ;
591 >          float pt4l     = ZZSystem.Pt() ;
592 >          passtuple->SetBranchAddress("run",  &run);
593 >          passtuple->SetBranchAddress("evt",  &evt);
594 >          passtuple->SetBranchAddress("lumi", &lumi);
595 >          passtuple->SetBranchAddress("mZ1",  &mZ1);
596 >          passtuple->SetBranchAddress("mZ2",  &mZ2);
597 >          passtuple->SetBranchAddress("m4l",  &m4l);
598 >          passtuple->SetBranchAddress("pt4l", &pt4l);
599 >          passtuple->SetBranchAddress("w",    &eventweight);
600 >          passtuple->Fill( );
601          }
602  
603          if( ctrl.debug ) cout  << "run: " << info->runNum  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines