Changeset 44 in svn
- Timestamp:
- Nov 19, 2008, 8:42:24 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r43 r44 88 88 exit(1); 89 89 } 90 //create output log-file name 91 string LogName = outputfilename.erase(outputfilename.find(".root")); 92 LogName = LogName+"_run.log"; 90 93 91 94 TFile *outputFile = TFile::Open(outputfilename.c_str(), "RECREATE"); // Creates the file, but should be closed just after … … 95 98 ifstream infile(inputFileList.c_str()); 96 99 infile >> line; // the first line determines the type of input files 100 101 //read the datacard input file 102 string DetDatacard(""); 103 if(argc==4) DetDatacard =argv[3]; 104 RESOLution *DET = new RESOLution(); 105 DET->ReadDataCard(DetDatacard); 106 DET->Logfile(LogName); 107 108 todo(LogName.c_str()); 97 109 98 110 DataConverter *converter=0; … … 100 112 if(strstr(line.c_str(),".hep")) 101 113 { 102 cout<<" *************************************************************************"<<endl;103 cout<<" ************ StdHEP file format detected **************"<<endl;104 cout<<" ************ Starting convertion to TRoot format**************"<<endl;105 cout<<" *************************************************************************"<<endl;114 cout<<"#**********************************************************************"<<endl; 115 cout<<"#********** StdHEP file format detected *************"<<endl; 116 cout<<"#*********** Starting convertion to TRoot format **************"<<endl; 117 cout<<"#**********************************************************************"<<endl; 106 118 converter = new STDHEPConverter(inputFileList,outputfilename);//case ntpl file in input list 107 119 } 108 120 else if(strstr(line.c_str(),".lhe")) 109 121 { 110 cout<<" *************************************************************************"<<endl;111 cout<<" ************ LHEF file format detected **************"<<endl;112 cout<<" ************ Starting convertion to TRoot format **************"<<endl;113 cout<<" *************************************************************************"<<endl;122 cout<<"#**********************************************************************"<<endl; 123 cout<<"#*********** LHEF file format detected ************"<<endl; 124 cout<<"#*********** Starting convertion to TRoot format ************"<<endl; 125 cout<<"#**********************************************************************"<<endl; 114 126 converter = new LHEFConverter(inputFileList,outputfilename);//case ntpl file in input list 115 127 } 116 128 else if(strstr(line.c_str(),".root")) 117 129 { 118 cout<<" *************************************************************************"<<endl;119 cout<<" ************ h2root file format detected **************"<<endl;120 cout<<" ************ Starting convertion to TRoot format **************"<<endl;121 cout<<" *************************************************************************"<<endl;130 cout<<"#**********************************************************************"<<endl; 131 cout<<"#********** h2root file format detected *************"<<endl; 132 cout<<"#********** Starting convertion to TRoot format *************"<<endl; 133 cout<<"#**********************************************************************"<<endl; 122 134 converter = new HEPEVTConverter(inputFileList,outputfilename);//case ntpl file in input list 123 135 } … … 157 169 TRootRomanPotHits *elementRP220, *elementFP420; 158 170 159 //read the datacard input file160 string DetDatacard("");161 if(argc==4) DetDatacard =argv[3];162 RESOLution *DET = new RESOLution();163 DET->ReadDataCard(DetDatacard);164 165 171 TLorentzVector genMomentum(0,0,0,0); 166 172 TLorentzVector genMomentumCalo(0,0,0,0); … … 235 241 // set up a siscone jet definition 236 242 #ifdef ENABLE_PLUGIN_SISCONE 237 int npass = 0; // do infinite number of passes 238 double protojet_ptmin = 0.0; // use all protojets 239 plugins = new fastjet::SISConePlugin (DET->CONERADIUS,DET->OVERLAPTHRESHOLD,npass, protojet_ptmin); 243 plugins = new fastjet::SISConePlugin (DET->CONERADIUS,DET->OVERLAPTHRESHOLD,DET->NPASS, DET->PROTOJET_PTMIN); 240 244 jet_def = fastjet::JetDefinition(plugins); 241 245 #else … … 485 489 486 490 // run the jet clustering with the above jet definition 487 cout<<input_particles.size()<<endl;488 491 if(input_particles.size()!=0) 489 492 { … … 492 495 double ptmin = 5.0; 493 496 inclusive_jets = clust_seq.inclusive_jets(ptmin); 494 cout<<"inclusive_jets "<<inclusive_jets.size()<<endl;495 497 // sort jets into increasing pt 496 498 sorted_jets = sorted_by_pt(inclusive_jets); 497 499 } 498 cout<<"sorted_jets.size() "<<sorted_jets.size()<<endl;499 500 for (unsigned int i = 0; i < sorted_jets.size(); i++) { 500 501 TLorentzVector JET; -
trunk/interface/SmearUtil.h
r43 r44 108 108 int C_IRATCH; 109 109 110 //Define SISCone algorithm. 111 int NPASS; 112 double PROTOJET_PTMIN; 113 114 110 115 /// Reads the data card for the initialisation of the parameters 111 116 void ReadDataCard(const string datacard); 117 118 /// Create the output log file 119 void Logfile(string LogName); 112 120 113 121 /// Provides the smeared TLorentzVector for the electrons -
trunk/src/SmearUtil.cc
r43 r44 19 19 #include <sstream> 20 20 #include <fstream> 21 22 #include <cstdio> 23 #include <cstdio> 24 #include <TCanvas.h> 25 #include <TLorentzVector.h> 26 #include <string> 27 #include <fstream> 28 #include <istream> 29 #include <iostream> 30 #include <TMath.h> 31 #include <vector> 32 #include "TRandom.h" 33 #include <cstdlib> 34 #include <math.h> 35 #include <time.h> 36 37 #include <iostream> 38 #include <iomanip> 39 40 #include <iostream> 41 #include <sstream> 42 43 #include <fstream> 44 #include <vector> 45 21 46 using namespace std; 22 47 … … 164 189 M_MAXITERATIONS = 100; 165 190 166 } 167 191 //Define SISCone algorithm. 192 NPASS = 0; 193 PROTOJET_PTMIN = 0.0; 194 195 196 } 197 198 void RESOLution::Logfile(string LogName) { 199 //void RESOLution::Logfile(string outputfilename) { 200 201 ofstream f_out(LogName.c_str()); 202 203 f_out<<"#*********************************************************************"<<"\n"; 204 f_out<<"# *"<<"\n"; 205 f_out<<"# ---- DELPHES release 1.0 ---- *"<<"\n"; 206 f_out<<"# *"<<"\n"; 207 f_out<<"# A Fast Simulator for general purpose LHC detector *"<<"\n"; 208 f_out<<"# Written by S. Ovyn and X. Rouby *"<<"\n"; 209 f_out<<"# severine.ovyn@uclouvain.be *"<<"\n"; 210 f_out<<"# *"<<"\n"; 211 f_out<<"# http: *"<<"\n"; 212 f_out<<"# *"<<"\n"; 213 f_out<<"# Center for Particle Physics and Phenomenology (CP3) *"<<"\n"; 214 f_out<<"# Universite Catholique de Louvain (UCL) *"<<"\n"; 215 f_out<<"# Louvain-la-Neuve, Belgium *"<<"\n"; 216 f_out<<"# *"<<"\n"; 217 f_out<<"#....................................................................*"<<"\n"; 218 f_out<<"# *"<<"\n"; 219 f_out<<"# This package uses FastJet algorithm, *"<<"\n"; 220 f_out<<"# Phys. Lett. B641 (2006) [hep-ph/0512210] *"<<"\n"; 221 f_out<<"# *"<<"\n"; 222 f_out<<"#....................................................................*"<<"\n"; 223 f_out<<"# *"<<"\n"; 224 f_out<<"# This file contains all the running parameters (detector and cuts) *"<<"\n"; 225 f_out<<"# necessary to reproduce the detector simulation *"<<"\n"; 226 f_out<<"# *"<<"\n"; 227 f_out<<"#....................................................................*"<<"\n"; 228 f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n"; 229 f_out<<"* *"<<"\n"; 230 f_out<<"#******************************** *"<<"\n"; 231 f_out<<"# Central detector caracteristics *"<<"\n"; 232 f_out<<"#******************************** *"<<"\n"; 233 f_out<<"* *"<<"\n"; 234 f_out << left << setw(30) <<"* Maximum tracking system: "<<"" 235 << left << setw(10) <<MAX_TRACKER <<""<< right << setw(15)<<"*"<<"\n"; 236 f_out << left << setw(30) <<"* Maximum central calorimeter: "<<"" 237 << left << setw(10) <<MAX_CALO_CEN <<""<< right << setw(15)<<"*"<<"\n"; 238 f_out << left << setw(30) <<"* Maximum forward calorimeter: "<<"" 239 << left << setw(10) <<MAX_CALO_FWD <<""<< right << setw(15)<<"*"<<"\n"; 240 f_out << left << setw(30) <<"* Muon chambers coverage: "<<"" 241 << left << setw(10) <<MAX_MU <<""<< right << setw(15)<<"*"<<"\n"; 242 f_out<<"* *"<<"\n"; 243 f_out<<"#************************************* *"<<"\n"; 244 f_out<<"# Very forward detector caracteristics *"<<"\n"; 245 f_out<<"#************************************* *"<<"\n"; 246 f_out<<"* *"<<"\n"; 247 f_out << left << setw(55) <<"* Minimum very forward calorimeter: "<<"" 248 << left << setw(5) <<MIN_CALO_VFWD <<""<< right << setw(10)<<"*"<<"\n"; 249 f_out << left << setw(55) <<"* Maximum very forward calorimeter: "<<"" 250 << left << setw(5) <<MAX_CALO_VFWD <<""<< right << setw(10)<<"*"<<"\n"; 251 f_out << left << setw(55) <<"* Distance of the ZDC to the IP, in meters: "<<"" 252 << left << setw(5) <<ZDC_S <<""<< right << setw(10)<<"*"<<"\n"; 253 f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters: "<<"" 254 << left << setw(5) <<RP220_S <<""<< right << setw(10)<<"*"<<"\n"; 255 f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<"" 256 << left << setw(5) <<RP220_X <<""<< right << setw(10)<<"*"<<"\n"; 257 f_out << left << setw(55) <<"* Distance of the RP to the IP, in meters: "<<"" 258 << left << setw(5) <<FP420_S <<""<< right << setw(10)<<"*"<<"\n"; 259 f_out << left << setw(55) <<"* Distance of the RP to the beam, in meters: "<<"" 260 << left << setw(5) <<FP420_X <<""<< right << setw(10)<<"*"<<"\n"; 261 f_out<<"* *"<<"\n"; 262 f_out<<"#************************************ *"<<"\n"; 263 f_out<<"# Electromagnetic smearing parameters *"<<"\n"; 264 f_out<<"#************************************ *"<<"\n"; 265 f_out<<"* *"<<"\n"; 266 //# \sigma/E = C + N/E + S/\sqrt{E} 267 f_out << left << setw(30) <<"* S term for central ECAL: "<<"" 268 << left << setw(30) <<ELG_Scen <<""<< right << setw(10)<<"*"<<"\n"; 269 f_out << left << setw(30) <<"* N term for central ECAL: "<<"" 270 << left << setw(30) <<ELG_Ncen <<""<< right << setw(10)<<"*"<<"\n"; 271 f_out << left << setw(30) <<"* C term for central ECAL: "<<"" 272 << left << setw(30) <<ELG_Ccen <<""<< right << setw(10)<<"*"<<"\n"; 273 f_out << left << setw(30) <<"* S term for forward ECAL: "<<"" 274 << left << setw(30) <<ELG_Sfwd <<""<< right << setw(10)<<"*"<<"\n"; 275 f_out << left << setw(30) <<"* N term for forward ECAL: "<<"" 276 << left << setw(30) <<ELG_Nfwd <<""<< right << setw(10)<<"*"<<"\n"; 277 f_out << left << setw(30) <<"* C term for forward ECAL: "<<"" 278 << left << setw(30) <<ELG_Cfwd <<""<< right << setw(10)<<"*"<<"\n"; 279 f_out<<"* *"<<"\n"; 280 f_out<<"#***************************** *"<<"\n"; 281 f_out<<"# Hadronic smearing parameters *"<<"\n"; 282 f_out<<"#***************************** *"<<"\n"; 283 f_out<<"* *"<<"\n"; 284 f_out << left << setw(30) <<"* S term for central HCAL: "<<"" 285 << left << setw(30) <<HAD_Shcal <<""<< right << setw(10)<<"*"<<"\n"; 286 f_out << left << setw(30) <<"* N term for central HCAL: "<<"" 287 << left << setw(30) <<HAD_Nhcal <<""<< right << setw(10)<<"*"<<"\n"; 288 f_out << left << setw(30) <<"* C term for central HCAL: "<<"" 289 << left << setw(30) <<HAD_Chcal <<""<< right << setw(10)<<"*"<<"\n"; 290 f_out << left << setw(30) <<"* S term for forward HCAL: "<<"" 291 << left << setw(30) <<HAD_Shf <<""<< right << setw(10)<<"*"<<"\n"; 292 f_out << left << setw(30) <<"* N term for forward HCAL: "<<"" 293 << left << setw(30) <<HAD_Nhf <<""<< right << setw(10)<<"*"<<"\n"; 294 f_out << left << setw(30) <<"* C term for forward HCAL: "<<"" 295 << left << setw(30) <<HAD_Chf <<""<< right << setw(10)<<"*"<<"\n"; 296 f_out<<"* *"<<"\n"; 297 f_out<<"#*************************** *"<<"\n"; 298 f_out<<"# Tracking system acceptance *"<<"\n"; 299 f_out<<"#*************************** *"<<"\n"; 300 f_out<<"* *"<<"\n"; 301 f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<"" 302 << left << setw(10) <<PT_TRACKS_MIN <<""<< right << setw(5)<<"*"<<"\n"; 303 f_out << left << setw(55) <<"* Efficiency associated to the tracking: "<<"" 304 << left << setw(10) <<TRACKING_EFF <<""<< right << setw(5)<<"*"<<"\n"; 305 f_out<<"* *"<<"\n"; 306 f_out<<"#************************* *"<<"\n"; 307 f_out<<"# Muon smearing parameters *"<<"\n"; 308 f_out<<"#************************* *"<<"\n"; 309 f_out<<"* *"<<"\n"; 310 //MU_SmearPt 0.01 311 f_out<<"* *"<<"\n"; 312 f_out<<"#****************************** *"<<"\n"; 313 f_out<<"# Tau-jet definition parameters *"<<"\n"; 314 f_out<<"#****************************** *"<<"\n"; 315 f_out<<"* *"<<"\n"; 316 f_out << left << setw(45) <<"* Cone radius for calorimeter tagging: "<<"" 317 << left << setw(5) <<TAU_CONE_ENERGY <<""<< right << setw(20)<<"*"<<"\n"; 318 f_out << left << setw(45) <<"* Fraction of energy in the small cone: "<<"" 319 << left << setw(5) <<TAU_EM_COLLIMATION*100 <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 320 f_out << left << setw(45) <<"* Cone radius for tracking tagging: "<<"" 321 << left << setw(5) <<TAU_CONE_TRACKS <<""<< right << setw(20)<<"*"<<"\n"; 322 f_out << left << setw(45) <<"* Minimum track pT [GeV]: "<<"" 323 << left << setw(5) <<PT_TRACK_TAU <<""<< right << setw(20)<<"*"<<"\n"; 324 f_out<<"* *"<<"\n"; 325 f_out<<"#******************* *"<<"\n"; 326 f_out<<"# Minimum pT's [GeV] *"<<"\n"; 327 f_out<<"#******************* *"<<"\n"; 328 f_out<<"* *"<<"\n"; 329 f_out << left << setw(40) <<"* Minimum pT for electrons: "<<"" 330 << left << setw(20) <<ELEC_pt <<""<< right << setw(10)<<"*"<<"\n"; 331 f_out << left << setw(40) <<"* Minimum pT for muons: "<<"" 332 << left << setw(20) <<MUON_pt <<""<< right << setw(10)<<"*"<<"\n"; 333 f_out << left << setw(40) <<"* Minimum pT for jets: "<<"" 334 << left << setw(20) <<JET_pt <<""<< right << setw(10)<<"*"<<"\n"; 335 f_out << left << setw(40) <<"* Minimum pT for Tau-jets: "<<"" 336 << left << setw(20) <<TAUJET_pt <<""<< right << setw(10)<<"*"<<"\n"; 337 f_out<<"* *"<<"\n"; 338 f_out<<"#*************************** *"<<"\n"; 339 f_out<<"# B-tagging efficiencies [%] *"<<"\n"; 340 f_out<<"#*************************** *"<<"\n"; 341 f_out<<"* *"<<"\n"; 342 f_out << left << setw(50) <<"* Efficiency to tag a \"b\" as a b-jet: "<<"" 343 << left << setw(10) <<TAGGING_B <<""<< right << setw(10)<<"*"<<"\n"; 344 f_out << left << setw(50) <<"* Efficiency to mistag a c-jet as a b-jet: "<<"" 345 << left << setw(10) <<MISTAGGING_C <<""<< right << setw(10)<<"*"<<"\n"; 346 f_out << left << setw(50) <<"* Efficiency to mistag a light jet as a b-jet: "<<"" 347 << left << setw(10) <<MISTAGGING_L <<""<< right << setw(10)<<"*"<<"\n"; 348 f_out<<"* *"<<"\n"; 349 f_out<<"#*************** *"<<"\n"; 350 f_out<<"# Jet definition *"<<"\n"; 351 f_out<<"#*************** *"<<"\n"; 352 f_out<<"* *"<<"\n"; 353 switch(JETALGO) { 354 default: 355 case 1: { 356 f_out<<"* CDF JetClu jet algorithm with: *"<<"\n"; 357 f_out << left << setw(40) <<"* - Seed threshold: "<<"" 358 << left << setw(10) <<SEEDTHRESHOLD <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 359 f_out << left << setw(40) <<"* - Cone radius: "<<"" 360 << left << setw(10) <<CONERADIUS <<""<< right << setw(20)<<"*"<<"\n"; 361 f_out << left << setw(40) <<"* - Adjacency cut: "<<"" 362 << left << setw(10) <<C_ADJACENCYCUT <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 363 f_out << left << setw(40) <<"* - Max iterations: "<<"" 364 << left << setw(10) <<C_MAXITERATIONS <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 365 f_out << left << setw(40) <<"* - Iratch: "<<"" 366 << left << setw(10) <<C_IRATCH <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 367 f_out << left << setw(40) <<"* - Overlap threshold: "<<"" 368 << left << setw(10) <<OVERLAPTHRESHOLD <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 369 } 370 break; 371 case 2: { 372 f_out<<"* CDF midpoint jet algorithm with: *"<<"\n"; 373 f_out << left << setw(40) <<"* - Seed threshold: "<<"" 374 << left << setw(20) <<SEEDTHRESHOLD <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 375 f_out << left << setw(40) <<"* - Cone radius: "<<"" 376 << left << setw(20) <<CONERADIUS <<""<< right << setw(10)<<"*"<<"\n"; 377 f_out << left << setw(40) <<"* - Cone area fraction:"<<"" 378 << left << setw(20) <<M_CONEAREAFRACTION <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 379 f_out << left << setw(40) <<"* - Maximum pair size: "<<"" 380 << left << setw(20) <<M_MAXPAIRSIZE <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 381 f_out << left << setw(40) <<"* - Max iterations: "<<"" 382 << left << setw(20) <<M_MAXITERATIONS <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 383 f_out << left << setw(40) <<"* - Overlap threshold: "<<"" 384 << left << setw(20) <<OVERLAPTHRESHOLD <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 385 } 386 break; 387 case 3: { 388 f_out<<"* SISCone jet algorithm with: *"<<"\n"; 389 f_out << left << setw(40) <<"* - Cone radius: "<<"" 390 << left << setw(20) <<CONERADIUS <<""<< right << setw(10)<<"*"<<"\n"; 391 f_out << left << setw(40) <<"* - Overlap threshold: "<<"" 392 << left << setw(20) <<OVERLAPTHRESHOLD <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 393 f_out << left << setw(40) <<"* - Number pass max: "<<"" 394 << left << setw(20) <<NPASS <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 395 f_out << left << setw(40) <<"* - Minimum pT for protojet: "<<"" 396 << left << setw(20) <<PROTOJET_PTMIN <<""<< right << setw(10)<<"! not in datacard *"<<"\n"; 397 } 398 break; 399 case 4: { 400 f_out<<"* KT jet algorithm with: *"<<"\n"; 401 f_out << left << setw(40) <<"* - Cone radius: "<<"" 402 << left << setw(20) <<CONERADIUS <<""<< right << setw(10)<<"*"<<"\n"; 403 } 404 break; 405 } 406 f_out<<"* *"<<"\n"; 407 f_out<<"#....................................................................*"<<"\n"; 408 f_out<<"#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"<<"\n"; 409 410 } 168 411 169 412 // **********Provides the smeared TLorentzVector for the electrons********
Note:
See TracChangeset
for help on using the changeset viewer.