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.1 by khahn, Thu Sep 8 13:33:18 2011 UTC vs.
Revision 1.3 by khahn, Wed Sep 14 21:43:21 2011 UTC

# Line 32 | Line 32 | using namespace std;
32   //
33   // ntuple format headers
34   //
35 < #include "EWKAnaDefs.hh"
35 > #include "HiggsAnaDefs.hh"
36   #include "TEventInfo.hh"
37   #include "TElectron.hh"
38   #include "TMuon.hh"
# Line 43 | Line 43 | using namespace std;
43   // utility headers
44   //
45   #include "ParseArgs.h"
46 + #include "SampleWeight.h"
47   #include "Selection.h"
48   #include "HZZCiCElectronSelection.h"
49 + #include "SampleWeight.h"
50  
51   //#define THEIR_EVENTS
52  
# Line 82 | Line 84 | int main(int argc, char** argv)
84      chain->AddFile(fname.c_str());
85    }
86  
87 +  // table of cross section values  
88 +  SimpleTable xstab("./data/xs.dat");
89 +
90    //
91    // Setup
92    //--------------------------------------------------------------------------------------------------------------
93    TH1F * h_evt = new TH1F("hevt", "hevt", 2, 0, 2 );
94 <  TH1F * h_evtfail = new TH1F("hevtfail", "hevtfail", 100, 0, 100 );
94 >  TH1F * h_evtfail = new TH1F("hevtfail", "hevtfail", 1024, 0, 1024 );
95    TNtuple * passtuple = new TNtuple( "passtuple", "passtuple", "run:evt:lumi:channel:mZ1:mZ2:m4l:pt4l:w" );
96    initCiCSelection();
97    initRunLumiRangeMap();
# Line 127 | Line 132 | int main(int argc, char** argv)
132      
133      chain->GetEntry(ientry);
134  
135 +    // get event weight for this file                                                    
136 +    double xs=1,eventweight=1;                                                            
137 +    if(ctrl.mc) eventweight = xstab.Get(getname(chain).c_str()) / chain->GetEntries();    
138 +
139   #ifdef THEIR_EVENTS
140      if( !( info->evtNum == 504867308  ||
141             info->evtNum == 368148849  ||
# Line 152 | Line 161 | int main(int argc, char** argv)
161             info->evtNum == 107360878  ) ) continue;
162   #endif
163  
164 <    unsigned evtfail = fails_HZZ4L_selection(ctrl, info, electronArr, muonArr, passtuple );    
156 <    double eventweight = info->eventweight;
164 >    unsigned evtfail = fails_HZZ4L_selection(ctrl, info, electronArr, muonArr, eventweight, passtuple );    
165      h_evtfail->Fill( evtfail, eventweight );
166      cout << endl << endl;  
167            

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines