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.70 by anlevin, Sun Jan 20 06:55:17 2013 UTC vs.
Revision 1.73 by anlevin, Tue Feb 5 09:53:47 2013 UTC

# Line 81 | Line 81 | using namespace std;
81  
82   #include "SimpleLepton.h"
83  
84 + #include "Cintex/Cintex.h"
85 +
86   #ifndef CMSSW_BASE
87   #define CMSSW_BASE "../"
88   #endif
# Line 132 | Line 134 | void initRunLumiRangeMap(ControlFlags &c
134   int main(int argc, char** argv)
135   //----------------------------------------------------------------------------
136   {
137 +
138    vector<TString> cuts;
139    cuts.push_back("start"); // NOTE: is incremented in ReferenceSelection, so if you turn on JSONS be careful
140    cuts.push_back("trigger");
# Line 225 | Line 228 | int main(int argc, char** argv)
228      if(ctrl.use_xs_weights) getWeight(xstab,entrymap,chain); // test *now* whether we've got the xs in here, so it fails before it creates the output
229    }
230  
231 +  //root will write to this temporary file instead of to memory and the selection will run faster
232 +
233    //
234    // Setup
235    //--------------------------------------------------------------------------------------------------------------
# Line 275 | Line 280 | int main(int argc, char** argv)
280    initMassErrors();
281    ti.dump();
282  
283 <  if(ctrl.do_escale) {
283 >  TFile tmp_file("tmp_file.root");
284 >
285 >  if(ctrl.do_eregression) {
286      string regPath("EGamma/EGammaAnalysisTools/data/eleEnergyRegWeights_V1.root");
287      // if(TString(getenv("HOSTNAME")).Contains(TRegexp("t3[bd][te][cs][hk]")))
288 <      regPath = cmsswpath + "/" + regPath;
288 >    regPath = cmsswpath + "/" + regPath;
289      electron_momentum_correction.initialize_regression(regPath);
290 +  }
291 +
292 +  if(ctrl.do_escale) {
293      if(ctrl.mc) {
294        if(ctrl.era == 2011) ctrl.smearing_scaling_dataset = "Fall11";
295        else                 ctrl.smearing_scaling_dataset = "Summer12_DR53X_HCP2012";
296      } else {
297        if(ctrl.era == 2011) ctrl.smearing_scaling_dataset = "Jan16ReReco";
298 <      else                 ctrl.smearing_scaling_dataset = "2012Jul13ReReco";
298 >      else                 ctrl.smearing_scaling_dataset = "Moriond2013";
299      }
300    }
301    if(ctrl.correct_muon_momentum) {
# Line 366 | Line 376 | int main(int argc, char** argv)
376      chain->GetEntry(ientry);
377      if(!(ientry%1000)) cerr << "entry: " << ientry << " ( / " << imax << " )" << endl;
378  
379 +    //if(info->EvtNum() != 217502611) continue;
380 +
381      increment(counts,"start");
382      if( ctrl.debug ) {
383        cout << "-----------------------------------------------------------------" << endl;
# Line 494 | Line 506 | int main(int argc, char** argv)
506          if(ctrl.debug) cout << "failing PASS_GOODZ1" << endl;
507        }
508      }
509 +
510 +    hltTable->Delete();
511 +
512    }
513  
514    if(ctrl.fakeScheme != "none") {
# Line 507 | Line 522 | int main(int argc, char** argv)
522      cerr << setw(25) << cuts[icut] << "\t" << setw(9) << thisCount["all"] << "  ("
523           << setw(9) << thisCount["4e"] << setw(9) << thisCount["4m"] << setw(9) << thisCount["2e2m"] << ")" << endl;
524    }
525 +
526 +  tmp_file.Close();
527 +
528   }
529   //----------------------------------------------------------------------------------------
530   void addDummyZ2Lepotons(EventData &ret4l)
# Line 530 | Line 548 | void setNtupleVals(ControlFlags &ctrl, E
548    //the last two arguments are usePt and useY respectively
549    fillMela(kine,0,0);
550  
551 <  fillMassErrors(ctrl,ret4l,muonArr,electronArr,kine,false);
551 >  fillMassErrors(ctrl,ret4l,muonArr,electronArr,kine);
552  
553    TLorentzVector pfmet; pfmet.SetPxPyPzE(metArr->At(0)->Mex(),metArr->At(0)->Mey(),0,0);
554    fillEventInfo( info, pfmet, evtinfo, ctrl.mc ? getNPU(puArr) : 0, vtxArr->GetEntries());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines