Fork me on GitHub

Changeset 44 in svn for trunk/src/SmearUtil.cc


Ignore:
Timestamp:
Nov 19, 2008, 8:42:24 PM (16 years ago)
Author:
severine ovyn
Message:

add log file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SmearUtil.cc

    r43 r44  
    1919#include <sstream>
    2020#include <fstream>
     21
     22#include <cstdio>
     23#include <cstdio>
     24#include <TCanvas.h>
     25#include <TLorentzVector.h>
     26#include <string>
     27#include <fstream>
     28#include <istream>
     29#include <iostream>
     30#include <TMath.h>
     31#include <vector>
     32#include "TRandom.h"
     33#include <cstdlib>
     34#include <math.h>
     35#include <time.h>
     36
     37#include <iostream>
     38#include <iomanip>
     39
     40#include <iostream>
     41#include <sstream>
     42
     43#include <fstream>
     44#include <vector>
     45
    2146using namespace std;
    2247
     
    164189 M_MAXITERATIONS     =   100;
    165190
    166 }
    167 
     191//Define SISCone algorithm.
     192 NPASS = 0;               
     193 PROTOJET_PTMIN = 0.0;
     194
     195
     196}
     197
     198void RESOLution::Logfile(string LogName) {
     199//void RESOLution::Logfile(string outputfilename) {
     200
     201  ofstream f_out(LogName.c_str());
     202 
     203  f_out<<"#*********************************************************************"<<"\n";
     204  f_out<<"#                                                                    *"<<"\n";
     205  f_out<<"#                  ---- DELPHES release 1.0 ----                     *"<<"\n";
     206  f_out<<"#                                                                    *"<<"\n";
     207  f_out<<"#        A Fast Simulator for general purpose LHC detector           *"<<"\n";
     208  f_out<<"#                 Written by S. Ovyn and X. Rouby                    *"<<"\n";
     209  f_out<<"#                   severine.ovyn@uclouvain.be                       *"<<"\n";
     210  f_out<<"#                                                                    *"<<"\n";
     211  f_out<<"#                   http:                                            *"<<"\n";
     212  f_out<<"#                                                                    *"<<"\n";
     213  f_out<<"#         Center for Particle Physics and Phenomenology (CP3)        *"<<"\n";
     214  f_out<<"#              Universite Catholique de Louvain (UCL)                *"<<"\n";
     215  f_out<<"#                     Louvain-la-Neuve, Belgium                      *"<<"\n";
     216  f_out<<"#                                                                    *"<<"\n";
     217  f_out<<"#....................................................................*"<<"\n";
     218  f_out<<"#                                                                    *"<<"\n";
     219  f_out<<"#                This package uses FastJet algorithm,                *"<<"\n";
     220  f_out<<"#              Phys. Lett. B641 (2006) [hep-ph/0512210]              *"<<"\n";
     221  f_out<<"#                                                                    *"<<"\n";
     222  f_out<<"#....................................................................*"<<"\n";
     223  f_out<<"#                                                                    *"<<"\n";
     224  f_out<<"# This file contains all the running parameters (detector and cuts)  *"<<"\n";
     225  f_out<<"# necessary to reproduce the detector simulation                     *"<<"\n";
     226  f_out<<"#                                                                    *"<<"\n";
     227  f_out<<"#....................................................................*"<<"\n";
     228  f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n";
     229  f_out<<"*                                                                    *"<<"\n";
     230  f_out<<"#********************************                                    *"<<"\n";
     231  f_out<<"# Central detector caracteristics                                    *"<<"\n";
     232  f_out<<"#********************************                                    *"<<"\n";
     233  f_out<<"*                                                                    *"<<"\n";
     234  f_out << left << setw(30) <<"* Maximum tracking system:                   "<<""
     235        << left << setw(10) <<MAX_TRACKER   <<""<< right << setw(15)<<"*"<<"\n";
     236  f_out << left << setw(30) <<"* Maximum central calorimeter:               "<<""
     237        << left << setw(10) <<MAX_CALO_CEN  <<""<< right << setw(15)<<"*"<<"\n";
     238  f_out << left << setw(30) <<"* Maximum forward calorimeter:               "<<""
     239        << left << setw(10) <<MAX_CALO_FWD  <<""<< right << setw(15)<<"*"<<"\n";
     240  f_out << left << setw(30) <<"* Muon chambers coverage:                    "<<""
     241        << left << setw(10) <<MAX_MU        <<""<< right << setw(15)<<"*"<<"\n";
     242  f_out<<"*                                                                    *"<<"\n";
     243  f_out<<"#*************************************                               *"<<"\n";
     244  f_out<<"# Very forward detector caracteristics                               *"<<"\n";
     245  f_out<<"#*************************************                               *"<<"\n";
     246  f_out<<"*                                                                    *"<<"\n";
     247  f_out << left << setw(55) <<"* Minimum very forward calorimeter:          "<<""
     248        << left << setw(5) <<MIN_CALO_VFWD <<""<< right << setw(10)<<"*"<<"\n";
     249  f_out << left << setw(55) <<"* Maximum very forward calorimeter:          "<<""
     250        << left << setw(5) <<MAX_CALO_VFWD <<""<< right << setw(10)<<"*"<<"\n";
     251  f_out << left << setw(55) <<"* Distance of the ZDC to the IP, in meters:  "<<""
     252        << left << setw(5) <<ZDC_S         <<""<< right << setw(10)<<"*"<<"\n";
     253  f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters:   "<<""
     254        << left << setw(5) <<RP220_S       <<""<< right << setw(10)<<"*"<<"\n";
     255  f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<""
     256        << left << setw(5) <<RP220_X       <<""<< right << setw(10)<<"*"<<"\n";
     257  f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters:   "<<""
     258        << left << setw(5) <<FP420_S       <<""<< right << setw(10)<<"*"<<"\n";
     259  f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<""
     260        << left << setw(5) <<FP420_X       <<""<< right << setw(10)<<"*"<<"\n";
     261  f_out<<"*                                                                    *"<<"\n";
     262  f_out<<"#************************************                                *"<<"\n";
     263  f_out<<"# Electromagnetic smearing parameters                                *"<<"\n";
     264  f_out<<"#************************************                                *"<<"\n";
     265  f_out<<"*                                                                    *"<<"\n";
     266  //# \sigma/E = C + N/E + S/\sqrt{E}
     267  f_out << left << setw(30) <<"* S term for central ECAL: "<<""
     268        << left << setw(30) <<ELG_Scen       <<""<< right << setw(10)<<"*"<<"\n";
     269  f_out << left << setw(30) <<"* N term for central ECAL: "<<""
     270        << left << setw(30) <<ELG_Ncen       <<""<< right << setw(10)<<"*"<<"\n";
     271  f_out << left << setw(30) <<"* C term for central ECAL: "<<""
     272        << left << setw(30) <<ELG_Ccen       <<""<< right << setw(10)<<"*"<<"\n";
     273  f_out << left << setw(30) <<"* S term for forward ECAL: "<<""
     274        << left << setw(30) <<ELG_Sfwd       <<""<< right << setw(10)<<"*"<<"\n";
     275  f_out << left << setw(30) <<"* N term for forward ECAL: "<<""
     276        << left << setw(30) <<ELG_Nfwd       <<""<< right << setw(10)<<"*"<<"\n";
     277  f_out << left << setw(30) <<"* C term for forward ECAL: "<<""
     278        << left << setw(30) <<ELG_Cfwd       <<""<< right << setw(10)<<"*"<<"\n";
     279  f_out<<"*                                                                    *"<<"\n";
     280  f_out<<"#*****************************                                       *"<<"\n";
     281  f_out<<"# Hadronic smearing parameters                                       *"<<"\n";
     282  f_out<<"#*****************************                                       *"<<"\n";
     283  f_out<<"*                                                                    *"<<"\n";
     284  f_out << left << setw(30) <<"* S term for central HCAL: "<<""
     285        << left << setw(30) <<HAD_Shcal       <<""<< right << setw(10)<<"*"<<"\n";
     286  f_out << left << setw(30) <<"* N term for central HCAL: "<<""
     287        << left << setw(30) <<HAD_Nhcal       <<""<< right << setw(10)<<"*"<<"\n";
     288  f_out << left << setw(30) <<"* C term for central HCAL: "<<""
     289        << left << setw(30) <<HAD_Chcal       <<""<< right << setw(10)<<"*"<<"\n";
     290  f_out << left << setw(30) <<"* S term for forward HCAL: "<<""
     291        << left << setw(30) <<HAD_Shf         <<""<< right << setw(10)<<"*"<<"\n";
     292  f_out << left << setw(30) <<"* N term for forward HCAL: "<<""
     293        << left << setw(30) <<HAD_Nhf         <<""<< right << setw(10)<<"*"<<"\n";
     294  f_out << left << setw(30) <<"* C term for forward HCAL: "<<""
     295        << left << setw(30) <<HAD_Chf         <<""<< right << setw(10)<<"*"<<"\n";
     296  f_out<<"*                                                                    *"<<"\n";
     297  f_out<<"#***************************                                         *"<<"\n";
     298  f_out<<"# Tracking system acceptance                                         *"<<"\n";
     299  f_out<<"#***************************                                         *"<<"\n";
     300  f_out<<"*                                                                    *"<<"\n";
     301  f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""
     302        << left << setw(10) <<PT_TRACKS_MIN         <<""<< right << setw(5)<<"*"<<"\n";
     303  f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<""
     304        << left << setw(10) <<TRACKING_EFF          <<""<< right << setw(5)<<"*"<<"\n";
     305  f_out<<"*                                                                    *"<<"\n";
     306  f_out<<"#*************************                                           *"<<"\n";
     307  f_out<<"# Muon smearing parameters                                           *"<<"\n";
     308  f_out<<"#*************************                                           *"<<"\n";
     309  f_out<<"*                                                                    *"<<"\n";
     310  //MU_SmearPt       0.01
     311  f_out<<"*                                                                    *"<<"\n";
     312  f_out<<"#******************************                                      *"<<"\n";
     313  f_out<<"# Tau-jet definition parameters                                      *"<<"\n";
     314  f_out<<"#******************************                                      *"<<"\n";
     315  f_out<<"*                                                                    *"<<"\n";
     316  f_out << left << setw(45) <<"* Cone radius for calorimeter tagging:  "<<""
     317        << left << setw(5) <<TAU_CONE_ENERGY                           <<""<< right << setw(20)<<"*"<<"\n";
     318  f_out << left << setw(45) <<"* Fraction of energy in the small cone: "<<""
     319        << left << setw(5) <<TAU_EM_COLLIMATION*100                    <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
     320  f_out << left << setw(45) <<"* Cone radius for tracking tagging:     "<<""
     321        << left << setw(5) <<TAU_CONE_TRACKS                           <<""<< right << setw(20)<<"*"<<"\n";
     322  f_out << left << setw(45) <<"* Minimum track pT [GeV]:               "<<""
     323        << left << setw(5) <<PT_TRACK_TAU                              <<""<< right << setw(20)<<"*"<<"\n";
     324  f_out<<"*                                                                    *"<<"\n";
     325  f_out<<"#*******************                                                 *"<<"\n";
     326  f_out<<"# Minimum pT's [GeV]                                                 *"<<"\n";
     327  f_out<<"#*******************                                                 *"<<"\n";
     328  f_out<<"*                                                                    *"<<"\n";
     329  f_out << left << setw(40) <<"* Minimum pT for electrons: "<<""
     330        << left << setw(20) <<ELEC_pt         <<""<< right << setw(10)<<"*"<<"\n";
     331  f_out << left << setw(40) <<"* Minimum pT for muons: "<<""
     332        << left << setw(20) <<MUON_pt         <<""<< right << setw(10)<<"*"<<"\n";
     333  f_out << left << setw(40) <<"* Minimum pT for jets: "<<""
     334        << left << setw(20) <<JET_pt         <<""<< right << setw(10)<<"*"<<"\n";
     335  f_out << left << setw(40) <<"* Minimum pT for Tau-jets: "<<""
     336        << left << setw(20) <<TAUJET_pt         <<""<< right << setw(10)<<"*"<<"\n";
     337  f_out<<"*                                                                    *"<<"\n";
     338  f_out<<"#***************************                                         *"<<"\n";
     339  f_out<<"# B-tagging efficiencies [%]                                         *"<<"\n";
     340  f_out<<"#***************************                                         *"<<"\n";
     341  f_out<<"*                                                                    *"<<"\n";
     342  f_out << left << setw(50) <<"* Efficiency to tag a \"b\" as a b-jet: "<<""
     343        << left << setw(10) <<TAGGING_B         <<""<< right << setw(10)<<"*"<<"\n";
     344  f_out << left << setw(50) <<"* Efficiency to mistag a c-jet as a b-jet: "<<""
     345        << left << setw(10) <<MISTAGGING_C         <<""<< right << setw(10)<<"*"<<"\n";
     346  f_out << left << setw(50) <<"* Efficiency to mistag a light jet as a b-jet: "<<""
     347        << left << setw(10) <<MISTAGGING_L         <<""<< right << setw(10)<<"*"<<"\n";
     348  f_out<<"*                                                                    *"<<"\n";
     349  f_out<<"#***************                                                     *"<<"\n";
     350  f_out<<"# Jet definition                                                     *"<<"\n";
     351  f_out<<"#***************                                                     *"<<"\n";
     352  f_out<<"*                                                                    *"<<"\n";
     353  switch(JETALGO) {
     354  default:
     355  case 1: {
     356    f_out<<"* CDF JetClu jet algorithm with:                                     *"<<"\n";
     357    f_out << left << setw(40) <<"*        - Seed threshold:    "<<""
     358          << left << setw(10) <<SEEDTHRESHOLD                   <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
     359    f_out << left << setw(40) <<"*        - Cone radius:       "<<""
     360          << left << setw(10) <<CONERADIUS                      <<""<< right << setw(20)<<"*"<<"\n";
     361    f_out << left << setw(40) <<"*        - Adjacency cut:     "<<""
     362          << left << setw(10) <<C_ADJACENCYCUT                  <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
     363    f_out << left << setw(40) <<"*        - Max iterations:    "<<""
     364          << left << setw(10) <<C_MAXITERATIONS                 <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
     365    f_out << left << setw(40) <<"*        - Iratch:            "<<""
     366          << left << setw(10) <<C_IRATCH                        <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
     367    f_out << left << setw(40) <<"*        - Overlap threshold: "<<""
     368          << left << setw(10) <<OVERLAPTHRESHOLD                <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
     369  }
     370    break;
     371  case 2: {
     372    f_out<<"* CDF midpoint jet algorithm with:                                     *"<<"\n";
     373    f_out << left << setw(40) <<"*        - Seed threshold:    "<<""
     374          << left << setw(20) <<SEEDTHRESHOLD                   <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     375    f_out << left << setw(40) <<"*        - Cone radius:       "<<""
     376          << left << setw(20) <<CONERADIUS                      <<""<< right << setw(10)<<"*"<<"\n";
     377    f_out << left << setw(40) <<"*        - Cone area fraction:"<<""
     378          << left << setw(20) <<M_CONEAREAFRACTION              <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     379    f_out << left << setw(40) <<"*        - Maximum pair size: "<<""
     380          << left << setw(20) <<M_MAXPAIRSIZE                   <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     381    f_out << left << setw(40) <<"*        - Max iterations:    "<<""
     382          << left << setw(20) <<M_MAXITERATIONS                 <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     383    f_out << left << setw(40) <<"*        - Overlap threshold: "<<""
     384          << left << setw(20) <<OVERLAPTHRESHOLD                <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     385  }
     386    break;
     387  case 3: {
     388    f_out<<"* SISCone jet algorithm with:                                     *"<<"\n";
     389    f_out << left << setw(40) <<"*        - Cone radius:             "<<""
     390          << left << setw(20) <<CONERADIUS                            <<""<< right << setw(10)<<"*"<<"\n";
     391    f_out << left << setw(40) <<"*        - Overlap threshold:       "<<""
     392          << left << setw(20) <<OVERLAPTHRESHOLD                      <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     393    f_out << left << setw(40) <<"*        - Number pass max:         "<<""
     394          << left << setw(20) <<NPASS                                 <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     395    f_out << left << setw(40) <<"*        - Minimum pT for protojet: "<<""
     396          << left << setw(20) <<PROTOJET_PTMIN                        <<""<< right << setw(10)<<"! not in datacard  *"<<"\n";
     397  }
     398    break;
     399  case 4: {
     400    f_out<<"* KT jet algorithm with:                                          *"<<"\n";
     401    f_out << left << setw(40) <<"*        - Cone radius: "<<""
     402          << left << setw(20) <<CONERADIUS                <<""<< right << setw(10)<<"*"<<"\n";
     403  }
     404    break;
     405  }
     406  f_out<<"*                                                                    *"<<"\n";
     407  f_out<<"#....................................................................*"<<"\n";
     408  f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n";
     409
     410}
    168411
    169412// **********Provides the smeared TLorentzVector for the electrons********
Note: See TracChangeset for help on using the changeset viewer.