ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/interface/ntupleReader.hpp
(Generate patch)

Comparing UserCode/VHbb/interface/ntupleReader.hpp (file contents):
Revision 1.1 by bortigno, Fri Apr 27 14:24:40 2012 UTC vs.
Revision 1.3 by bortigno, Tue May 8 08:13:10 2012 UTC

# Line 5 | Line 5
5   #include <TChain.h>
6   #include <TFile.h>
7   #include "TLorentzVector.h"
8 < #include "ntupleLoader.h"
8 > #include "ntupleLoader.hpp"
9  
10   class ntupleReader : public ntupleLoader {
11   public :
12  
13 <  ntupleReader(const char * infile) : ntupleLoader ( infile );
14 <  virtual ~ntupleReader();
13 >  ntupleReader(const char * infile) : ntupleLoader( infile ){};
14 >  //  virtual ~ntupleReader();
15     virtual std::vector<TLorentzVector> SimBs();
16     virtual std::vector<TLorentzVector> SVs();
17     virtual int CountJets();
# Line 21 | Line 21 | public :
21     virtual int CountAddLeptons();
22     virtual bool TriggerBit();
23     virtual TLorentzVector VectorBoson(); //vector boson TLorentz vector
24 +   virtual double resolution(double eta); //smearing for the jet energy resolution
25 +   virtual TLorentzVector hJet_jer( int idx, double sign );
26 +   virtual TLorentzVector H_jer( double sing );
27     virtual double hJet_PT( int idx, int sign ); //higgs jet energy correction
28     virtual double aJet_PT( int idx, int sign ); //addtional jet energy correction
29     virtual TLorentzVector Higgs( int sign ); //higgs candidate jet energy correction
# Line 69 | Line 72 | TLorentzVector ntupleReader::VectorBoson
72    return (l1+l2);
73   }
74  
75 + //JER
76 + double ntupleReader::resolution(double eta){
77 +  double inner = 0.06;
78 +  double outer = 0.1;
79 +  double eta_tracker = 1.1;
80 +  if(abs(eta) < eta_tracker) return inner; else return outer;
81 + }
82 + TLorentzVector ntupleReader::hJet_jer( int idx, double sign ){
83 +  TLorentzVector tmp;
84 +  double hJet_pt_jer = hJet_pt[idx] + sign * resolution(hJet_eta[idx])*TMath::Abs(hJet_pt[idx]-hJet_genPt[idx]);
85 +  tmp.SetPtEtaPhiE(  hJet_pt_jer,
86 +                     hJet_eta[idx],
87 +                     hJet_phi[idx],
88 +                     hJet_e[idx]*(hJet_pt_jer/hJet_pt[idx]) );
89 + return tmp;
90 + }
91 +
92 + TLorentzVector ntupleReader::H_jer( double sign ){
93 +  TLorentzVector h;
94 +  h = hJet_jer( 0, sign ) + hJet_jer( 1, sign );
95 +  return h;
96 + }
97 +
98   double ntupleReader::hJet_PT( int idx, int sign ){ return  hJet_pt[idx]*(1 + (sign)*hJet_JECUnc[idx]); }
99   double ntupleReader::aJet_PT( int idx, int sign ){ return  aJet_pt[idx]*(1 + (sign)*aJet_JECUnc[idx]); }
100   TLorentzVector ntupleReader::Higgs( int sign ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines