Fork me on GitHub

source: svn/trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h@ 565

Last change on this file since 565 was 555, checked in by severine ovyn, 15 years ago

/*

/----------------------------------------------\
| Delphes, a framework for the fast simulation |
| of a generic collider experiment |
\------------- arXiv:0903.2225v1 ------------/


This package uses:
------------------
ROOT: Nucl. Inst. & Meth. in Phys. Res. A389 (1997) 81-86
FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]
Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]
FROG: [hep-ex/0901.2718v1]
HepMC: Comput. Phys. Commun.134 (2001) 41

------------------------------------------------------------------

Main authors:
-------------

Severine Ovyn Xavier Rouby
severine.ovyn@… xavier.rouby@cern

Center for Particle Physics and Phenomenology (CP3)
Universite catholique de Louvain (UCL)
Louvain-la-Neuve, Belgium

Copyright (C) 2008-2009,
All rights reserved.

*/

/ \file SmearUtil.cc
/ \brief RESOLution class, and some generic definitions

#include "SmearUtil.h"
#include "TStopwatch.h"

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <map>
#include <vector>
#include <cmath>
#include <cstdlib> for exit()
using namespace std;

------------------------------------------------------------------------------

RESOLution::RESOLution() {

Detector characteristics
CEN_max_tracker = 2.5;
Maximum tracker coverage
CEN_max_calo_cen = 1.7; central calorimeter coverage
CEN_max_calo_ec = 3.0;
calorimeter endcap coverage
CEN_max_calo_fwd = 5.0; forward calorimeter pseudorapidity coverage
CEN_max_mu = 2.4;
muon chambers pseudorapidity coverage


Energy resolution for electron/photon
\sigma/E = C + N/E + S/\sqrt{E}
ELG_Scen = 0.05; S term for central ECAL
ELG_Ncen = 0.25;
N term
ELG_Ccen = 0.005; C term
ELG_Sec = 0.05;
S term for central ECAL endcap
ELG_Nec = 0.25; S term
ELG_Cec = 0.005;
S term
ELG_Sfwd = 2.084; S term for FCAL
ELG_Nfwd = 0.0;
N term
ELG_Cfwd = 0.107; C term
ELG_Szdc = 0.70;
S term for ZDC
ELG_Nzdc = 0.0; N term
ELG_Czdc = 0.08;
C term

Energy resolution for hadrons in ecal/hcal/fwd
\sigma/E = C + N/E + S/\sqrt{E}
HAD_Scen = 1.5; S term for central HCAL
HAD_Ncen = 0.;
N term
HAD_Ccen = 0.05; C term
HAD_Sec = 1.5;
S term for HCAL endcap
HAD_Nec = 0.; N term
HAD_Cec = 0.05;
C term
HAD_Sfwd = 2.7; S term for FCAL
HAD_Nfwd = 0.;
N term
HAD_Cfwd = 0.13; C term
HAD_Szdc = 1.38;
S term for ZDC
HAD_Nzdc = 0.; N term
HAD_Czdc = 0.13;
C term

Muon smearing
MU_SmearPt = 0.01;

time resolution
ZDC_T_resolution = 0;
resolution for time measurement [s]
RP220_T_resolution = 0;
RP420_T_resolution = 0;

Tracking efficiencies
TRACK_ptmin = 0.9;
minimal pt needed to reach the calorimeter in GeV
TRACK_eff = 100; efficiency associated to the tracking

Calorimetric towers
TOWER_number = 40;
const float tower_eta_edges[41] = {

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,
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,
4.350, 4.525, 4.700, 5.000}; temporary object

TOWER_eta_edges = new float[TOWER_number+1];
for(unsigned int i=0; i<TOWER_number +1; i++) TOWER_eta_edges[i] = tower_eta_edges[i];


const float tower_dphi[40] = {

5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10,
10,10,10,10,10, 10,10,10,10,10, 10,10,10,10,10, 10,10,10,20, 20 }; temporary object

TOWER_dphi = new float[TOWER_number];
for(unsigned int i=0; i<TOWER_number; i++) TOWER_dphi[i] = tower_dphi[i];

Thresholds for reconstructed objetcs (GeV)
PTCUT_elec = 10.0;
PTCUT_muon = 10.0;
PTCUT_jet = 20.0;
PTCUT_gamma = 10.0;
PTCUT_taujet = 10.0;

ZDC_gamma_E = 20; GeV
ZDC_n_E = 50;
GeV

Isolation
ISOL_PT = 2.0;
minimal pt of tracks for isolation criteria
ISOL_Cone = 0.5; Cone for isolation criteria
ISOL_Calo_ET = 1E99;
minimal tower energy for isolation criteria. Default off = 1E99
ISOL_Calo_Grid = 3; Grid size (N x N) for calorimetric isolation -- should be odd

General jet variable
JET_coneradius = 0.7;
generic jet radius ; not for tau's !!!
JET_jetalgo = 1; 1 for Cone algorithm, 2 for MidPoint algorithm, 3 for SIScone algorithm, 4 for kt algorithm
JET_seed = 1.0;
minimum seed to start jet reconstruction
JET_Eflow = 1; 1 for Energy flow in jets reco ; 0 if not

Tagging definition
BTAG_b = 40.;
BTAG_mistag_c = 10.;
BTAG_mistag_l = 1.;

FLAGS
FLAG_bfield = 1;
1 to run the bfield propagation else 0
FLAG_vfd = 1; 1 to run the very forward detectors else 0
FLAG_RP = 1;
1 to run the zero degree calorimeter else 0
FLAG_trigger = 1; 1 to run the trigger selection else 0
FLAG_frog = 1;
1 to run the FROG event display
FLAG_lhco = 1;

In case BField propagation allowed
TRACK_radius = 129;
radius of the BField coverage
TRACK_length = 300; length of the BField coverage
TRACK_bfield_x = 0;
X composant of the BField
TRACK_bfield_y = 0; Y composant of the BField
TRACK_bfield_z = 3.8;
Z composant of the BField

In case Very forward detectors allowed
VFD_min_calo_vfd = 5.2;
very forward calorimeter (if any) like CASTOR
VFD_max_calo_vfd = 6.6;
VFD_min_zdc = 8.3;
VFD_s_zdc = 140; distance of the Zero Degree Calorimeter, from the Interaction poin, in [m]

RP_220_s = 220; distance of the RP to the IP, in meters
RP_220_x = 0.002;
distance of the RP to the beam, in meters
RP_420_s = 420; distance of the RP to the IP, in meters
RP_420_x = 0.004;
distance of the RP to the beam, in meters
RP_IP_name = "IP5";
RP_beam1Card = "data/LHCB1IR5_v6.500.tfs";
RP_beam2Card = "data/LHCB1IR5_v6.500.tfs";

In case FROG event display allowed
NEvents_Frog = 10;

Number of events to be processed
NEvents = -1;


jet stuffs not defined in the input datacard


JET_overlap = 0.75;
MidPoint algorithm definition
JET_M_coneareafraction = 0.25;
JET_M_maxpairsize = 2;
JET_M_maxiterations = 100;
Define Cone algorithm.
JET_C_adjacencycut = 2;
JET_C_maxiterations = 100;
JET_C_iratch = 1;
Define SISCone algorithm.
JET_S_npass = 0;
JET_S_protojet_ptmin= 0.0;


For Tau-jet definition
TAU_energy_scone = 0.15;
radius R of the cone for tau definition, based on energy threshold
TAU_track_scone = 0.4; radius R of the cone for tau definition, based on track number
TAU_track_pt = 2;
minimal pt [GeV] for tracks to be considered in tau definition
TAU_energy_frac = 0.95; fraction of energy required in the central part of the cone, for tau jets


PT_QUARKS_MIN = 2.0 ; minimal pt needed by quarks to do b-tag

for very forward detectors
RP_offsetEl_s = 120;
distance of beam separation point, from IP
RP_offsetEl_x = -0.097; half distance of separation of beams in horizontal plan, in m
RP_offsetEl_y = 0;
half distance of separation of beams in vertical plan, in m
RP_cross_x = -500; IP offset in horizontal plane, in micrometers
RP_cross_y = 0.0;
IP offset in vertical plane, in micrometers
RP_cross_ang_x = 142.5; half-crossing angle in horizontal plane, in microrad
RP_cross_ang_y = 0.0;
half-crossing angle in vertical plane, in microrad

PdgTableFilename = "data/particle.tbl";
inputfilelist = "";
detectorcard = "";
triggercard = "";

grandom = new TRandom3(0); a new seed is set everytime Delphes is run

}

RESOLution::RESOLution(const RESOLution & DET) {

Detector characteristics
CEN_max_tracker = DET.CEN_max_tracker;
CEN_max_calo_cen = DET.CEN_max_calo_cen;
CEN_max_calo_ec = DET.CEN_max_calo_ec;
CEN_max_calo_fwd = DET.CEN_max_calo_fwd;
CEN_max_mu = DET.CEN_max_mu;


Energy resolution for electron/photon
ELG_Scen = DET.ELG_Scen;
ELG_Ncen = DET.ELG_Ncen;
ELG_Ccen = DET.ELG_Ccen;
ELG_Sec = DET.ELG_Sec;
ELG_Nec = DET.ELG_Nec;
ELG_Cec = DET.ELG_Cec;
ELG_Cfwd = DET.ELG_Cfwd;
ELG_Sfwd = DET.ELG_Sfwd;
ELG_Nfwd = DET.ELG_Nfwd;
ELG_Czdc = DET.ELG_Czdc;
ELG_Szdc = DET.ELG_Szdc;
ELG_Nzdc = DET.ELG_Nzdc;

Energy resolution for hadrons in ecal/hcal/fwd/zdc
HAD_Scen = DET.HAD_Scen;
HAD_Ncen = DET.HAD_Ncen;
HAD_Ccen = DET.HAD_Ccen;
HAD_Sec = DET.HAD_Sec;
HAD_Nec = DET.HAD_Nec;
HAD_Cec = DET.HAD_Cec;
HAD_Sfwd = DET.HAD_Sfwd;
HAD_Nfwd = DET.HAD_Nfwd;
HAD_Cfwd = DET.HAD_Cfwd;
HAD_Szdc = DET.HAD_Szdc;
HAD_Nzdc = DET.HAD_Nzdc;
HAD_Czdc = DET.HAD_Czdc;

time resolution
ZDC_T_resolution = DET.ZDC_T_resolution;
resolution for time measurement [s]
RP220_T_resolution = DET.RP220_T_resolution;
RP420_T_resolution = DET.RP420_T_resolution;

Muon smearing
MU_SmearPt = DET.MU_SmearPt;

Tracking efficiencies
TRACK_ptmin = DET.TRACK_ptmin;
TRACK_eff = DET.TRACK_eff;

Calorimetric towers
TOWER_number = DET.TOWER_number;
TOWER_eta_edges = new float[TOWER_number+1];
for(unsigned int i=0; i<TOWER_number +1; i++) TOWER_eta_edges[i] = DET.TOWER_eta_edges[i];

TOWER_dphi = new float[TOWER_number];
for(unsigned int i=0; i<TOWER_number; i++) TOWER_dphi[i] = DET.TOWER_dphi[i];

Thresholds for reconstructed objetcs
PTCUT_elec = DET.PTCUT_elec;
PTCUT_muon = DET.PTCUT_muon;
PTCUT_jet = DET.PTCUT_jet;
PTCUT_gamma = DET.PTCUT_gamma;
PTCUT_taujet = DET.PTCUT_taujet;

ZDC_gamma_E = DET.ZDC_gamma_E;
ZDC_n_E = DET.ZDC_n_E;

Isolation
ISOL_PT = DET.ISOL_PT;
tracking isolation
ISOL_Cone = DET.ISOL_Cone;
ISOL_Calo_ET = DET.ISOL_Calo_ET; calorimeter isolation, defaut off
ISOL_Calo_Grid = DET.ISOL_Calo_Grid;

General jet variable
JET_coneradius = DET.JET_coneradius;
JET_jetalgo = DET.JET_jetalgo;
JET_seed = DET.JET_seed;
JET_Eflow = DET.JET_Eflow;

Tagging definition
BTAG_b = DET.BTAG_b;
BTAG_mistag_c = DET.BTAG_mistag_c;
BTAG_mistag_l = DET.BTAG_mistag_l;

FLAGS
FLAG_bfield = DET.FLAG_bfield;
FLAG_vfd = DET.FLAG_vfd;
FLAG_RP = DET.FLAG_RP;
FLAG_trigger = DET.FLAG_trigger;
FLAG_frog = DET.FLAG_frog;
FLAG_lhco = DET.FLAG_lhco;

In case BField propagation allowed
TRACK_radius = DET.TRACK_radius;
TRACK_length = DET.TRACK_length;
TRACK_bfield_x = DET.TRACK_bfield_x;
TRACK_bfield_y = DET.TRACK_bfield_y;
TRACK_bfield_z = DET.TRACK_bfield_z;

In case Very forward detectors allowed
VFD_min_calo_vfd = DET.VFD_min_calo_vfd;
VFD_max_calo_vfd = DET.VFD_max_calo_vfd;
VFD_min_zdc = DET.VFD_min_zdc;
VFD_s_zdc = DET.VFD_s_zdc;

RP_220_s = DET.RP_220_s;
RP_220_x = DET.RP_220_x;
RP_420_s = DET.RP_420_s;
RP_420_x = DET.RP_420_x;
RP_beam1Card = DET.RP_beam1Card;
RP_beam2Card = DET.RP_beam2Card;
RP_offsetEl_s = DET.RP_offsetEl_s;
RP_offsetEl_x = DET.RP_offsetEl_x;
RP_offsetEl_y = DET.RP_offsetEl_y;
RP_cross_x = DET.RP_cross_x;
RP_cross_y = DET.RP_cross_y;
RP_cross_ang_x = DET.RP_cross_ang_x;
RP_cross_ang_y = DET.RP_cross_ang_y;
RP_IP_name = DET.RP_IP_name;

In case FROG event display allowed
NEvents_Frog = DET.NEvents_Frog;

Number of events to be processed
NEvents = DET.NEvents;

JET_overlap = DET.JET_overlap;
MidPoint algorithm definition
JET_M_coneareafraction = DET.JET_M_coneareafraction;
JET_M_maxpairsize = DET.JET_M_maxpairsize;
JET_M_maxiterations = DET.JET_M_maxiterations;
Define Cone algorithm.
JET_C_adjacencycut = DET.JET_C_adjacencycut;
JET_C_maxiterations = DET.JET_C_maxiterations;
JET_C_iratch = DET.JET_C_iratch;
Define SISCone algorithm.
JET_S_npass = DET.JET_S_npass;
JET_S_protojet_ptmin = DET.JET_S_protojet_ptmin;

For Tau-jet definition
TAU_energy_scone = DET.TAU_energy_scone;
TAU_track_scone = DET.TAU_track_scone;
TAU_track_pt = DET.TAU_track_pt;
TAU_energy_frac = DET.TAU_energy_frac;

PT_QUARKS_MIN = DET.PT_QUARKS_MIN;
PdgTableFilename = DET.PdgTableFilename;
PDGtable = DET.PDGtable;
inputfilelist = DET.inputfilelist;
detectorcard = DET.detectorcard;
triggercard = DET.triggercard;

grandom = new TRandom3(*(DET.grandom));

}

RESOLution& RESOLution::operator=(const RESOLution& DET) {

if(this==&DET) return *this;
Detector characteristics
CEN_max_tracker = DET.CEN_max_tracker;
CEN_max_calo_cen = DET.CEN_max_calo_cen;
CEN_max_calo_ec = DET.CEN_max_calo_ec;
CEN_max_calo_fwd = DET.CEN_max_calo_fwd;
CEN_max_mu = DET.CEN_max_mu;


Energy resolution for electron/photon
ELG_Scen = DET.ELG_Scen;
ELG_Ncen = DET.ELG_Ncen;
ELG_Ccen = DET.ELG_Ccen;
ELG_Sec = DET.ELG_Sec;
ELG_Nec = DET.ELG_Nec;
ELG_Cec = DET.ELG_Cec;
ELG_Cfwd = DET.ELG_Cfwd;
ELG_Sfwd = DET.ELG_Sfwd;
ELG_Nfwd = DET.ELG_Nfwd;
ELG_Czdc = DET.ELG_Czdc;
ELG_Szdc = DET.ELG_Szdc;
ELG_Nzdc = DET.ELG_Nzdc;

Energy resolution for hadrons in ecal/hcal/fwd/zdc
HAD_Scen = DET.HAD_Scen ;
HAD_Ncen = DET.HAD_Ncen;
HAD_Ccen = DET.HAD_Ccen;
HAD_Sec = DET.HAD_Sec;
HAD_Nec = DET.HAD_Nec;
HAD_Cec = DET.HAD_Cec;
HAD_Sfwd = DET.HAD_Sfwd;
HAD_Nfwd = DET.HAD_Nfwd;
HAD_Cfwd = DET.HAD_Cfwd;
HAD_Szdc = DET.HAD_Szdc;
HAD_Nzdc = DET.HAD_Nzdc;
HAD_Czdc = DET.HAD_Czdc;

time resolution
ZDC_T_resolution = DET.ZDC_T_resolution;
resolution for time measurement [s]
RP220_T_resolution = DET.RP220_T_resolution;
RP420_T_resolution = DET.RP420_T_resolution;

Muon smearing
MU_SmearPt = DET.MU_SmearPt;

Tracking efficiencies
TRACK_ptmin = DET.TRACK_ptmin;
TRACK_eff = DET.TRACK_eff;

Calorimetric towers
TOWER_number = DET.TOWER_number;
TOWER_eta_edges = new float[TOWER_number+1];
for(unsigned int i=0; i<TOWER_number +1; i++) TOWER_eta_edges[i] = DET.TOWER_eta_edges[i];

TOWER_dphi = new float[TOWER_number];
for(unsigned int i=0; i<TOWER_number; i++) TOWER_dphi[i] = DET.TOWER_dphi[i];

Thresholds for reconstructed objetcs
PTCUT_elec = DET.PTCUT_elec;
PTCUT_muon = DET.PTCUT_muon;
PTCUT_jet = DET.PTCUT_jet;
PTCUT_gamma = DET.PTCUT_gamma;
PTCUT_taujet = DET.PTCUT_taujet;

ZDC_gamma_E = DET.ZDC_gamma_E;
ZDC_n_E = DET.ZDC_n_E;

Isolation
ISOL_PT = DET.ISOL_PT;
tracking isolation
ISOL_Cone = DET.ISOL_Cone;
ISOL_Calo_ET = DET.ISOL_Calo_ET; calorimeter isolation, defaut off
ISOL_Calo_Grid = DET.ISOL_Calo_Grid;

General jet variable
JET_coneradius = DET.JET_coneradius;
JET_jetalgo = DET.JET_jetalgo;
JET_seed = DET.JET_seed;
JET_Eflow = DET.JET_Eflow;

Tagging definition
BTAG_b = DET.BTAG_b;
BTAG_mistag_c = DET.BTAG_mistag_c;
BTAG_mistag_l = DET.BTAG_mistag_l;

FLAGS
FLAG_bfield = DET.FLAG_bfield;
FLAG_vfd = DET.FLAG_vfd;
FLAG_RP = DET.FLAG_RP;
FLAG_trigger = DET.FLAG_trigger;
FLAG_frog = DET.FLAG_frog;
FLAG_lhco = DET.FLAG_lhco;

In case BField propagation allowed
TRACK_radius = DET.TRACK_radius;
TRACK_length = DET.TRACK_length;
TRACK_bfield_x = DET.TRACK_bfield_x;
TRACK_bfield_y = DET.TRACK_bfield_y;
TRACK_bfield_z = DET.TRACK_bfield_z;

In case Very forward detectors allowed
VFD_min_calo_vfd = DET.VFD_min_calo_vfd;
VFD_max_calo_vfd = DET.VFD_max_calo_vfd;
VFD_min_zdc = DET.VFD_min_zdc;
VFD_s_zdc = DET.VFD_s_zdc;

RP_220_s = DET.RP_220_s;
RP_220_x = DET.RP_220_x;
RP_420_s = DET.RP_420_s;
RP_420_x = DET.RP_420_x;
RP_offsetEl_s = DET.RP_offsetEl_s;
RP_offsetEl_x = DET.RP_offsetEl_x;
RP_offsetEl_y = DET.RP_offsetEl_y;
RP_beam1Card = DET.RP_beam1Card;
RP_beam2Card = DET.RP_beam2Card;
RP_cross_x = DET.RP_cross_x;
RP_cross_y = DET.RP_cross_y;
RP_cross_ang_x = DET.RP_cross_ang_x;
RP_cross_ang_y = DET.RP_cross_ang_y;
RP_IP_name = DET.RP_IP_name;

In case FROG event display allowed
NEvents_Frog = DET.NEvents_Frog;

Number of events to be processed
NEvents = DET.NEvents;

JET_overlap = DET.JET_overlap;
MidPoint algorithm definition
JET_M_coneareafraction = DET.JET_M_coneareafraction;
JET_M_maxpairsize = DET.JET_M_maxpairsize;
JET_M_maxiterations = DET.JET_M_maxiterations;
Define Cone algorithm.
JET_C_adjacencycut = DET.JET_C_adjacencycut;
JET_C_maxiterations = DET.JET_C_maxiterations;
JET_C_iratch = DET.JET_C_iratch;
Define SISCone algorithm.
JET_S_npass = DET.JET_S_npass;
JET_S_protojet_ptmin = DET.JET_S_protojet_ptmin;

For Tau-jet definition
TAU_energy_scone = DET.TAU_energy_scone;
TAU_track_scone = DET.TAU_track_scone;
TAU_track_pt = DET.TAU_track_pt;
TAU_energy_frac = DET.TAU_energy_frac;

PT_QUARKS_MIN = DET.PT_QUARKS_MIN;

PdgTableFilename = DET.PdgTableFilename;
PDGtable = DET.PDGtable;

inputfilelist = DET.inputfilelist;
detectorcard = DET.detectorcard;
triggercard = DET.triggercard;

grandom = new TRandom3(*(DET.grandom));

return *this;

}

void RESOLution::setNames(const string& list, const string& det, const string& trig) {

inputfilelist = list;
detectorcard = det;
triggercard = trig;

}

------------------------------------------------------------------------------
void RESOLution::ReadDataCard(const string datacard) {

string temp_string;
istringstream curstring;


ifstream fichier_a_lire(datacard.c_str());
if(!fichier_a_lire.good()) {

cout <<" WARNING: Datadard not found, use default values " << endl;
return;

}
bool CEN_max_calo_ec_flag = false;


while (getline(fichier_a_lire,temp_string)) {

curstring.clear(); needed when using several times istringstream::str(string)
curstring.str(temp_string);
string varname;
float value; int ivalue; string svalue;

if(strstr(temp_string.c_str(),"#")) { }
else if(strstr(temp_string.c_str(),"CEN_max_tracker")) {curstring >> varname >> value; CEN_max_tracker = value;}
else if(strstr(temp_string.c_str(),"CEN_max_calo_cen")) {curstring >> varname >> value; CEN_max_calo_cen = value;}
else if(strstr(temp_string.c_str(),"CEN_max_calo_ec")) {CEN_max_calo_ec_flag=true; curstring >> varname >> value; CEN_max_calo_ec = value;}
else if(strstr(temp_string.c_str(),"CEN_max_calo_fwd")) {curstring >> varname >> value; CEN_max_calo_fwd = value;}
else if(strstr(temp_string.c_str(),"CEN_max_mu")) {curstring >> varname >> value; CEN_max_mu = value;}

else if(strstr(temp_string.c_str(),"VFD_min_calo_vfd")) {curstring >> varname >> value; VFD_min_calo_vfd = value;}
else if(strstr(temp_string.c_str(),"VFD_max_calo_vfd")) {curstring >> varname >> value; VFD_max_calo_vfd = value;}
else if(strstr(temp_string.c_str(),"VFD_min_zdc")) {curstring >> varname >> value; VFD_min_zdc = value;}
else if(strstr(temp_string.c_str(),"VFD_s_zdc")) {curstring >> varname >> value; VFD_s_zdc = value;}


else if(strstr(temp_string.c_str(),"RP_220_s")) {curstring >> varname >> value; RP_220_s = value;}
else if(strstr(temp_string.c_str(),"RP_220_x")) {curstring >> varname >> value; RP_220_x = value;}
else if(strstr(temp_string.c_str(),"RP_420_s")) {curstring >> varname >> value; RP_420_s = value;}
else if(strstr(temp_string.c_str(),"RP_420_x")) {curstring >> varname >> value; RP_420_x = value;}
else if(strstr(temp_string.c_str(),"RP_beam1Card")) {curstring >> varname >> svalue;RP_beam1Card = svalue;}
else if(strstr(temp_string.c_str(),"RP_beam2Card")) {curstring >> varname >> svalue;RP_beam2Card = svalue;}
else if(strstr(temp_string.c_str(),"RP_IP_name")) {curstring >> varname >> svalue;RP_IP_name = svalue;}

else if(strstr(temp_string.c_str(),"RP_offsetEl_s")) {curstring >> varname >> value; RP_offsetEl_s = value;}
else if(strstr(temp_string.c_str(),"RP_offsetEl_x")) {curstring >> varname >> value; RP_offsetEl_x = value;}
else if(strstr(temp_string.c_str(),"RP_offsetEl_y")) {curstring >> varname >> value; RP_offsetEl_y = value;}
else if(strstr(temp_string.c_str(),"RP_cross_x")) {curstring >> varname >> value; RP_cross_x = value;}
else if(strstr(temp_string.c_str(),"RP_cross_y")) {curstring >> varname >> value; RP_cross_y = value;}
else if(strstr(temp_string.c_str(),"RP_cross_ang_x")) {curstring >> varname >> value; RP_cross_ang_x = value;}
else if(strstr(temp_string.c_str(),"RP_cross_ang_y")) {curstring >> varname >> value; RP_cross_ang_y = value;}


else if(strstr(temp_string.c_str(),"ELG_Scen")) {curstring >> varname >> value; ELG_Scen = value;}
else if(strstr(temp_string.c_str(),"ELG_Ncen")) {curstring >> varname >> value; ELG_Ncen = value;}
else if(strstr(temp_string.c_str(),"ELG_Ccen")) {curstring >> varname >> value; ELG_Ccen = value;}
else if(strstr(temp_string.c_str(),"ELG_Sec")) {curstring >> varname >> value; ELG_Sec = value;}
else if(strstr(temp_string.c_str(),"ELG_Nec")) {curstring >> varname >> value; ELG_Nec = value;}
else if(strstr(temp_string.c_str(),"ELG_Cec")) {curstring >> varname >> value; ELG_Cec = value;}
else if(strstr(temp_string.c_str(),"ELG_Sfwd")) {curstring >> varname >> value; ELG_Sfwd = value;}
else if(strstr(temp_string.c_str(),"ELG_Cfwd")) {curstring >> varname >> value; ELG_Cfwd = value;}
else if(strstr(temp_string.c_str(),"ELG_Nfwd")) {curstring >> varname >> value; ELG_Nfwd = value;}
else if(strstr(temp_string.c_str(),"ELG_Szdc")) {curstring >> varname >> value; ELG_Szdc = value;}
else if(strstr(temp_string.c_str(),"ELG_Czdc")) {curstring >> varname >> value; ELG_Czdc = value;}
else if(strstr(temp_string.c_str(),"ELG_Nzdc")) {curstring >> varname >> value; ELG_Nzdc = value;}

else if(strstr(temp_string.c_str(),"HAD_Shcal")) {warning("HAD_Shcal","HAD_Scen"); curstring >> varname >> value; HAD_Scen = value;}
else if(strstr(temp_string.c_str(),"HAD_Nhcal")) {warning("HAD_Nhcal","HAD_Ncen"); curstring >> varname >> value; HAD_Ncen = value;}
else if(strstr(temp_string.c_str(),"HAD_Chcal")) {warning("HAD_Chcal","HAD_Ccen"); curstring >> varname >> value; HAD_Ccen = value;}
else if(strstr(temp_string.c_str(),"HAD_Shf")) {warning("HAD_Shf","HAD_Sfwd"); curstring >> varname >> value; HAD_Sfwd = value;}
else if(strstr(temp_string.c_str(),"HAD_Nhf")) {warning("HAD_Nhf","HAD_Nfwd"); curstring >> varname >> value; HAD_Nfwd = value;}
else if(strstr(temp_string.c_str(),"HAD_Chf")) {warning("HAD_Chf","HAD_Cfwd"); curstring >> varname >> value; HAD_Cfwd = value;}

else if(strstr(temp_string.c_str(),"HAD_Scen")) {curstring >> varname >> value; HAD_Scen = value;}
else if(strstr(temp_string.c_str(),"HAD_Ncen")) {curstring >> varname >> value; HAD_Ncen = value;}
else if(strstr(temp_string.c_str(),"HAD_Ccen")) {curstring >> varname >> value; HAD_Ccen = value;}
else if(strstr(temp_string.c_str(),"HAD_Sec")) {curstring >> varname >> value; HAD_Sec = value;}
else if(strstr(temp_string.c_str(),"HAD_Nec")) {curstring >> varname >> value; HAD_Nec = value;}
else if(strstr(temp_string.c_str(),"HAD_Cec")) {curstring >> varname >> value; HAD_Cec = value;}
else if(strstr(temp_string.c_str(),"HAD_Sfwd")) {curstring >> varname >> value; HAD_Sfwd = value;}
else if(strstr(temp_string.c_str(),"HAD_Nfwd")) {curstring >> varname >> value; HAD_Nfwd = value;}
else if(strstr(temp_string.c_str(),"HAD_Cfwd")) {curstring >> varname >> value; HAD_Cfwd = value;}
else if(strstr(temp_string.c_str(),"HAD_Szdc")) {curstring >> varname >> value; HAD_Szdc = value;}
else if(strstr(temp_string.c_str(),"HAD_Nzdc")) {curstring >> varname >> value; HAD_Nzdc = value;}
else if(strstr(temp_string.c_str(),"HAD_Czdc")) {curstring >> varname >> value; HAD_Czdc = value;}

else if(strstr(temp_string.c_str(),"ZDC_T_resolution")) {curstring >> varname >> value; ZDC_T_resolution = value;}
else if(strstr(temp_string.c_str(),"RP220_T_resolution")) {curstring >> varname >> value; RP220_T_resolution = value;}
else if(strstr(temp_string.c_str(),"RP420_T_resolution")) {curstring >> varname >> value; RP420_T_resolution = value;}
else if(strstr(temp_string.c_str(),"MU_SmearPt")) {curstring >> varname >> value; MU_SmearPt = value;}


else if(strstr(temp_string.c_str(),"TRACK_radius")) {curstring >> varname >> ivalue;TRACK_radius = ivalue;}
else if(strstr(temp_string.c_str(),"TRACK_length")) {curstring >> varname >> ivalue;TRACK_length = ivalue;}
else if(strstr(temp_string.c_str(),"TRACK_bfield_x")) {curstring >> varname >> value; TRACK_bfield_x = value;}
else if(strstr(temp_string.c_str(),"TRACK_bfield_y")) {curstring >> varname >> value; TRACK_bfield_y = value;}
else if(strstr(temp_string.c_str(),"TRACK_bfield_z")) {curstring >> varname >> value; TRACK_bfield_z = value;}
else if(strstr(temp_string.c_str(),"FLAG_bfield")) {curstring >> varname >> ivalue; FLAG_bfield = ivalue;}
else if(strstr(temp_string.c_str(),"TRACK_ptmin")) {curstring >> varname >> value; TRACK_ptmin = value;}
else if(strstr(temp_string.c_str(),"TRACK_eff")) {curstring >> varname >> value; TRACK_eff = value;}

else if(strstr(temp_string.c_str(),"TOWER_number")) {curstring >> varname >> ivalue;TOWER_number = ivalue;}
else if(strstr(temp_string.c_str(),"TOWER_eta_edges")){

curstring >> varname; for(unsigned int i=0; i<TOWER_number+1; i++) {curstring >> value; TOWER_eta_edges[i] = value;} }

else if(strstr(temp_string.c_str(),"TOWER_dphi")){

curstring >> varname; for(unsigned int i=0; i<TOWER_number; i++) {curstring >> value; TOWER_dphi[i] = value;} }

else if(strstr(temp_string.c_str(),"PTCUT_elec")) {curstring >> varname >> value; PTCUT_elec = value;}
else if(strstr(temp_string.c_str(),"PTCUT_muon")) {curstring >> varname >> value; PTCUT_muon = value;}
else if(strstr(temp_string.c_str(),"PTCUT_jet")) {curstring >> varname >> value; PTCUT_jet = value;}
else if(strstr(temp_string.c_str(),"PTCUT_gamma")) {curstring >> varname >> value; PTCUT_gamma = value;}
else if(strstr(temp_string.c_str(),"PTCUT_taujet")) {curstring >> varname >> value; PTCUT_taujet = value;}
else if(strstr(temp_string.c_str(),"ZDC_gamma_E")) {curstring >> varname >> value; ZDC_gamma_E = value;}
else if(strstr(temp_string.c_str(),"ZDC_n_E")) {curstring >> varname >> value; ZDC_n_E = value;}

else if(strstr(temp_string.c_str(),"ISOL_PT")) {curstring >> varname >> value; ISOL_PT = value;}
else if(strstr(temp_string.c_str(),"ISOL_Cone")) {curstring >> varname >> value; ISOL_Cone = value;}
else if(strstr(temp_string.c_str(),"ISOL_Calo_ET")) {curstring >> varname >> value; ISOL_Calo_ET = value;}
else if(strstr(temp_string.c_str(),"ISOL_Calo_Grid")) {curstring >> varname >> ivalue; ISOL_Calo_Grid = ivalue;}

else if(strstr(temp_string.c_str(),"JET_coneradius")) {curstring >> varname >> value; JET_coneradius = value;}
else if(strstr(temp_string.c_str(),"JET_jetalgo")) {curstring >> varname >> ivalue;JET_jetalgo = ivalue;}
else if(strstr(temp_string.c_str(),"JET_seed")) {curstring >> varname >> value; JET_seed = value;}
else if(strstr(temp_string.c_str(),"JET_Eflow")) {curstring >> varname >> ivalue; JET_Eflow = ivalue;}


else if(strstr(temp_string.c_str(),"BTAG_b")) {curstring >> varname >> value;BTAG_b = value;}
else if(strstr(temp_string.c_str(),"BTAG_mistag_c")) {curstring >> varname >> value;BTAG_mistag_c = value;}
else if(strstr(temp_string.c_str(),"BTAG_mistag_l")) {curstring >> varname >> value;BTAG_mistag_l = value;}

else if(strstr(temp_string.c_str(),"FLAG_vfd")) {curstring >> varname >> ivalue; FLAG_vfd = ivalue;}
else if(strstr(temp_string.c_str(),"FLAG_RP")) {curstring >> varname >> ivalue; FLAG_RP = ivalue;}
else if(strstr(temp_string.c_str(),"FLAG_trigger")) {curstring >> varname >> ivalue; FLAG_trigger = ivalue;}
else if(strstr(temp_string.c_str(),"FLAG_frog")) {curstring >> varname >> ivalue; FLAG_frog = ivalue;}
else if(strstr(temp_string.c_str(),"FLAG_lhco")) {curstring >> varname >> ivalue; FLAG_lhco = ivalue;}
else if(strstr(temp_string.c_str(),"NEvents_Frog")) {curstring >> varname >> ivalue; NEvents_Frog = ivalue;}
else if(strstr(temp_string.c_str(),"NEvents")) {curstring >> varname >> ivalue; NEvents = ivalue;}

else if(strstr(temp_string.c_str(),"PdgTableFilename")) {curstring >> varname >> svalue; PdgTableFilename = svalue;}

}

for compatibility with old data cards
if(!CEN_max_calo_ec_flag) {

cout << " Warning \'CEN_max_calo_ec\' not found in datacard. "<< endl;
cout << " Same values will be applied for calorimeter endcaps "<< endl;
cout << " as for central calorimeters "<< endl;
string text = " Please update your card ("+ datacard +")";
cout << left << setw(67) << text << right << setw(2) << "
" << endl;
cout << " This change is 100\% backward compatibly with older DetectorCard. " << endl;
cout << " However, please update your DetectorCard. " << endl;
CEN_max_calo_ec = CEN_max_calo_cen;
CEN_max_calo_cen = CEN_max_calo_cen/2;
ELG_Sec = ELG_Scen;
ELG_Nec = ELG_Ncen;
ELG_Cec = ELG_Ccen;
HAD_Sec = HAD_Scen;
HAD_Nec = HAD_Ncen;
HAD_Cec = HAD_Ccen;

}


if(ISOL_Calo_Grid%2 ==0) {

ISOL_Calo_Grid++;
cout <<" WARNING: ISOL_Calo_Grid is not odd. Set it to "<< ISOL_Calo_Grid << " " << endl;

}


jet stuffs not defined in the input datacard
JET_overlap = 0.75;
MidPoint algorithm definition
JET_M_coneareafraction = 0.25;
JET_M_maxpairsize = 2;
JET_M_maxiterations = 100;
Define Cone algorithm.
JET_C_adjacencycut = 2;
JET_C_maxiterations = 100;
JET_C_iratch = 1;
Define SISCone algorithm.
JET_S_npass = 0;
JET_S_protojet_ptmin= 0.0;


For Tau-jet definition
TAU_energy_scone = 0.15;
radius R of the cone for tau definition, based on energy threshold
TAU_track_scone = 0.4; radius R of the cone for tau definition, based on track number
TAU_track_pt = 2;
minimal pt [GeV] for tracks to be considered in tau definition
TAU_energy_frac = 0.95; fraction of energy required in the central part of the cone, for tau jets


}

void RESOLution::Logfile(const string& LogName) {

creates the list of good input files
this list is vector<string> inputfiles.
ifstream infile(inputfilelist.c_str());
vector<string> inputfiles;
string filename;
while(1) {

infile >> filename; reads the first line of the list
if(!infile.good()) break;
quits when at the end of the list
ifstream checking_the_file(filename.c_str()); try to open the file
if(!checking_the_file.good()) continue;
skips bad/unknown files
else checking_the_file.close(); close file if found
inputfiles.push_back(filename);
append the name to the vector

}
infile.close();

ofstream f_out(LogName.c_str());

f_out <<""<< endl;
f_out <<"
"<< endl;
f_out <<" "<< endl;
f_out <<" Welcome to "<< endl;
f_out <<" "<< endl;
f_out <<" "<< endl;
f_out <<" .ddddddd- lL hH "<< endl;
f_out <<" -Dd dD: Ll hH` "<< endl;
f_out <<" dDd dDd eeee. lL .pp+pp Hh+hhh -eeee- sssss "<< endl;
f_out <<" -Dd `DD ee. ee Ll .Pp. PP Hh. HH. ee. ee sSs "<< endl;
f_out <<" dD dDd eEeee: lL. pP. pP hH hH eEeee:` -sSSSs. "<< endl;
f_out <<" .Dd :dd eE. LlL PpppPP Hh Hh eE sSS "<< endl;
f_out <<" dddddd:. eee+: lL. pp. hh. hh eee+ sssssS "<< endl;
f_out <<" Pp "<< endl;
f_out <<" "<< endl;
f_out <<" Delphes, a framework for the fast simulation "<< endl;
f_out <<" of a generic collider experiment "<< endl;
f_out <<" "<< endl;
f_out <<" --- Version 1.8 of Delphes --- "<< endl;
f_out <<" Last date of change: 16 August 2009 "<< endl;
f_out <<" "<< endl;
f_out <<" "<< endl;
f_out <<" This package uses: "<< endl;
f_out <<" ------------------ "<< endl;
f_out <<" FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] "<< endl;
f_out <<" Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] "<< endl;
f_out <<" FROG: L. Quertenmont, V. Roberfroid [hep-ex/0901.2718v1] "<< endl;
f_out <<" "<< endl;
f_out <<" ---------------------------------------------------------------- "<< endl;
f_out <<" "<< endl;
f_out <<" Main authors: "<< endl;
f_out <<" ------------- "<< endl;
f_out <<" "<< endl;
f_out <<" Séverine Ovyn Xavier Rouby "<< endl;
f_out <<" severine.ovyn@… xavier.rouby@cern "<< endl;
f_out <<" Center for Particle Physics and Phenomenology (CP3) "<< endl;
f_out <<" Universite Catholique de Louvain (UCL) "<< endl;
f_out <<" Louvain-la-Neuve, Belgium "<< endl;
f_out <<" "<< endl;
f_out <<" ---------------------------------------------------------------- "<< endl;
f_out <<" "<< endl;
f_out <<" Former Delphes versions and documentation can be found on : "<< endl;
f_out <<" http://www.fynu.ucl.ac.be/delphes.html "<< endl;
f_out <<" "<< endl;
f_out <<" "<< endl;
f_out <<" Disclaimer: this program comes without guarantees. "<< endl;
f_out <<" Beware of errors and please give us "<< endl;
f_out <<" your feedbacks about potential bugs. "<< endl;
f_out <<" "<< endl;
f_out <<""<< endl;
f_out <<"
"<< endl;
f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n";
f_out <<"* *"<< endl;
f_out <<"#
*"<<"\n";
f_out <<"# Input files *"<<"\n";
f_out <<"#
*"<<"\n";
f_out << left << setw(22) <<"* Input list "<<""

<< left << setw(39) << inputfilelist << "" << right << setw(9) << "*"<<"\n";

for (unsigned int i =0; i<inputfiles.size(); i++) {

f_out << left << setw(22) <<"* - file "<<""

<< left << setw(43) << inputfiles[i] << "" << right << setw(5) << "*"<<"\n";

}
if(detectorcard != "")

f_out << left << setw(22) <<"* Detector card "<<""

<< left << setw(39) << detectorcard << "" << right << setw(9) << "*"<<"\n";

if(triggercard != "")

f_out << left << setw(22) <<"* Trigger card "<<""

<< left << setw(39) << triggercard << "" << right << setw(9) << "*"<<"\n";

f_out<<"* Beam optics : *"<<"\n";
f_out << left << setw(22) <<"* - beam 1 "<<""

<< left << setw(33) << RP_beam1Card << "" << right << setw(15) << "*"<<"\n";

f_out << left << setw(22) <<"* - beam 2 "<<""

<< left << setw(33) << RP_beam2Card << "" << right << setw(15) << "*"<<"\n";

f_out << left << setw(22) <<"* Input PDG table " << ""

<< left << setw(39) << PdgTableFilename << "" << right << setw(9) << "*"<<"\n";

f_out<<"* *"<<"\n";
f_out<<"* *"<<"\n";
f_out<<"# *"<<"\n";
f_out<<"# Central detector caracteristics *"<<"\n";
f_out<<"# *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(30) <<"* Maximum tracking system: "<<""

<< left << setw(10) <<CEN_max_tracker <<""<< right << setw(15)<<"*"<<"\n";

f_out << left << setw(30) <<"* Maximum central calorimeter: "<<""

<< left << setw(10) <<CEN_max_calo_cen <<""<< right << setw(15)<<"*"<<"\n";

f_out << left << setw(30) <<"* Maximum endcap calorimeter: "<<""

<< left << setw(10) <<CEN_max_calo_ec <<""<< right << setw(15)<<"*"<<"\n";

f_out << left << setw(30) <<"* Maximum central calorimeter: "<<""

<< left << setw(10) <<CEN_max_calo_fwd <<""<< right << setw(15)<<"*"<<"\n";

f_out << left << setw(30) <<"* Muon chambers coverage: "<<""

<< left << setw(10) <<CEN_max_mu <<""<< right << setw(15)<<"*"<<"\n";

f_out<<"* *"<<"\n";
if(FLAG_RP==1){

f_out<<"# *"<<"\n";
f_out<<"# Very forward Roman Pots switched on *"<<"\n";
f_out<<"# *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(55) <<"* Distance of the 220 RP to the IP in meters:"<<""

<< left << setw(5) <<RP_220_s <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Distance of the 220 RP to the beam in meters:"<<""

<< left << setw(5) <<RP_220_x <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Distance of the 420 RP to the IP in meters:"<<""

<< left << setw(5) <<RP_420_s <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Distance of the 420 RP to the beam in meters:"<<""

<< left << setw(5) <<RP_420_x <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Interaction point at the LHC named: "<<""

<< left << setw(5) <<RP_IP_name <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(35) <<"* Datacard for beam 1: "<<""

<< left << setw(25) <<RP_beam1Card <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(35) <<"* Datacard for beam 2: "<<""

<< left << setw(25) <<RP_beam2Card <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(54) <<"* Beam separation, in meters(hor):"<<""

<< left << setw(6) << RP_offsetEl_x <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(54) <<"* Beam separation, in meters(ver):"<<""

<< left << setw(6) << RP_offsetEl_y <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(54) <<"* Distance from IP for Beam separation (m):"<<""

<< left << setw(6) <<RP_offsetEl_s <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(54) <<"* X offset of beam crossing in micrometers:"<<""

<< left << setw(6) <<RP_cross_x <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(54) <<"* Y offset of beam crossing in micrometers:"<<""

<< left << setw(6) <<RP_cross_y <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(54) <<"* X Angle of beam crossing:"<<""

<< left << setw(6) <<RP_cross_ang_x <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(54) <<"* Y Angle of beam crossing:"<<""

<< left << setw(6) <<RP_cross_ang_y <<""<< right << setw(10)<<"*"<<"\n";

f_out<<"* *"<<"\n";

}
else {

f_out<<"#* *"<<"\n";
f_out<<"# Very forward Roman Pots switched off *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"* *"<<"\n";

}
if(FLAG_vfd==1){

f_out<<"# *"<<"\n";
f_out<<"# Very forward calorimeters switched on *"<<"\n";
f_out<<"#
*"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(55) <<"* Minimum very forward calorimeter: "<<""

<< left << setw(5) <<VFD_min_calo_vfd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Maximum very forward calorimeter: "<<""

<< left << setw(5) <<VFD_max_calo_vfd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Minimum coverage zero_degree calorimeter "<<""

<< left << setw(5) <<VFD_min_zdc <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Distance of the ZDC to the IP, in meters: "<<""

<< left << setw(5) <<VFD_s_zdc <<""<< right << setw(10)<<"*"<<"\n";

f_out<<"* *"<<"\n";

}
else {

f_out<<"#* *"<<"\n";
f_out<<"# Very forward calorimeters switched off *"<<"\n";
f_out<<"#
* *"<<"\n";
f_out<<"* *"<<"\n";

}

f_out<<"# *"<<"\n";
f_out<<"# Electromagnetic smearing parameters *"<<"\n";
f_out<<"# *"<<"\n";
f_out<<"* *"<<"\n";
# \sigma/E = C + N/E + S/\sqrt{E}
f_out << left << setw(30) <<"* S term for central ECAL: "<<""

<< left << setw(30) <<ELG_Scen <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for central ECAL: "<<""

<< left << setw(30) <<ELG_Ncen <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for central ECAL: "<<""

<< left << setw(30) <<ELG_Ccen <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* S term for ECAL end-cap: "<<""

<< left << setw(30) <<ELG_Sec <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for ECAL end-cap: "<<""

<< left << setw(30) <<ELG_Nec <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for ECAL end-cap: "<<""

<< left << setw(30) <<ELG_Cec <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* S term for FCAL: "<<""

<< left << setw(30) <<ELG_Sfwd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for FCAL: "<<""

<< left << setw(30) <<ELG_Nfwd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for FCAL: "<<""

<< left << setw(30) <<ELG_Cfwd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* S term for ZDC: "<<""

<< left << setw(30) <<ELG_Szdc <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for ZDC: "<<""

<< left << setw(30) <<ELG_Nzdc <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for ZDC: "<<""

<< left << setw(30) <<ELG_Czdc <<""<< right << setw(10)<<"*"<<"\n";

f_out<<"* *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"# Hadronic smearing parameters *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(30) <<"* S term for central HCAL: "<<""

<< left << setw(30) <<HAD_Scen <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for central HCAL: "<<""

<< left << setw(30) <<HAD_Ncen <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for central HCAL: "<<""

<< left << setw(30) <<HAD_Ccen <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* S term for HCAL endcap: "<<""

<< left << setw(30) <<HAD_Sec <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for HCAL endcap: "<<""

<< left << setw(30) <<HAD_Nec <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for HCAL endcap: "<<""

<< left << setw(30) <<HAD_Cec <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* S term for FCAL: "<<""

<< left << setw(30) <<HAD_Sfwd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for FCAL: "<<""

<< left << setw(30) <<HAD_Nfwd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for FCAL: "<<""

<< left << setw(30) <<HAD_Cfwd <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* S term for ZDC: "<<""

<< left << setw(30) <<HAD_Szdc <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* N term for ZDC: "<<""

<< left << setw(30) <<HAD_Nzdc <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(30) <<"* C term for ZDC: "<<""

<< left << setw(30) <<HAD_Czdc <<""<< right << setw(10)<<"*"<<"\n";

f_out<<"* *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"# Time smearing parameters *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(55) <<"* Time resolution for ZDC : "<<""

<< left << setw(5) <<ZDC_T_resolution <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Time resolution for RP220 : "<<""

<< left << setw(5) <<RP220_T_resolution <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Time resolution for RP420 : "<<""

<< left << setw(5) <<RP420_T_resolution <<""<< right << setw(10)<<"*"<<"\n";

f_out<<"* *"<<"\n";

f_out<<"* *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"# Muon smearing parameters *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(55) <<"* PT resolution for muons : "<<""

<< left << setw(5) <<MU_SmearPt <<""<< right << setw(10)<<"*"<<"\n";

f_out<<"* *"<<"\n";
if(FLAG_bfield==1){

f_out<<"#* *"<<"\n";
f_out<<"# Magnetic field switched on *"<<"\n";
f_out<<"#
* *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(55) <<"* Radius of the BField coverage: "<<""

<< left << setw(5) <<TRACK_radius <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Length of the BField coverage: "<<""

<< left << setw(5) <<TRACK_length <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* BField X component: "<<""

<< left << setw(5) <<TRACK_bfield_x <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* BField Y component: "<<""

<< left << setw(5) <<TRACK_bfield_y <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* BField Z component: "<<""

<< left << setw(5) <<TRACK_bfield_z <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""

<< left << setw(10) <<TRACK_ptmin <<""<< right << setw(5)<<"*"<<"\n";

f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<""

<< left << setw(10) <<TRACK_eff <<""<< right << setw(5)<<"*"<<"\n";

f_out<<"* *"<<"\n";

}
else {

f_out<<"# *"<<"\n";
f_out<<"# Magnetic field switched off *"<<"\n";
f_out<<"# *"<<"\n";
f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""

<< left << setw(10) <<TRACK_ptmin <<""<< right << setw(5)<<"*"<<"\n";

f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<""

<< left << setw(10) <<TRACK_eff <<""<< right << setw(5)<<"*"<<"\n";

f_out<<"* *"<<"\n";

}
f_out<<"# *"<<"\n";
f_out<<"# Calorimetric Towers *"<<"\n";
f_out<<"# *"<<"\n";
f_out << left << setw(55) <<"* Number of calorimetric towers in eta, for eta>0: "<<""

<< left << setw(5) << TOWER_number <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(55) <<"* Tower edges in eta, for eta>0: "<<"" << right << setw(15)<<"*"<<"\n";
f_out << "* ";
for (unsigned int i=0; i<TOWER_number+1; i++) {

f_out << left << setw(7) << TOWER_eta_edges[i];
if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* ";

}
for (unsigned int i=(TOWER_number+1)%9; i<9; i++) f_out << left << setw(7) << "";
f_out << right << setw(3)<<"*"<<"\n";
f_out << left << setw(55) <<"* Tower sizes in phi, for eta>0 [degree]:"<<"" << right << setw(15)<<"*"<<"\n";
f_out << "* ";
for (unsigned int i=0; i<TOWER_number; i++) {

f_out << left << setw(7) << TOWER_dphi[i];
if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* ";

}
for (unsigned int i=(TOWER_number)%9; i<9; i++) f_out << left << setw(7) << "";
f_out << right << setw(3)<<"*"<<"\n";
f_out<<"* *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"# Minimum pT's [GeV] *"<<"\n";
f_out<<"#
* *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(40) <<"* Minimum pT for electrons: "<<""

<< left << setw(20) <<PTCUT_elec <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Minimum pT for muons: "<<""

<< left << setw(20) <<PTCUT_muon <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Minimum pT for jets: "<<""

<< left << setw(20) <<PTCUT_jet <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Minimum pT for Tau-jets: "<<""

<< left << setw(20) <<PTCUT_taujet <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Minimum pT for photons: "<<""

<< left << setw(20) <<PTCUT_gamma <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Minimum E for photons in ZDC: "<<""

<< left << setw(20) <<ZDC_gamma_E <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Minimum E for neutrons in ZDC: "<<""

<< left << setw(20) <<ZDC_n_E <<""<< right << setw(10)<<"*"<<"\n";

f_out<<"* *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"# Isolation criteria *"<<"\n";
f_out<<"#
* *"<<"\n";
f_out<<"* *"<<"\n";
f_out << left << setw(40) <<"* Minimum pT for tracks [GeV]: "<<""

<< left << setw(20) <<ISOL_PT <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Cone for isolation criteria: "<<""

<< left << setw(20) <<ISOL_Cone <<""<< right << setw(10)<<"*"<<"\n";

if(ISOL_Calo_ET > 1E98) f_out<<"# No Calorimetric isolation applied *"<<"\n";
else {

f_out << left << setw(40) <<"* Minimum ET for towers [GeV]: "<<""

<< left << setw(20) <<ISOL_Calo_ET <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* Grid size (NxN) for calorimetric isolation: "<<""

<< left << setw(20) <<ISOL_Calo_Grid <<""<< right << setw(4)<<"*"<<"\n";

}

f_out<<"* *"<<"\n";
f_out<<"#* *"<<"\n";
f_out<<"# Jet definition *"<<"\n";
f_out<<"#
* *"<<"\n";
if(JET_Eflow)

{

f_out<<"#* *"<<"\n";
f_out<<"#* Running considering perfect energy flow on the tracker coverage *"<<"\n";

}

else

{

f_out<<"#* Running considering no energy flow on the tracker coverage *"<<"\n";
f_out<<"#* --> jet algo applied on the calorimetric towers *"<<"\n";

}

f_out<<"* *"<<"\n";
f_out<<"* Six algorithms are currently available: *"<<"\n";
f_out<<"* - 1) CDF cone algorithm, *"<<"\n";
f_out<<"* - 2) CDF MidPoint algorithm, *"<<"\n";
f_out<<"* - 3) SIScone algorithm, *"<<"\n";
f_out<<"* - 4) kt algorithm, *"<<"\n";
f_out<<"* - 5) Cambrigde/Aachen algorithm, *"<<"\n";
f_out<<"* - 6) Anti-kt algorithm. *"<<"\n";
f_out<<"* *"<<"\n";
f_out<<"* You have chosen *"<<"\n";
switch(JET_jetalgo) {
default:
case 1: {

f_out<<"* CDF JetClu jet algorithm with parameters: *"<<"\n";
f_out << left << setw(40) <<"* - Seed threshold: "<<""

<< left << setw(10) <<JET_seed <<""<< right << setw(20)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Cone radius: "<<""

<< left << setw(10) <<JET_coneradius <<""<< right << setw(20)<<"*"<<"\n";

f_out << left << setw(40) <<"* - Adjacency cut: "<<""

<< left << setw(10) <<JET_C_adjacencycut <<""<< right << setw(20)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Max iterations: "<<""

<< left << setw(10) <<JET_C_maxiterations <<""<< right << setw(20)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Iratch: "<<""

<< left << setw(10) <<JET_C_iratch <<""<< right << setw(20)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Overlap threshold: "<<""

<< left << setw(10) <<JET_overlap <<""<< right << setw(20)<<"! not in datacard *"<<"\n";

}

break;

case 2: {

f_out<<"* CDF midpoint jet algorithm with parameters: *"<<"\n";
f_out << left << setw(40) <<"* - Seed threshold: "<<""

<< left << setw(20) <<JET_seed <<""<< right << setw(10)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Cone radius: "<<""

<< left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* - Cone area fraction:"<<""

<< left << setw(20) <<JET_M_coneareafraction <<""<< right << setw(10)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Maximum pair size: "<<""

<< left << setw(20) <<JET_M_maxpairsize <<""<< right << setw(10)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Max iterations: "<<""

<< left << setw(20) <<JET_M_maxiterations <<""<< right << setw(10)<<"! not in datacard *"<<"\n";

f_out << left << setw(40) <<"* - Overlap threshold: "<<""

<< left << setw(20) <<JET_overlap <<""<< right << setw(10)<<"! not in datacard *"<<"\n";

}

break;

case 3: {

f_out <<"* SISCone jet algorithm with parameters: *"<<"\n";
f_out << left << setw(40) <<"* - Cone radius: "<<""

<< left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n";

f_out << left << setw(40) <<"* - Overlap threshold: "<<""

<< left << setw(20) <<JET_overlap <<""<< right << setw(10)<<"! not in data

File size: 18.8 KB
Line 
1#ifndef BLOCKCLASSES_H
2#define BLOCKCLASSES_H
3
4/***********************************************************************
5** **
6** /----------------------------------------------\ **
7** | Delphes, a framework for the fast simulation | **
8** | of a generic collider experiment | **
9** \----------------------------------------------/ **
10** **
11** **
12** This package uses: **
13** ------------------ **
14** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
15** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
16** FROG: [hep-ex/0901.2718v1] **
17** **
18** ------------------------------------------------------------------ **
19** **
20** Main authors: **
21** ------------- **
22** **
23** Severine Ovyn Xavier Rouby **
24** severine.ovyn@uclouvain.be xavier.rouby@cern **
25** **
26** Center for Particle Physics and Phenomenology (CP3) **
27** Universite catholique de Louvain (UCL) **
28** Louvain-la-Neuve, Belgium **
29** **
30** Copyright (C) 2008-2009, **
31** All rights reserved. **
32** **
33***********************************************************************/
34
35#include "TLorentzVector.h"
36#include "TObject.h"
37#include "BlockCompare.h"
38#include "interface/D_Constants.h"
39#include "interface/CaloUtil.h"
40
41class TSortableObject: public TObject
42{
43public:
44 TSortableObject() {};
45 Bool_t IsSortable() const { return GetCompare() ? GetCompare()->IsSortable(this) : kFALSE; }
46 Int_t Compare(const TObject *obj) const { return GetCompare()->Compare(this, obj); }
47
48 virtual const TCompare *GetCompare() const = 0;
49
50 ClassDef(TSortableObject, 1)
51};
52
53//---------------------------------------------------------------------------
54//
55class TRootLHEFEvent: public TObject
56{
57public:
58 TRootLHEFEvent() {};
59
60 Long64_t Number; // event number
61
62 int Nparticles; // number of particles in the event | hepup.NUP
63 int ProcessID; // subprocess code for the event | hepup.IDPRUP
64
65 Double_t Weight; // weight for the event | hepup.XWGTUP
66 Double_t ScalePDF; // scale in GeV used in the calculation of the PDFs in the event | hepup.SCALUP
67 Double_t CouplingQED; // value of the QED coupling used in the event | hepup.AQEDUP
68 Double_t CouplingQCD; // value of the QCD coupling used in the event | hepup.AQCDUP
69
70 ClassDef(TRootLHEFEvent, 2)
71};
72
73//---------------------------------------------------------------------------
74
75//---------------------------------------------------------------------------
76/*
77class TRootLHEFParticle: public TSortableObject
78{
79public:
80 TRootLHEFParticle() {};
81 int PID; // particle HEP ID number | hepup.IDUP[number]
82 int Status; // particle status code | hepup.ISTUP[number]
83 int Mother1; // index for the particle first mother | hepup.MOTHUP[number][0]
84 int Mother2; // index for the particle last mother | hepup.MOTHUP[number][1]
85 int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0]
86 int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1]
87
88 double Px; // particle momentum vector (x component) | hepup.PUP[number][0]
89 double Py; // particle momentum vector (y component) | hepup.PUP[number][1]
90 double Pz; // particle momentum vector (z component) | hepup.PUP[number][2]
91 double E; // particle energy | hepup.PUP[number][3]
92 double M; // particle mass | hepup.PUP[number][4]
93 double Charge; // particle charge
94
95 double PT; // particle transverse momentum
96 double Eta; // particle pseudorapidity
97 double Phi; // particle azimuthal angle
98
99 double Rapidity; // particle rapidity
100
101 double LifeTime; // particle invariant lifetime
102 // (c*tau, distance from production to decay in mm)
103 // | hepup.VTIMUP[number]
104
105 double Spin; // cosine of the angle between the particle spin vector
106 // and the decaying particle 3-momentum,
107 // specified in the lab frame. | hepup.SPINUP[number]
108
109 static TCompare *fgCompare; //!
110 const TCompare *GetCompare() const { return fgCompare; }
111 ClassDef(TRootLHEFParticle, 2)
112
113};
114*/
115//---------------------------------------------------------------------------
116
117class TRootSelectorInfo: public TObject
118{
119public:
120 TRootSelectorInfo() {};
121 int Processed; // current number of processed events
122 int Accepted; // current number of accepted events
123
124 ClassDef(TRootSelectorInfo, 1)
125};
126
127
128class TRootGenEvent: public TObject
129{
130public:
131 TRootGenEvent() {};
132 Long64_t Number; // event number | hepevt.nevhep
133
134 static TCompare *fgCompare; //!
135 const TCompare *GetCompare() const { return fgCompare; }
136
137 ClassDef(TRootGenEvent, 1)
138};
139
140
141class TRootEvent: public TObject {
142
143public:
144 TRootEvent() {};
145 int Run; // run number [G3EventProxy::simSignal().id().runNumber()]
146 int Event; // event number [G3EventProxy::simSignal().id().eventInRun()]
147
148// Short_t L1Decision; // L1 trigger global decision [L1Trigger::decision()]
149// Short_t HLTDecision; // HLT trigger global decision [HighLevelTriggerResult::getGlobalDecision()]
150
151 ClassDef(TRootEvent, 1)
152};
153
154//---------------------------------------------------------------------------
155
156class TRootParticle: public TSortableObject {
157
158public:
159
160 TRootParticle() {};
161 float E; // particle energy in GeV
162 float Px; // particle momentum vector (x component) in GeV
163 float Py; // particle momentum vector (y component) in GeV
164 float Pz; // particle momentum vector (z component) in GeV
165
166 float Eta; // particle pseudorapidity
167 float Phi; // particle azimuthal angle in rad
168
169 void Set(const TLorentzVector& momentum);
170 void Set(const float px, const float py, const float pz, const float e);
171 void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;};
172 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
173 static TCompare *fgCompare; //!
174 const TCompare *GetCompare() const { return fgCompare; }
175 float PT; // particle transverse momentum in GeV
176
177 ClassDef(TRootParticle, 1)
178};
179
180//--------------------------------------------------------------------------
181class TRootGenParticle;
182
183namespace TRootC {
184class GenParticle: public TRootParticle {
185
186public:
187 GenParticle() {};
188 GenParticle(const TRootGenParticle& p);
189 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
190 int Status; // particle status [RawHepEventParticle::status()]
191 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
192 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
193 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
194 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
195
196 float Charge;
197
198 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
199 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
200 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
201 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
202 float M;
203
204
205 static TCompare *fgCompare; //!
206
207 ClassDef(GenParticle, 1)
208};
209}
210
211//---------------------------------------------------------------------------
212
213class TRootGenParticle: public TRootParticle {
214
215public:
216 TRootGenParticle() {_initialised=false; M=-9999.; }
217 TRootGenParticle(const int pid): PID(pid) {_initialised=false;}
218 TRootGenParticle(TRootC::GenParticle* part);
219
220 int PID; // particle HEP ID number [RawHepEventParticle::pid()]
221 int Status; // particle status [RawHepEventParticle::status()]
222 int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
223 int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
224 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
225 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
226
227 float T; // particle vertex position (t component) [RawHepEventParticle::t()]
228 float X; // particle vertex position (x component) [RawHepEventParticle::x()]
229 float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
230 float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
231 float M;
232 void setFractions();
233 const float getFem() {if(!_initialised) setFractions(); return _Fem;}
234 const float getFhad() {if(!_initialised) setFractions(); return _Fhad;}
235
236 float EtaCalo; // particle pseudorapidity when entering the calo,
237 float PhiCalo; // particle azimuthal angle in rad when entering the calo
238 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
239
240 void print();//
241
242 static TCompare *fgCompare; //!
243
244 float Charge; // electrical charge
245 protected:
246 float _Fem, _Fhad; // fractions of energy deposit
247 bool _initialised;
248 ClassDef(TRootGenParticle, 1)
249};
250
251
252//------------------------------------------------------------------------------
253
254class TRootElectron: public TRootParticle {
255public:
256 TRootElectron():Charge(-999), IsolFlag(false), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED){};
257 static TCompare *fgCompare; //!
258 int Charge; // particle Charge [RawHepEventParticle::pid()]
259 bool IsolFlag; // stores the result of the isolation test
260 float EtaCalo; // particle pseudorapidity when entering the calo,
261 float PhiCalo; // particle azimuthal angle in rad when entering the calo
262 float EHoverEE;
263 float EtRatio;
264 float SumEt;
265 float SumPt;
266
267 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
268
269 ClassDef(TRootElectron, 1)
270};
271
272//------------------------------------------------------------------------------
273
274class TRootPhoton: public TRootParticle {
275public:
276 TRootPhoton() : EHoverEE(UNDEFINED) {};
277 static TCompare *fgCompare; //!
278
279 float EHoverEE;
280 ClassDef(TRootPhoton, 1)
281};
282
283
284//------------------------------------------------------------------------------
285
286class TRootMuon: public TRootParticle {
287public:
288 TRootMuon():Charge(-999), IsolFlag(false), EtaCalo(UNDEFINED), PhiCalo(UNDEFINED), EHoverEE(UNDEFINED), EtRatio(UNDEFINED) {};
289 static TCompare *fgCompare; //!
290 int Charge; // particle Charge [RawHepEventParticle::pid()]
291 bool IsolFlag;
292 float EtaCalo; // particle pseudorapidity when entering the calo,
293 float PhiCalo; // particle azimuthal angle in rad when entering the calo
294 float EHoverEE; // hadronic energy over electromagnetic energy
295 float EtRatio; // calo Et in NxN-tower grid around the muon over the muon Et
296 float SumEt;
297 float SumPt;
298
299 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
300 ClassDef(TRootMuon, 1)
301};
302
303//---------------------------------------------------------------------------
304
305class TRootTracks : public TSortableObject {
306 public:
307 TRootTracks(); // needed for storage in ExRootAnalysis
308 TRootTracks(const TRootTracks& track);
309 TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
310 TRootTracks& operator=(const TRootTracks& track);
311 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge);
312 const TLorentzVector GetFourVector() const;
313 const float getEta() const {return Eta;}
314 const float getPhi() const {return Phi;}
315 const float getEtaOuter() const {return EtaOuter;}
316 const float getPhiOuter() const {return PhiOuter;}
317
318 static TCompare *fgCompare; //!
319 const TCompare *GetCompare() const { return fgCompare; }
320
321 float Eta, Phi; // (eta,phi) at the beginning of the track
322 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
323 float PT, E, Px, Py, Pz; // transverse momentum
324 float Charge;
325 float Vx,Vy,Vz;
326 ClassDef(TRootTracks, 1)
327};
328
329//---------------------------------------------------------------------------
330
331class TRootCalo: public TSortableObject
332{
333//class TRootCalo: public TRootParticle {
334 public:
335 float Eta;
336 float Phi;
337 float E;
338 TRootCalo() ;
339 TRootCalo(const TRootCalo& cal);
340 TRootCalo& operator=(const TRootCalo& cal);
341 void set(const D_CaloTower& cal);
342 static TCompare *fgCompare; //!
343 const TCompare *GetCompare() const { return fgCompare; }
344 const float getET() const {return ET;}
345
346 protected:
347 float E_em, E_had; // electromagnetic and hadronic components of the tower energy
348 float ET; // total energy and transverse energy
349 ClassDef(TRootCalo, 1)
350};
351
352//---------------------------------------------------------------------------
353/*
354class TRootZdcHits: public TRootParticle
355{
356public:
357 TRootZdcHits() {};
358 float T; // time of flight [s]
359 int side; // -1 or +1
360 static TCompare *fgCompare; //!
361 int pid;
362
363 ClassDef(TRootZdcHits, 1)
364};
365*/
366
367// gen-level info stored for forward detectors
368// this class is similar to TRootParticle, but for the member names
369class TRootGenFwdParticle: public TSortableObject {
370
371public:
372
373 TRootGenFwdParticle() {};
374 TRootGenFwdParticle(const TRootGenFwdParticle& p);
375 TRootGenFwdParticle& operator=(const TRootGenFwdParticle& p);
376 float genE; // particle energy in GeV
377 float genPx; // particle momentum vector (x component) in GeV
378 float genPy; // particle momentum vector (y component) in GeV
379 float genPz; // particle momentum vector (z component) in GeV
380 float genPT; // particle transverse momentum in GeV
381
382 float genEta; // particle pseudorapidity
383 float genPhi; // particle azimuthal angle in rad
384 int pid;
385
386 void Set(const TLorentzVector& momentum); // initialises the gen-level data
387 void Set(const float px, const float py, const float pz, const float e);
388 void SetEtaPhi(const float eta, const float phi) {genEta=eta; genPhi=phi;};
389 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
390 static TCompare *fgCompare; //!
391 const TCompare *GetCompare() const { return fgCompare; }
392
393 ClassDef(TRootGenFwdParticle, 1)
394};
395
396
397
398//class TRootZdcHits: public TSortableObject
399class TRootZdcHits: public TRootGenFwdParticle
400{
401public:
402
403 TRootZdcHits() {}; // do not put anything for the default constructor-- ExRootAnalysis constrain!!!
404 TRootZdcHits(const float e, const float t, const int side, const bool had);
405 TRootZdcHits(const TRootZdcHits& zdc);
406 TRootZdcHits& operator=(const TRootZdcHits& zdc);
407 float E;
408 float T; // time of flight [s]
409 int side; // -1 or +1
410 static TCompare *fgCompare; //!
411 bool hadronic_hit; // true if neutron, false if photon
412
413 ClassDef(TRootZdcHits, 2)
414};
415
416
417//---------------------------------------------------------------------------
418
419class TRootTauJet: public TRootParticle
420{
421public:
422 TRootTauJet() {};
423 float Charge; // normally, using the charge of the track ; here using gen-level tau charge
424 int NTracks;
425
426 float EHoverEE;
427// float E; // particle energy in GeV
428// float Px; // particle momentum vector (x component) in GeV
429// float Py; // particle momentum vector (y component) in GeV
430// float Pz; // particle momentum vector (z component) in GeV
431
432// float Eta; // particle pseudorapidity
433// float Phi; // particle azimuthal angle in rad
434
435 void Set(const TLorentzVector& momentum);// { return TRootParticle::Set(momentum); }
436
437 static TCompare *fgCompare; //!
438
439 // float PT; // particle transverse momentum in GeV
440
441 ClassDef(TRootTauJet, 1)
442};
443
444//---------------------------------------------------------------------------
445
446class TRootJet: public TRootParticle
447{
448public:
449 TRootJet() {};
450
451 static TCompare *fgCompare; //!
452
453 bool Btag;
454 int NTracks;
455
456 float EHoverEE;
457 ClassDef(TRootJet, 1)
458};
459
460//------------------------------------------------------------------------------
461
462class TRootTrigger: public TSortableObject
463{
464public:
465 TRootTrigger() {};
466
467 int Accepted;
468
469 static TCompare *fgCompare; //!
470 const TCompare *GetCompare() const { return fgCompare; }
471
472 ClassDef(TRootTrigger, 1)
473};
474//---------------------------------------------------------------------------
475
476class TRootETmis: public TSortableObject
477{
478public:
479 TRootETmis() {};
480 float ET; // jet energy [RecJet::getEnergy()]
481 float Phi; // jet azimuthal angle [RecJet::getPhi()]
482 float Px;
483 float Py;
484
485 static TCompare *fgCompare; //!
486 const TCompare *GetCompare() const { return fgCompare; }
487
488 ClassDef(TRootETmis, 1)
489};
490
491//---------------------------------------------------------------------------
492
493//class TRootRomanPotHits: public TSortableObject
494class TRootRomanPotHits: public TRootGenFwdParticle
495{
496public:
497 TRootRomanPotHits() {};
498 // float T; // time of flight to the detector [s]
499 float S; // distance to the IP [m]
500 float E; // reconstructed energy [GeV]
501 float q2; // reconstructed squared momentum transfer [GeV^2]
502
503 float X; // horizontal distance to the beam [um]
504 float Y; // vertical distance to the beam [um]
505
506 float Tx; // angle of the momentum in the horizontal (x,z) plane [urad]
507 float Ty; // angle of the momentum in the verical (y,z) plane [urad]
508
509 float T; // time of flight to the detector [s]
510 int side; // -1 or 1
511
512 static TCompare *fgCompare; //!
513 //const TCompare *GetCompare() const { return fgCompare; }
514
515 ClassDef(TRootRomanPotHits, 2)
516};
517
518//---------------------------------------------------------------------------
519
520class TRootForwardTaggerHits : public TRootRomanPotHits
521{
522public:
523 TRootForwardTaggerHits() {};
524 float T; // time of flight to the detector [s]
525
526 static TCompare *fgCompare; //!
527 const TCompare *GetCompare() const { return fgCompare; }
528
529 ClassDef(TRootForwardTaggerHits, 1)
530};
531
532
533
534
535class TRootLHEFParticle: public TRootC::GenParticle
536{
537public:
538 TRootLHEFParticle() {};
539 int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0]
540 int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1]
541
542 double Rapidity; // particle rapidity
543 double LifeTime; // particle invariant lifetime
544 // (c*tau, distance from production to decay in mm)
545 // | hepup.VTIMUP[number]
546
547 double Spin; // cosine of the angle between the particle spin vector
548 // and the decaying particle 3-momentum,
549 // specified in the lab frame. | hepup.SPINUP[number]
550
551 static TCompare *fgCompare; //!
552 const TCompare *GetCompare() const { return fgCompare; }
553 ClassDef(TRootLHEFParticle, 2)
554
555};
556
557#endif // BLOCKCLASSES_H
558
Note: See TracBrowser for help on using the repository browser.