- Timestamp:
- Dec 12, 2008, 5:32:29 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/BFieldProp.cc
r90 r94 43 43 44 44 //out of trackibg coverage? 45 if(sqrt(Xvertex1*Xvertex1+Yvertex1*Yvertex1) > TRACK ING_RADIUS){return;}46 if(fabs(Zvertex1) > TRACK ING_LENGTH){return;}45 if(sqrt(Xvertex1*Xvertex1+Yvertex1*Yvertex1) > TRACK_radius){return;} 46 if(fabs(Zvertex1) > TRACK_length){return;} 47 47 48 48 float Px = Part->Px; … … 62 62 double vz = pz/M; 63 63 64 double Bx = BFIELD_X;65 double By = BFIELD_Y;66 double Bz = BFIELD_Z;64 double Bx = TRACK_bfield_x; 65 double By = TRACK_bfield_y; 66 double Bz = TRACK_bfield_z; 67 67 68 68 double ax = (q/M)*(Bz*vy - By*vz); … … 99 99 z += vz*dt; 100 100 101 if( (x*x+y*y) > TRACK ING_RADIUS*TRACKING_RADIUS ){ x /= (x*x+y*y)/(TRACKING_RADIUS*TRACKING_RADIUS); y /= (x*x+y*y)/(TRACKING_RADIUS*TRACKING_RADIUS); break;}102 if( fabs(z)>TRACK ING_LENGTH)break;101 if( (x*x+y*y) > TRACK_radius*TRACK_radius ){ x /= (x*x+y*y)/(TRACK_radius*TRACK_radius); y /= (x*x+y*y)/(TRACK_radius*TRACK_radius); break;} 102 if( fabs(z)>TRACK_length)break; 103 103 104 104 xold = x; -
trunk/src/JetUtils.cc
r65 r94 17 17 JetsUtil::JetsUtil() { 18 18 19 switch(JET ALGO) {19 switch(JET_jetalgo) { 20 20 default: 21 21 case 1: { … … 23 23 // set up a CDF midpoint jet definition 24 24 #ifdef ENABLE_PLUGIN_CDFCONES 25 plugins = new fastjet::CDFJetCluPlugin( SEEDTHRESHOLD,CONERADIUS,C_ADJACENCYCUT,C_MAXITERATIONS,C_IRATCH,OVERLAPTHRESHOLD);25 plugins = new fastjet::CDFJetCluPlugin(JET_seed,JET_coneradius,JET_C_adjacencycut,JET_C_maxiterations,JET_C_iratch,JET_overlap); 26 26 jet_def = fastjet::JetDefinition(plugins); 27 27 #else … … 34 34 // set up a CDF midpoint jet definition 35 35 #ifdef ENABLE_PLUGIN_CDFCONES 36 plugins = new fastjet::CDFMidPointPlugin ( SEEDTHRESHOLD,CONERADIUS,M_CONEAREAFRACTION,M_MAXPAIRSIZE,M_MAXITERATIONS,OVERLAPTHRESHOLD);36 plugins = new fastjet::CDFMidPointPlugin (JET_seed,JET_coneradius,JET_M_coneareafraction,JET_M_maxpairsize,JET_M_maxiterations,JET_overlap); 37 37 jet_def = fastjet::JetDefinition(plugins); 38 38 #else … … 45 45 // set up a siscone jet definition 46 46 #ifdef ENABLE_PLUGIN_SISCONE 47 plugins = new fastjet::SISConePlugin ( CONERADIUS,OVERLAPTHRESHOLD,NPASS, PROTOJET_PTMIN);47 plugins = new fastjet::SISConePlugin (JET_coneradius,JET_overlap,JET_S_npass, JET_S_protojet_ptmin); 48 48 jet_def = fastjet::JetDefinition(plugins); 49 49 #else … … 54 54 55 55 case 4: { 56 jet_def = fastjet::JetDefinition(fastjet::kt_algorithm, CONERADIUS);56 jet_def = fastjet::JetDefinition(fastjet::kt_algorithm, JET_coneradius); 57 57 } 58 58 break; 59 59 60 60 case 5: { 61 jet_def = fastjet::JetDefinition(fastjet::cambridge_algorithm, CONERADIUS);61 jet_def = fastjet::JetDefinition(fastjet::cambridge_algorithm,JET_coneradius); 62 62 } 63 63 break; 64 64 65 65 case 6: { 66 jet_def = fastjet::JetDefinition(fastjet::antikt_algorithm, CONERADIUS);66 jet_def = fastjet::JetDefinition(fastjet::antikt_algorithm,JET_coneradius); 67 67 } 68 68 break; … … 96 96 for (unsigned int i = 0; i < sorted_jets.size(); i++) { 97 97 JET.SetPxPyPzE(sorted_jets[i].px(),sorted_jets[i].py(),sorted_jets[i].pz(),sorted_jets[i].E()); 98 if(JET.Pt() > JET_pt)98 if(JET.Pt() > PTCUT_jet) 99 99 { 100 100 elementJet = (TRootJet*) branchJet->NewEntry(); … … 102 102 // b-jets 103 103 bool btag=false; 104 if((fabs(JET.Eta()) < MAX_TRACKER&& Btaggedjet(JET, NFCentralQ)))btag=true;104 if((fabs(JET.Eta()) < CEN_max_tracker && Btaggedjet(JET, NFCentralQ)))btag=true; 105 105 elementJet->Btag = btag; 106 106 } … … 116 116 JET.SetPxPyPzE(sorted_jets[i].px(),sorted_jets[i].py(),sorted_jets[i].pz(),sorted_jets[i].E()); 117 117 // Tau jet identification : 1! track and electromagnetic collimation 118 if(fabs(JET.Eta()) < ( MAX_TRACKER - TAU_CONE_TRACKS)) {118 if(fabs(JET.Eta()) < (CEN_max_tracker - TAU_track_scone)) { 119 119 double Energie_tau_central = EnergySmallCone(towers,JET.Eta(),JET.Phi()); 120 120 if( 121 ( Energie_tau_central/JET.E() > TAU_ EM_COLLIMATION) &&122 ( NumTracks(TrackCentral, PT_TRACK_TAU,JET.Eta(),JET.Phi()) == 1 ) &&123 ( JET.Pt() > TAUJET_pt)121 ( Energie_tau_central/JET.E() > TAU_energy_frac ) && 122 ( NumTracks(TrackCentral,TAU_track_pt,JET.Eta(),JET.Phi()) == 1 ) && 123 ( JET.Pt() > PTCUT_taujet) 124 124 ) { 125 125 elementTauJet = (TRootTauJet*) branchTauJet->NewEntry(); -
trunk/src/SmearUtil.cc
r82 r94 29 29 RESOLution::RESOLution() { 30 30 31 MAX_TRACKER = 2.5; // tracker coverage 32 MAX_CALO_CEN = 3.0; // central calorimeter coverage 33 MAX_CALO_FWD = 5.0; // forward calorimeter pseudorapidity coverage 34 MAX_MU = 2.4; // muon chambers pseudorapidity coverage 35 MIN_CALO_VFWD= 5.2; // very forward calorimeter (if any), like CASTOR 36 MAX_CALO_VFWD= 6.6; // very forward calorimeter (if any), like CASTOR 37 MIN_ZDC = 8.3; // zero-degree calorimeter, coverage 38 39 ZDC_S = 140.; // ZDC distance to IP 40 RP220_S = 220; // distance of the RP to the IP, in meters 41 RP220_X = 0.002;// distance of the RP to the beam, in meters 42 FP420_S = 420; // distance of the RP to the IP, in meters 43 FP420_X = 0.004;// distance of the RP to the beam, in meters 44 45 TRACKING_RADIUS = 129; //radius of the BField coverage 46 TRACKING_LENGTH = 300; //length of the BField coverage 47 BFIELD_X = 0.0; 48 BFIELD_Y = 0.0; 49 BFIELD_Z = 3.8; 50 51 ELG_Scen = 0.05; // S term for central ECAL 52 ELG_Ncen = 0.25 ; // N term for central ECAL 53 ELG_Ccen = 0.0055 ; // C term for central ECAL 54 ELG_Cfwd = 0.107 ; // S term for forward ECAL 55 ELG_Sfwd = 2.084 ; // C term for forward ECAL 56 ELG_Nfwd = 0.0 ; // N term for central ECAL 57 58 HAD_Shcal = 1.5 ; // S term for central HCAL // hadronic calorimeter 59 HAD_Nhcal = 0.0 ; // N term for central HCAL 60 HAD_Chcal = 0.05 ; // C term for central HCAL 61 HAD_Shf = 2.7 ; // S term for central HF // forward calorimeter 62 HAD_Nhf = 0.0 ; // N term for central HF 63 HAD_Chf = 0.13 ; // C term for central HF 64 65 MU_SmearPt = 0.01 ; 66 67 ELEC_pt = 10.0; 68 MUON_pt = 10.0; 69 JET_pt = 20.0; 70 GAMMA_pt = 10.0; 71 TAUJET_pt = 10.0; 72 73 74 TAU_CONE_ENERGY = 0.15 ; // Delta R = radius of the cone // for "electromagnetic collimation" 75 TAU_EM_COLLIMATION = 0.95; 76 TAU_CONE_TRACKS= 0.4 ; //Delta R for tracker isolation for tau's 77 PT_TRACK_TAU = 2.0 ; // GeV // 6 GeV ???? 78 79 80 PT_TRACKS_MIN = 0.9 ; // minimal pt needed to reach the calorimeter, in GeV 81 PT_QUARKS_MIN = 2.0 ; // minimal pt needed by quarks to reach the tracker, in GeV (??????) 82 TRACKING_EFF = 90; 83 84 85 TAGGING_B = 40; 86 MISTAGGING_C = 10; 87 MISTAGGING_L = 1; 88 89 //Trigger flag 90 DOTRIGGER = 1; 91 92 CONERADIUS = 0.7; // generic jet radius ; not for tau's !!! 93 JETALGO = 1; // 1 for Cone algorithm, 2 for MidPoint algorithm, 3 for SIScone algorithm, 4 for kt algorithm 94 95 //General jet parameters 96 SEEDTHRESHOLD = 1.0; 97 OVERLAPTHRESHOLD = 0.75; 98 99 // Define Cone algorithm. 100 C_ADJACENCYCUT = 2; 101 C_MAXITERATIONS = 100; 102 C_IRATCH = 1; 103 104 //Define MidPoint algorithm. 105 M_CONEAREAFRACTION = 0.25; 106 M_MAXPAIRSIZE = 2; 107 M_MAXITERATIONS = 100; 108 109 // Define Calorimeter Towers 110 NTOWERS = 40; 111 112 const float tower_eta_edges[41] = { 31 // Detector characteristics 32 CEN_max_tracker = 2.5; // Maximum tracker coverage 33 CEN_max_calo_cen = 3.0; // central calorimeter coverage 34 CEN_max_calo_fwd = 5.0; // forward calorimeter pseudorapidity coverage 35 CEN_max_mu = 2.4; // muon chambers pseudorapidity coverage 36 37 // Energy resolution for electron/photon 38 // \sigma/E = C + N/E + S/\sqrt{E} 39 ELG_Scen = 0.05; // S term for central ECAL 40 ELG_Ncen = 0.25; // N term for central ECAL 41 ELG_Ccen = 0.005; // C term for central ECAL 42 ELG_Cfwd = 0.107; // S term for forward ECAL 43 ELG_Sfwd = 2.084; // C term for forward ECAL 44 ELG_Nfwd = 0.0; // N term for central ECAL 45 46 // Energy resolution for hadrons in ecal/hcal/hf 47 // \sigma/E = C + N/E + S/\sqrt{E} 48 HAD_Shcal = 1.5; // S term for central HCAL // hadronic calorimeter 49 HAD_Nhcal = 0.; // N term for central HCAL 50 HAD_Chcal = 0.05; // C term for central HCAL 51 HAD_Shf = 2.7; // S term for HF // forward calorimeter 52 HAD_Nhf = 0.; // N term for HF 53 HAD_Chf = 0.13; // C term for HF 54 55 // Muon smearing 56 MU_SmearPt = 0.01; 57 58 // Tracking efficiencies 59 TRACK_ptmin = 0.9; // minimal pt needed to reach the calorimeter in GeV 60 TRACK_eff = 100; // efficiency associated to the tracking 61 62 // Calorimetric towers 63 TOWER_number = 40; 64 const float tower_eta_edges[41] = { 113 65 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, 114 66 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, 115 67 4.350, 4.525, 4.700, 5.000}; // temporary object 116 TOWER_ETA_EDGES = new float[NTOWERS+1];117 for(unsigned int i=0; i<NTOWERS+1; i++) TOWER_ETA_EDGES[i] = tower_eta_edges[i];118 119 const float tower_dphi[40] = {120 68 TOWER_eta_edges = new float[TOWER_number+1]; 69 for(unsigned int i=0; i<TOWER_number +1; i++) TOWER_eta_edges[i] = tower_eta_edges[i]; 70 71 const float tower_dphi[40] = { 72 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 121 73 10,10,10,10,10, 10,10,10,10,10, 10,10,10,10,10, 10,10,10,20, 20 }; // temporary object 122 TOWER_DPHI = new float[NTOWERS]; 123 for(unsigned int i=0; i<NTOWERS; i++) TOWER_DPHI[i] = tower_dphi[i]; 124 74 TOWER_dphi = new float[TOWER_number]; 75 for(unsigned int i=0; i<TOWER_number; i++) TOWER_dphi[i] = tower_dphi[i]; 76 77 78 // Thresholds for reconstructed objetcs 79 PTCUT_elec = 10.0; 80 PTCUT_muon = 10.0; 81 PTCUT_jet = 20.0; 82 PTCUT_gamma = 10.0; 83 PTCUT_taujet = 10.0; 84 85 // General jet variable 86 JET_coneradius = 0.7; // generic jet radius ; not for tau's !!! 87 JET_jetalgo = 1; // 1 for Cone algorithm, 2 for MidPoint algorithm, 3 for SIScone algorithm, 4 for kt algorithm 88 JET_seed = 1.0; // minimum seed to start jet reconstruction 89 90 // Tagging definition 91 BTAG_b = 40; 92 BTAG_mistag_c = 10; 93 BTAG_mistag_l = 1; 94 95 // FLAGS 96 FLAG_bfield = 1; //1 to run the bfield propagation else 0 97 FLAG_vfd = 1; //1 to run the very forward detectors else 0 98 FLAG_trigger = 1; //1 to run the trigger selection else 0 99 FLAG_frog = 1; //1 to run the FROG event display 100 101 // In case BField propagation allowed 102 TRACK_radius = 129; //radius of the BField coverage 103 TRACK_length = 300; //length of the BField coverage 104 TRACK_bfield_x = 0; //X composant of the BField 105 TRACK_bfield_y = 0; //Y composant of the BField 106 TRACK_bfield_z = 3.8; //Z composant of the BField 107 108 // In case Very forward detectors allowed 109 VFD_min_calo_vfd = 5.2; // very forward calorimeter (if any) like CASTOR 110 VFD_max_calo_vfd = 6.6; 111 VFD_min_zdc = 8.3; 112 VFD_s_zdc = 140; // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m] 113 114 RP_220_s = 220; // distance of the RP to the IP, in meters 115 RP_220_x = 0.002; // distance of the RP to the beam, in meters 116 RP_420_s = 420; // distance of the RP to the IP, in meters 117 RP_420_x = 0.004; // distance of the RP to the beam, in meters 118 119 // In case FROG event display allowed 120 NEvents_Frog = 10; 121 122 //******************************************** 123 //jet stuffs not defined in the input datacard 124 //******************************************** 125 126 JET_overlap = 0.75; 127 // MidPoint algorithm definition 128 JET_M_coneareafraction = 0.25; 129 JET_M_maxpairsize = 2; 130 JET_M_maxiterations = 100; 131 // Define Cone algorithm. 132 JET_C_adjacencycut = 2; 133 JET_C_maxiterations = 100; 134 JET_C_iratch = 1; 135 //Define SISCone algorithm. 136 JET_S_npass = 0; 137 JET_S_protojet_ptmin= 0.0; 138 139 //For Tau-jet definition 140 TAU_energy_scone = 0.15; // radius R of the cone for tau definition, based on energy threshold 141 TAU_track_scone = 0.4; // radius R of the cone for tau definition, based on track number 142 TAU_track_pt = 2; // minimal pt [GeV] for tracks to be considered in tau definition 143 TAU_energy_frac = 0.95; // fraction of energy required in the central part of the cone, for tau jets 144 145 PT_QUARKS_MIN = 2.0 ; // minimal pt needed by quarks to do b-tag 146 125 147 } 126 148 … … 133 155 ifstream fichier_a_lire(datacard.c_str()); 134 156 if(!fichier_a_lire.good()) { 135 136 137 } 138 157 cout << datacard << "Datadard " << datacard << " not found, use default values" << endl; 158 return; 159 } 160 139 161 while (getline(fichier_a_lire,temp_string)) { 140 162 curstring.clear(); // needed when using several times istringstream::str(string) … … 144 166 145 167 if(strstr(temp_string.c_str(),"#")) { } 146 else if(strstr(temp_string.c_str(),"MAX_TRACKER")){curstring >> varname >> value; MAX_TRACKER = value;} 147 else if(strstr(temp_string.c_str(),"MAX_CALO_CEN")){curstring >> varname >> value; MAX_CALO_CEN = value;} 148 else if(strstr(temp_string.c_str(),"MAX_CALO_FWD")){curstring >> varname >> value; MAX_CALO_FWD = value;} 149 else if(strstr(temp_string.c_str(),"MAX_MU")){curstring >> varname >> value; MAX_MU = value;} 150 else if(strstr(temp_string.c_str(),"TRACKING_RADIUS")){curstring >> varname >> ivalue; TRACKING_RADIUS = ivalue;} 151 else if(strstr(temp_string.c_str(),"TRACKING_LENGTH")){curstring >> varname >> ivalue; TRACKING_LENGTH = ivalue;} 152 else if(strstr(temp_string.c_str(),"BFIELD_X")){curstring >> varname >> value; BFIELD_X = value;} 153 else if(strstr(temp_string.c_str(),"BFIELD_Y")){curstring >> varname >> value; BFIELD_Y = value;} 154 else if(strstr(temp_string.c_str(),"BFIELD_Z")){curstring >> varname >> value; BFIELD_Z = value;} 155 else if(strstr(temp_string.c_str(),"ELG_Scen")){curstring >> varname >> value; ELG_Scen = value;} 156 else if(strstr(temp_string.c_str(),"ELG_Ncen")){curstring >> varname >> value; ELG_Ncen = value;} 157 else if(strstr(temp_string.c_str(),"ELG_Ccen")){curstring >> varname >> value; ELG_Ccen = value;} 158 else if(strstr(temp_string.c_str(),"ELG_Sfwd")){curstring >> varname >> value; ELG_Sfwd = value;} 159 else if(strstr(temp_string.c_str(),"ELG_Cfwd")){curstring >> varname >> value; ELG_Cfwd = value;} 160 else if(strstr(temp_string.c_str(),"ELG_Nfwd")){curstring >> varname >> value; ELG_Nfwd = value;} 161 else if(strstr(temp_string.c_str(),"HAD_Shcal")){curstring >> varname >> value; HAD_Shcal = value;} 162 else if(strstr(temp_string.c_str(),"HAD_Nhcal")){curstring >> varname >> value; HAD_Nhcal = value;} 163 else if(strstr(temp_string.c_str(),"HAD_Chcal")){curstring >> varname >> value; HAD_Chcal = value;} 164 else if(strstr(temp_string.c_str(),"HAD_Shf")){curstring >> varname >> value; HAD_Shf = value;} 165 else if(strstr(temp_string.c_str(),"HAD_Nhf")){curstring >> varname >> value; HAD_Nhf = value;} 166 else if(strstr(temp_string.c_str(),"HAD_Chf")){curstring >> varname >> value; HAD_Chf = value;} 167 else if(strstr(temp_string.c_str(),"MU_SmearPt")){curstring >> varname >> value; MU_SmearPt = value;} 168 else if(strstr(temp_string.c_str(),"TAU_CONE_ENERGY")){curstring >> varname >> value; TAU_CONE_ENERGY = value;} 169 else if(strstr(temp_string.c_str(),"TAU_CONE_TRACKS")){curstring >> varname >> value; TAU_CONE_TRACKS = value;} 170 else if(strstr(temp_string.c_str(),"PT_TRACK_TAU")){curstring >> varname >> value; PT_TRACK_TAU = value;} 171 else if(strstr(temp_string.c_str(),"PT_TRACKS_MIN")){curstring >> varname >> value; PT_TRACKS_MIN = value;} 172 else if(strstr(temp_string.c_str(),"TAGGING_B")){curstring >> varname >> ivalue; TAGGING_B = ivalue;} 173 else if(strstr(temp_string.c_str(),"MISTAGGING_C")){curstring >> varname >> ivalue; MISTAGGING_C = ivalue;} 174 else if(strstr(temp_string.c_str(),"MISTAGGING_L")){curstring >> varname >> ivalue; MISTAGGING_L = ivalue;} 175 else if(strstr(temp_string.c_str(),"CONERADIUS")){curstring >> varname >> value; CONERADIUS = value;} 176 else if(strstr(temp_string.c_str(),"JETALGO")){curstring >> varname >> ivalue; JETALGO = ivalue;} 177 else if(strstr(temp_string.c_str(),"TRACKING_EFF")){curstring >> varname >> ivalue; TRACKING_EFF = ivalue;} 178 else if(strstr(temp_string.c_str(),"ELEC_pt")){curstring >> varname >> value; ELEC_pt = value;} 179 else if(strstr(temp_string.c_str(),"MUON_pt")){curstring >> varname >> value; MUON_pt = value;} 180 else if(strstr(temp_string.c_str(),"JET_pt")){curstring >> varname >> value; JET_pt = value;} 181 else if(strstr(temp_string.c_str(),"GAMMA_pt")){curstring >> varname >> value; GAMMA_pt = value;} 182 else if(strstr(temp_string.c_str(),"TAUJET_pt")){curstring >> varname >> value; TAUJET_pt = value;} 183 else if(strstr(temp_string.c_str(),"NTOWERS")){curstring >> varname >> ivalue; NTOWERS = ivalue;} 184 else if(strstr(temp_string.c_str(),"DOTRIGGER")){curstring >> varname >> ivalue; DOTRIGGER = ivalue;} 185 else if(strstr(temp_string.c_str(),"TOWER_ETA_EDGES")){ 186 curstring >> varname; for(unsigned int i=0; i<NTOWERS+1; i++) {curstring >> value; TOWER_ETA_EDGES[i] = value;} } 187 else if(strstr(temp_string.c_str(),"TOWER_DPHI")){ 188 curstring >> varname; for(unsigned int i=0; i<NTOWERS; i++) {curstring >> value; TOWER_DPHI[i] = value;} } 189 190 191 } 192 193 // General jet variables 194 SEEDTHRESHOLD = 1.0; 195 OVERLAPTHRESHOLD = 0.75; 196 197 // Define Cone algorithm. 198 C_ADJACENCYCUT = 2; 199 C_MAXITERATIONS = 100; 200 C_IRATCH = 1; 201 202 //Define MidPoint algorithm. 203 M_CONEAREAFRACTION = 0.25; 204 M_MAXPAIRSIZE = 2; 205 M_MAXITERATIONS = 100; 206 207 //Define SISCone algorithm. 208 NPASS = 0; 209 PROTOJET_PTMIN = 0.0; 210 211 168 else if(strstr(temp_string.c_str(),"CEN_max_tracker")) {curstring >> varname >> value; CEN_max_tracker = value;} 169 else if(strstr(temp_string.c_str(),"CEN_max_calo_cen")) {curstring >> varname >> value; CEN_max_calo_cen = value;} 170 else if(strstr(temp_string.c_str(),"CEN_max_calo_fwd")) {curstring >> varname >> value; CEN_max_calo_fwd = value;} 171 else if(strstr(temp_string.c_str(),"CEN_max_mu")) {curstring >> varname >> value; CEN_max_mu = value;} 172 173 else if(strstr(temp_string.c_str(),"VFD_min_calo_vfd")) {curstring >> varname >> value; VFD_min_calo_vfd = value;} 174 else if(strstr(temp_string.c_str(),"VFD_max_calo_vfd")) {curstring >> varname >> value; VFD_max_calo_vfd = value;} 175 else if(strstr(temp_string.c_str(),"VFD_min_zdc")) {curstring >> varname >> value; VFD_min_zdc = value;} 176 else if(strstr(temp_string.c_str(),"VFD_s_zdc")) {curstring >> varname >> value; VFD_s_zdc = value;} 177 178 else if(strstr(temp_string.c_str(),"RP_220_s")) {curstring >> varname >> value; RP_220_s = value;} 179 else if(strstr(temp_string.c_str(),"RP_220_x")) {curstring >> varname >> value; RP_220_x = value;} 180 else if(strstr(temp_string.c_str(),"RP_420_s")) {curstring >> varname >> value; RP_420_s = value;} 181 else if(strstr(temp_string.c_str(),"RP_420_x")) {curstring >> varname >> value; RP_420_x = value;} 182 183 else if(strstr(temp_string.c_str(),"ELG_Scen")) {curstring >> varname >> value; ELG_Scen = value;} 184 else if(strstr(temp_string.c_str(),"ELG_Ncen")) {curstring >> varname >> value; ELG_Ncen = value;} 185 else if(strstr(temp_string.c_str(),"ELG_Ccen")) {curstring >> varname >> value; ELG_Ccen = value;} 186 else if(strstr(temp_string.c_str(),"ELG_Sfwd")) {curstring >> varname >> value; ELG_Sfwd = value;} 187 else if(strstr(temp_string.c_str(),"ELG_Cfwd")) {curstring >> varname >> value; ELG_Cfwd = value;} 188 else if(strstr(temp_string.c_str(),"ELG_Nfwd")) {curstring >> varname >> value; ELG_Nfwd = value;} 189 else if(strstr(temp_string.c_str(),"HAD_Shcal")) {curstring >> varname >> value; HAD_Shcal = value;} 190 else if(strstr(temp_string.c_str(),"HAD_Nhcal")) {curstring >> varname >> value; HAD_Nhcal = value;} 191 else if(strstr(temp_string.c_str(),"HAD_Chcal")) {curstring >> varname >> value; HAD_Chcal = value;} 192 else if(strstr(temp_string.c_str(),"HAD_Shf")) {curstring >> varname >> value; HAD_Shf = value;} 193 else if(strstr(temp_string.c_str(),"HAD_Nhf")) {curstring >> varname >> value; HAD_Nhf = value;} 194 else if(strstr(temp_string.c_str(),"HAD_Chf")) {curstring >> varname >> value; HAD_Chf = value;} 195 else if(strstr(temp_string.c_str(),"MU_SmearPt")) {curstring >> varname >> value; MU_SmearPt = value;} 196 197 else if(strstr(temp_string.c_str(),"TRACK_radius")) {curstring >> varname >> ivalue;TRACK_radius = ivalue;} 198 else if(strstr(temp_string.c_str(),"TRACK_length")) {curstring >> varname >> ivalue;TRACK_length = ivalue;} 199 else if(strstr(temp_string.c_str(),"TRACK_bfield_x")) {curstring >> varname >> value; TRACK_bfield_x = value;} 200 else if(strstr(temp_string.c_str(),"TRACK_bfield_y")) {curstring >> varname >> value; TRACK_bfield_y = value;} 201 else if(strstr(temp_string.c_str(),"TRACK_bfield_z")) {curstring >> varname >> value; TRACK_bfield_z = value;} 202 else if(strstr(temp_string.c_str(),"FLAG_bfield")) {curstring >> varname >> ivalue; FLAG_bfield = ivalue;} 203 else if(strstr(temp_string.c_str(),"TRACK_ptmin")) {curstring >> varname >> value; TRACK_ptmin = value;} 204 else if(strstr(temp_string.c_str(),"TRACK_eff")) {curstring >> varname >> ivalue;TRACK_eff = ivalue;} 205 206 else if(strstr(temp_string.c_str(),"TOWER_number")) {curstring >> varname >> ivalue;TOWER_number = ivalue;} 207 else if(strstr(temp_string.c_str(),"TOWER_eta_edges")){ 208 curstring >> varname; for(unsigned int i=0; i<TOWER_number+1; i++) {curstring >> value; TOWER_eta_edges[i] = value;} } 209 else if(strstr(temp_string.c_str(),"TOWER_dphi")){ 210 curstring >> varname; for(unsigned int i=0; i<TOWER_number; i++) {curstring >> value; TOWER_dphi[i] = value;} } 211 212 else if(strstr(temp_string.c_str(),"PTCUT_elec")) {curstring >> varname >> value; PTCUT_elec = value;} 213 else if(strstr(temp_string.c_str(),"PTCUT_muon")) {curstring >> varname >> value; PTCUT_muon = value;} 214 else if(strstr(temp_string.c_str(),"PTCUT_jet")) {curstring >> varname >> value; PTCUT_jet = value;} 215 else if(strstr(temp_string.c_str(),"PTCUT_gamma")) {curstring >> varname >> value; PTCUT_gamma = value;} 216 else if(strstr(temp_string.c_str(),"PTCUT_taujet")) {curstring >> varname >> value; PTCUT_taujet = value;} 217 218 else if(strstr(temp_string.c_str(),"JET_coneradius")) {curstring >> varname >> value; JET_coneradius = value;} 219 else if(strstr(temp_string.c_str(),"JET_jetalgo")) {curstring >> varname >> ivalue;JET_jetalgo = ivalue;} 220 else if(strstr(temp_string.c_str(),"JET_seed")) {curstring >> varname >> value; JET_seed = value;} 221 222 else if(strstr(temp_string.c_str(),"BTAG_b")) {curstring >> varname >> ivalue;BTAG_b = ivalue;} 223 else if(strstr(temp_string.c_str(),"BTAG_mistag_c")) {curstring >> varname >> ivalue;BTAG_mistag_c = ivalue;} 224 else if(strstr(temp_string.c_str(),"BTAG_mistag_l")) {curstring >> varname >> ivalue;BTAG_mistag_l = ivalue;} 225 226 else if(strstr(temp_string.c_str(),"FLAG_vfd")) {curstring >> varname >> ivalue; FLAG_vfd = ivalue;} 227 else if(strstr(temp_string.c_str(),"FLAG_trigger")) {curstring >> varname >> ivalue; FLAG_trigger = ivalue;} 228 else if(strstr(temp_string.c_str(),"FLAG_frog")) {curstring >> varname >> ivalue; FLAG_frog = ivalue;} 229 else if(strstr(temp_string.c_str(),"NEvents_Frog")) {curstring >> varname >> ivalue; NEvents_Frog = ivalue;} 230 } 231 232 //jet stuffs not defined in the input datacard 233 JET_overlap = 0.75; 234 // MidPoint algorithm definition 235 JET_M_coneareafraction = 0.25; 236 JET_M_maxpairsize = 2; 237 JET_M_maxiterations = 100; 238 // Define Cone algorithm. 239 JET_C_adjacencycut = 2; 240 JET_C_maxiterations = 100; 241 JET_C_iratch = 1; 242 //Define SISCone algorithm. 243 JET_S_npass = 0; 244 JET_S_protojet_ptmin= 0.0; 245 246 //For Tau-jet definition 247 TAU_energy_scone = 0.15; // radius R of the cone for tau definition, based on energy threshold 248 TAU_track_scone = 0.4; // radius R of the cone for tau definition, based on track number 249 TAU_track_pt = 2; // minimal pt [GeV] for tracks to be considered in tau definition 250 TAU_energy_frac = 0.95; // fraction of energy required in the central part of the cone, for tau jets 251 212 252 } 213 253 214 254 void RESOLution::Logfile(string LogName) { 215 //void RESOLution::Logfile(string outputfilename) {216 255 //void RESOLution::Logfile(string outputfilename) { 256 217 257 ofstream f_out(LogName.c_str()); 218 258 … … 251 291 f_out<<"* *"<<"\n"; 252 292 f_out << left << setw(30) <<"* Maximum tracking system: "<<"" 253 << left << setw(10) << MAX_TRACKER<<""<< right << setw(15)<<"*"<<"\n";293 << left << setw(10) <<CEN_max_tracker <<""<< right << setw(15)<<"*"<<"\n"; 254 294 f_out << left << setw(30) <<"* Maximum central calorimeter: "<<"" 255 << left << setw(10) << MAX_CALO_CEN<<""<< right << setw(15)<<"*"<<"\n";295 << left << setw(10) <<CEN_max_calo_cen <<""<< right << setw(15)<<"*"<<"\n"; 256 296 f_out << left << setw(30) <<"* Maximum forward calorimeter: "<<"" 257 << left << setw(10) << MAX_CALO_FWD<<""<< right << setw(15)<<"*"<<"\n";297 << left << setw(10) <<CEN_max_calo_fwd <<""<< right << setw(15)<<"*"<<"\n"; 258 298 f_out << left << setw(30) <<"* Muon chambers coverage: "<<"" 259 << left << setw(10) <<MAX_MU <<""<< right << setw(15)<<"*"<<"\n"; 260 f_out<<"* *"<<"\n"; 261 f_out<<"#************************************* *"<<"\n"; 262 f_out<<"# Very forward detector caracteristics *"<<"\n"; 263 f_out<<"#************************************* *"<<"\n"; 264 f_out<<"* *"<<"\n"; 265 f_out << left << setw(55) <<"* Minimum very forward calorimeter: "<<"" 266 << left << setw(5) <<MIN_CALO_VFWD <<""<< right << setw(10)<<"*"<<"\n"; 267 f_out << left << setw(55) <<"* Maximum very forward calorimeter: "<<"" 268 << left << setw(5) <<MAX_CALO_VFWD <<""<< right << setw(10)<<"*"<<"\n"; 269 f_out << left << setw(55) <<"* Distance of the ZDC to the IP, in meters: "<<"" 270 << left << setw(5) <<ZDC_S <<""<< right << setw(10)<<"*"<<"\n"; 271 f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters: "<<"" 272 << left << setw(5) <<RP220_S <<""<< right << setw(10)<<"*"<<"\n"; 273 f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<"" 274 << left << setw(5) <<RP220_X <<""<< right << setw(10)<<"*"<<"\n"; 275 f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters: "<<"" 276 << left << setw(5) <<FP420_S <<""<< right << setw(10)<<"*"<<"\n"; 277 f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<"" 278 << left << setw(5) <<FP420_X <<""<< right << setw(10)<<"*"<<"\n"; 279 f_out<<"* *"<<"\n"; 280 f_out<<"#*********************************** *"<<"\n"; 281 f_out<<"# Magnetic field needed informations *"<<"\n"; 282 f_out<<"#*********************************** *"<<"\n"; 283 f_out<<"* *"<<"\n"; 284 f_out << left << setw(55) <<"* Radius of the BField coverage: "<<"" 285 << left << setw(5) <<TRACKING_RADIUS <<""<< right << setw(10)<<"*"<<"\n"; 286 f_out << left << setw(55) <<"* Length of the BField coverage: "<<"" 287 << left << setw(5) <<TRACKING_LENGTH <<""<< right << setw(10)<<"*"<<"\n"; 288 f_out << left << setw(55) <<"* BField X component: "<<"" 289 << left << setw(5) <<BFIELD_X <<""<< right << setw(10)<<"*"<<"\n"; 290 f_out << left << setw(55) <<"* BField Y component: "<<"" 291 << left << setw(5) <<BFIELD_Y <<""<< right << setw(10)<<"*"<<"\n"; 292 f_out << left << setw(55) <<"* BField Z component: "<<"" 293 << left << setw(5) <<BFIELD_Z <<""<< right << setw(10)<<"*"<<"\n"; 294 f_out<<"* *"<<"\n"; 295 296 297 f_out<<"* *"<<"\n"; 298 f_out<<"#******************** *"<<"\n"; 299 f_out<<"# Calorimetric Towers *"<<"\n"; 300 f_out<<"#******************** *"<<"\n"; 301 f_out << left << setw(55) <<"* Number of calorimetric towers in eta, for eta>0: "<<"" 302 << left << setw(5) << NTOWERS <<""<< right << setw(10)<<"*"<<"\n"; 303 f_out << left << setw(55) <<"* Tower edges in eta, for eta>0: "<<"" << right << setw(15)<<"*"<<"\n"; 304 f_out << "* "; 305 for (unsigned int i=0; i<NTOWERS+1; i++) { 306 f_out << left << setw(7) << TOWER_ETA_EDGES[i]; 307 if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* "; 308 } 309 for (unsigned int i=(NTOWERS+1)%9; i<9; i++) f_out << left << setw(7) << ""; 310 f_out << right << setw(3)<<"*"<<"\n"; 311 f_out << left << setw(55) <<"* Tower sizes in phi, for eta>0 [degree]:"<<"" << right << setw(15)<<"*"<<"\n"; 312 f_out << "* "; 313 for (unsigned int i=0; i<NTOWERS; i++) { 314 f_out << left << setw(7) << TOWER_DPHI[i]; 315 if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* "; 316 } 317 for (unsigned int i=(NTOWERS)%9; i<9; i++) f_out << left << setw(7) << ""; 318 f_out << right << setw(3)<<"*"<<"\n"; 319 f_out<<"* *"<<"\n"; 320 299 << left << setw(10) <<CEN_max_mu <<""<< right << setw(15)<<"*"<<"\n"; 300 f_out<<"* *"<<"\n"; 301 if(FLAG_vfd==1){ 302 f_out<<"#********************************** *"<<"\n"; 303 f_out<<"# Very forward detector switches on *"<<"\n"; 304 f_out<<"#********************************** *"<<"\n"; 305 f_out<<"* *"<<"\n"; 306 f_out << left << setw(55) <<"* Minimum very forward calorimeter: "<<"" 307 << left << setw(5) <<VFD_min_calo_vfd <<""<< right << setw(10)<<"*"<<"\n"; 308 f_out << left << setw(55) <<"* Maximum very forward calorimeter: "<<"" 309 << left << setw(5) <<VFD_max_calo_vfd <<""<< right << setw(10)<<"*"<<"\n"; 310 f_out << left << setw(55) <<"* Minimum coverage zero_degree calorimeter "<<"" 311 << left << setw(5) <<VFD_min_zdc <<""<< right << setw(10)<<"*"<<"\n"; 312 f_out << left << setw(55) <<"* Distance of the ZDC to the IP, in meters: "<<"" 313 << left << setw(5) <<VFD_s_zdc <<""<< right << setw(10)<<"*"<<"\n"; 314 f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters: "<<"" 315 << left << setw(5) <<RP_220_s <<""<< right << setw(10)<<"*"<<"\n"; 316 f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<"" 317 << left << setw(5) <<RP_220_x <<""<< right << setw(10)<<"*"<<"\n"; 318 f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters: "<<"" 319 << left << setw(5) <<RP_420_s <<""<< right << setw(10)<<"*"<<"\n"; 320 f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<"" 321 << left << setw(5) <<RP_420_x <<""<< right << setw(10)<<"*"<<"\n"; 322 f_out<<"* *"<<"\n"; 323 } 324 else { 325 f_out<<"#*********************************** *"<<"\n"; 326 f_out<<"# Very forward detector switches off *"<<"\n"; 327 f_out<<"#*********************************** *"<<"\n"; 328 f_out<<"* *"<<"\n"; 329 } 321 330 f_out<<"#************************************ *"<<"\n"; 322 331 f_out<<"# Electromagnetic smearing parameters *"<<"\n"; … … 354 363 << left << setw(30) <<HAD_Chf <<""<< right << setw(10)<<"*"<<"\n"; 355 364 f_out<<"* *"<<"\n"; 356 f_out<<"#*************************** *"<<"\n";357 f_out<<"# Tracking system acceptance *"<<"\n";358 f_out<<"#*************************** *"<<"\n";359 f_out<<"* *"<<"\n";360 f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""361 << left << setw(10) <<PT_TRACKS_MIN <<""<< right << setw(5)<<"*"<<"\n";362 f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<""363 << left << setw(10) <<TRACKING_EFF <<""<< right << setw(5)<<"*"<<"\n";364 f_out<<"* *"<<"\n";365 365 f_out<<"#************************* *"<<"\n"; 366 366 f_out<<"# Muon smearing parameters *"<<"\n"; 367 367 f_out<<"#************************* *"<<"\n"; 368 368 f_out<<"* *"<<"\n"; 369 //MU_SmearPt 0.01 370 f_out<<"* *"<<"\n"; 371 f_out<<"#****************************** *"<<"\n"; 372 f_out<<"# Tau-jet definition parameters *"<<"\n"; 373 f_out<<"#****************************** *"<<"\n"; 374 f_out<<"* *"<<"\n"; 375 f_out << left << setw(45) <<"* Cone radius for calorimeter tagging: "<<"" 376 << left << setw(5) <<TAU_CONE_ENERGY <<""<< right << setw(20)<<"*"<<"\n"; 377 f_out << left << setw(45) <<"* Fraction of energy in the small cone: "<<"" 378 << left << setw(5) <<TAU_EM_COLLIMATION*100 <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 379 f_out << left << setw(45) <<"* Cone radius for tracking tagging: "<<"" 380 << left << setw(5) <<TAU_CONE_TRACKS <<""<< right << setw(20)<<"*"<<"\n"; 381 f_out << left << setw(45) <<"* Minimum track pT [GeV]: "<<"" 382 << left << setw(5) <<PT_TRACK_TAU <<""<< right << setw(20)<<"*"<<"\n"; 369 f_out << left << setw(55) <<"* PT resolution for muons : "<<"" 370 << left << setw(5) <<MU_SmearPt <<""<< right << setw(10)<<"*"<<"\n"; 371 f_out<<"* *"<<"\n"; 372 if(FLAG_bfield==1){ 373 f_out<<"#*************************** *"<<"\n"; 374 f_out<<"# Magnetic field switches on *"<<"\n"; 375 f_out<<"#*************************** *"<<"\n"; 376 f_out<<"* *"<<"\n"; 377 f_out << left << setw(55) <<"* Radius of the BField coverage: "<<"" 378 << left << setw(5) <<TRACK_radius <<""<< right << setw(10)<<"*"<<"\n"; 379 f_out << left << setw(55) <<"* Length of the BField coverage: "<<"" 380 << left << setw(5) <<TRACK_length <<""<< right << setw(10)<<"*"<<"\n"; 381 f_out << left << setw(55) <<"* BField X component: "<<"" 382 << left << setw(5) <<TRACK_bfield_x <<""<< right << setw(10)<<"*"<<"\n"; 383 f_out << left << setw(55) <<"* BField Y component: "<<"" 384 << left << setw(5) <<TRACK_bfield_y <<""<< right << setw(10)<<"*"<<"\n"; 385 f_out << left << setw(55) <<"* BField Z component: "<<"" 386 << left << setw(5) <<TRACK_bfield_z <<""<< right << setw(10)<<"*"<<"\n"; 387 f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<"" 388 << left << setw(10) <<TRACK_ptmin <<""<< right << setw(5)<<"*"<<"\n"; 389 f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<"" 390 << left << setw(10) <<TRACK_eff <<""<< right << setw(5)<<"*"<<"\n"; 391 f_out<<"* *"<<"\n"; 392 } 393 else { 394 f_out<<"#**************************** *"<<"\n"; 395 f_out<<"# Magnetic field switches off *"<<"\n"; 396 f_out<<"#**************************** *"<<"\n"; 397 f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<"" 398 << left << setw(10) <<TRACK_ptmin <<""<< right << setw(5)<<"*"<<"\n"; 399 f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<"" 400 << left << setw(10) <<TRACK_eff <<""<< right << setw(5)<<"*"<<"\n"; 401 f_out<<"* *"<<"\n"; 402 } 403 f_out<<"#******************** *"<<"\n"; 404 f_out<<"# Calorimetric Towers *"<<"\n"; 405 f_out<<"#******************** *"<<"\n"; 406 f_out << left << setw(55) <<"* Number of calorimetric towers in eta, for eta>0: "<<"" 407 << left << setw(5) << TOWER_number <<""<< right << setw(10)<<"*"<<"\n"; 408 f_out << left << setw(55) <<"* Tower edges in eta, for eta>0: "<<"" << right << setw(15)<<"*"<<"\n"; 409 f_out << "* "; 410 for (unsigned int i=0; i<TOWER_number+1; i++) { 411 f_out << left << setw(7) << TOWER_eta_edges[i]; 412 if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* "; 413 } 414 for (unsigned int i=(TOWER_number+1)%9; i<9; i++) f_out << left << setw(7) << ""; 415 f_out << right << setw(3)<<"*"<<"\n"; 416 f_out << left << setw(55) <<"* Tower sizes in phi, for eta>0 [degree]:"<<"" << right << setw(15)<<"*"<<"\n"; 417 f_out << "* "; 418 for (unsigned int i=0; i<TOWER_number; i++) { 419 f_out << left << setw(7) << TOWER_dphi[i]; 420 if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "* "; 421 } 422 for (unsigned int i=(TOWER_number)%9; i<9; i++) f_out << left << setw(7) << ""; 423 f_out << right << setw(3)<<"*"<<"\n"; 383 424 f_out<<"* *"<<"\n"; 384 425 f_out<<"#******************* *"<<"\n"; … … 387 428 f_out<<"* *"<<"\n"; 388 429 f_out << left << setw(40) <<"* Minimum pT for electrons: "<<"" 389 << left << setw(20) << ELEC_pt<<""<< right << setw(10)<<"*"<<"\n";430 << left << setw(20) <<PTCUT_elec <<""<< right << setw(10)<<"*"<<"\n"; 390 431 f_out << left << setw(40) <<"* Minimum pT for muons: "<<"" 391 << left << setw(20) << MUON_pt<<""<< right << setw(10)<<"*"<<"\n";432 << left << setw(20) <<PTCUT_muon <<""<< right << setw(10)<<"*"<<"\n"; 392 433 f_out << left << setw(40) <<"* Minimum pT for jets: "<<"" 393 << left << setw(20) << JET_pt<<""<< right << setw(10)<<"*"<<"\n";434 << left << setw(20) <<PTCUT_jet <<""<< right << setw(10)<<"*"<<"\n"; 394 435 f_out << left << setw(40) <<"* Minimum pT for Tau-jets: "<<"" 395 << left << setw(20) << TAUJET_pt<<""<< right << setw(10)<<"*"<<"\n";436 << left << setw(20) <<PTCUT_taujet <<""<< right << setw(10)<<"*"<<"\n"; 396 437 f_out << left << setw(40) <<"* Minimum pT for photons: "<<"" 397 << left << setw(20) <<GAMMA_pt <<""<< right << setw(10)<<"*"<<"\n"; 398 f_out<<"* *"<<"\n"; 399 f_out<<"#*************************** *"<<"\n"; 400 f_out<<"# B-tagging efficiencies [%] *"<<"\n"; 401 f_out<<"#*************************** *"<<"\n"; 402 f_out<<"* *"<<"\n"; 403 f_out << left << setw(50) <<"* Efficiency to tag a \"b\" as a b-jet: "<<"" 404 << left << setw(10) <<TAGGING_B <<""<< right << setw(10)<<"*"<<"\n"; 405 f_out << left << setw(50) <<"* Efficiency to mistag a c-jet as a b-jet: "<<"" 406 << left << setw(10) <<MISTAGGING_C <<""<< right << setw(10)<<"*"<<"\n"; 407 f_out << left << setw(50) <<"* Efficiency to mistag a light jet as a b-jet: "<<"" 408 << left << setw(10) <<MISTAGGING_L <<""<< right << setw(10)<<"*"<<"\n"; 438 << left << setw(20) <<PTCUT_gamma <<""<< right << setw(10)<<"*"<<"\n"; 409 439 f_out<<"* *"<<"\n"; 410 440 f_out<<"#*************** *"<<"\n"; … … 421 451 f_out<<"* *"<<"\n"; 422 452 f_out<<"* You have chosen *"<<"\n"; 423 switch(JET ALGO) {453 switch(JET_jetalgo) { 424 454 default: 425 455 case 1: { 426 f_out<<"* CDF JetClu jet algorithm with parameters: *"<<"\n";427 f_out << left << setw(40) <<"* - Seed threshold: "<<""428 << left << setw(10) <<SEEDTHRESHOLD<<""<< right << setw(20)<<"! not in datacard *"<<"\n";429 f_out << left << setw(40) <<"* - Cone radius: "<<""430 << left << setw(10) <<CONERADIUS<<""<< right << setw(20)<<"*"<<"\n";431 f_out << left << setw(40) <<"* - Adjacency cut: "<<""432 << left << setw(10) <<C_ADJACENCYCUT<<""<< right << setw(20)<<"! not in datacard *"<<"\n";433 f_out << left << setw(40) <<"* - Max iterations: "<<""434 << left << setw(10) <<C_MAXITERATIONS<<""<< right << setw(20)<<"! not in datacard *"<<"\n";435 f_out << left << setw(40) <<"* - Iratch: "<<""436 << left << setw(10) <<C_IRATCH<<""<< right << setw(20)<<"! not in datacard *"<<"\n";437 f_out << left << setw(40) <<"* - Overlap threshold: "<<""438 << left << setw(10) <<OVERLAPTHRESHOLD<<""<< right << setw(20)<<"! not in datacard *"<<"\n";456 f_out<<"* CDF JetClu jet algorithm with parameters: *"<<"\n"; 457 f_out << left << setw(40) <<"* - Seed threshold: "<<"" 458 << left << setw(10) <<JET_seed <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 459 f_out << left << setw(40) <<"* - Cone radius: "<<"" 460 << left << setw(10) <<JET_coneradius <<""<< right << setw(20)<<"*"<<"\n"; 461 f_out << left << setw(40) <<"* - Adjacency cut: "<<"" 462 << left << setw(10) <<JET_C_adjacencycut <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 463 f_out << left << setw(40) <<"* - Max iterations: "<<"" 464 << left << setw(10) <<JET_C_maxiterations <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 465 f_out << left << setw(40) <<"* - Iratch: "<<"" 466 << left << setw(10) <<JET_C_iratch <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 467 f_out << left << setw(40) <<"* - Overlap threshold: "<<"" 468 << left << setw(10) <<JET_overlap <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 439 469 } 440 470 break; 441 471 case 2: { 442 f_out<<"* CDF midpoint jet algorithm with parameters: *"<<"\n";443 f_out << left << setw(40) <<"* - Seed threshold: "<<""444 << left << setw(20) <<SEEDTHRESHOLD<<""<< right << setw(10)<<"! not in datacard *"<<"\n";445 f_out << left << setw(40) <<"* - Cone radius: "<<""446 << left << setw(20) <<CONERADIUS<<""<< right << setw(10)<<"*"<<"\n";447 f_out << left << setw(40) <<"* - Cone area fraction:"<<""448 << left << setw(20) <<M_CONEAREAFRACTION<<""<< right << setw(10)<<"! not in datacard *"<<"\n";449 f_out << left << setw(40) <<"* - Maximum pair size: "<<""450 << left << setw(20) <<M_MAXPAIRSIZE<<""<< right << setw(10)<<"! not in datacard *"<<"\n";451 f_out << left << setw(40) <<"* - Max iterations: "<<""452 << left << setw(20) <<M_MAXITERATIONS<<""<< right << setw(10)<<"! not in datacard *"<<"\n";453 f_out << left << setw(40) <<"* - Overlap threshold: "<<""454 << left << setw(20) <<OVERLAPTHRESHOLD<<""<< right << setw(10)<<"! not in datacard *"<<"\n";472 f_out<<"* CDF midpoint jet algorithm with parameters: *"<<"\n"; 473 f_out << left << setw(40) <<"* - Seed threshold: "<<"" 474 << left << setw(20) <<JET_seed <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 475 f_out << left << setw(40) <<"* - Cone radius: "<<"" 476 << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n"; 477 f_out << left << setw(40) <<"* - Cone area fraction:"<<"" 478 << left << setw(20) <<JET_M_coneareafraction <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 479 f_out << left << setw(40) <<"* - Maximum pair size: "<<"" 480 << left << setw(20) <<JET_M_maxpairsize <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 481 f_out << left << setw(40) <<"* - Max iterations: "<<"" 482 << left << setw(20) <<JET_M_maxiterations <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 483 f_out << left << setw(40) <<"* - Overlap threshold: "<<"" 484 << left << setw(20) <<JET_overlap <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 455 485 } 456 486 break; 457 487 case 3: { 458 f_out <<"* SISCone jet algorithm with parameters: *"<<"\n";459 f_out << left << setw(40) <<"* - Cone radius: "<<""460 << left << setw(20) <<CONERADIUS<<""<< right << setw(10)<<"*"<<"\n";461 f_out << left << setw(40) <<"* - Overlap threshold: "<<""462 << left << setw(20) <<OVERLAPTHRESHOLD<<""<< right << setw(10)<<"! not in datacard *"<<"\n";463 f_out << left << setw(40) <<"* - Number pass max: "<<""464 << left << setw(20) <<NPASS<<""<< right << setw(10)<<"! not in datacard *"<<"\n";465 f_out << left << setw(40) <<"* - Minimum pT for protojet: "<<""466 << left << setw(20) <<PROTOJET_PTMIN<<""<< right << setw(10)<<"! not in datacard *"<<"\n";488 f_out <<"* SISCone jet algorithm with parameters: *"<<"\n"; 489 f_out << left << setw(40) <<"* - Cone radius: "<<"" 490 << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n"; 491 f_out << left << setw(40) <<"* - Overlap threshold: "<<"" 492 << left << setw(20) <<JET_overlap <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 493 f_out << left << setw(40) <<"* - Number pass max: "<<"" 494 << left << setw(20) <<JET_S_npass <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 495 f_out << left << setw(40) <<"* - Minimum pT for protojet: "<<"" 496 << left << setw(20) <<JET_S_protojet_ptmin <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 467 497 } 468 498 break; 469 499 case 4: { 470 f_out <<"* KT jet algorithm with parameters: *"<<"\n";471 f_out << left << setw(40) <<"* - Cone radius: "<<""472 << left << setw(20) <<CONERADIUS<<""<< right << setw(10)<<"*"<<"\n";500 f_out <<"* KT jet algorithm with parameters: *"<<"\n"; 501 f_out << left << setw(40) <<"* - Cone radius: "<<"" 502 << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n"; 473 503 } 474 504 break; 475 505 case 5: { 476 f_out <<"* Cambridge/Aachen jet algorithm with parameters: *"<<"\n";477 f_out << left << setw(40) <<"* - Cone radius: "<<""478 << left << setw(20) <<CONERADIUS<<""<< right << setw(10)<<"*"<<"\n";506 f_out <<"* Cambridge/Aachen jet algorithm with parameters: *"<<"\n"; 507 f_out << left << setw(40) <<"* - Cone radius: "<<"" 508 << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n"; 479 509 } 480 510 break; 481 511 case 6: { 482 f_out <<"* Anti-kt jet algorithm with parameters: *"<<"\n";483 f_out << left << setw(40) <<"* - Cone radius: "<<""484 << left << setw(20) <<CONERADIUS<<""<< right << setw(10)<<"*"<<"\n";512 f_out <<"* Anti-kt jet algorithm with parameters: *"<<"\n"; 513 f_out << left << setw(40) <<"* - Cone radius: "<<"" 514 << left << setw(20) <<JET_coneradius <<""<< right << setw(10)<<"*"<<"\n"; 485 515 } 486 516 break; 487 488 489 } 517 } 518 f_out<<"* *"<<"\n"; 519 f_out<<"#****************************** *"<<"\n"; 520 f_out<<"# Tau-jet definition parameters *"<<"\n"; 521 f_out<<"#****************************** *"<<"\n"; 522 f_out<<"* *"<<"\n"; 523 f_out << left << setw(45) <<"* Cone radius for calorimeter tagging: "<<"" 524 << left << setw(5) <<TAU_energy_scone <<""<< right << setw(20)<<"*"<<"\n"; 525 f_out << left << setw(45) <<"* Fraction of energy in the small cone: "<<"" 526 << left << setw(5) <<TAU_energy_frac*100 <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 527 f_out << left << setw(45) <<"* Cone radius for tracking tagging: "<<"" 528 << left << setw(5) <<TAU_track_scone <<""<< right << setw(20)<<"*"<<"\n"; 529 f_out << left << setw(45) <<"* Minimum track pT [GeV]: "<<"" 530 << left << setw(5) <<TAU_track_pt <<""<< right << setw(20)<<"*"<<"\n"; 531 f_out<<"* *"<<"\n"; 532 f_out<<"#*************************** *"<<"\n"; 533 f_out<<"# B-tagging efficiencies [%] *"<<"\n"; 534 f_out<<"#*************************** *"<<"\n"; 535 f_out<<"* *"<<"\n"; 536 f_out << left << setw(50) <<"* Efficiency to tag a \"b\" as a b-jet: "<<"" 537 << left << setw(10) <<BTAG_b <<""<< right << setw(10)<<"*"<<"\n"; 538 f_out << left << setw(50) <<"* Efficiency to mistag a c-jet as a b-jet: "<<"" 539 << left << setw(10) <<BTAG_mistag_c <<""<< right << setw(10)<<"*"<<"\n"; 540 f_out << left << setw(50) <<"* Efficiency to mistag a light jet as a b-jet: "<<"" 541 << left << setw(10) <<BTAG_mistag_l <<""<< right << setw(10)<<"*"<<"\n"; 542 f_out<<"* *"<<"\n"; 490 543 f_out<<"* *"<<"\n"; 491 544 f_out<<"#....................................................................*"<<"\n"; 492 545 f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n"; 493 546 494 547 } 495 548 … … 502 555 float energyS = 0.0; // after smearing // \sigma/E = C + N/E + S/\sqrt{E} 503 556 504 if(fabs(electron.Eta()) < MAX_TRACKER) { // if the electron is inside the tracker557 if(fabs(electron.Eta()) < CEN_max_tracker) { // if the electron is inside the tracker 505 558 energyS = gRandom->Gaus(energy, sqrt( 506 559 pow(ELG_Ncen,2) + … … 508 561 pow(ELG_Scen*sqrt(energy),2) )); 509 562 } 510 if(fabs(electron.Eta()) > MAX_TRACKER && fabs(electron.Eta()) < MAX_CALO_FWD){563 if(fabs(electron.Eta()) > CEN_max_tracker && fabs(electron.Eta()) < CEN_max_calo_fwd){ 511 564 energyS = gRandom->Gaus(energy, sqrt( 512 565 pow(ELG_Nfwd,2) + … … 526 579 float ptS=pt; 527 580 528 if(fabs(muon.Eta()) < MAX_MU)581 if(fabs(muon.Eta()) < CEN_max_mu ) 529 582 { 530 583 ptS = gRandom->Gaus(pt, MU_SmearPt*pt ); // after smearing // \sigma/E = C + N/E + S/\sqrt{E} … … 550 603 551 604 float energyS1,energyS2; 552 if(fabs(hadron.Eta()) < MAX_CALO_CEN) {605 if(fabs(hadron.Eta()) < CEN_max_calo_cen) { 553 606 energyS1 = gRandom->Gaus(energy_hcal, sqrt( 554 607 pow(HAD_Nhcal,2) + … … 564 617 energyS = ((energyS1>0)?energyS1:0) + ((energyS2>0)?energyS2:0); 565 618 } 566 if(abs(hadron.Eta()) > MAX_CALO_CEN && fabs(hadron.Eta()) < MAX_CALO_FWD){619 if(abs(hadron.Eta()) > CEN_max_calo_cen && fabs(hadron.Eta()) < CEN_max_calo_fwd){ 567 620 energyS = gRandom->Gaus(energy, sqrt( 568 621 pow(HAD_Nhf,2) + … … 609 662 double Energie=0; 610 663 for(unsigned int i=0; i < towers.size(); i++) { 611 if(towers[i].fourVector.pt() < SEEDTHRESHOLD) continue;612 if((DeltaR(phi,eta,towers[i].fourVector.phi(),towers[i].fourVector.eta()) < TAU_ CONE_ENERGY)) {664 if(towers[i].fourVector.pt() < JET_seed) continue; 665 if((DeltaR(phi,eta,towers[i].fourVector.phi(),towers[i].fourVector.eta()) < TAU_energy_scone)) { 613 666 Energie += towers[i].fourVector.E; 614 667 } … … 630 683 for(unsigned int i=0; i < tracks.size(); i++) { 631 684 if((tracks[i].Pt() < pt_track )|| 632 (DeltaR(phi,eta,tracks[i].Phi(),tracks[i].Eta()) > TAU_ CONE_TRACKS)685 (DeltaR(phi,eta,tracks[i].Phi(),tracks[i].Eta()) > TAU_track_scone) 633 686 )continue; 634 687 numtrack++; … … 647 700 for(int i=0; i < subarray.GetEntries();i++) { // should have pt>PT_JETMIN and a small cone radius (r<CONE_JET) 648 701 float genDeltaR = DeltaR(subarray[i]->Phi,subarray[i]->Eta,phi,eta); 649 if(genDeltaR < CONERADIUS&& subarray[i]->E > emax) {702 if(genDeltaR < JET_coneradius && subarray[i]->E > emax) { 650 703 emax=subarray[i]->E; 651 704 Ppid=abs(subarray[i]->PID); … … 659 712 //******************** Simulates the b-tagging efficiency for real bjet, or the misendentification for other jets**************** 660 713 bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray) { 661 if( rand()%100 < ( TAGGING_B+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pB ) return true; // b-tag of b-jets is 40%662 else if( rand()%100 < ( MISTAGGING_C+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pC ) return true; // b-tag of c-jets is 10%663 else if( rand()%100 < ( MISTAGGING_L+1) && Bjets(subarray,JET.Eta(),JET.Phi())!=0) return true; // b-tag of light jets is 1%714 if( rand()%100 < (BTAG_b+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pB ) return true; // b-tag of b-jets is 40% 715 else if( rand()%100 < (BTAG_mistag_c+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pC ) return true; // b-tag of c-jets is 10% 716 else if( rand()%100 < (BTAG_mistag_l+1) && Bjets(subarray,JET.Eta(),JET.Phi())!=0) return true; // b-tag of light jets is 1% 664 717 return false; 665 718 } … … 691 744 iEta = -100; 692 745 int index=-100; 693 for (unsigned int i=1; i< NTOWERS+1; i++) {694 if(fabs(eta)>TOWER_ ETA_EDGES[i-1] && fabs(eta)<TOWER_ETA_EDGES[i]) {695 iEta = (eta>0) ? TOWER_ ETA_EDGES[i-1] : -TOWER_ETA_EDGES[i];746 for (unsigned int i=1; i< TOWER_number+1; i++) { 747 if(fabs(eta)>TOWER_eta_edges[i-1] && fabs(eta)<TOWER_eta_edges[i]) { 748 iEta = (eta>0) ? TOWER_eta_edges[i-1] : -TOWER_eta_edges[i]; 696 749 index = i-1; 697 750 //cout << setw(15) << left << eta << "\t" << iEta << endl; … … 701 754 if(index==-100) return; 702 755 iPhi = -100; 703 float dphi = TOWER_ DPHI[index]*PI/180.;704 for (unsigned int i=1; i < 360/TOWER_ DPHI[index]; i++ ) {756 float dphi = TOWER_dphi[index]*PI/180.; 757 for (unsigned int i=1; i < 360/TOWER_dphi[index]; i++ ) { 705 758 float low = -PI+(i-1)*dphi; 706 759 float high= low+dphi; -
trunk/src/VeryForward.cc
r65 r94 62 62 TLorentzVector genMomentum; 63 63 // Zero degree calorimeter, for forward neutrons and photons 64 if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > MIN_ZDC) {64 if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > VFD_min_zdc ) { 65 65 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 66 66 // !!!!!!!!! vérifier que particle->Z est bien en micromÚtres!!! … … 75 75 //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) ); 76 76 //double flight_distance = (DET->ZDC_S - particle->Z*(1E-6))/cos(theta) ; // assumes that Z is in micrometers 77 double flight_distance = ( ZDC_S- particle->Z*(1E-6));77 double flight_distance = (VFD_s_zdc - particle->Z*(1E-6)); 78 78 // assumes also that the emission angle is so small that 1/(cos theta) = 1 79 79 elementZdc->T = 0*particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles … … 95 95 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 96 96 // if forward proton 97 if( (pid == pP) && (particle->Status == 1) && (fabs(genMomentum.Eta()) > MAX_CALO_FWD) )97 if( (pid == pP) && (particle->Status == 1) && (fabs(genMomentum.Eta()) > CEN_max_calo_fwd) ) 98 98 { 99 99 // !!!!!!!! put here particle->CHARGE and particle->MASS … … 112 112 if(p1.stopped(beamline)) { 113 113 if (p1.getStoppingElement()->getName()=="rp220_1" || p1.getStoppingElement()->getName()=="rp220_2") { 114 p1.propagate(RP 220_S);114 p1.propagate(RP_220_s); 115 115 elementRP220 = (TRootRomanPotHits*) branchRP220->NewEntry(); 116 116 elementRP220->X = (1E-6)*p1.getX(); // [m] … … 125 125 126 126 } else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") { 127 p1.propagate( FP420_S);127 p1.propagate(RP_420_s); 128 128 elementFP420 = (TRootRomanPotHits*) branchFP420->NewEntry(); 129 129 elementFP420->X = (1E-6)*p1.getX(); // [m]
Note:
See TracChangeset
for help on using the changeset viewer.