Fork me on GitHub

source: svn/trunk/interface/SmearUtil.h@ 32

Last change on this file since 32 was 32, checked in by severine ovyn, 16 years ago

remove HCALecal

File size: 6.3 KB
Line 
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
24#include "Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh"
25using namespace std;
26
27class 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_Shcal; // S term for central HCAL // hadronic calorimeter
61 float HAD_Nhcal; // N term for central HCAL
62 float HAD_Chcal; // C term for central HCAL
63 float HAD_Shf; // S term for central HF // forward calorimeter
64 float HAD_Nhf; // N term for central HF
65 float HAD_Chf; // C term for central HF
66
67 // muon smearing
68 float MU_SmearPt;
69
70 //For Tau-jet definition
71 // R = sqrt (phi^2 + eta^2)
72 float TAU_CONE_ENERGY; // radius R of the cone for tau definition, based on energy threshold
73 float TAU_CONE_TRACKS; // radius R of the cone for tau definition, based on track number
74 float PT_TRACK_TAU; // minimal pt [GeV] for tracks to be considered in tau definition
75 float TAU_EM_COLLIMATION; // fraction of energy required in the central part of the cone, for tau jets
76
77 // Tracker acceptance
78 float PT_TRACKS_MIN; // minimal pt needed to reach the calorimeter, in GeV
79 float PT_QUARKS_MIN; // minimal pt needed for quarks to reach the tracker, in GeV
80 int TRACKING_EFF; // in percent, should be an integer
81
82 //tagging definition
83 int TAGGING_B; //
84 int MISTAGGING_C;
85 int MISTAGGING_L;
86
87 double CONERADIUS;
88 int JETALGO;
89 // MidPoint algorithm definition
90 double M_SEEDTHRESHOLD;
91 double M_CONEAREAFRACTION;
92 int M_MAXPAIRSIZE;
93 int M_MAXITERATIONS;
94 double M_OVERLAPTHRESHOLD;
95
96 // Define Cone algorithm.
97 double C_SEEDTHRESHOLD;
98 int C_ADJACENCYCUT;
99 int C_MAXITERATIONS;
100 int C_IRATCH;
101 double C_OVERLAPTHRESHOLD;
102
103 /// Reads the data card for the initialisation of the parameters
104 void ReadDataCard(const string datacard);
105
106 /// Provides the smeared TLorentzVector for the electrons
107 void SmearElectron(TLorentzVector &electron);
108
109 /// Provides the smeared TLorentzVector for the muons
110 void SmearMu(TLorentzVector &muon);
111
112 /// Provides the smeared TLorentzVector for the hadrons
113 void SmearHadron(TLorentzVector &hadron, const float frac);
114
115 //*****************************fonction pour avoir les taus************************************
116 double EnergySmallCone(const vector<PhysicsTower> &towers, const float eta, const float phi);
117
118 //***************** Fonction pour avoir le nombre de traces pour les taus****************************
119 unsigned int NumTracks(const vector<TLorentzVector> &tracks, const float pt_track, const float eta, const float phi);
120
121 //**********************fonction pour avoir les b-jets******************************
122 int Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi);
123
124 //******************** retourne l'efficacite de b-tagging ******************************
125 bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray);
126
127 //******************************isolation criteria**************************************
128 bool Isolation(Float_t phi,Float_t eta,const vector<TLorentzVector> &tracks,float PT_TRACK2);
129
130};
131
132
133// particles PID (PDG ID)
134const int pU = 1; // c quark
135const int pD = 2; // b quark
136const int pS = 3; // s quark
137const int pC = 4; // c quark
138const int pB = 5; // b quark
139const int pE = 11; // e
140const int pNU1 = 12; // nu_e
141const int pMU = 13; // mu
142const int pNU2 = 14; // nu_mu
143const int pTAU = 15; // tau
144const int pNU3 = 16; // nu_tau
145const int pGLUON = 21; // gluon
146const int pGAMMA = 22; // gamma
147const int pW = 24; // W
148const int pP = 2212; // proton
149const int pN = 2112; // neutron
150const int pPI0 = 111; // pi_0
151const int pK0L = 130; // K^0_L
152const int pK0S = 310; // K^0_S
153const int pLAMBDA = 3122; // Lambda
154const int pSIGMA0 = 3212; // Sigma^0
155const int pDELTA0 = 2114; // Delta^0
156
157const double speed_of_light = 299792458; // m/s
158
159#ifndef __PI__
160#define __PI__
161const double PI = acos(-1.0);
162#endif
163
164// ** returns the sign (+1 or -1) or an integer
165int sign(const int myint);
166int sign(const float myfloat);
167
168// **************************** Return the Delta Phi****************************
169float DeltaPhi(const float phi1, const float phi2);
170
171// **************************** Returns the Delta R****************************
172float 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 ***************
175float Charge(const int pid);
176
177#endif
Note: See TracBrowser for help on using the repository browser.