Fork me on GitHub

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

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

1file ->several

File size: 6.5 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 //threshold for reconstructed objetcs
71 float ELEC_pt;
72 float MUON_pt;
73 float JET_pt;
74 float TAUJET_pt;
75
76 //For Tau-jet definition
77 // R = sqrt (phi^2 + eta^2)
78 float TAU_CONE_ENERGY; // radius R of the cone for tau definition, based on energy threshold
79 float TAU_CONE_TRACKS; // radius R of the cone for tau definition, based on track number
80 float PT_TRACK_TAU; // minimal pt [GeV] for tracks to be considered in tau definition
81 float TAU_EM_COLLIMATION; // fraction of energy required in the central part of the cone, for tau jets
82
83 // Tracker acceptance
84 float PT_TRACKS_MIN; // minimal pt needed to reach the calorimeter, in GeV
85 float PT_QUARKS_MIN; // minimal pt needed for quarks to reach the tracker, in GeV
86 int TRACKING_EFF; // in percent, should be an integer
87
88 //tagging definition
89 int TAGGING_B; //
90 int MISTAGGING_C;
91 int MISTAGGING_L;
92
93 double CONERADIUS;
94 int JETALGO;
95
96 //General jet variable
97 double SEEDTHRESHOLD;
98 double OVERLAPTHRESHOLD;
99
100 // MidPoint algorithm definition
101 double M_CONEAREAFRACTION;
102 int M_MAXPAIRSIZE;
103 int M_MAXITERATIONS;
104
105 // Define Cone algorithm.
106 int C_ADJACENCYCUT;
107 int C_MAXITERATIONS;
108 int C_IRATCH;
109
110 //Define SISCone algorithm.
111 int NPASS;
112 double PROTOJET_PTMIN;
113
114
115 /// Reads the data card for the initialisation of the parameters
116 void ReadDataCard(const string datacard);
117
118 /// Create the output log file
119 void Logfile(string LogName);
120
121 /// Provides the smeared TLorentzVector for the electrons
122 void SmearElectron(TLorentzVector &electron);
123
124 /// Provides the smeared TLorentzVector for the muons
125 void SmearMu(TLorentzVector &muon);
126
127 /// Provides the smeared TLorentzVector for the hadrons
128 void SmearHadron(TLorentzVector &hadron, const float frac);
129
130 //*****************************fonction pour avoir les taus************************************
131 double EnergySmallCone(const vector<PhysicsTower> &towers, const float eta, const float phi);
132
133 //***************** Fonction pour avoir le nombre de traces pour les taus****************************
134 unsigned int NumTracks(const vector<TLorentzVector> &tracks, const float pt_track, const float eta, const float phi);
135
136 //**********************fonction pour avoir les b-jets******************************
137 int Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi);
138
139 //******************** retourne l'efficacite de b-tagging ******************************
140 bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray);
141
142 //******************************isolation criteria**************************************
143 bool Isolation(Float_t phi,Float_t eta,const vector<TLorentzVector> &tracks,float PT_TRACK2);
144
145};
146
147
148// particles PID (PDG ID)
149const int pU = 1; // c quark
150const int pD = 2; // b quark
151const int pS = 3; // s quark
152const int pC = 4; // c quark
153const int pB = 5; // b quark
154const int pE = 11; // e
155const int pNU1 = 12; // nu_e
156const int pMU = 13; // mu
157const int pNU2 = 14; // nu_mu
158const int pTAU = 15; // tau
159const int pNU3 = 16; // nu_tau
160const int pGLUON = 21; // gluon
161const int pGAMMA = 22; // gamma
162const int pW = 24; // W
163const int pP = 2212; // proton
164const int pN = 2112; // neutron
165const int pPI0 = 111; // pi_0
166const int pK0L = 130; // K^0_L
167const int pK0S = 310; // K^0_S
168const int pLAMBDA = 3122; // Lambda
169const int pSIGMA0 = 3212; // Sigma^0
170const int pDELTA0 = 2114; // Delta^0
171
172const double speed_of_light = 299792458; // m/s
173
174#ifndef __PI__
175#define __PI__
176const double PI = acos(-1.0);
177#endif
178
179// ** returns the sign (+1 or -1) or an integer
180int sign(const int myint);
181int sign(const float myfloat);
182
183// **************************** Return the Delta Phi****************************
184float DeltaPhi(const float phi1, const float phi2);
185
186// **************************** Returns the Delta R****************************
187float DeltaR(const float phi1, const float eta1, const float phi2, const float eta2);
188
189//************* Returns an array of the quarks sitting within the tracker acceptance ***************
190int Charge(int pid);
191
192#endif
Note: See TracBrowser for help on using the repository browser.