1 |
#ifndef utils_h
|
2 |
#define utils_h
|
3 |
|
4 |
#include <math.h>
|
5 |
#include <vector>
|
6 |
|
7 |
#include <fstream>
|
8 |
|
9 |
#include "init.h"
|
10 |
#include "muon.h"
|
11 |
#include "electron.h"
|
12 |
#include "mcParticle.h"
|
13 |
//#include "inputbins.h"
|
14 |
double dR(double eta1, double phi1, double eta2, double phi2);
|
15 |
double pt(double px,double py);
|
16 |
double phi(double px,double py);
|
17 |
double p(double px,double py,double pz);
|
18 |
double eta(double pz,double p);
|
19 |
|
20 |
double correctZZweight(double weight,const double m4l);
|
21 |
double sortMaxToMin(const double* a, const int size, const int j);
|
22 |
|
23 |
int FindTrueLepMatchedToThisRECLep(Electron* recMu,
|
24 |
vector<mcParticle*> genMus, double deltar = 0.3, bool requiresamecharge=false);
|
25 |
int FindRecLepMatchedToThisGenLep(mcParticle* genMu,
|
26 |
vector<Electron*> recMus, double deltar=0.3, bool requiresamecharge=false);
|
27 |
int FindRecLepMatchedToThisGenLep(mcParticle* genMu,
|
28 |
vector<Electron*> recMus, int used, double deltar=0.3, bool requiresamecharge=false);
|
29 |
int FindTrueLepMatchedToThisRECLep(Muon* recMu,
|
30 |
vector<mcParticle*> genMus, double deltar=0.3, bool requiresamecharge=false);
|
31 |
int FindRecLepMatchedToThisGenLep(mcParticle* genMu,
|
32 |
vector<Muon*> recMus, double deltar=0.3, bool requiresamecharge=false);
|
33 |
int FindRecLepMatchedToThisGenLep(mcParticle* genMu,
|
34 |
vector<Muon*> recMus, int used, double deltar=0.3, bool requiresamecharge=false);
|
35 |
void PrintRecMuonInfo(vector<Muon*> recMu, ofstream & fout);
|
36 |
void PrintRecMuonInfo(vector<Muon*> recMu);
|
37 |
void PrintBriefGenChain(vector<mcParticle*> genMu, ofstream& fout);
|
38 |
|
39 |
int FindTrueElectronMatchedToThisRECElectron(Electron* recEl,
|
40 |
vector<mcParticle*> genEls);
|
41 |
void PrintRecElectronInfo(vector<Electron*> recEl, ofstream & fout);
|
42 |
|
43 |
float DeltaPhi(float v1, float v2);
|
44 |
float GetDeltaR(float eta1, float eta2, float phi1, float phi2);
|
45 |
char * asctime_mine(const struct tm *timeptr);
|
46 |
bool filterRun(int run, int lumi);
|
47 |
double GetTheta( TLorentzVector a, TLorentzVector b) ;
|
48 |
double TransverseMass(double metx, double mety, TLorentzVector lepton );
|
49 |
#endif
|