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.8 by kukartse, Thu Mar 5 17:30:20 2009 UTC vs.
Revision 1.13 by kukartse, Thu May 14 00:12:39 2009 UTC

# Line 21 | Line 21
21  
22   #include <memory>
23   #include <string>
24 < #include "TFile.h"
24 > //#include "TFile.h"
25   #include "TTree.h"
26   #include "Rtypes.h"
27   #include "FWCore/Framework/interface/Frameworkfwd.h"
# Line 30 | Line 30
30   #include "FWCore/Framework/interface/MakerMacros.h"
31   #include "FWCore/ParameterSet/interface/ParameterSet.h"
32  
33 + #include "FWCore/ServiceRegistry/interface/Service.h"
34 + #include "PhysicsTools/UtilAlgos/interface/TFileService.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:
42    explicit TtLJetsAnalyzer(const edm::ParameterSet&);
# Line 42 | Line 49 | private:
49    virtual void analyze(const edm::Event&, const edm::EventSetup&);
50    virtual void endJob(void);
51  
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 +  edm::Service<TFileService> fs;
62 +
63 +  bool first_event;
64 +
65    // _____ quantities read from the config file _________________________
66 <  std::string _jetSource, _electronSource, _muonSource, _METSource;
66 >  std::string _jetSource, _electronSource, _muonSource, _METSource,
67 >    _beamSpotSource, _trigger_source, _track_source;
68 >  bool _lepton_flavor_is_muon;
69    std::string _outFile;
70    bool _is_mc;
71    int nCaloJets_min;
# Line 60 | Line 82 | private:
82    double electron_caloIso_max  ;
83    double met_et_min            ;
84    double min_dr_jet_lepton     ;
85 +  double _bfield;
86 +  double _dist_min;
87 +  double _dist_max;
88 +  double _abs_dcot_max;
89 +  double _e_track_dr;
90  
91    RooGKCounter eventCounter;
92    RooGKCounter selectedEvents;
93  
67  TFile * _file;
94    TTree * _tree;
95  
96    //
97    // _____ output tree variables ________________________________________
98 +  //
99    Int_t _event;
100    Int_t _process_id;
101    Int_t _n_jets;
# Line 77 | Line 104 | private:
104    Int_t _n_muons;
105    Int_t _n_electrons;
106    Int_t _lepton_is_muon;
107 +  //
108 +  //_____ photon conversion _____________________________________________
109 +  //
110 +  vector<double> * _e_dist;
111 +  vector<double> * _e_dcot;
112 +  bool     _is_conv;
113 +  //
114 +  //_____ trigger _______________________________________________________
115 +  //
116 +  std::map<std::string,bool> _hlt;
117 +  //vector<TBranch> b_hlt;
118 +  //
119    Double_t _event_weight;
120    Double_t _lepton_et;
121    Double_t _lepton_pt;
122    Double_t _lepton_eta;
123    Double_t _lepton_phi;
124 +  Double_t _lepton_jet_min_dr;
125 +  Double_t _lepton_ptrel; // relative to the nearest jet
126 +  Double_t _lepton_d0;    // relative to the beam spot
127 +  Double_t _lepton_d0_err;    // relative to the beam spot
128 +  Double_t _lepton_d0_significance;    // relative to the beam spot
129    Double_t _lepton_energy;
130 +  Double_t _lepton_track_iso;
131 +  Double_t _lepton_calo_iso;
132 +  Double_t _lepton_ecal_iso;
133 +  Double_t _lepton_hcal_iso;
134 +  Double_t _lepton_user_iso;
135 +  Double_t _lepton_IsoDeposit_em;
136 +  Double_t _lepton_IsoDeposit_had;
137 +  Int_t    _muon_track_nhits;
138    Double_t _muon_track_chi2;
139    Double_t _muon_track_ndof;
140    Double_t _muon_track_nChi2;
# Line 92 | Line 144 | private:
144    Double_t _muon_globalTrack_chi2;
145    Double_t _muon_globalTrack_ndof;
146    Double_t _muon_globalTrack_nChi2;
95  Double_t _lepton_track_iso;
96  Double_t _lepton_calo_iso;
97  Double_t _lepton_ecal_iso;
98  Double_t _lepton_hcal_iso;
99  Double_t _lepton_user_iso;
100  Double_t _lepton_IsoDeposit_em;
101  Double_t _lepton_IsoDeposit_had;
147    Double_t _met_et;
148    Double_t _met_pt;
149    Double_t _met_eta;
# Line 196 | Line 241 | private:
241    vector<double> * _jet_et;
242    vector<double> * _jet_energy;
243    vector<int> *    _jet_flavor;
244 <  vector<double> * _lept_pt;
245 <  vector<double> * _lept_pz;
246 <  vector<double> * _lept_eta;
247 <  vector<double> * _lept_phi;
248 <  vector<double> * _lept_et;
249 <  vector<double> * _lept_energy;
250 <  vector<int> *    _lept_flavor;
244 >  //
245 >  vector<double> * _muon_pt;
246 >  vector<double> * _muon_pz;
247 >  vector<double> * _muon_eta;
248 >  vector<double> * _muon_phi;
249 >  vector<double> * _muon_et;
250 >  vector<double> * _muon_energy;
251 >  vector<int> *    _muon_flavor;
252 >  //
253 >  vector<double> * _electron_pt;
254 >  vector<double> * _electron_pz;
255 >  vector<double> * _electron_eta;
256 >  vector<double> * _electron_phi;
257 >  vector<double> * _electron_et;
258 >  vector<double> * _electron_energy;
259 >  vector<int> *    _electron_flavor;
260    /* FIXME: add vectors of these:
261    Double_t _lepton_track_iso;
262    Double_t _lepton_calo_iso;
# Line 219 | Line 273 | private:
273    TBranch * b_jet_et;
274    TBranch * b_jet_energy;
275    TBranch * b_jet_flavor;
276 <  TBranch * b_lept_pt;
277 <  TBranch * b_lept_pz;
278 <  TBranch * b_lept_eta;
279 <  TBranch * b_lept_phi;
280 <  TBranch * b_lept_et;
281 <  TBranch * b_lept_energy;
282 <  TBranch * b_lept_flavor;
276 >  //
277 >  TBranch * b_lepton_pt;
278 >  TBranch * b_lepton_pz;
279 >  TBranch * b_lepton_eta;
280 >  TBranch * b_lepton_phi;
281 >  TBranch * b_lepton_et;
282 >  TBranch * b_lepton_energy;
283 >  TBranch * b_lepton_flavor;
284 >  TBranch * b_lepton_jet_min_dr;
285 >  TBranch * b_lepton_ptrel;
286 >  TBranch * b_lepton_d0;
287 >  TBranch * b_lepton_d0_err;
288 >  TBranch * b_lepton_d0_significance;
289 >  //
290    vector<string> * _b_tagger_label;
291    vector<float> * _b_tagger_discr;
292    TBranch * b_b_tagger_label;
# Line 319 | Line 380 | private:
380    TBranch * b_n_electrons;
381    TBranch * b_lepton_is_muon;
382    TBranch * b_event_weight;
383 <  TBranch * b_lepton_et;
384 <  TBranch * b_lepton_pt;
385 <  TBranch * b_lepton_eta;
386 <  TBranch * b_lepton_phi;
387 <  TBranch * b_lepton_energy;
383 >  //
384 >  TBranch * b_muon_et;
385 >  TBranch * b_muon_pt;
386 >  TBranch * b_muon_pz;
387 >  TBranch * b_muon_eta;
388 >  TBranch * b_muon_phi;
389 >  TBranch * b_muon_energy;
390 >  TBranch * b_muon_flavor;
391 >  //
392 >  TBranch * b_electron_et;
393 >  TBranch * b_electron_pt;
394 >  TBranch * b_electron_pz;
395 >  TBranch * b_electron_eta;
396 >  TBranch * b_electron_phi;
397 >  TBranch * b_electron_energy;
398 >  TBranch * b_electron_flavor;
399 >  //
400    TBranch * b_muon_track_chi2;
401    TBranch * b_muon_track_ndof;
402    TBranch * b_muon_track_nChi2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines