[2] | 1 | #ifndef _SMEARUTIL_H_
|
---|
| 2 | #define _SMEARUTIL_H_
|
---|
| 3 |
|
---|
| 4 | /*
|
---|
| 5 | ---- Delphes ----
|
---|
| 6 | A Fast Simulator for general purpose LHC detector
|
---|
| 7 | S. Ovyn ~~~~ severine.ovyn@uclouvain.be
|
---|
| 8 |
|
---|
| 9 | Center for Particle Physics and Phenomenology (CP3)
|
---|
| 10 | Universite Catholique de Louvain (UCL)
|
---|
| 11 | Louvain-la-Neuve, Belgium
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | /// \file SmearUtil.h
|
---|
| 15 | /// \brief RESOLution class, and some generic definitions
|
---|
| 16 |
|
---|
| 17 |
|
---|
| 18 | #include <vector>
|
---|
| 19 | #include "TLorentzVector.h"
|
---|
| 20 |
|
---|
| 21 | #include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
|
---|
| 22 | #include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
|
---|
| 23 |
|
---|
[11] | 24 | #include "Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh"
|
---|
[2] | 25 | using namespace std;
|
---|
| 26 |
|
---|
| 27 | class RESOLution
|
---|
| 28 | {
|
---|
| 29 | public:
|
---|
| 30 | /// Constructor
|
---|
| 31 | RESOLution();
|
---|
| 32 |
|
---|
| 33 | // Detector coverage
|
---|
| 34 | float MAX_TRACKER; // tracker pseudorapidity coverage
|
---|
| 35 | float MAX_CALO_CEN; // central calorimeter pseudorapidity coverage
|
---|
| 36 | float MAX_CALO_FWD; // forward calorimeter pseudorapidity coverage
|
---|
| 37 | float MAX_MU; // muon chambers pseudorapidity coverage
|
---|
| 38 | float MIN_CALO_VFWD; // very forward calorimeter pseudorapidity coverage
|
---|
| 39 | float MAX_CALO_VFWD; // very forward calorimeter pseudorapidity coverage
|
---|
| 40 | float MIN_ZDC; // coverage for Zero Degree Calorimeter, for photons and neutrons
|
---|
| 41 |
|
---|
| 42 | float ZDC_S; // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m]
|
---|
| 43 | float RP220_S; // distance of the RP to the IP, in meters
|
---|
| 44 | float RP220_X; // distance of the RP to the beam, in meters
|
---|
| 45 | float FP420_S; // distance of the RP to the IP, in meters
|
---|
| 46 | float FP420_X; // distance of the RP to the beam, in meters
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 | //energy resolution for electron/photon
|
---|
| 50 | // \sigma/E = C + N/E + S/\sqrt{E}
|
---|
| 51 | float ELG_Scen; // S term for central ECAL
|
---|
| 52 | float ELG_Ncen; // N term for central ECAL
|
---|
| 53 | float ELG_Ccen; // C term for central ECAL
|
---|
| 54 | float ELG_Sfwd; // S term for forward ECAL
|
---|
| 55 | float ELG_Cfwd; // C term for forward ECAL
|
---|
| 56 | float ELG_Nfwd; // N term for central ECAL
|
---|
| 57 |
|
---|
| 58 | //energy resolution for hadrons in ecal/hcal/hf
|
---|
| 59 | // \sigma/E = C + N/E + S/\sqrt{E}
|
---|
| 60 | float HAD_Secal; // S term for central ECAL // electromagnetic calorimeter
|
---|
| 61 | float HAD_Necal; // N term for central ECAL
|
---|
| 62 | float HAD_Cecal; // C term for central ECAL
|
---|
| 63 | float HAD_Shcal; // S term for central HCAL // hadronic calorimeter
|
---|
| 64 | float HAD_Nhcal; // N term for central HCAL
|
---|
| 65 | float HAD_Chcal; // C term for central HCAL
|
---|
| 66 | float HAD_Shf; // S term for central HF // forward calorimeter
|
---|
| 67 | float HAD_Nhf; // N term for central HF
|
---|
| 68 | float HAD_Chf; // C term for central HF
|
---|
| 69 |
|
---|
| 70 | // muon smearing
|
---|
| 71 | float MU_SmearPt;
|
---|
| 72 |
|
---|
| 73 | //For Tau-jet definition
|
---|
| 74 | // R = sqrt (phi^2 + eta^2)
|
---|
| 75 | float TAU_CONE_ENERGY; // radius R of the cone for tau definition, based on energy threshold
|
---|
| 76 | float TAU_CONE_TRACKS; // radius R of the cone for tau definition, based on track number
|
---|
| 77 | float PT_TRACK_TAU; // minimal pt [GeV] for tracks to be considered in tau definition
|
---|
| 78 | float TAU_EM_COLLIMATION; // fraction of energy required in the central part of the cone, for tau jets
|
---|
| 79 |
|
---|
| 80 | // Tracker acceptance
|
---|
| 81 | float PT_TRACKS_MIN; // minimal pt needed to reach the calorimeter, in GeV
|
---|
| 82 | float PT_QUARKS_MIN; // minimal pt needed for quarks to reach the tracker, in GeV
|
---|
| 83 | int TRACKING_EFF; // in percent, should be an integer
|
---|
| 84 |
|
---|
| 85 | //tagging definition
|
---|
| 86 | int TAGGING_B; //
|
---|
| 87 | int MISTAGGING_C;
|
---|
| 88 | int MISTAGGING_L;
|
---|
| 89 |
|
---|
| 90 | double CONERADIUS;
|
---|
| 91 | int JETALGO;
|
---|
| 92 | // MidPoint algorithm definition
|
---|
| 93 | double M_SEEDTHRESHOLD;
|
---|
| 94 | double M_CONEAREAFRACTION;
|
---|
| 95 | int M_MAXPAIRSIZE;
|
---|
| 96 | int M_MAXITERATIONS;
|
---|
| 97 | double M_OVERLAPTHRESHOLD;
|
---|
| 98 |
|
---|
| 99 | // Define Cone algorithm.
|
---|
| 100 | double C_SEEDTHRESHOLD;
|
---|
| 101 | int C_ADJACENCYCUT;
|
---|
| 102 | int C_MAXITERATIONS;
|
---|
| 103 | int C_IRATCH;
|
---|
| 104 | double C_OVERLAPTHRESHOLD;
|
---|
| 105 |
|
---|
| 106 | /// Reads the data card for the initialisation of the parameters
|
---|
| 107 | void ReadDataCard(const string datacard);
|
---|
| 108 |
|
---|
| 109 | /// Provides the smeared TLorentzVector for the electrons
|
---|
| 110 | void SmearElectron(TLorentzVector &electron);
|
---|
| 111 |
|
---|
| 112 | /// Provides the smeared TLorentzVector for the muons
|
---|
| 113 | void SmearMu(TLorentzVector &muon);
|
---|
| 114 |
|
---|
| 115 | /// Provides the smeared TLorentzVector for the hadrons
|
---|
| 116 | void SmearHadron(TLorentzVector &hadron, const float frac);
|
---|
| 117 |
|
---|
| 118 | //*****************************fonction pour avoir les taus************************************
|
---|
| 119 | double EnergySmallCone(const vector<PhysicsTower> &towers, const float eta, const float phi);
|
---|
| 120 |
|
---|
| 121 | //***************** Fonction pour avoir le nombre de traces pour les taus****************************
|
---|
| 122 | unsigned int NumTracks(const vector<TLorentzVector> &tracks, const float pt_track, const float eta, const float phi);
|
---|
| 123 |
|
---|
| 124 | //**********************fonction pour avoir les b-jets******************************
|
---|
| 125 | int Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi);
|
---|
| 126 |
|
---|
| 127 | //******************** retourne l'efficacite de b-tagging ******************************
|
---|
| 128 | bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray);
|
---|
| 129 |
|
---|
| 130 | };
|
---|
| 131 |
|
---|
| 132 |
|
---|
| 133 | // particles PID (PDG ID)
|
---|
| 134 | const int pU = 1; // c quark
|
---|
| 135 | const int pD = 2; // b quark
|
---|
| 136 | const int pS = 3; // s quark
|
---|
| 137 | const int pC = 4; // c quark
|
---|
| 138 | const int pB = 5; // b quark
|
---|
| 139 | const int pE = 11; // e
|
---|
| 140 | const int pNU1 = 12; // nu_e
|
---|
| 141 | const int pMU = 13; // mu
|
---|
| 142 | const int pNU2 = 14; // nu_mu
|
---|
| 143 | const int pTAU = 15; // tau
|
---|
| 144 | const int pNU3 = 16; // nu_tau
|
---|
| 145 | const int pGLUON = 21; // gluon
|
---|
| 146 | const int pGAMMA = 22; // gamma
|
---|
| 147 | const int pW = 24; // W
|
---|
| 148 | const int pP = 2212; // proton
|
---|
| 149 | const int pN = 2112; // neutron
|
---|
| 150 | const int pPI0 = 111; // pi_0
|
---|
| 151 | const int pK0L = 130; // K^0_L
|
---|
| 152 | const int pK0S = 310; // K^0_S
|
---|
| 153 | const int pLAMBDA = 3122; // Lambda
|
---|
| 154 | const int pSIGMA0 = 3212; // Sigma^0
|
---|
| 155 | const int pDELTA0 = 2114; // Delta^0
|
---|
| 156 |
|
---|
| 157 | const double speed_of_light = 299792458; // m/s
|
---|
| 158 |
|
---|
| 159 | #ifndef __PI__
|
---|
| 160 | #define __PI__
|
---|
| 161 | const double PI = acos(-1.0);
|
---|
| 162 | #endif
|
---|
| 163 |
|
---|
| 164 | // ** returns the sign (+1 or -1) or an integer
|
---|
| 165 | int sign(const int myint);
|
---|
| 166 | int sign(const float myfloat);
|
---|
| 167 |
|
---|
| 168 | // **************************** Return the Delta Phi****************************
|
---|
| 169 | float DeltaPhi(const float phi1, const float phi2);
|
---|
| 170 |
|
---|
| 171 | // **************************** Returns the Delta R****************************
|
---|
| 172 | float DeltaR(const float phi1, const float eta1, const float phi2, const float eta2);
|
---|
| 173 |
|
---|
| 174 | //************* Returns an array of the quarks sitting within the tracker acceptance ***************
|
---|
| 175 | float Charge(const int pid);
|
---|
| 176 |
|
---|
| 177 | #endif
|
---|