#ifndef _SMEARUTIL_H_ #define _SMEARUTIL_H_ /* ---- Delphes ---- A Fast Simulator for general purpose LHC detector S. Ovyn ~~~~ severine.ovyn@uclouvain.be Center for Particle Physics and Phenomenology (CP3) Universite Catholique de Louvain (UCL) Louvain-la-Neuve, Belgium */ /// \file SmearUtil.h /// \brief RESOLution class, and some generic definitions #include #include "TLorentzVector.h" #include "Utilities/ExRootAnalysis/interface/BlockClasses.h" #include "Utilities/ExRootAnalysis/interface/TSimpleArray.h" #include "Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh" using namespace std; class RESOLution { public: /// Constructor RESOLution(); // Detector coverage float MAX_TRACKER; // tracker pseudorapidity coverage float MAX_CALO_CEN; // central calorimeter pseudorapidity coverage float MAX_CALO_FWD; // forward calorimeter pseudorapidity coverage float MAX_MU; // muon chambers pseudorapidity coverage float MIN_CALO_VFWD; // very forward calorimeter pseudorapidity coverage float MAX_CALO_VFWD; // very forward calorimeter pseudorapidity coverage float MIN_ZDC; // coverage for Zero Degree Calorimeter, for photons and neutrons float ZDC_S; // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m] float RP220_S; // distance of the RP to the IP, in meters float RP220_X; // distance of the RP to the beam, in meters float FP420_S; // distance of the RP to the IP, in meters float FP420_X; // distance of the RP to the beam, in meters //Magnetic Field information int TRACKING_RADIUS; //radius of the BField coverage int TRACKING_LENGTH; //length of the BField coverage float BFIELD_X; float BFIELD_Y; float BFIELD_Z; //energy resolution for electron/photon // \sigma/E = C + N/E + S/\sqrt{E} float ELG_Scen; // S term for central ECAL float ELG_Ncen; // N term for central ECAL float ELG_Ccen; // C term for central ECAL float ELG_Sfwd; // S term for forward ECAL float ELG_Cfwd; // C term for forward ECAL float ELG_Nfwd; // N term for central ECAL //energy resolution for hadrons in ecal/hcal/hf // \sigma/E = C + N/E + S/\sqrt{E} float HAD_Shcal; // S term for central HCAL // hadronic calorimeter float HAD_Nhcal; // N term for central HCAL float HAD_Chcal; // C term for central HCAL float HAD_Shf; // S term for central HF // forward calorimeter float HAD_Nhf; // N term for central HF float HAD_Chf; // C term for central HF // muon smearing float MU_SmearPt; //threshold for reconstructed objetcs float ELEC_pt; float MUON_pt; float JET_pt; float TAUJET_pt; //For Tau-jet definition // R = sqrt (phi^2 + eta^2) float TAU_CONE_ENERGY; // radius R of the cone for tau definition, based on energy threshold float TAU_CONE_TRACKS; // radius R of the cone for tau definition, based on track number float PT_TRACK_TAU; // minimal pt [GeV] for tracks to be considered in tau definition float TAU_EM_COLLIMATION; // fraction of energy required in the central part of the cone, for tau jets // Tracker acceptance float PT_TRACKS_MIN; // minimal pt needed to reach the calorimeter, in GeV float PT_QUARKS_MIN; // minimal pt needed for quarks to reach the tracker, in GeV int TRACKING_EFF; // in percent, should be an integer //tagging definition int TAGGING_B; // int MISTAGGING_C; int MISTAGGING_L; double CONERADIUS; int JETALGO; //General jet variable double SEEDTHRESHOLD; double OVERLAPTHRESHOLD; // MidPoint algorithm definition double M_CONEAREAFRACTION; int M_MAXPAIRSIZE; int M_MAXITERATIONS; // Define Cone algorithm. int C_ADJACENCYCUT; int C_MAXITERATIONS; int C_IRATCH; //Define SISCone algorithm. int NPASS; double PROTOJET_PTMIN; // Define Calorimetric towers unsigned int NTOWERS; float * TOWER_ETA_EDGES; float * TOWER_DPHI; /// Reads the data card for the initialisation of the parameters void ReadDataCard(const string datacard); /// Create the output log file void Logfile(string LogName); /// Provides the smeared TLorentzVector for the electrons void SmearElectron(TLorentzVector &electron); /// Provides the smeared TLorentzVector for the muons void SmearMu(TLorentzVector &muon); /// Provides the smeared TLorentzVector for the hadrons void SmearHadron(TLorentzVector &hadron, const float frac); //*****************************fonction pour avoir les taus************************************ double EnergySmallCone(const vector &towers, const float eta, const float phi); //***************** Fonction pour avoir le nombre de traces pour les taus**************************** unsigned int NumTracks(const vector &tracks, const float pt_track, const float eta, const float phi); //**********************fonction pour avoir les b-jets****************************** int Bjets(const TSimpleArray &subarray, const float eta, const float phi); //******************** retourne l'efficacite de b-tagging ****************************** bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray &subarray); //******************************isolation criteria************************************** bool Isolation(Float_t phi,Float_t eta,const vector &tracks,float PT_TRACK2); //********************* returns a segmented value for eta and phi, for calo towers ***** void BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta); }; // particles PID (PDG ID) const int pU = 1; // c quark const int pD = 2; // b quark const int pS = 3; // s quark const int pC = 4; // c quark const int pB = 5; // b quark const int pE = 11; // e const int pNU1 = 12; // nu_e const int pMU = 13; // mu const int pNU2 = 14; // nu_mu const int pTAU = 15; // tau const int pNU3 = 16; // nu_tau const int pGLUON = 21; // gluon const int pGAMMA = 22; // gamma const int pW = 24; // W const int pP = 2212; // proton const int pN = 2112; // neutron const int pPI0 = 111; // pi_0 const int pK0L = 130; // K^0_L const int pK0S = 310; // K^0_S const int pLAMBDA = 3122; // Lambda const int pSIGMA0 = 3212; // Sigma^0 const int pDELTA0 = 2114; // Delta^0 const double speed_of_light = 299792458; // m/s #ifndef __PI__ #define __PI__ const double PI = acos(-1.0); #endif // ** returns the sign (+1 or -1) or an integer int sign(const int myint); int sign(const float myfloat); // **************************** Return the Delta Phi**************************** float DeltaPhi(const float phi1, const float phi2); // **************************** Returns the Delta R**************************** float DeltaR(const float phi1, const float eta1, const float phi2, const float eta2); //************* Returns an array of the quarks sitting within the tracker acceptance *************** int Charge(int pid); #endif