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.5 by kukartse, Fri Dec 19 07:32:06 2008 UTC vs.
Revision 1.14 by kukartse, Thu May 21 00:17:21 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 "FWCore/ServiceRegistry/interface/Service.h"
36 > #include "PhysicsTools/UtilAlgos/interface/TFileService.h"
37 > #include "DataFormats/Math/interface/LorentzVector.h"
38 > #include "DataFormats/Common/interface/View.h"
39 > #include "DataFormats/PatCandidates/interface/Electron.h"
40 > #include "DataFormats/TrackReco/interface/Track.h"
41  
42   class TtLJetsAnalyzer : public edm::EDAnalyzer {
43   public:
# Line 43 | Line 51 | private:
51    virtual void analyze(const edm::Event&, const edm::EventSetup&);
52    virtual void endJob(void);
53  
54 +  // returns pair<dist,dcot>
55 +  pair<float, float> getConversionInfo(const pat::Electron & el,
56 +                                       const reco::Track & track,
57 +                                       const reco::BeamSpot::Point _bs,
58 +                                       float bField);
59 +
60 +  bool ConversionAlgo(const pat::Electron& e, edm::Handle<edm::View<reco::Track> > track_h);
61 +  double DelRTrackEle(const pat::Electron& e,const reco::Track& tk);
62 +
63 +  edm::Service<TFileService> fs;
64 +
65 +  bool first_event;
66 +
67    // _____ quantities read from the config file _________________________
68 <  std::string _jetSource, _electronSource, _muonSource, _METSource;
68 >  std::string _jetSource, _electronSource, _muonSource, _METSource,
69 >    _beamSpotSource, _trigger_source, _track_source;
70 >  bool _lepton_flavor_is_muon;
71    std::string _outFile;
72 +  bool _is_mc;
73    int nCaloJets_min;
74    int nLepton_min;
75 <  double jet_et_min            ;
75 >  double jet_pt_min            ;
76    double jet_eta_max           ;
77    double muon_pt_min           ;
78    double muon_eta_max          ;
# Line 59 | Line 83 | private:
83    double electron_trackIso_max ;
84    double electron_caloIso_max  ;
85    double met_et_min            ;
86 +  double min_dr_jet_lepton     ;
87 +  double _bfield;
88 +  double _dist_min;
89 +  double _dist_max;
90 +  double _abs_dcot_max;
91 +  double _e_track_dr;
92  
93    RooGKCounter eventCounter;
94    RooGKCounter selectedEvents;
95  
66  TFile * _file;
96    TTree * _tree;
97  
98    //
99    // _____ output tree variables ________________________________________
100 +  //
101    Int_t _event;
102    Int_t _process_id;
103    Int_t _n_jets;
104 +  Int_t _n_removed_jets;
105    Int_t _n_met;
106    Int_t _n_muons;
107    Int_t _n_electrons;
108    Int_t _lepton_is_muon;
109 +  //
110 +  //_____ photon conversion _____________________________________________
111 +  //
112 +  vector<double> * _e_dist;
113 +  vector<double> * _e_dcot;
114 +  bool     _is_conv;
115 +  //
116 +  //_____ trigger _______________________________________________________
117 +  //
118 +  std::map<std::string,bool> _hlt;
119 +  //vector<TBranch> b_hlt;
120 +  //
121    Double_t _event_weight;
122    Double_t _lepton_et;
123    Double_t _lepton_pt;
124    Double_t _lepton_eta;
125    Double_t _lepton_phi;
126 +  Double_t _lepton_jet_min_dr;
127 +  Double_t _lepton_ptrel; // relative to the nearest jet
128 +  Double_t _lepton_d0;    // relative to the beam spot
129 +  Double_t _lepton_d0_err;    // relative to the beam spot
130 +  Double_t _lepton_d0_significance;    // relative to the beam spot
131    Double_t _lepton_energy;
132 +  Double_t _lepton_track_iso;
133 +  Double_t _lepton_calo_iso;
134 +  Double_t _lepton_ecal_iso;
135 +  Double_t _lepton_hcal_iso;
136 +  Double_t _lepton_user_iso;
137 +  Double_t _lepton_IsoDeposit_em;
138 +  Double_t _lepton_IsoDeposit_had;
139 +  Int_t    _muon_track_nhits;
140    Double_t _muon_track_chi2;
141    Double_t _muon_track_ndof;
142    Double_t _muon_track_nChi2;
# Line 90 | Line 146 | private:
146    Double_t _muon_globalTrack_chi2;
147    Double_t _muon_globalTrack_ndof;
148    Double_t _muon_globalTrack_nChi2;
93  Double_t _lepton_track_iso;
94  Double_t _lepton_calo_iso;
95  Double_t _lepton_ecal_iso;
96  Double_t _lepton_hcal_iso;
97  Double_t _lepton_user_iso;
149    Double_t _met_et;
150    Double_t _met_pt;
151    Double_t _met_eta;
# Line 185 | Line 236 | private:
236    //
237    //
238    //_____ b tagging ______________________________________________
239 +  vector<double> * _jet_pt;
240 +  vector<double> * _jet_pz;
241 +  vector<double> * _jet_eta;
242 +  vector<double> * _jet_phi;
243 +  vector<double> * _jet_et;
244 +  vector<double> * _jet_energy;
245 +  vector<int> *    _jet_flavor;
246 +  //
247 +  vector<double> * _muon_pt;
248 +  vector<double> * _muon_pz;
249 +  vector<double> * _muon_eta;
250 +  vector<double> * _muon_phi;
251 +  vector<double> * _muon_et;
252 +  vector<double> * _muon_energy;
253 +  vector<int> *    _muon_flavor;
254 +  //
255 +  vector<double> * _electron_pt;
256 +  vector<double> * _electron_pz;
257 +  vector<double> * _electron_eta;
258 +  vector<double> * _electron_phi;
259 +  vector<double> * _electron_et;
260 +  vector<double> * _electron_energy;
261 +  vector<int> *    _electron_flavor;
262 +  /* FIXME: add vectors of these:
263 +  Double_t _lepton_track_iso;
264 +  Double_t _lepton_calo_iso;
265 +  Double_t _lepton_ecal_iso;
266 +  Double_t _lepton_hcal_iso;
267 +  Double_t _lepton_user_iso;
268 +  Double_t _lepton_IsoDeposit_em;
269 +  Double_t _lepton_IsoDeposit_had;
270 +  */
271 +  TBranch * b_jet_pt;
272 +  TBranch * b_jet_pz;
273 +  TBranch * b_jet_eta;
274 +  TBranch * b_jet_phi;
275 +  TBranch * b_jet_et;
276 +  TBranch * b_jet_energy;
277 +  TBranch * b_jet_flavor;
278 +  //
279 +  TBranch * b_lepton_pt;
280 +  TBranch * b_lepton_pz;
281 +  TBranch * b_lepton_eta;
282 +  TBranch * b_lepton_phi;
283 +  TBranch * b_lepton_et;
284 +  TBranch * b_lepton_energy;
285 +  TBranch * b_lepton_flavor;
286 +  TBranch * b_lepton_jet_min_dr;
287 +  TBranch * b_lepton_ptrel;
288 +  TBranch * b_lepton_d0;
289 +  TBranch * b_lepton_d0_err;
290 +  TBranch * b_lepton_d0_significance;
291 +  //
292    vector<string> * _b_tagger_label;
293    vector<float> * _b_tagger_discr;
294    TBranch * b_b_tagger_label;
# Line 272 | Line 376 | private:
376    TBranch * b_event;
377    TBranch * b_process_id;
378    TBranch * b_n_jets;
379 +  TBranch * b_n_removed_jets;
380    TBranch * b_n_met;
381    TBranch * b_n_muons;
382    TBranch * b_n_electrons;
383    TBranch * b_lepton_is_muon;
384    TBranch * b_event_weight;
385 <  TBranch * b_lepton_et;
386 <  TBranch * b_lepton_pt;
387 <  TBranch * b_lepton_eta;
388 <  TBranch * b_lepton_phi;
389 <  TBranch * b_lepton_energy;
385 >  //
386 >  TBranch * b_muon_et;
387 >  TBranch * b_muon_pt;
388 >  TBranch * b_muon_pz;
389 >  TBranch * b_muon_eta;
390 >  TBranch * b_muon_phi;
391 >  TBranch * b_muon_energy;
392 >  TBranch * b_muon_flavor;
393 >  //
394 >  TBranch * b_electron_et;
395 >  TBranch * b_electron_pt;
396 >  TBranch * b_electron_pz;
397 >  TBranch * b_electron_eta;
398 >  TBranch * b_electron_phi;
399 >  TBranch * b_electron_energy;
400 >  TBranch * b_electron_flavor;
401 >  //
402    TBranch * b_muon_track_chi2;
403    TBranch * b_muon_track_ndof;
404    TBranch * b_muon_track_nChi2;
# Line 296 | Line 413 | private:
413    TBranch * b_lepton_ecal_iso;
414    TBranch * b_lepton_hcal_iso;
415    TBranch * b_lepton_user_iso;
416 +  TBranch * b_lepton_IsoDeposit_em;
417 +  TBranch * b_lepton_IsoDeposit_had;
418    TBranch * b_met_et;
419    TBranch * b_met_pt;
420    TBranch * b_met_eta;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines