ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/TtLJetsAnalyzer.h
(Generate patch)

Comparing UserCode/LJMet/MultivariateAnalysis/interface/TtLJetsAnalyzer.h (file contents):
Revision 1.4 by kukartse, Wed Dec 10 16:44:48 2008 UTC vs.
Revision 1.18 by kukartse, Tue Nov 24 08:02:35 2009 UTC

# Line 17 | Line 17
17   //
18   //
19  
20 + #include "DataFormats/BeamSpot/interface/BeamSpot.h"
21 +
22 + #include "LJMet/MultivariateAnalysis/interface/RooGKCounter.h"
23 +
24   #include <memory>
25   #include <string>
26 <
26 > //#include "TFile.h"
27 > #include "TTree.h"
28 > #include "Rtypes.h"
29   #include "FWCore/Framework/interface/Frameworkfwd.h"
30   #include "FWCore/Framework/interface/EDAnalyzer.h"
31   #include "FWCore/Framework/interface/Event.h"
32   #include "FWCore/Framework/interface/MakerMacros.h"
33   #include "FWCore/ParameterSet/interface/ParameterSet.h"
28 #include "LJMet/MultivariateAnalysis/interface/RooGKCounter.h"
34  
35 < #include "TFile.h"
36 < #include "TTree.h"
37 < #include "Rtypes.h"
35 > #include "DataFormats/Math/interface/LorentzVector.h"
36 > #include "DataFormats/Common/interface/View.h"
37 > #include "DataFormats/PatCandidates/interface/Electron.h"
38 > #include "DataFormats/TrackReco/interface/Track.h"
39  
40   class TtLJetsAnalyzer : public edm::EDAnalyzer {
41   public:
# Line 43 | Line 49 | private:
49    virtual void analyze(const edm::Event&, const edm::EventSetup&);
50    virtual void endJob(void);
51  
52 <  // quantities read from the config file
53 <  std::string _jetSource, _electronSource, _muonSource, _METSource;
52 >  // returns pair<dist,dcot>
53 >  pair<float, float> getConversionInfo(const pat::Electron & el,
54 >                                       const reco::Track & track,
55 >                                       const reco::BeamSpot::Point _bs,
56 >                                       float bField);
57 >
58 >  bool ConversionAlgo(const pat::Electron& e, edm::Handle<edm::View<reco::Track> > track_h);
59 >  double DelRTrackEle(const pat::Electron& e,const reco::Track& tk);
60 >
61 >  bool first_event;
62 >
63 >  // _____ quantities read from the config file _________________________
64 >  std::string _jetSource, _electronSource, _muonSource, _METSource,
65 >    _beamSpotSource, _trigger_source, _track_source;
66 >  std::string pdfWeightTag_;
67 >  bool _lepton_flavor_is_muon;
68    std::string _outFile;
69 +  bool _is_mc;
70    int nCaloJets_min;
71    int nLepton_min;
72    double jet_pt_min            ;
# Line 59 | Line 80 | private:
80    double electron_trackIso_max ;
81    double electron_caloIso_max  ;
82    double met_et_min            ;
83 +  double min_dr_jet_lepton     ;
84 +  double _bfield;
85 +  double _dist_min;
86 +  double _dist_max;
87 +  double _abs_dcot_max;
88 +  double _e_track_dr;
89  
90    RooGKCounter eventCounter;
91    RooGKCounter selectedEvents;
92  
66  TFile * _file;
93    TTree * _tree;
94  
95 <  // output tree variables
96 <  Int_t _event;
95 >  //
96 >  // _____ output tree variables ________________________________________
97 >  //
98 >  Int_t _event, ilumi, irun;
99    Int_t _process_id;
100    Int_t _n_jets;
101 +  Int_t _n_removed_jets;
102    Int_t _n_met;
103    Int_t _n_muons;
104    Int_t _n_electrons;
105    Int_t _lepton_is_muon;
106 +  //
107 +  //_____ photon conversion _____________________________________________
108 +  //
109 +  vector<double> * _e_dist;
110 +  vector<double> * _e_dcot;
111 +  bool     _is_conv;
112 +  //
113 +  //_____ PDF weights ___________________________________________________
114 +  //
115 +  vector<double> * _pdf_weights;
116 +  Double_t _weight_pdf_pos;
117 +  Double_t _weight_pdf_neg;
118 +  //
119 +  //_____ trigger _______________________________________________________
120 +  //
121 +  std::map<std::string,bool> _hlt;
122 +  //vector<TBranch> b_hlt;
123 +  //
124    Double_t _event_weight;
125 +  Double_t _lepton_et;
126    Double_t _lepton_pt;
127    Double_t _lepton_eta;
128    Double_t _lepton_phi;
129 +  Double_t _lepton_jet_min_dr;
130 +  Double_t _lepton_ptrel; // relative to the nearest jet
131 +  Double_t _lepton_d0;    // relative to the beam spot
132 +  Double_t _lepton_d0_err;    // relative to the beam spot
133 +  Double_t _lepton_d0_significance;    // relative to the beam spot
134    Double_t _lepton_energy;
135 +  Double_t _lepton_track_iso;
136 +  Double_t _lepton_calo_iso;
137 +  Double_t _lepton_ecal_iso;
138 +  Double_t _lepton_hcal_iso;
139 +  Double_t _lepton_user_iso;
140 +  Double_t _lepton_IsoDeposit_em;
141 +  Double_t _lepton_IsoDeposit_had;
142 +  Int_t    _muon_track_nhits;
143    Double_t _muon_track_chi2;
144    Double_t _muon_track_ndof;
145    Double_t _muon_track_nChi2;
# Line 88 | Line 149 | private:
149    Double_t _muon_globalTrack_chi2;
150    Double_t _muon_globalTrack_ndof;
151    Double_t _muon_globalTrack_nChi2;
91  Double_t _lepton_track_iso;
92  Double_t _lepton_calo_iso;
93  Double_t _lepton_ecal_iso;
94  Double_t _lepton_hcal_iso;
95  Double_t _lepton_user_iso;
96  Double_t _met_pt;
152    Double_t _met_et;
153 +  Double_t _met_pt;
154    Double_t _met_eta;
155    Double_t _met_phi;
156    Double_t _met_energy;
157 +  Double_t _jet1_et;
158    Double_t _jet1_pt;
159    Double_t _jet1_eta;
160    Double_t _jet1_phi;
161    Double_t _jet1_energy;
162 +  Double_t _jet2_et;
163    Double_t _jet2_pt;
164    Double_t _jet2_eta;
165    Double_t _jet2_phi;
166    Double_t _jet2_energy;
167 +  Double_t _jet3_et;
168    Double_t _jet3_pt;
169    Double_t _jet3_eta;
170    Double_t _jet3_phi;
171    Double_t _jet3_energy;
172 +  Double_t _jet4_et;
173    Double_t _jet4_pt;
174    Double_t _jet4_eta;
175    Double_t _jet4_phi;
# Line 176 | Line 236 | private:
236    // mT              
237    Double_t _getDphiMuMet     ;
238    Double_t _getMt            ;
239 +  //
240 +  //
241 +  //_____ b tagging ______________________________________________
242 +  vector<double> * _jet_pt;
243 +  vector<double> * _jet_pz;
244 +  vector<double> * _jet_eta;
245 +  vector<double> * _jet_phi;
246 +  vector<double> * _jet_et;
247 +  vector<double> * _jet_energy;
248 +  vector<int> *    _jet_flavor;
249 +  //
250 +  vector<double> * _muon_pt;
251 +  vector<double> * _muon_pz;
252 +  vector<double> * _muon_eta;
253 +  vector<double> * _muon_phi;
254 +  vector<double> * _muon_et;
255 +  vector<double> * _muon_energy;
256 +  vector<int> *    _muon_flavor;
257 +  //
258 +  vector<double> * _electron_pt;
259 +  vector<double> * _electron_pz;
260 +  vector<double> * _electron_eta;
261 +  vector<double> * _electron_phi;
262 +  vector<double> * _electron_et;
263 +  vector<double> * _electron_energy;
264 +  vector<int> *    _electron_flavor;
265 +  /* FIXME: add vectors of these:
266 +  Double_t _lepton_track_iso;
267 +  Double_t _lepton_calo_iso;
268 +  Double_t _lepton_ecal_iso;
269 +  Double_t _lepton_hcal_iso;
270 +  Double_t _lepton_user_iso;
271 +  Double_t _lepton_IsoDeposit_em;
272 +  Double_t _lepton_IsoDeposit_had;
273 +  */
274 +  TBranch * b_jet_pt;
275 +  TBranch * b_jet_pz;
276 +  TBranch * b_jet_eta;
277 +  TBranch * b_jet_phi;
278 +  TBranch * b_jet_et;
279 +  TBranch * b_jet_energy;
280 +  TBranch * b_jet_flavor;
281 +  //
282 +  TBranch * b_lepton_pt;
283 +  TBranch * b_lepton_pz;
284 +  TBranch * b_lepton_eta;
285 +  TBranch * b_lepton_phi;
286 +  TBranch * b_lepton_et;
287 +  TBranch * b_lepton_energy;
288 +  TBranch * b_lepton_flavor;
289 +  TBranch * b_lepton_jet_min_dr;
290 +  TBranch * b_lepton_ptrel;
291 +  TBranch * b_lepton_d0;
292 +  TBranch * b_lepton_d0_err;
293 +  TBranch * b_lepton_d0_significance;
294 +  //
295 +  vector<string> * _b_tagger_label;
296 +  vector<float> * _b_tagger_discr;
297 +  TBranch * b_b_tagger_label;
298 +  TBranch * b_b_tagger_discr;
299    Int_t _n_tagged_jets_trackCounting_loose;
300    Int_t _n_tagged_jets_trackCounting_medium;
301    Int_t _n_tagged_jets_trackCounting_tight;
# Line 186 | Line 306 | private:
306    //
307    //
308    //_____ electron quality _______________________________________
309 <  Double_t _electron_id_robust;
310 <  Double_t _electron_id_loose;
311 <  Double_t _electron_id_tight;
312 <  Double_t _electron_tdrid_medium;
313 <  Double_t _electron_tdrid_loose;
194 <  Double_t _electron_tdrid_tight;
309 >  Float_t _eidLoose;
310 >  Float_t _eidRobustHighEnergy;
311 >  Float_t _eidRobustLoose;
312 >  Float_t _eidRobustTight;
313 >  Float_t _eidTight;
314    Int_t    _GsfElectron_classification;
315    Double_t _GsfElectron_hadronicOverEm;
316    Double_t _GsfElectron_caloEnergyError;
317    Double_t _GsfElectron_trackMomentumError;
199  Double_t _GsfElectron_shFracInnerHits; //! measure the fraction of common hits between the GSF and CTF tracks
318    Int_t    _GsfElectron_numberOfClusters;
319    Double_t _GsfElectron_caloEnergy;  // the super cluster energy corrected by EnergyScaleFactor
320    Double_t _GsfElectron_eSuperClusterOverP;  // the supercluster energy / track momentum at impact point
# Line 206 | Line 324 | private:
324    Double_t _GsfElectron_deltaPhiSuperClusterTrackAtVtx;  // the supercluster phi - track phi from helix extrapolation from impact point
325    Double_t _GsfElectron_deltaPhiSeedClusterTrackAtCalo;  // the seed cluster phi - track phi at calo from outermost state
326    // ____ branches
327 <  TBranch * b_electron_id_robust;
328 <  TBranch * b_electron_id_loose;
329 <  TBranch * b_electron_id_tight;
330 <  TBranch * b_electron_tdrid_medium;
331 <  TBranch * b_electron_tdrid_loose;
214 <  TBranch * b_electron_tdrid_tight;
327 >  TBranch * b_eidLoose;
328 >  TBranch * b_eidRobustHighEnergy;
329 >  TBranch * b_eidRobustLoose;
330 >  TBranch * b_eidRobustTight;
331 >  TBranch * b_eidTight;
332    TBranch * b_GsfElectron_classification;
333    TBranch * b_GsfElectron_hadronicOverEm;
334    TBranch * b_GsfElectron_caloEnergyError;
335    TBranch * b_GsfElectron_trackMomentumError;
219  TBranch * b_GsfElectron_shFracInnerHits; //! measure the fraction of common hits between the GSF and CTF tracks
336    TBranch * b_GsfElectron_numberOfClusters;
337    TBranch * b_GsfElectron_caloEnergy;  // the super cluster energy corrected by EnergyScaleFactor
338    TBranch * b_GsfElectron_eSuperClusterOverP;  // the supercluster energy / track momentum at impact point
# Line 263 | Line 379 | private:
379    TBranch * b_event;
380    TBranch * b_process_id;
381    TBranch * b_n_jets;
382 +  TBranch * b_n_removed_jets;
383    TBranch * b_n_met;
384    TBranch * b_n_muons;
385    TBranch * b_n_electrons;
386    TBranch * b_lepton_is_muon;
387    TBranch * b_event_weight;
388 <  TBranch * b_lepton_pt;
389 <  TBranch * b_lepton_eta;
390 <  TBranch * b_lepton_phi;
391 <  TBranch * b_lepton_energy;
388 >  //
389 >  TBranch * b_muon_et;
390 >  TBranch * b_muon_pt;
391 >  TBranch * b_muon_pz;
392 >  TBranch * b_muon_eta;
393 >  TBranch * b_muon_phi;
394 >  TBranch * b_muon_energy;
395 >  TBranch * b_muon_flavor;
396 >  //
397 >  TBranch * b_electron_et;
398 >  TBranch * b_electron_pt;
399 >  TBranch * b_electron_pz;
400 >  TBranch * b_electron_eta;
401 >  TBranch * b_electron_phi;
402 >  TBranch * b_electron_energy;
403 >  TBranch * b_electron_flavor;
404 >  //
405    TBranch * b_muon_track_chi2;
406    TBranch * b_muon_track_ndof;
407    TBranch * b_muon_track_nChi2;
# Line 286 | Line 416 | private:
416    TBranch * b_lepton_ecal_iso;
417    TBranch * b_lepton_hcal_iso;
418    TBranch * b_lepton_user_iso;
419 <  TBranch * b_met_pt;
419 >  TBranch * b_lepton_IsoDeposit_em;
420 >  TBranch * b_lepton_IsoDeposit_had;
421    TBranch * b_met_et;
422 +  TBranch * b_met_pt;
423    TBranch * b_met_eta;
424    TBranch * b_met_phi;
425    TBranch * b_met_energy;
426 +  TBranch * b_jet1_et;
427    TBranch * b_jet1_pt;
428    TBranch * b_jet1_eta;
429    TBranch * b_jet1_phi;
430    TBranch * b_jet1_energy;
431 +  TBranch * b_jet2_et;
432    TBranch * b_jet2_pt;
433    TBranch * b_jet2_eta;
434    TBranch * b_jet2_phi;
435    TBranch * b_jet2_energy;
436 +  TBranch * b_jet3_et;
437    TBranch * b_jet3_pt;
438    TBranch * b_jet3_eta;
439    TBranch * b_jet3_phi;
440    TBranch * b_jet3_energy;
441 +  TBranch * b_jet4_et;
442    TBranch * b_jet4_pt;
443    TBranch * b_jet4_eta;
444    TBranch * b_jet4_phi;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines