[260] | 1 | /***********************************************************************
|
---|
| 2 | ** **
|
---|
| 3 | ** /----------------------------------------------\ **
|
---|
| 4 | ** | Delphes, a framework for the fast simulation | **
|
---|
| 5 | ** | of a generic collider experiment | **
|
---|
| 6 | ** \----------------------------------------------/ **
|
---|
| 7 | ** **
|
---|
| 8 | ** **
|
---|
| 9 | ** This package uses: **
|
---|
| 10 | ** ------------------ **
|
---|
| 11 | ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
|
---|
| 12 | ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
|
---|
| 13 | ** FROG: [hep-ex/0901.2718v1] **
|
---|
| 14 | ** **
|
---|
| 15 | ** ------------------------------------------------------------------ **
|
---|
| 16 | ** **
|
---|
| 17 | ** Main authors: **
|
---|
| 18 | ** ------------- **
|
---|
| 19 | ** **
|
---|
| 20 | ** Severine Ovyn Xavier Rouby **
|
---|
| 21 | ** severine.ovyn@uclouvain.be xavier.rouby@cern **
|
---|
| 22 | ** **
|
---|
| 23 | ** Center for Particle Physics and Phenomenology (CP3) **
|
---|
| 24 | ** Universite catholique de Louvain (UCL) **
|
---|
| 25 | ** Louvain-la-Neuve, Belgium **
|
---|
| 26 | ** **
|
---|
| 27 | ** Copyright (C) 2008-2009, **
|
---|
| 28 | ** All rights reserved. **
|
---|
| 29 | ** **
|
---|
| 30 | ***********************************************************************/
|
---|
[2] | 31 |
|
---|
[264] | 32 |
|
---|
[2] | 33 | /// \file SmearUtil.cc
|
---|
| 34 | /// \brief RESOLution class, and some generic definitions
|
---|
| 35 |
|
---|
| 36 |
|
---|
[219] | 37 | #include "SmearUtil.h"
|
---|
[2] | 38 | #include "TRandom.h"
|
---|
| 39 |
|
---|
| 40 | #include <iostream>
|
---|
[219] | 41 | #include <fstream>
|
---|
[2] | 42 | #include <sstream>
|
---|
[44] | 43 | #include <iomanip>
|
---|
[219] | 44 | using namespace std;
|
---|
[44] | 45 |
|
---|
[2] | 46 | //------------------------------------------------------------------------------
|
---|
| 47 |
|
---|
| 48 | RESOLution::RESOLution() {
|
---|
| 49 |
|
---|
[94] | 50 | // Detector characteristics
|
---|
| 51 | CEN_max_tracker = 2.5; // Maximum tracker coverage
|
---|
| 52 | CEN_max_calo_cen = 3.0; // central calorimeter coverage
|
---|
| 53 | CEN_max_calo_fwd = 5.0; // forward calorimeter pseudorapidity coverage
|
---|
| 54 | CEN_max_mu = 2.4; // muon chambers pseudorapidity coverage
|
---|
| 55 |
|
---|
| 56 | // Energy resolution for electron/photon
|
---|
| 57 | // \sigma/E = C + N/E + S/\sqrt{E}
|
---|
| 58 | ELG_Scen = 0.05; // S term for central ECAL
|
---|
| 59 | ELG_Ncen = 0.25; // N term for central ECAL
|
---|
| 60 | ELG_Ccen = 0.005; // C term for central ECAL
|
---|
[257] | 61 | ELG_Sfwd = 2.084; // S term for FCAL
|
---|
| 62 | ELG_Nfwd = 0.0; // N term for FCAL
|
---|
| 63 | ELG_Cfwd = 0.107; // C term for FCAL
|
---|
[2] | 64 |
|
---|
[94] | 65 | // Energy resolution for hadrons in ecal/hcal/hf
|
---|
| 66 | // \sigma/E = C + N/E + S/\sqrt{E}
|
---|
[264] | 67 | HAD_Shcal = 1.5; // S term for central HCAL
|
---|
[94] | 68 | HAD_Nhcal = 0.; // N term for central HCAL
|
---|
| 69 | HAD_Chcal = 0.05; // C term for central HCAL
|
---|
[264] | 70 | HAD_Shf = 2.7; // S term for FCAL
|
---|
[257] | 71 | HAD_Nhf = 0.; // N term for FCAL
|
---|
| 72 | HAD_Chf = 0.13; // C term for FCAL
|
---|
[2] | 73 |
|
---|
[94] | 74 | // Muon smearing
|
---|
| 75 | MU_SmearPt = 0.01;
|
---|
[2] | 76 |
|
---|
[94] | 77 | // Tracking efficiencies
|
---|
| 78 | TRACK_ptmin = 0.9; // minimal pt needed to reach the calorimeter in GeV
|
---|
| 79 | TRACK_eff = 100; // efficiency associated to the tracking
|
---|
[2] | 80 |
|
---|
[94] | 81 | // Calorimetric towers
|
---|
| 82 | TOWER_number = 40;
|
---|
| 83 | const float tower_eta_edges[41] = {
|
---|
| 84 | 0., 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.870, 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479, 1.566,
|
---|
| 85 | 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.868, 2.950, 3.125, 3.300, 3.475, 3.650, 3.825, 4.000, 4.175,
|
---|
| 86 | 4.350, 4.525, 4.700, 5.000}; // temporary object
|
---|
| 87 | TOWER_eta_edges = new float[TOWER_number+1];
|
---|
| 88 | for(unsigned int i=0; i<TOWER_number +1; i++) TOWER_eta_edges[i] = tower_eta_edges[i];
|
---|
| 89 |
|
---|
| 90 | const float tower_dphi[40] = {
|
---|
| 91 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10,
|
---|
| 92 | 10,10,10,10,10, 10,10,10,10,10, 10,10,10,10,10, 10,10,10,20, 20 }; // temporary object
|
---|
| 93 | TOWER_dphi = new float[TOWER_number];
|
---|
| 94 | for(unsigned int i=0; i<TOWER_number; i++) TOWER_dphi[i] = tower_dphi[i];
|
---|
[2] | 95 |
|
---|
| 96 |
|
---|
[94] | 97 | // Thresholds for reconstructed objetcs
|
---|
| 98 | PTCUT_elec = 10.0;
|
---|
| 99 | PTCUT_muon = 10.0;
|
---|
| 100 | PTCUT_jet = 20.0;
|
---|
| 101 | PTCUT_gamma = 10.0;
|
---|
| 102 | PTCUT_taujet = 10.0;
|
---|
[33] | 103 |
|
---|
[305] | 104 | ISOL_PT = 2.0; //minimal pt of tracks for isolation criteria
|
---|
| 105 | ISOL_Cone = 0.5; //Cone for isolation criteria
|
---|
| 106 |
|
---|
| 107 |
|
---|
[94] | 108 | // General jet variable
|
---|
| 109 | JET_coneradius = 0.7; // generic jet radius ; not for tau's !!!
|
---|
| 110 | JET_jetalgo = 1; // 1 for Cone algorithm, 2 for MidPoint algorithm, 3 for SIScone algorithm, 4 for kt algorithm
|
---|
| 111 | JET_seed = 1.0; // minimum seed to start jet reconstruction
|
---|
[33] | 112 |
|
---|
[94] | 113 | // Tagging definition
|
---|
| 114 | BTAG_b = 40;
|
---|
| 115 | BTAG_mistag_c = 10;
|
---|
| 116 | BTAG_mistag_l = 1;
|
---|
[2] | 117 |
|
---|
[94] | 118 | // FLAGS
|
---|
| 119 | FLAG_bfield = 1; //1 to run the bfield propagation else 0
|
---|
| 120 | FLAG_vfd = 1; //1 to run the very forward detectors else 0
|
---|
[307] | 121 | FLAG_RP = 1; //1 to run the zero degree calorimeter else 0
|
---|
[94] | 122 | FLAG_trigger = 1; //1 to run the trigger selection else 0
|
---|
| 123 | FLAG_frog = 1; //1 to run the FROG event display
|
---|
[307] | 124 | FLAG_lhco = 1;
|
---|
[2] | 125 |
|
---|
[94] | 126 | // In case BField propagation allowed
|
---|
| 127 | TRACK_radius = 129; //radius of the BField coverage
|
---|
| 128 | TRACK_length = 300; //length of the BField coverage
|
---|
| 129 | TRACK_bfield_x = 0; //X composant of the BField
|
---|
| 130 | TRACK_bfield_y = 0; //Y composant of the BField
|
---|
| 131 | TRACK_bfield_z = 3.8; //Z composant of the BField
|
---|
[2] | 132 |
|
---|
[94] | 133 | // In case Very forward detectors allowed
|
---|
| 134 | VFD_min_calo_vfd = 5.2; // very forward calorimeter (if any) like CASTOR
|
---|
| 135 | VFD_max_calo_vfd = 6.6;
|
---|
| 136 | VFD_min_zdc = 8.3;
|
---|
| 137 | VFD_s_zdc = 140; // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m]
|
---|
[2] | 138 |
|
---|
[94] | 139 | RP_220_s = 220; // distance of the RP to the IP, in meters
|
---|
| 140 | RP_220_x = 0.002; // distance of the RP to the beam, in meters
|
---|
| 141 | RP_420_s = 420; // distance of the RP to the IP, in meters
|
---|
| 142 | RP_420_x = 0.004; // distance of the RP to the beam, in meters
|
---|
[257] | 143 | RP_IP_name = "IP5";
|
---|
[252] | 144 | RP_beam1Card = "data/LHCB1IR5_v6.500.tfs";
|
---|
| 145 | RP_beam2Card = "data/LHCB1IR5_v6.500.tfs";
|
---|
[2] | 146 |
|
---|
[94] | 147 | // In case FROG event display allowed
|
---|
| 148 | NEvents_Frog = 10;
|
---|
[2] | 149 |
|
---|
[94] | 150 | //********************************************
|
---|
| 151 | //jet stuffs not defined in the input datacard
|
---|
| 152 | //********************************************
|
---|
| 153 |
|
---|
| 154 | JET_overlap = 0.75;
|
---|
| 155 | // MidPoint algorithm definition
|
---|
| 156 | JET_M_coneareafraction = 0.25;
|
---|
| 157 | JET_M_maxpairsize = 2;
|
---|
| 158 | JET_M_maxiterations = 100;
|
---|
| 159 | // Define Cone algorithm.
|
---|
| 160 | JET_C_adjacencycut = 2;
|
---|
| 161 | JET_C_maxiterations = 100;
|
---|
| 162 | JET_C_iratch = 1;
|
---|
| 163 | //Define SISCone algorithm.
|
---|
| 164 | JET_S_npass = 0;
|
---|
| 165 | JET_S_protojet_ptmin= 0.0;
|
---|
| 166 |
|
---|
| 167 | //For Tau-jet definition
|
---|
| 168 | TAU_energy_scone = 0.15; // radius R of the cone for tau definition, based on energy threshold
|
---|
| 169 | TAU_track_scone = 0.4; // radius R of the cone for tau definition, based on track number
|
---|
| 170 | TAU_track_pt = 2; // minimal pt [GeV] for tracks to be considered in tau definition
|
---|
| 171 | TAU_energy_frac = 0.95; // fraction of energy required in the central part of the cone, for tau jets
|
---|
| 172 |
|
---|
| 173 | PT_QUARKS_MIN = 2.0 ; // minimal pt needed by quarks to do b-tag
|
---|
[252] | 174 |
|
---|
| 175 | //for very forward detectors
|
---|
| 176 | RP_offsetEl_s = 120;
|
---|
| 177 | RP_offsetEl_x = 0.097;
|
---|
[254] | 178 | RP_cross_x = -500;
|
---|
| 179 | RP_cross_y = 0.0;
|
---|
| 180 | RP_cross_ang = 142.5;
|
---|
[94] | 181 |
|
---|
[2] | 182 | }
|
---|
| 183 |
|
---|
[219] | 184 |
|
---|
| 185 | RESOLution::RESOLution(const RESOLution & DET) {
|
---|
| 186 | // Detector characteristics
|
---|
| 187 | CEN_max_tracker = DET.CEN_max_tracker;
|
---|
| 188 | CEN_max_calo_cen = DET.CEN_max_calo_cen;
|
---|
| 189 | CEN_max_calo_fwd = DET.CEN_max_calo_fwd;
|
---|
| 190 | CEN_max_mu = DET.CEN_max_mu;
|
---|
| 191 |
|
---|
| 192 | // Energy resolution for electron/photon
|
---|
| 193 | ELG_Scen = DET.ELG_Scen;
|
---|
| 194 | ELG_Ncen = DET.ELG_Ncen;
|
---|
| 195 | ELG_Ccen = DET.ELG_Ccen;
|
---|
| 196 | ELG_Cfwd = DET.ELG_Cfwd;
|
---|
| 197 | ELG_Sfwd = DET.ELG_Sfwd;
|
---|
| 198 | ELG_Nfwd = DET.ELG_Nfwd;
|
---|
| 199 |
|
---|
| 200 | // Energy resolution for hadrons in ecal/hcal/hf
|
---|
| 201 | HAD_Shcal = DET.HAD_Shcal;
|
---|
| 202 | HAD_Nhcal = DET.HAD_Nhcal;
|
---|
| 203 | HAD_Chcal = DET.HAD_Chcal;
|
---|
| 204 | HAD_Shf = DET.HAD_Shf;
|
---|
| 205 | HAD_Nhf = DET.HAD_Nhf;
|
---|
| 206 | HAD_Chf = DET.HAD_Chf;
|
---|
| 207 |
|
---|
| 208 | // Muon smearing
|
---|
| 209 | MU_SmearPt = DET.MU_SmearPt;
|
---|
| 210 |
|
---|
| 211 | // Tracking efficiencies
|
---|
| 212 | TRACK_ptmin = DET.TRACK_ptmin;
|
---|
| 213 | TRACK_eff = DET.TRACK_eff;
|
---|
| 214 |
|
---|
| 215 | // Calorimetric towers
|
---|
| 216 | TOWER_number = DET.TOWER_number;
|
---|
| 217 | TOWER_eta_edges = new float[TOWER_number+1];
|
---|
| 218 | for(unsigned int i=0; i<TOWER_number +1; i++) TOWER_eta_edges[i] = DET.TOWER_eta_edges[i];
|
---|
| 219 |
|
---|
| 220 | TOWER_dphi = new float[TOWER_number];
|
---|
| 221 | for(unsigned int i=0; i<TOWER_number; i++) TOWER_dphi[i] = DET.TOWER_dphi[i];
|
---|
| 222 |
|
---|
| 223 | // Thresholds for reconstructed objetcs
|
---|
| 224 | PTCUT_elec = DET.PTCUT_elec;
|
---|
| 225 | PTCUT_muon = DET.PTCUT_muon;
|
---|
| 226 | PTCUT_jet = DET.PTCUT_jet;
|
---|
| 227 | PTCUT_gamma = DET.PTCUT_gamma;
|
---|
| 228 | PTCUT_taujet = DET.PTCUT_taujet;
|
---|
| 229 |
|
---|
[305] | 230 | ISOL_PT = DET.ISOL_PT; //minimal pt of tracks for isolation criteria
|
---|
| 231 | ISOL_Cone = DET.ISOL_Cone; //Cone for isolation criteria
|
---|
| 232 |
|
---|
| 233 |
|
---|
[219] | 234 | // General jet variable
|
---|
| 235 | JET_coneradius = DET.JET_coneradius;
|
---|
| 236 | JET_jetalgo = DET.JET_jetalgo;
|
---|
| 237 | JET_seed = DET.JET_seed;
|
---|
| 238 |
|
---|
| 239 | // Tagging definition
|
---|
| 240 | BTAG_b = DET.BTAG_b;
|
---|
| 241 | BTAG_mistag_c = DET.BTAG_mistag_c;
|
---|
| 242 | BTAG_mistag_l = DET.BTAG_mistag_l;
|
---|
| 243 |
|
---|
| 244 | // FLAGS
|
---|
| 245 | FLAG_bfield = DET.FLAG_bfield;
|
---|
| 246 | FLAG_vfd = DET.FLAG_vfd;
|
---|
[306] | 247 | FLAG_RP = DET.FLAG_RP;
|
---|
[219] | 248 | FLAG_trigger = DET.FLAG_trigger;
|
---|
| 249 | FLAG_frog = DET.FLAG_frog;
|
---|
[307] | 250 | FLAG_lhco = DET.FLAG_lhco;
|
---|
[219] | 251 |
|
---|
| 252 | // In case BField propagation allowed
|
---|
| 253 | TRACK_radius = DET.TRACK_radius;
|
---|
| 254 | TRACK_length = DET.TRACK_length;
|
---|
| 255 | TRACK_bfield_x = DET.TRACK_bfield_x;
|
---|
| 256 | TRACK_bfield_y = DET.TRACK_bfield_y;
|
---|
| 257 | TRACK_bfield_z = DET.TRACK_bfield_z;
|
---|
| 258 |
|
---|
| 259 | // In case Very forward detectors allowed
|
---|
| 260 | VFD_min_calo_vfd = DET.VFD_min_calo_vfd;
|
---|
| 261 | VFD_max_calo_vfd = DET.VFD_max_calo_vfd;
|
---|
| 262 | VFD_min_zdc = DET.VFD_min_zdc;
|
---|
| 263 | VFD_s_zdc = DET.VFD_s_zdc;
|
---|
| 264 |
|
---|
| 265 | RP_220_s = DET.RP_220_s;
|
---|
| 266 | RP_220_x = DET.RP_220_x;
|
---|
| 267 | RP_420_s = DET.RP_420_s;
|
---|
| 268 | RP_420_x = DET.RP_420_x;
|
---|
[252] | 269 | RP_beam1Card = DET.RP_beam1Card;
|
---|
| 270 | RP_beam2Card = DET.RP_beam2Card;
|
---|
| 271 | RP_offsetEl_s = DET.RP_offsetEl_s;
|
---|
| 272 | RP_offsetEl_x = DET.RP_offsetEl_x;
|
---|
[254] | 273 | RP_cross_x = DET.RP_cross_x;
|
---|
| 274 | RP_cross_y = DET.RP_cross_y;
|
---|
| 275 | RP_cross_ang = DET.RP_cross_ang;
|
---|
[257] | 276 | RP_IP_name = DET.RP_IP_name;
|
---|
[219] | 277 |
|
---|
| 278 | // In case FROG event display allowed
|
---|
| 279 | NEvents_Frog = DET.NEvents_Frog;
|
---|
| 280 |
|
---|
| 281 | JET_overlap = DET.JET_overlap;
|
---|
| 282 | // MidPoint algorithm definition
|
---|
| 283 | JET_M_coneareafraction = DET.JET_M_coneareafraction;
|
---|
| 284 | JET_M_maxpairsize = DET.JET_M_maxpairsize;
|
---|
| 285 | JET_M_maxiterations = DET.JET_M_maxiterations;
|
---|
| 286 | // Define Cone algorithm.
|
---|
| 287 | JET_C_adjacencycut = DET.JET_C_adjacencycut;
|
---|
| 288 | JET_C_maxiterations = DET.JET_C_maxiterations;
|
---|
| 289 | JET_C_iratch = DET.JET_C_iratch;
|
---|
| 290 | //Define SISCone algorithm.
|
---|
| 291 | JET_S_npass = DET.JET_S_npass;
|
---|
| 292 | JET_S_protojet_ptmin = DET.JET_S_protojet_ptmin;
|
---|
| 293 |
|
---|
| 294 | //For Tau-jet definition
|
---|
| 295 | TAU_energy_scone = DET.TAU_energy_scone;
|
---|
| 296 | TAU_track_scone = DET.TAU_track_scone;
|
---|
| 297 | TAU_track_pt = DET.TAU_track_pt;
|
---|
| 298 | TAU_energy_frac = DET.TAU_energy_frac;
|
---|
| 299 |
|
---|
| 300 | PT_QUARKS_MIN = DET.PT_QUARKS_MIN;
|
---|
| 301 | }
|
---|
| 302 |
|
---|
| 303 | RESOLution& RESOLution::operator=(const RESOLution& DET) {
|
---|
| 304 | if(this==&DET) return *this;
|
---|
| 305 | // Detector characteristics
|
---|
| 306 | CEN_max_tracker = DET.CEN_max_tracker;
|
---|
| 307 | CEN_max_calo_cen = DET.CEN_max_calo_cen;
|
---|
| 308 | CEN_max_calo_fwd = DET.CEN_max_calo_fwd;
|
---|
| 309 | CEN_max_mu = DET.CEN_max_mu;
|
---|
| 310 |
|
---|
| 311 | // Energy resolution for electron/photon
|
---|
| 312 | ELG_Scen = DET.ELG_Scen;
|
---|
| 313 | ELG_Ncen = DET.ELG_Ncen;
|
---|
| 314 | ELG_Ccen = DET.ELG_Ccen;
|
---|
| 315 | ELG_Cfwd = DET.ELG_Cfwd;
|
---|
| 316 | ELG_Sfwd = DET.ELG_Sfwd;
|
---|
| 317 | ELG_Nfwd = DET.ELG_Nfwd;
|
---|
| 318 |
|
---|
| 319 | // Energy resolution for hadrons in ecal/hcal/hf
|
---|
| 320 | HAD_Shcal = DET.HAD_Shcal;
|
---|
| 321 | HAD_Nhcal = DET.HAD_Nhcal;
|
---|
| 322 | HAD_Chcal = DET.HAD_Chcal;
|
---|
| 323 | HAD_Shf = DET.HAD_Shf;
|
---|
| 324 | HAD_Nhf = DET.HAD_Nhf;
|
---|
| 325 | HAD_Chf = DET.HAD_Chf;
|
---|
| 326 |
|
---|
| 327 | // Muon smearing
|
---|
| 328 | MU_SmearPt = DET.MU_SmearPt;
|
---|
| 329 |
|
---|
| 330 | // Tracking efficiencies
|
---|
| 331 | TRACK_ptmin = DET.TRACK_ptmin;
|
---|
| 332 | TRACK_eff = DET.TRACK_eff;
|
---|
| 333 |
|
---|
| 334 | // Calorimetric towers
|
---|
| 335 | TOWER_number = DET.TOWER_number;
|
---|
| 336 | TOWER_eta_edges = new float[TOWER_number+1];
|
---|
| 337 | for(unsigned int i=0; i<TOWER_number +1; i++) TOWER_eta_edges[i] = DET.TOWER_eta_edges[i];
|
---|
| 338 |
|
---|
| 339 | TOWER_dphi = new float[TOWER_number];
|
---|
| 340 | for(unsigned int i=0; i<TOWER_number; i++) TOWER_dphi[i] = DET.TOWER_dphi[i];
|
---|
| 341 |
|
---|
| 342 | // Thresholds for reconstructed objetcs
|
---|
| 343 | PTCUT_elec = DET.PTCUT_elec;
|
---|
| 344 | PTCUT_muon = DET.PTCUT_muon;
|
---|
| 345 | PTCUT_jet = DET.PTCUT_jet;
|
---|
| 346 | PTCUT_gamma = DET.PTCUT_gamma;
|
---|
| 347 | PTCUT_taujet = DET.PTCUT_taujet;
|
---|
| 348 |
|
---|
[305] | 349 | ISOL_PT = DET.ISOL_PT; //minimal pt of tracks for isolation criteria
|
---|
| 350 | ISOL_Cone = DET.ISOL_Cone; //Cone for isolation criteria
|
---|
| 351 |
|
---|
| 352 |
|
---|
[219] | 353 | // General jet variable
|
---|
| 354 | JET_coneradius = DET.JET_coneradius;
|
---|
| 355 | JET_jetalgo = DET.JET_jetalgo;
|
---|
| 356 | JET_seed = DET.JET_seed;
|
---|
| 357 |
|
---|
| 358 | // Tagging definition
|
---|
| 359 | BTAG_b = DET.BTAG_b;
|
---|
| 360 | BTAG_mistag_c = DET.BTAG_mistag_c;
|
---|
| 361 | BTAG_mistag_l = DET.BTAG_mistag_l;
|
---|
| 362 |
|
---|
| 363 | // FLAGS
|
---|
| 364 | FLAG_bfield = DET.FLAG_bfield;
|
---|
| 365 | FLAG_vfd = DET.FLAG_vfd;
|
---|
[306] | 366 | FLAG_RP = DET.FLAG_RP;
|
---|
[219] | 367 | FLAG_trigger = DET.FLAG_trigger;
|
---|
| 368 | FLAG_frog = DET.FLAG_frog;
|
---|
[307] | 369 | FLAG_lhco = DET.FLAG_lhco;
|
---|
[219] | 370 |
|
---|
| 371 | // In case BField propagation allowed
|
---|
| 372 | TRACK_radius = DET.TRACK_radius;
|
---|
| 373 | TRACK_length = DET.TRACK_length;
|
---|
| 374 | TRACK_bfield_x = DET.TRACK_bfield_x;
|
---|
| 375 | TRACK_bfield_y = DET.TRACK_bfield_y;
|
---|
| 376 | TRACK_bfield_z = DET.TRACK_bfield_z;
|
---|
| 377 |
|
---|
| 378 | // In case Very forward detectors allowed
|
---|
| 379 | VFD_min_calo_vfd = DET.VFD_min_calo_vfd;
|
---|
| 380 | VFD_max_calo_vfd = DET.VFD_max_calo_vfd;
|
---|
| 381 | VFD_min_zdc = DET.VFD_min_zdc;
|
---|
| 382 | VFD_s_zdc = DET.VFD_s_zdc;
|
---|
| 383 |
|
---|
| 384 | RP_220_s = DET.RP_220_s;
|
---|
| 385 | RP_220_x = DET.RP_220_x;
|
---|
| 386 | RP_420_s = DET.RP_420_s;
|
---|
| 387 | RP_420_x = DET.RP_420_x;
|
---|
[252] | 388 | RP_offsetEl_s = DET.RP_offsetEl_s;
|
---|
| 389 | RP_offsetEl_x = DET.RP_offsetEl_x;
|
---|
| 390 | RP_beam1Card = DET.RP_beam1Card;
|
---|
| 391 | RP_beam2Card = DET.RP_beam2Card;
|
---|
[254] | 392 | RP_cross_x = DET.RP_cross_x;
|
---|
| 393 | RP_cross_y = DET.RP_cross_y;
|
---|
| 394 | RP_cross_ang = DET.RP_cross_ang;
|
---|
[257] | 395 | RP_IP_name = DET.RP_IP_name;
|
---|
[219] | 396 |
|
---|
[252] | 397 |
|
---|
[219] | 398 | // In case FROG event display allowed
|
---|
| 399 | NEvents_Frog = DET.NEvents_Frog;
|
---|
| 400 |
|
---|
| 401 | JET_overlap = DET.JET_overlap;
|
---|
| 402 | // MidPoint algorithm definition
|
---|
| 403 | JET_M_coneareafraction = DET.JET_M_coneareafraction;
|
---|
| 404 | JET_M_maxpairsize = DET.JET_M_maxpairsize;
|
---|
| 405 | JET_M_maxiterations = DET.JET_M_maxiterations;
|
---|
| 406 | // Define Cone algorithm.
|
---|
| 407 | JET_C_adjacencycut = DET.JET_C_adjacencycut;
|
---|
| 408 | JET_C_maxiterations = DET.JET_C_maxiterations;
|
---|
| 409 | JET_C_iratch = DET.JET_C_iratch;
|
---|
| 410 | //Define SISCone algorithm.
|
---|
| 411 | JET_S_npass = DET.JET_S_npass;
|
---|
| 412 | JET_S_protojet_ptmin = DET.JET_S_protojet_ptmin;
|
---|
| 413 |
|
---|
| 414 | //For Tau-jet definition
|
---|
| 415 | TAU_energy_scone = DET.TAU_energy_scone;
|
---|
| 416 | TAU_track_scone = DET.TAU_track_scone;
|
---|
| 417 | TAU_track_pt = DET.TAU_track_pt;
|
---|
| 418 | TAU_energy_frac = DET.TAU_energy_frac;
|
---|
| 419 |
|
---|
| 420 | PT_QUARKS_MIN = DET.PT_QUARKS_MIN;
|
---|
| 421 | return *this;
|
---|
| 422 | }
|
---|
| 423 |
|
---|
| 424 |
|
---|
| 425 |
|
---|
| 426 |
|
---|
[2] | 427 | //------------------------------------------------------------------------------
|
---|
| 428 | void RESOLution::ReadDataCard(const string datacard) {
|
---|
| 429 |
|
---|
| 430 | string temp_string;
|
---|
| 431 | istringstream curstring;
|
---|
| 432 |
|
---|
| 433 | ifstream fichier_a_lire(datacard.c_str());
|
---|
| 434 | if(!fichier_a_lire.good()) {
|
---|
[249] | 435 | cout <<"** WARNING: Datadard not found, use default values **" << endl;
|
---|
[94] | 436 | return;
|
---|
[2] | 437 | }
|
---|
[94] | 438 |
|
---|
[2] | 439 | while (getline(fichier_a_lire,temp_string)) {
|
---|
| 440 | curstring.clear(); // needed when using several times istringstream::str(string)
|
---|
| 441 | curstring.str(temp_string);
|
---|
| 442 | string varname;
|
---|
[252] | 443 | float value; int ivalue; string svalue;
|
---|
[2] | 444 |
|
---|
| 445 | if(strstr(temp_string.c_str(),"#")) { }
|
---|
[94] | 446 | else if(strstr(temp_string.c_str(),"CEN_max_tracker")) {curstring >> varname >> value; CEN_max_tracker = value;}
|
---|
| 447 | else if(strstr(temp_string.c_str(),"CEN_max_calo_cen")) {curstring >> varname >> value; CEN_max_calo_cen = value;}
|
---|
| 448 | else if(strstr(temp_string.c_str(),"CEN_max_calo_fwd")) {curstring >> varname >> value; CEN_max_calo_fwd = value;}
|
---|
| 449 | else if(strstr(temp_string.c_str(),"CEN_max_mu")) {curstring >> varname >> value; CEN_max_mu = value;}
|
---|
| 450 |
|
---|
| 451 | else if(strstr(temp_string.c_str(),"VFD_min_calo_vfd")) {curstring >> varname >> value; VFD_min_calo_vfd = value;}
|
---|
| 452 | else if(strstr(temp_string.c_str(),"VFD_max_calo_vfd")) {curstring >> varname >> value; VFD_max_calo_vfd = value;}
|
---|
| 453 | else if(strstr(temp_string.c_str(),"VFD_min_zdc")) {curstring >> varname >> value; VFD_min_zdc = value;}
|
---|
| 454 | else if(strstr(temp_string.c_str(),"VFD_s_zdc")) {curstring >> varname >> value; VFD_s_zdc = value;}
|
---|
| 455 |
|
---|
| 456 | else if(strstr(temp_string.c_str(),"RP_220_s")) {curstring >> varname >> value; RP_220_s = value;}
|
---|
| 457 | else if(strstr(temp_string.c_str(),"RP_220_x")) {curstring >> varname >> value; RP_220_x = value;}
|
---|
| 458 | else if(strstr(temp_string.c_str(),"RP_420_s")) {curstring >> varname >> value; RP_420_s = value;}
|
---|
| 459 | else if(strstr(temp_string.c_str(),"RP_420_x")) {curstring >> varname >> value; RP_420_x = value;}
|
---|
[257] | 460 | else if(strstr(temp_string.c_str(),"RP_beam1Card")) {curstring >> varname >> svalue;RP_beam1Card = svalue;}
|
---|
| 461 | else if(strstr(temp_string.c_str(),"RP_beam2Card")) {curstring >> varname >> svalue;RP_beam2Card = svalue;}
|
---|
| 462 | else if(strstr(temp_string.c_str(),"RP_IP_name")) {curstring >> varname >> svalue;RP_IP_name = svalue;}
|
---|
[94] | 463 |
|
---|
| 464 | else if(strstr(temp_string.c_str(),"ELG_Scen")) {curstring >> varname >> value; ELG_Scen = value;}
|
---|
| 465 | else if(strstr(temp_string.c_str(),"ELG_Ncen")) {curstring >> varname >> value; ELG_Ncen = value;}
|
---|
| 466 | else if(strstr(temp_string.c_str(),"ELG_Ccen")) {curstring >> varname >> value; ELG_Ccen = value;}
|
---|
| 467 | else if(strstr(temp_string.c_str(),"ELG_Sfwd")) {curstring >> varname >> value; ELG_Sfwd = value;}
|
---|
| 468 | else if(strstr(temp_string.c_str(),"ELG_Cfwd")) {curstring >> varname >> value; ELG_Cfwd = value;}
|
---|
| 469 | else if(strstr(temp_string.c_str(),"ELG_Nfwd")) {curstring >> varname >> value; ELG_Nfwd = value;}
|
---|
| 470 | else if(strstr(temp_string.c_str(),"HAD_Shcal")) {curstring >> varname >> value; HAD_Shcal = value;}
|
---|
| 471 | else if(strstr(temp_string.c_str(),"HAD_Nhcal")) {curstring >> varname >> value; HAD_Nhcal = value;}
|
---|
| 472 | else if(strstr(temp_string.c_str(),"HAD_Chcal")) {curstring >> varname >> value; HAD_Chcal = value;}
|
---|
| 473 | else if(strstr(temp_string.c_str(),"HAD_Shf")) {curstring >> varname >> value; HAD_Shf = value;}
|
---|
| 474 | else if(strstr(temp_string.c_str(),"HAD_Nhf")) {curstring >> varname >> value; HAD_Nhf = value;}
|
---|
| 475 | else if(strstr(temp_string.c_str(),"HAD_Chf")) {curstring >> varname >> value; HAD_Chf = value;}
|
---|
| 476 | else if(strstr(temp_string.c_str(),"MU_SmearPt")) {curstring >> varname >> value; MU_SmearPt = value;}
|
---|
| 477 |
|
---|
| 478 | else if(strstr(temp_string.c_str(),"TRACK_radius")) {curstring >> varname >> ivalue;TRACK_radius = ivalue;}
|
---|
| 479 | else if(strstr(temp_string.c_str(),"TRACK_length")) {curstring >> varname >> ivalue;TRACK_length = ivalue;}
|
---|
| 480 | else if(strstr(temp_string.c_str(),"TRACK_bfield_x")) {curstring >> varname >> value; TRACK_bfield_x = value;}
|
---|
| 481 | else if(strstr(temp_string.c_str(),"TRACK_bfield_y")) {curstring >> varname >> value; TRACK_bfield_y = value;}
|
---|
| 482 | else if(strstr(temp_string.c_str(),"TRACK_bfield_z")) {curstring >> varname >> value; TRACK_bfield_z = value;}
|
---|
| 483 | else if(strstr(temp_string.c_str(),"FLAG_bfield")) {curstring >> varname >> ivalue; FLAG_bfield = ivalue;}
|
---|
| 484 | else if(strstr(temp_string.c_str(),"TRACK_ptmin")) {curstring >> varname >> value; TRACK_ptmin = value;}
|
---|
| 485 | else if(strstr(temp_string.c_str(),"TRACK_eff")) {curstring >> varname >> ivalue;TRACK_eff = ivalue;}
|
---|
[33] | 486 |
|
---|
[94] | 487 | else if(strstr(temp_string.c_str(),"TOWER_number")) {curstring >> varname >> ivalue;TOWER_number = ivalue;}
|
---|
| 488 | else if(strstr(temp_string.c_str(),"TOWER_eta_edges")){
|
---|
| 489 | curstring >> varname; for(unsigned int i=0; i<TOWER_number+1; i++) {curstring >> value; TOWER_eta_edges[i] = value;} }
|
---|
| 490 | else if(strstr(temp_string.c_str(),"TOWER_dphi")){
|
---|
| 491 | curstring >> varname; for(unsigned int i=0; i<TOWER_number; i++) {curstring >> value; TOWER_dphi[i] = value;} }
|
---|
[2] | 492 |
|
---|
[94] | 493 | else if(strstr(temp_string.c_str(),"PTCUT_elec")) {curstring >> varname >> value; PTCUT_elec = value;}
|
---|
| 494 | else if(strstr(temp_string.c_str(),"PTCUT_muon")) {curstring >> varname >> value; PTCUT_muon = value;}
|
---|
| 495 | else if(strstr(temp_string.c_str(),"PTCUT_jet")) {curstring >> varname >> value; PTCUT_jet = value;}
|
---|
| 496 | else if(strstr(temp_string.c_str(),"PTCUT_gamma")) {curstring >> varname >> value; PTCUT_gamma = value;}
|
---|
| 497 | else if(strstr(temp_string.c_str(),"PTCUT_taujet")) {curstring >> varname >> value; PTCUT_taujet = value;}
|
---|
[43] | 498 |
|
---|
[305] | 499 | else if(strstr(temp_string.c_str(),"ISOL_PT")) {curstring >> varname >> value; ISOL_PT = value;}
|
---|
| 500 | else if(strstr(temp_string.c_str(),"ISOL_Cone")) {curstring >> varname >> value; ISOL_Cone = value;}
|
---|
| 501 |
|
---|
| 502 |
|
---|
[94] | 503 | else if(strstr(temp_string.c_str(),"JET_coneradius")) {curstring >> varname >> value; JET_coneradius = value;}
|
---|
| 504 | else if(strstr(temp_string.c_str(),"JET_jetalgo")) {curstring >> varname >> ivalue;JET_jetalgo = ivalue;}
|
---|
| 505 | else if(strstr(temp_string.c_str(),"JET_seed")) {curstring >> varname >> value; JET_seed = value;}
|
---|
| 506 |
|
---|
| 507 | else if(strstr(temp_string.c_str(),"BTAG_b")) {curstring >> varname >> ivalue;BTAG_b = ivalue;}
|
---|
| 508 | else if(strstr(temp_string.c_str(),"BTAG_mistag_c")) {curstring >> varname >> ivalue;BTAG_mistag_c = ivalue;}
|
---|
| 509 | else if(strstr(temp_string.c_str(),"BTAG_mistag_l")) {curstring >> varname >> ivalue;BTAG_mistag_l = ivalue;}
|
---|
[2] | 510 |
|
---|
[94] | 511 | else if(strstr(temp_string.c_str(),"FLAG_vfd")) {curstring >> varname >> ivalue; FLAG_vfd = ivalue;}
|
---|
[306] | 512 | else if(strstr(temp_string.c_str(),"FLAG_RP")) {curstring >> varname >> ivalue; FLAG_RP = ivalue;}
|
---|
[94] | 513 | else if(strstr(temp_string.c_str(),"FLAG_trigger")) {curstring >> varname >> ivalue; FLAG_trigger = ivalue;}
|
---|
| 514 | else if(strstr(temp_string.c_str(),"FLAG_frog")) {curstring >> varname >> ivalue; FLAG_frog = ivalue;}
|
---|
[307] | 515 | else if(strstr(temp_string.c_str(),"FLAG_lhco")) {curstring >> varname >> ivalue; FLAG_lhco = ivalue;}
|
---|
[94] | 516 | else if(strstr(temp_string.c_str(),"NEvents_Frog")) {curstring >> varname >> ivalue; NEvents_Frog = ivalue;}
|
---|
| 517 | }
|
---|
| 518 |
|
---|
| 519 | //jet stuffs not defined in the input datacard
|
---|
| 520 | JET_overlap = 0.75;
|
---|
| 521 | // MidPoint algorithm definition
|
---|
| 522 | JET_M_coneareafraction = 0.25;
|
---|
| 523 | JET_M_maxpairsize = 2;
|
---|
| 524 | JET_M_maxiterations = 100;
|
---|
| 525 | // Define Cone algorithm.
|
---|
| 526 | JET_C_adjacencycut = 2;
|
---|
| 527 | JET_C_maxiterations = 100;
|
---|
| 528 | JET_C_iratch = 1;
|
---|
| 529 | //Define SISCone algorithm.
|
---|
| 530 | JET_S_npass = 0;
|
---|
| 531 | JET_S_protojet_ptmin= 0.0;
|
---|
| 532 |
|
---|
| 533 | //For Tau-jet definition
|
---|
| 534 | TAU_energy_scone = 0.15; // radius R of the cone for tau definition, based on energy threshold
|
---|
| 535 | TAU_track_scone = 0.4; // radius R of the cone for tau definition, based on track number
|
---|
| 536 | TAU_track_pt = 2; // minimal pt [GeV] for tracks to be considered in tau definition
|
---|
| 537 | TAU_energy_frac = 0.95; // fraction of energy required in the central part of the cone, for tau jets
|
---|
| 538 |
|
---|
[2] | 539 | }
|
---|
| 540 |
|
---|
[219] | 541 | void RESOLution::Logfile(const string& LogName) {
|
---|
[94] | 542 | //void RESOLution::Logfile(string outputfilename) {
|
---|
| 543 |
|
---|
[44] | 544 | ofstream f_out(LogName.c_str());
|
---|
[260] | 545 |
|
---|
| 546 | f_out <<"**********************************************************************"<< endl;
|
---|
| 547 | f_out <<"**********************************************************************"<< endl;
|
---|
| 548 | f_out <<"** **"<< endl;
|
---|
| 549 | f_out <<"** Welcome to **"<< endl;
|
---|
| 550 | f_out <<"** **"<< endl;
|
---|
| 551 | f_out <<"** **"<< endl;
|
---|
| 552 | f_out <<"** .ddddddd- lL hH **"<< endl;
|
---|
| 553 | f_out <<"** -Dd` `dD: Ll hH` **"<< endl;
|
---|
| 554 | f_out <<"** dDd dDd eeee. lL .pp+pp Hh+hhh` -eeee- `sssss **"<< endl;
|
---|
| 555 | f_out <<"** -Dd `DD ee. ee Ll .Pp. PP Hh. HH. ee. ee sSs **"<< endl;
|
---|
| 556 | f_out <<"** dD` dDd eEeee: lL. pP. pP hH hH` eEeee:` -sSSSs. **"<< endl;
|
---|
| 557 | f_out <<"** .Dd :dd eE. LlL PpppPP Hh Hh eE sSS **"<< endl;
|
---|
| 558 | f_out <<"** dddddd:. eee+: lL. pp. hh. hh eee+ sssssS **"<< endl;
|
---|
| 559 | f_out <<"** Pp **"<< endl;
|
---|
| 560 | f_out <<"** **"<< endl;
|
---|
| 561 | f_out <<"** Delphes, a framework for the fast simulation **"<< endl;
|
---|
| 562 | f_out <<"** of a generic collider experiment **"<< endl;
|
---|
| 563 | f_out <<"** **"<< endl;
|
---|
[261] | 564 | f_out <<"** --- Version 1.4beta of Delphes --- **"<< endl;
|
---|
| 565 | f_out <<"** Last date of change: 9 February 2009 **"<< endl;
|
---|
[260] | 566 | f_out <<"** **"<< endl;
|
---|
| 567 | f_out <<"** **"<< endl;
|
---|
| 568 | f_out <<"** This package uses: **"<< endl;
|
---|
| 569 | f_out <<"** ------------------ **"<< endl;
|
---|
| 570 | f_out <<"** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **"<< endl;
|
---|
| 571 | f_out <<"** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **"<< endl;
|
---|
| 572 | f_out <<"** FROG: L. Quertenmont, V. Roberfroid [hep-ex/0901.2718v1] **"<< endl;
|
---|
| 573 | f_out <<"** **"<< endl;
|
---|
| 574 | f_out <<"** ---------------------------------------------------------------- **"<< endl;
|
---|
| 575 | f_out <<"** **"<< endl;
|
---|
| 576 | f_out <<"** Main authors: **"<< endl;
|
---|
| 577 | f_out <<"** ------------- **"<< endl;
|
---|
| 578 | f_out <<"** **"<< endl;
|
---|
| 579 | f_out <<"** Séverine Ovyn Xavier Rouby **"<< endl;
|
---|
| 580 | f_out <<"** severine.ovyn@uclouvain.be xavier.rouby@cern **"<< endl;
|
---|
| 581 | f_out <<"** Center for Particle Physics and Phenomenology (CP3) **"<< endl;
|
---|
| 582 | f_out <<"** Universite Catholique de Louvain (UCL) **"<< endl;
|
---|
| 583 | f_out <<"** Louvain-la-Neuve, Belgium **"<< endl;
|
---|
| 584 | f_out <<"** **"<< endl;
|
---|
| 585 | f_out <<"** ---------------------------------------------------------------- **"<< endl;
|
---|
| 586 | f_out <<"** **"<< endl;
|
---|
| 587 | f_out <<"** Former Delphes versions and documentation can be found on : **"<< endl;
|
---|
| 588 | f_out <<"** http://www.fynu.ucl.ac.be/delphes.html **"<< endl;
|
---|
| 589 | f_out <<"** **"<< endl;
|
---|
| 590 | f_out <<"** **"<< endl;
|
---|
| 591 | f_out <<"** Disclaimer: this program is a beta version of Delphes and **"<< endl;
|
---|
| 592 | f_out <<"** therefore comes without guarantees. Beware of errors and please **"<< endl;
|
---|
| 593 | f_out <<"** give us your feedbacks about potential bugs **"<< endl;
|
---|
| 594 | f_out <<"** **"<< endl;
|
---|
| 595 | f_out <<"**********************************************************************"<< endl;
|
---|
| 596 | f_out <<"** **"<< endl;
|
---|
[44] | 597 | f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n";
|
---|
| 598 | f_out<<"* *"<<"\n";
|
---|
| 599 | f_out<<"#******************************** *"<<"\n";
|
---|
| 600 | f_out<<"# Central detector caracteristics *"<<"\n";
|
---|
| 601 | f_out<<"#******************************** *"<<"\n";
|
---|
| 602 | f_out<<"* *"<<"\n";
|
---|
| 603 | f_out << left << setw(30) <<"* Maximum tracking system: "<<""
|
---|
[94] | 604 | << left << setw(10) <<CEN_max_tracker <<""<< right << setw(15)<<"*"<<"\n";
|
---|
[44] | 605 | f_out << left << setw(30) <<"* Maximum central calorimeter: "<<""
|
---|
[94] | 606 | << left << setw(10) <<CEN_max_calo_cen <<""<< right << setw(15)<<"*"<<"\n";
|
---|
[44] | 607 | f_out << left << setw(30) <<"* Maximum forward calorimeter: "<<""
|
---|
[94] | 608 | << left << setw(10) <<CEN_max_calo_fwd <<""<< right << setw(15)<<"*"<<"\n";
|
---|
[44] | 609 | f_out << left << setw(30) <<"* Muon chambers coverage: "<<""
|
---|
[94] | 610 | << left << setw(10) <<CEN_max_mu <<""<< right << setw(15)<<"*"<<"\n";
|
---|
[44] | 611 | f_out<<"* *"<<"\n";
|
---|
[306] | 612 | if(FLAG_RP==1){
|
---|
| 613 | f_out<<"#************************************ *"<<"\n";
|
---|
| 614 | f_out<<"# Very forward Roman Pots switched on *"<<"\n";
|
---|
| 615 | f_out<<"#************************************ *"<<"\n";
|
---|
[94] | 616 | f_out<<"* *"<<"\n";
|
---|
[306] | 617 | f_out << left << setw(55) <<"* Distance of the 220 RP to the IP in meters:"<<""
|
---|
[94] | 618 | << left << setw(5) <<RP_220_s <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[306] | 619 | f_out << left << setw(55) <<"* Distance of the 220 RP to the beam in meters:"<<""
|
---|
[94] | 620 | << left << setw(5) <<RP_220_x <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[306] | 621 | f_out << left << setw(55) <<"* Distance of the 420 RP to the IP in meters:"<<""
|
---|
[94] | 622 | << left << setw(5) <<RP_420_s <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[306] | 623 | f_out << left << setw(55) <<"* Distance of the 420 RP to the beam in meters:"<<""
|
---|
[94] | 624 | << left << setw(5) <<RP_420_x <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[257] | 625 | f_out << left << setw(55) <<"* Interaction point at the LHC named: "<<""
|
---|
| 626 | << left << setw(5) <<RP_IP_name <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[252] | 627 | f_out << left << setw(35) <<"* Datacard for beam 1: "<<""
|
---|
| 628 | << left << setw(25) <<RP_beam1Card <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 629 | f_out << left << setw(35) <<"* Datacard for beam 2: "<<""
|
---|
| 630 | << left << setw(25) <<RP_beam2Card <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[254] | 631 | f_out << left << setw(44) <<"* Beam separation, in meters: "<<""
|
---|
| 632 | << left << setw(6) << RP_offsetEl_x <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
[252] | 633 | f_out << left << setw(44) <<"* Distance from IP for Beam separation (m):"<<""
|
---|
| 634 | << left << setw(6) <<RP_offsetEl_s <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
[254] | 635 | f_out << left << setw(44) <<"* X offset of beam crossing in micrometers:"<<""
|
---|
| 636 | << left << setw(6) <<RP_cross_x <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
| 637 | f_out << left << setw(44) <<"* Y offset of beam crossing in micrometers:"<<""
|
---|
| 638 | << left << setw(6) <<RP_cross_y <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
| 639 | f_out << left << setw(44) <<"* Angle of beam crossing:"<<""
|
---|
| 640 | << left << setw(6) <<RP_cross_ang <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
[94] | 641 | f_out<<"* *"<<"\n";
|
---|
| 642 | }
|
---|
| 643 | else {
|
---|
[306] | 644 | f_out<<"#************************************* *"<<"\n";
|
---|
| 645 | f_out<<"# Very forward Roman Pots switched off *"<<"\n";
|
---|
| 646 | f_out<<"#************************************* *"<<"\n";
|
---|
[94] | 647 | f_out<<"* *"<<"\n";
|
---|
| 648 | }
|
---|
[306] | 649 | if(FLAG_vfd==1){
|
---|
| 650 | f_out<<"#************************************** *"<<"\n";
|
---|
| 651 | f_out<<"# Very forward calorimeters switched on *"<<"\n";
|
---|
| 652 | f_out<<"#************************************** *"<<"\n";
|
---|
| 653 | f_out<<"* *"<<"\n";
|
---|
| 654 | f_out << left << setw(55) <<"* Minimum very forward calorimeter: "<<""
|
---|
| 655 | << left << setw(5) <<VFD_min_calo_vfd <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 656 | f_out << left << setw(55) <<"* Maximum very forward calorimeter: "<<""
|
---|
| 657 | << left << setw(5) <<VFD_max_calo_vfd <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 658 | f_out << left << setw(55) <<"* Minimum coverage zero_degree calorimeter "<<""
|
---|
| 659 | << left << setw(5) <<VFD_min_zdc <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 660 | f_out << left << setw(55) <<"* Distance of the ZDC to the IP, in meters: "<<""
|
---|
| 661 | << left << setw(5) <<VFD_s_zdc <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 662 | f_out<<"* *"<<"\n";
|
---|
| 663 | }
|
---|
| 664 | else {
|
---|
| 665 | f_out<<"#*************************************** *"<<"\n";
|
---|
| 666 | f_out<<"# Very forward calorimeters switched off *"<<"\n";
|
---|
| 667 | f_out<<"#*************************************** *"<<"\n";
|
---|
| 668 | f_out<<"* *"<<"\n";
|
---|
| 669 | }
|
---|
| 670 |
|
---|
[44] | 671 | f_out<<"#************************************ *"<<"\n";
|
---|
| 672 | f_out<<"# Electromagnetic smearing parameters *"<<"\n";
|
---|
| 673 | f_out<<"#************************************ *"<<"\n";
|
---|
| 674 | f_out<<"* *"<<"\n";
|
---|
| 675 | //# \sigma/E = C + N/E + S/\sqrt{E}
|
---|
| 676 | f_out << left << setw(30) <<"* S term for central ECAL: "<<""
|
---|
| 677 | << left << setw(30) <<ELG_Scen <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 678 | f_out << left << setw(30) <<"* N term for central ECAL: "<<""
|
---|
| 679 | << left << setw(30) <<ELG_Ncen <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 680 | f_out << left << setw(30) <<"* C term for central ECAL: "<<""
|
---|
| 681 | << left << setw(30) <<ELG_Ccen <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[257] | 682 | f_out << left << setw(30) <<"* S term for FCAL: "<<""
|
---|
[44] | 683 | << left << setw(30) <<ELG_Sfwd <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[257] | 684 | f_out << left << setw(30) <<"* N term for FCAL: "<<""
|
---|
[44] | 685 | << left << setw(30) <<ELG_Nfwd <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[257] | 686 | f_out << left << setw(30) <<"* C term for FCAL: "<<""
|
---|
[44] | 687 | << left << setw(30) <<ELG_Cfwd <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 688 | f_out<<"* *"<<"\n";
|
---|
| 689 | f_out<<"#***************************** *"<<"\n";
|
---|
| 690 | f_out<<"# Hadronic smearing parameters *"<<"\n";
|
---|
| 691 | f_out<<"#***************************** *"<<"\n";
|
---|
| 692 | f_out<<"* *"<<"\n";
|
---|
| 693 | f_out << left << setw(30) <<"* S term for central HCAL: "<<""
|
---|
| 694 | << left << setw(30) <<HAD_Shcal <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 695 | f_out << left << setw(30) <<"* N term for central HCAL: "<<""
|
---|
| 696 | << left << setw(30) <<HAD_Nhcal <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 697 | f_out << left << setw(30) <<"* C term for central HCAL: "<<""
|
---|
| 698 | << left << setw(30) <<HAD_Chcal <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[257] | 699 | f_out << left << setw(30) <<"* S term for FCAL: "<<""
|
---|
[44] | 700 | << left << setw(30) <<HAD_Shf <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[257] | 701 | f_out << left << setw(30) <<"* N term for FCAL: "<<""
|
---|
[44] | 702 | << left << setw(30) <<HAD_Nhf <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[257] | 703 | f_out << left << setw(30) <<"* C term for FCAL: "<<""
|
---|
[44] | 704 | << left << setw(30) <<HAD_Chf <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 705 | f_out<<"* *"<<"\n";
|
---|
| 706 | f_out<<"#************************* *"<<"\n";
|
---|
| 707 | f_out<<"# Muon smearing parameters *"<<"\n";
|
---|
| 708 | f_out<<"#************************* *"<<"\n";
|
---|
| 709 | f_out<<"* *"<<"\n";
|
---|
[94] | 710 | f_out << left << setw(55) <<"* PT resolution for muons : "<<""
|
---|
| 711 | << left << setw(5) <<MU_SmearPt <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[44] | 712 | f_out<<"* *"<<"\n";
|
---|
[94] | 713 | if(FLAG_bfield==1){
|
---|
| 714 | f_out<<"#*************************** *"<<"\n";
|
---|
[264] | 715 | f_out<<"# Magnetic field switched on *"<<"\n";
|
---|
[94] | 716 | f_out<<"#*************************** *"<<"\n";
|
---|
| 717 | f_out<<"* *"<<"\n";
|
---|
| 718 | f_out << left << setw(55) <<"* Radius of the BField coverage: "<<""
|
---|
| 719 | << left << setw(5) <<TRACK_radius <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 720 | f_out << left << setw(55) <<"* Length of the BField coverage: "<<""
|
---|
| 721 | << left << setw(5) <<TRACK_length <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 722 | f_out << left << setw(55) <<"* BField X component: "<<""
|
---|
| 723 | << left << setw(5) <<TRACK_bfield_x <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 724 | f_out << left << setw(55) <<"* BField Y component: "<<""
|
---|
| 725 | << left << setw(5) <<TRACK_bfield_y <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 726 | f_out << left << setw(55) <<"* BField Z component: "<<""
|
---|
| 727 | << left << setw(5) <<TRACK_bfield_z <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 728 | f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""
|
---|
| 729 | << left << setw(10) <<TRACK_ptmin <<""<< right << setw(5)<<"*"<<"\n";
|
---|
| 730 | f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<""
|
---|
| 731 | << left << setw(10) <<TRACK_eff <<""<< right << setw(5)<<"*"<<"\n";
|
---|
| 732 | f_out<<"* *"<<"\n";
|
---|
| 733 | }
|
---|
| 734 | else {
|
---|
| 735 | f_out<<"#**************************** *"<<"\n";
|
---|
[264] | 736 | f_out<<"# Magnetic field switched off *"<<"\n";
|
---|
[94] | 737 | f_out<<"#**************************** *"<<"\n";
|
---|
| 738 | f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""
|
---|
| 739 | << left << setw(10) <<TRACK_ptmin <<""<< right << setw(5)<<"*"<<"\n";
|
---|
| 740 | f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<""
|
---|
| 741 | << left << setw(10) <<TRACK_eff <<""<< right << setw(5)<<"*"<<"\n";
|
---|
| 742 | f_out<<"* *"<<"\n";
|
---|
| 743 | }
|
---|
| 744 | f_out<<"#******************** *"<<"\n";
|
---|
| 745 | f_out<<"# Calorimetric Towers *"<<"\n";
|
---|
| 746 | f_out<<"#******************** *"<<"\n";
|
---|
| 747 | f_out << left << setw(55) <<"* Number of calorimetric towers in eta, for eta>0: "<<""
|
---|
| 748 | << left << setw(5) << TOWER_number <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 749 | f_out << left << setw(55) <<"* Tower edges in eta, for eta>0: "<<"" << right << setw(15)<<"*"<<"\n";
|
---|
| 750 | f_out << "* ";
|
---|
| 751 | for (unsigned int i=0; i<TOWER_number+1; i++) {
|
---|
| 752 | f_out << left << setw(7) << TOWER_eta_edges[i];
|
---|
| 753 | if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* ";
|
---|
| 754 | }
|
---|
| 755 | for (unsigned int i=(TOWER_number+1)%9; i<9; i++) f_out << left << setw(7) << "";
|
---|
| 756 | f_out << right << setw(3)<<"*"<<"\n";
|
---|
| 757 | f_out << left << setw(55) <<"* Tower sizes in phi, for eta>0 [degree]:"<<"" << right << setw(15)<<"*"<<"\n";
|
---|
| 758 | f_out << "* ";
|
---|
| 759 | for (unsigned int i=0; i<TOWER_number; i++) {
|
---|
| 760 | f_out << left << setw(7) << TOWER_dphi[i];
|
---|
| 761 | if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* ";
|
---|
| 762 | }
|
---|
| 763 | for (unsigned int i=(TOWER_number)%9; i<9; i++) f_out << left << setw(7) << "";
|
---|
| 764 | f_out << right << setw(3)<<"*"<<"\n";
|
---|
[44] | 765 | f_out<<"* *"<<"\n";
|
---|
| 766 | f_out<<"#******************* *"<<"\n";
|
---|
| 767 | f_out<<"# Minimum pT's [GeV] *"<<"\n";
|
---|
| 768 | f_out<<"#******************* *"<<"\n";
|
---|
| 769 | f_out<<"* *"<<"\n";
|
---|
| 770 | f_out << left << setw(40) <<"* Minimum pT for electrons: "<<""
|
---|
[94] | 771 | << left << setw(20) <<PTCUT_elec <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[44] | 772 | f_out << left << setw(40) <<"* Minimum pT for muons: "<<""
|
---|
[94] | 773 | << left << setw(20) <<PTCUT_muon <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[44] | 774 | f_out << left << setw(40) <<"* Minimum pT for jets: "<<""
|
---|
[94] | 775 | << left << setw(20) <<PTCUT_jet <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[44] | 776 | f_out << left << setw(40) <<"* Minimum pT for Tau-jets: "<<""
|
---|
[94] | 777 | << left << setw(20) <<PTCUT_taujet <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[74] | 778 | f_out << left << setw(40) <<"* Minimum pT for photons: "<<""
|
---|
[94] | 779 | << left << setw(20) <<PTCUT_gamma <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[44] | 780 | f_out<<"* *"<<"\n";
|
---|
[305] | 781 | f_out<<"#******************* *"<<"\n";
|
---|
| 782 | f_out<<"# Isolation criteria *"<<"\n";
|
---|
| 783 | f_out<<"#******************* *"<<"\n";
|
---|
| 784 | f_out<<"* *"<<"\n";
|
---|
| 785 | f_out << left << setw(40) <<"* Minimum pT for tracks [GeV]: "<<""
|
---|
| 786 | << left << setw(20) <<ISOL_PT <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 787 | f_out << left << setw(40) <<"* Cone for isolation criteria: "<<""
|
---|
| 788 | << left << setw(20) <<ISOL_Cone <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 789 | f_out<<"* *"<<"\n";
|
---|
[44] | 790 | f_out<<"#*************** *"<<"\n";
|
---|
| 791 | f_out<<"# Jet definition *"<<"\n";
|
---|
| 792 | f_out<<"#*************** *"<<"\n";
|
---|
| 793 | f_out<<"* *"<<"\n";
|
---|
[49] | 794 | f_out<<"* Six algorithms are currently available: *"<<"\n";
|
---|
| 795 | f_out<<"* - 1) CDF cone algorithm, *"<<"\n";
|
---|
| 796 | f_out<<"* - 2) CDF MidPoint algorithm, *"<<"\n";
|
---|
| 797 | f_out<<"* - 3) SIScone algorithm, *"<<"\n";
|
---|
| 798 | f_out<<"* - 4) kt algorithm, *"<<"\n";
|
---|
| 799 | f_out<<"* - 5) Cambrigde/Aachen algorithm, *"<<"\n";
|
---|
| 800 | f_out<<"* - 6) Anti-kt algorithm. *"<<"\n";
|
---|
| 801 | f_out<<"* *"<<"\n";
|
---|
| 802 | f_out<<"* You have chosen *"<<"\n";
|
---|
[94] | 803 | switch(JET_jetalgo) {
|
---|
[44] | 804 | default:
|
---|
| 805 | case 1: {
|
---|
[94] | 806 | f_out<<"* CDF JetClu jet algorithm with parameters: *"<<"\n";
|
---|
| 807 | f_out << left << setw(40) <<"* - Seed threshold: "<<""
|
---|
| 808 | << left << setw(10) <<JET_seed <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
| 809 | f_out << left << setw(40) <<"* - Cone radius: "<<""
|
---|
| 810 | << left << setw(10) <<JET_coneradius <<""<< right << setw(20)<<"*"<<"\n";
|
---|
| 811 | f_out << left << setw(40) <<"* - Adjacency cut: "<<""
|
---|
| 812 | << left << setw(10) <<JET_C_adjacencycut <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
| 813 | f_out << left << setw(40) <<"* - Max iterations: "<<""
|
---|
| 814 | << left << setw(10) <<JET_C_maxiterations <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
| 815 | f_out << left << setw(40) <<"* - Iratch: "<<""
|
---|
| 816 | << left << setw(10) <<JET_C_iratch <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
| 817 | f_out << left << setw(40) <<"* - Overlap threshold: "<<""
|
---|
| 818 | << left << setw(10) <<JET_overlap <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
[44] | 819 | }
|
---|
| 820 | break;
|
---|
| 821 | case 2: {
|
---|
[94] | 822 | f_out<<"* CDF midpoint jet algorithm with parameters: *"<<"\n";
|
---|
| 823 | f_out << left << setw(40) <<"* - Seed threshold: "<<""
|
---|
| 824 | << left << setw(20) <<JET_seed <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
| 825 | f_out << left << setw(40) <<"* - Cone radius: "<<""
|
---|
| 826 | << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 827 | f_out << left << setw(40) <<"* - Cone area fraction:"<<""
|
---|
| 828 | << left << setw(20) <<JET_M_coneareafraction <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
| 829 | f_out << left << setw(40) <<"* - Maximum pair size: "<<""
|
---|
| 830 | << left << setw(20) <<JET_M_maxpairsize <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
| 831 | f_out << left << setw(40) <<"* - Max iterations: "<<""
|
---|
| 832 | << left << setw(20) <<JET_M_maxiterations <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
| 833 | f_out << left << setw(40) <<"* - Overlap threshold: "<<""
|
---|
| 834 | << left << setw(20) <<JET_overlap <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
[44] | 835 | }
|
---|
| 836 | break;
|
---|
| 837 | case 3: {
|
---|
[94] | 838 | f_out <<"* SISCone jet algorithm with parameters: *"<<"\n";
|
---|
| 839 | f_out << left << setw(40) <<"* - Cone radius: "<<""
|
---|
| 840 | << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 841 | f_out << left << setw(40) <<"* - Overlap threshold: "<<""
|
---|
| 842 | << left << setw(20) <<JET_overlap <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
| 843 | f_out << left << setw(40) <<"* - Number pass max: "<<""
|
---|
| 844 | << left << setw(20) <<JET_S_npass <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
| 845 | f_out << left << setw(40) <<"* - Minimum pT for protojet: "<<""
|
---|
| 846 | << left << setw(20) <<JET_S_protojet_ptmin <<""<< right << setw(10)<<"! not in datacard *"<<"\n";
|
---|
[44] | 847 | }
|
---|
| 848 | break;
|
---|
| 849 | case 4: {
|
---|
[94] | 850 | f_out <<"* KT jet algorithm with parameters: *"<<"\n";
|
---|
| 851 | f_out << left << setw(40) <<"* - Cone radius: "<<""
|
---|
| 852 | << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[44] | 853 | }
|
---|
| 854 | break;
|
---|
[49] | 855 | case 5: {
|
---|
[94] | 856 | f_out <<"* Cambridge/Aachen jet algorithm with parameters: *"<<"\n";
|
---|
| 857 | f_out << left << setw(40) <<"* - Cone radius: "<<""
|
---|
| 858 | << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[44] | 859 | }
|
---|
[49] | 860 | break;
|
---|
| 861 | case 6: {
|
---|
[94] | 862 | f_out <<"* Anti-kt jet algorithm with parameters: *"<<"\n";
|
---|
| 863 | f_out << left << setw(40) <<"* - Cone radius: "<<""
|
---|
| 864 | << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n";
|
---|
[49] | 865 | }
|
---|
| 866 | break;
|
---|
| 867 | }
|
---|
[44] | 868 | f_out<<"* *"<<"\n";
|
---|
[94] | 869 | f_out<<"#****************************** *"<<"\n";
|
---|
| 870 | f_out<<"# Tau-jet definition parameters *"<<"\n";
|
---|
| 871 | f_out<<"#****************************** *"<<"\n";
|
---|
| 872 | f_out<<"* *"<<"\n";
|
---|
| 873 | f_out << left << setw(45) <<"* Cone radius for calorimeter tagging: "<<""
|
---|
| 874 | << left << setw(5) <<TAU_energy_scone <<""<< right << setw(20)<<"*"<<"\n";
|
---|
| 875 | f_out << left << setw(45) <<"* Fraction of energy in the small cone: "<<""
|
---|
| 876 | << left << setw(5) <<TAU_energy_frac*100 <<""<< right << setw(20)<<"! not in datacard *"<<"\n";
|
---|
| 877 | f_out << left << setw(45) <<"* Cone radius for tracking tagging: "<<""
|
---|
| 878 | << left << setw(5) <<TAU_track_scone <<""<< right << setw(20)<<"*"<<"\n";
|
---|
| 879 | f_out << left << setw(45) <<"* Minimum track pT [GeV]: "<<""
|
---|
| 880 | << left << setw(5) <<TAU_track_pt <<""<< right << setw(20)<<"*"<<"\n";
|
---|
| 881 | f_out<<"* *"<<"\n";
|
---|
| 882 | f_out<<"#*************************** *"<<"\n";
|
---|
| 883 | f_out<<"# B-tagging efficiencies [%] *"<<"\n";
|
---|
| 884 | f_out<<"#*************************** *"<<"\n";
|
---|
| 885 | f_out<<"* *"<<"\n";
|
---|
| 886 | f_out << left << setw(50) <<"* Efficiency to tag a \"b\" as a b-jet: "<<""
|
---|
| 887 | << left << setw(10) <<BTAG_b <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 888 | f_out << left << setw(50) <<"* Efficiency to mistag a c-jet as a b-jet: "<<""
|
---|
| 889 | << left << setw(10) <<BTAG_mistag_c <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 890 | f_out << left << setw(50) <<"* Efficiency to mistag a light jet as a b-jet: "<<""
|
---|
| 891 | << left << setw(10) <<BTAG_mistag_l <<""<< right << setw(10)<<"*"<<"\n";
|
---|
| 892 | f_out<<"* *"<<"\n";
|
---|
| 893 | f_out<<"* *"<<"\n";
|
---|
[44] | 894 | f_out<<"#....................................................................*"<<"\n";
|
---|
| 895 | f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n";
|
---|
[94] | 896 |
|
---|
[44] | 897 | }
|
---|
| 898 |
|
---|
[2] | 899 | // **********Provides the smeared TLorentzVector for the electrons********
|
---|
| 900 | // Smears the electron energy, and changes the 4-momentum accordingly
|
---|
| 901 | // different smearing if the electron is central (eta < 2.5) or forward
|
---|
| 902 | void RESOLution::SmearElectron(TLorentzVector &electron) {
|
---|
| 903 | // the 'electron' variable will be changed by the function
|
---|
| 904 | float energy = electron.E(); // before smearing
|
---|
| 905 | float energyS = 0.0; // after smearing // \sigma/E = C + N/E + S/\sqrt{E}
|
---|
[71] | 906 |
|
---|
[94] | 907 | if(fabs(electron.Eta()) < CEN_max_tracker) { // if the electron is inside the tracker
|
---|
[2] | 908 | energyS = gRandom->Gaus(energy, sqrt(
|
---|
| 909 | pow(ELG_Ncen,2) +
|
---|
| 910 | pow(ELG_Ccen*energy,2) +
|
---|
[22] | 911 | pow(ELG_Scen*sqrt(energy),2) ));
|
---|
[55] | 912 | }
|
---|
[94] | 913 | if(fabs(electron.Eta()) > CEN_max_tracker && fabs(electron.Eta()) < CEN_max_calo_fwd){
|
---|
[2] | 914 | energyS = gRandom->Gaus(energy, sqrt(
|
---|
| 915 | pow(ELG_Nfwd,2) +
|
---|
| 916 | pow(ELG_Cfwd*energy,2) +
|
---|
| 917 | pow(ELG_Sfwd*sqrt(energy),2) ) );
|
---|
| 918 | }
|
---|
| 919 | electron.SetPtEtaPhiE(energyS/cosh(electron.Eta()), electron.Eta(), electron.Phi(), energyS);
|
---|
| 920 | if(electron.E() < 0)electron.SetPxPyPzE(0,0,0,0); // no negative values after smearing !
|
---|
| 921 | }
|
---|
| 922 |
|
---|
| 923 |
|
---|
| 924 | // **********Provides the smeared TLorentzVector for the muons********
|
---|
| 925 | // Smears the muon pT and changes the 4-momentum accordingly
|
---|
| 926 | void RESOLution::SmearMu(TLorentzVector &muon) {
|
---|
| 927 | // the 'muon' variable will be changed by the function
|
---|
| 928 | float pt = muon.Pt(); // before smearing
|
---|
[61] | 929 | float ptS=pt;
|
---|
| 930 |
|
---|
[94] | 931 | if(fabs(muon.Eta()) < CEN_max_mu )
|
---|
[61] | 932 | {
|
---|
| 933 | ptS = gRandom->Gaus(pt, MU_SmearPt*pt ); // after smearing // \sigma/E = C + N/E + S/\sqrt{E}
|
---|
| 934 | }
|
---|
| 935 | muon.SetPtEtaPhiE(ptS, muon.Eta(), muon.Phi(), ptS*cosh(muon.Eta()));
|
---|
[2] | 936 |
|
---|
| 937 | if(muon.E() < 0)muon.SetPxPyPzE(0,0,0,0); // no negative values after smearing !
|
---|
| 938 | }
|
---|
| 939 |
|
---|
| 940 |
|
---|
| 941 | // **********Provides the smeared TLorentzVector for the hadrons********
|
---|
| 942 | // Smears the hadron 4-momentum
|
---|
| 943 | void RESOLution::SmearHadron(TLorentzVector &hadron, const float frac)
|
---|
| 944 | // the 'hadron' variable will be changed by the function
|
---|
| 945 | // the 'frac' variable describes the long-living particles. Should be 0.7 for K0S and Lambda, 1. otherwise
|
---|
| 946 | {
|
---|
| 947 | float energy = hadron.E(); // before smearing
|
---|
| 948 | float energyS = 0.0; // after smearing // \sigma/E = C + N/E + S/\sqrt{E}
|
---|
| 949 | float energy_ecal = (1.0 - frac)*energy; // electromagnetic calorimeter
|
---|
| 950 | float energy_hcal = frac*energy; // hadronic calorimeter
|
---|
| 951 | // frac takes into account the decay of long-living particles, that decay in the calorimeters
|
---|
| 952 | // some of the particles decay mostly in the ecal, some mostly in the hcal
|
---|
| 953 |
|
---|
[31] | 954 | float energyS1,energyS2;
|
---|
[94] | 955 | if(fabs(hadron.Eta()) < CEN_max_calo_cen) {
|
---|
[10] | 956 | energyS1 = gRandom->Gaus(energy_hcal, sqrt(
|
---|
[2] | 957 | pow(HAD_Nhcal,2) +
|
---|
| 958 | pow(HAD_Chcal*energy_hcal,2) +
|
---|
[9] | 959 | pow(HAD_Shcal*sqrt(energy_hcal),2) )) ;
|
---|
[10] | 960 |
|
---|
[9] | 961 |
|
---|
[10] | 962 | energyS2 = gRandom->Gaus(energy_ecal, sqrt(
|
---|
[32] | 963 | pow(ELG_Ncen,2) +
|
---|
| 964 | pow(ELG_Ccen*energy_ecal,2) +
|
---|
| 965 | pow(ELG_Scen*sqrt(energy_ecal),2) ) );
|
---|
[9] | 966 |
|
---|
[10] | 967 | energyS = ((energyS1>0)?energyS1:0) + ((energyS2>0)?energyS2:0);
|
---|
[55] | 968 | }
|
---|
[219] | 969 | if(fabs(hadron.Eta()) > CEN_max_calo_cen && fabs(hadron.Eta()) < CEN_max_calo_fwd){
|
---|
[22] | 970 | energyS = gRandom->Gaus(energy, sqrt(
|
---|
[2] | 971 | pow(HAD_Nhf,2) +
|
---|
| 972 | pow(HAD_Chf*energy,2) +
|
---|
[22] | 973 | pow(HAD_Shf*sqrt(energy),2) ));
|
---|
[55] | 974 | }
|
---|
| 975 |
|
---|
[10] | 976 |
|
---|
| 977 |
|
---|
[2] | 978 | hadron.SetPtEtaPhiE(energyS/cosh(hadron.Eta()),hadron.Eta(), hadron.Phi(), energyS);
|
---|
| 979 |
|
---|
| 980 | if(hadron.E() < 0)hadron.SetPxPyPzE(0,0,0,0);
|
---|
| 981 | }
|
---|
| 982 |
|
---|
[74] | 983 | //******************************************************************************************
|
---|
| 984 |
|
---|
[264] | 985 | //void RESOLution::SortedVector(vector<ParticleUtil> &vect)
|
---|
| 986 | void RESOLution::SortedVector(vector<D_Particle> &vect)
|
---|
[74] | 987 | {
|
---|
| 988 | int i,j = 0;
|
---|
| 989 | TLorentzVector tmp;
|
---|
| 990 | bool en_desordre = true;
|
---|
| 991 | int entries=vect.size();
|
---|
| 992 | for(i = 0 ; (i < entries) && en_desordre; i++)
|
---|
| 993 | {
|
---|
| 994 | en_desordre = false;
|
---|
| 995 | for(j = 1 ; j < entries - i ; j++)
|
---|
| 996 | {
|
---|
| 997 | if ( vect[j].Pt() > vect[j-1].Pt() )
|
---|
| 998 | {
|
---|
[264] | 999 | //ParticleUtil tmp = vect[j-1];
|
---|
| 1000 | D_Particle tmp = vect[j-1];
|
---|
[74] | 1001 | vect[j-1] = vect[j];
|
---|
| 1002 | vect[j] = tmp;
|
---|
| 1003 | en_desordre = true;
|
---|
| 1004 | }
|
---|
| 1005 | }
|
---|
| 1006 | }
|
---|
| 1007 | }
|
---|
| 1008 |
|
---|
[2] | 1009 | // **********Provides the energy in the cone of radius TAU_CONE_ENERGY for the tau identification********
|
---|
| 1010 | // to be taken into account, a calo tower should
|
---|
| 1011 | // 1) have a transverse energy \f$ E_T = \sqrt{E_X^2 + E_Y^2} \f$ above a given threshold
|
---|
| 1012 | // 2) be inside a cone with a radius R and the axis defined by (eta,phi)
|
---|
| 1013 | double RESOLution::EnergySmallCone(const vector<PhysicsTower> &towers, const float eta, const float phi) {
|
---|
| 1014 | double Energie=0;
|
---|
| 1015 | for(unsigned int i=0; i < towers.size(); i++) {
|
---|
[94] | 1016 | if(towers[i].fourVector.pt() < JET_seed) continue;
|
---|
| 1017 | if((DeltaR(phi,eta,towers[i].fourVector.phi(),towers[i].fourVector.eta()) < TAU_energy_scone)) {
|
---|
[2] | 1018 | Energie += towers[i].fourVector.E;
|
---|
| 1019 | }
|
---|
| 1020 | }
|
---|
| 1021 | return Energie;
|
---|
| 1022 | }
|
---|
| 1023 |
|
---|
| 1024 |
|
---|
| 1025 | // **********Provides the number of tracks in the cone of radius TAU_CONE_TRACKS for the tau identification********
|
---|
| 1026 | // to be taken into account, a track should
|
---|
| 1027 | // 1) avec a transverse momentum \$f p_T \$ above a given threshold
|
---|
| 1028 | // 2) be inside a cone with a radius R and the axis defined by (eta,phi)
|
---|
| 1029 | // IMPORTANT REMARK !!!!!
|
---|
[287] | 1030 | // NEW : "charge" will contain the sum of all charged tracks in the cone TAU_track_scone
|
---|
| 1031 | unsigned int RESOLution::NumTracks(float& charge, const vector<TRootTracks> &tracks, const float pt_track, const float eta, const float phi) {
|
---|
| 1032 | unsigned int numbtrack=0; // number of track in the tau-jet cone, which is smaller than R;
|
---|
| 1033 | charge=0;
|
---|
[2] | 1034 | for(unsigned int i=0; i < tracks.size(); i++) {
|
---|
[287] | 1035 | if(tracks[i].PT < pt_track ) continue;
|
---|
| 1036 | float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);
|
---|
| 1037 | if (dr > TAU_track_scone) continue;
|
---|
| 1038 | numbtrack++;
|
---|
| 1039 | charge += tracks[i].Charge; // total charge in the cone for Tau-jet
|
---|
[2] | 1040 | }
|
---|
[287] | 1041 | return numbtrack;
|
---|
[2] | 1042 | }
|
---|
[287] | 1043 | /*
|
---|
| 1044 | unsigned int RESOLution::NumTracks(unsigned int& NumTracksR, float& charge, const vector<TRootTracks> &tracks, const float pt_track, const float eta, const float phi, const float R) {
|
---|
| 1045 | unsigned int numbtrack=0; // number of track in the tau-jet cone, which is smaller than R;
|
---|
| 1046 | charge=0; NumTracksR=0; // total number of tracks
|
---|
| 1047 | if (R<TAU_track_scone) cout << "Warning: jet radius smaller than tau-jet radius in RESOLution::NumTracks\n";
|
---|
| 1048 | for(unsigned int i=0; i < tracks.size(); i++) {
|
---|
| 1049 | if(tracks[i].PT < pt_track ) continue;
|
---|
| 1050 | float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);
|
---|
| 1051 | if (dr > R) continue;
|
---|
[2] | 1052 |
|
---|
[287] | 1053 | NumTracksR++;
|
---|
| 1054 | if(dr < TAU_track_scone) {// previously R==TAU_track_scone, for tau-jets only
|
---|
| 1055 | numbtrack++;
|
---|
| 1056 | charge += tracks[i].Charge; // total charge in the cone for Tau-jet
|
---|
| 1057 | }
|
---|
[2] | 1058 |
|
---|
[287] | 1059 | }
|
---|
| 1060 | return numbtrack;
|
---|
| 1061 | }
|
---|
| 1062 | */
|
---|
| 1063 |
|
---|
| 1064 |
|
---|
[2] | 1065 | //*** Returns the PID of the particle with the highest energy, in a cone with a radius CONERADIUS and an axis (eta,phi) *********
|
---|
| 1066 | //used by Btaggedjet
|
---|
| 1067 | ///// Attention : bug removed => CONERADIUS/2 -> CONERADIUS !!
|
---|
| 1068 | int RESOLution::Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi) {
|
---|
| 1069 | float emax=0;
|
---|
| 1070 | int Ppid=0;
|
---|
| 1071 | if(subarray.GetEntries()>0) {
|
---|
| 1072 | for(int i=0; i < subarray.GetEntries();i++) { // should have pt>PT_JETMIN and a small cone radius (r<CONE_JET)
|
---|
| 1073 | float genDeltaR = DeltaR(subarray[i]->Phi,subarray[i]->Eta,phi,eta);
|
---|
[94] | 1074 | if(genDeltaR < JET_coneradius && subarray[i]->E > emax) {
|
---|
[2] | 1075 | emax=subarray[i]->E;
|
---|
| 1076 | Ppid=abs(subarray[i]->PID);
|
---|
| 1077 | }
|
---|
| 1078 | }
|
---|
| 1079 | }
|
---|
| 1080 | return Ppid;
|
---|
| 1081 | }
|
---|
| 1082 |
|
---|
| 1083 |
|
---|
| 1084 | //******************** Simulates the b-tagging efficiency for real bjet, or the misendentification for other jets****************
|
---|
| 1085 | bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray) {
|
---|
[94] | 1086 | if( rand()%100 < (BTAG_b+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pB ) return true; // b-tag of b-jets is 40%
|
---|
| 1087 | else if( rand()%100 < (BTAG_mistag_c+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pC ) return true; // b-tag of c-jets is 10%
|
---|
| 1088 | else if( rand()%100 < (BTAG_mistag_l+1) && Bjets(subarray,JET.Eta(),JET.Phi())!=0) return true; // b-tag of light jets is 1%
|
---|
[2] | 1089 | return false;
|
---|
| 1090 | }
|
---|
| 1091 |
|
---|
[31] | 1092 | //***********************Isolation criteria***********************
|
---|
| 1093 | //****************************************************************
|
---|
[287] | 1094 | //bool RESOLution::Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks, const float pt_second_track)
|
---|
[305] | 1095 | bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float pt_second_track, const float isolCone)
|
---|
[31] | 1096 | {
|
---|
| 1097 | bool isolated = false;
|
---|
[219] | 1098 | float deltar=5000.; // Initial value; should be high; no further repercussion
|
---|
[31] | 1099 | // loop on all final charged particles, with p_t >2, close enough from the electron
|
---|
| 1100 | for(unsigned int i=0; i < tracks.size(); i++)
|
---|
| 1101 | {
|
---|
[287] | 1102 | if(tracks[i].PT < pt_second_track)continue;
|
---|
| 1103 | float genDeltaR = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);
|
---|
[31] | 1104 | if(
|
---|
| 1105 | (genDeltaR > deltar) ||
|
---|
| 1106 | (genDeltaR==0)
|
---|
| 1107 | ) continue ;
|
---|
| 1108 | deltar=genDeltaR;
|
---|
| 1109 | }
|
---|
[305] | 1110 | if(deltar > isolCone) isolated = true;
|
---|
[31] | 1111 | return isolated;
|
---|
| 1112 | }
|
---|
| 1113 |
|
---|
| 1114 |
|
---|
[71] | 1115 | //********** returns a segmented value for eta and phi, for calo towers *****
|
---|
| 1116 | void RESOLution::BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta){
|
---|
[264] | 1117 | iEta = UNDEFINED;
|
---|
| 1118 | int index= iUNDEFINED;
|
---|
[94] | 1119 | for (unsigned int i=1; i< TOWER_number+1; i++) {
|
---|
| 1120 | if(fabs(eta)>TOWER_eta_edges[i-1] && fabs(eta)<TOWER_eta_edges[i]) {
|
---|
| 1121 | iEta = (eta>0) ? TOWER_eta_edges[i-1] : -TOWER_eta_edges[i];
|
---|
[71] | 1122 | index = i-1;
|
---|
| 1123 | //cout << setw(15) << left << eta << "\t" << iEta << endl;
|
---|
| 1124 | break;
|
---|
| 1125 | }
|
---|
| 1126 | }
|
---|
[264] | 1127 | if(index==UNDEFINED) return;
|
---|
| 1128 | iPhi = UNDEFINED;
|
---|
[244] | 1129 | float dphi = TOWER_dphi[index]*pi/180.;
|
---|
[94] | 1130 | for (unsigned int i=1; i < 360/TOWER_dphi[index]; i++ ) {
|
---|
[244] | 1131 | float low = -pi+(i-1)*dphi;
|
---|
[71] | 1132 | float high= low+dphi;
|
---|
| 1133 | if(phi > low && phi < high ){
|
---|
| 1134 | iPhi = low;
|
---|
| 1135 | break;
|
---|
| 1136 | }
|
---|
| 1137 | }
|
---|
[244] | 1138 | if (phi > pi-dphi) iPhi = pi-dphi;
|
---|
[71] | 1139 | }
|
---|
| 1140 |
|
---|
[264] | 1141 |
|
---|
| 1142 |
|
---|
[2] | 1143 | //**************************** Returns the delta Phi ****************************
|
---|
| 1144 | float DeltaPhi(const float phi1, const float phi2) {
|
---|
[244] | 1145 | float deltaphi=phi1-phi2; // in here, -pi < phi < pi
|
---|
| 1146 | if(fabs(deltaphi) > pi) {
|
---|
| 1147 | deltaphi=2.*pi -fabs(deltaphi);// put deltaphi between 0 and pi
|
---|
[219] | 1148 | }
|
---|
[2] | 1149 | else deltaphi=fabs(deltaphi);
|
---|
| 1150 |
|
---|
| 1151 | return deltaphi;
|
---|
| 1152 | }
|
---|
| 1153 |
|
---|
| 1154 | //**************************** Returns the delta R****************************
|
---|
| 1155 | float DeltaR(const float phi1, const float eta1, const float phi2, const float eta2) {
|
---|
| 1156 | return sqrt(pow(DeltaPhi(phi1,phi2),2) + pow(eta1-eta2,2));
|
---|
| 1157 | }
|
---|
| 1158 |
|
---|
| 1159 | int sign(const int myint) {
|
---|
| 1160 | if (myint >0) return 1;
|
---|
| 1161 | else if (myint <0) return -1;
|
---|
| 1162 | else return 0;
|
---|
| 1163 | }
|
---|
| 1164 |
|
---|
| 1165 | int sign(const float myfloat) {
|
---|
| 1166 | if (myfloat >0) return 1;
|
---|
| 1167 | else if (myfloat <0) return -1;
|
---|
| 1168 | else return 0;
|
---|
| 1169 | }
|
---|
| 1170 |
|
---|
[270] | 1171 | int ChargeVal(const int pid)
|
---|
[55] | 1172 | {
|
---|
| 1173 | int charge;
|
---|
| 1174 | if(
|
---|
| 1175 | (pid == pGAMMA) ||
|
---|
| 1176 | (pid == pPI0) ||
|
---|
| 1177 | (pid == pK0L) ||
|
---|
| 1178 | (pid == pN) ||
|
---|
| 1179 | (pid == pSIGMA0) ||
|
---|
| 1180 | (pid == pDELTA0) ||
|
---|
| 1181 | (pid == pK0S) // not charged particles : invisible by tracker
|
---|
| 1182 | )
|
---|
| 1183 | charge = 0;
|
---|
| 1184 | else charge = (sign(pid));
|
---|
| 1185 | return charge;
|
---|
| 1186 |
|
---|
[2] | 1187 | }
|
---|