- Timestamp:
- Dec 9, 2014, 1:27:13 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 37deb3b, 9e991f8
- Parents:
- f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- examples
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Example1.C
rf6b6ee7 r49234af 1 1 /* 2 Simple macro showing how to access branches from the delphes output root file, 3 loop over events, and plot simple quantities such as the jet pt and the di-electron invariant 4 mass. 5 2 6 root -l examples/Example1.C'("delphes_output.root")' 3 7 */ … … 41 45 42 46 // Print jet transverse momentum 43 cout << jet->PT << endl;47 cout << "Jet pt: "<<jet->PT << endl; 44 48 } 45 49 … … 62 66 histMass->Draw(); 63 67 } 68 -
examples/Example2.C
rf6b6ee7 r49234af 1 1 /* 2 Simple macro showing how to access branches from the delphes output root file, 3 loop over events, store histograms in a root file and print them as image files. 4 2 5 root -l examples/Example2.C'("delphes_output.root")' 3 6 */ -
examples/Example3.C
rf6b6ee7 r49234af 1 1 /* 2 This macro shows how to access the particle-level reference for reconstructed objects. 3 It is also shown how to loop over the jet constituents. 4 2 5 root -l examples/Example3.C'("delphes_output.root")' 3 6 */ … … 36 39 37 40 plots->fElectronDeltaPT = result->AddHist1D( 38 "electron deltapt", "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}",41 "electron_delta_pt", "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}", 39 42 "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}", "number of electrons", 40 43 100, -0.1, 0.1); 41 44 42 45 plots->fElectronDeltaEta = result->AddHist1D( 43 "electron deltaeta", "(#eta^{particle} - #eta^{electron})/#eta^{particle}",46 "electron_delta_eta", "(#eta^{particle} - #eta^{electron})/#eta^{particle}", 44 47 "(#eta^{particle} - #eta^{electron})/#eta^{particle}", "number of electrons", 45 48 100, -0.1, 0.1); 46 49 47 50 plots->fPhotonDeltaPT = result->AddHist1D( 48 "photon deltapt", "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}",51 "photon_delta_pt", "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}", 49 52 "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}", "number of photons", 50 53 100, -0.1, 0.1); 51 54 52 55 plots->fPhotonDeltaEta = result->AddHist1D( 53 "photon deltaeta", "(#eta^{particle} - #eta^{photon})/#eta^{particle}",56 "photon_delta_eta", "(#eta^{particle} - #eta^{photon})/#eta^{particle}", 54 57 "(#eta^{particle} - #eta^{photon})/#eta^{particle}", "number of photons", 55 58 100, -0.1, 0.1); 56 59 57 60 plots->fPhotonDeltaE = result->AddHist1D( 58 "photon deltaenergy", "(E^{particle} - E^{photon})/E^{particle}",61 "photon_delta_energy", "(E^{particle} - E^{photon})/E^{particle}", 59 62 "(E^{particle} - E^{photon})/E^{particle}", "number of photons", 60 63 100, -0.1, 0.1); 61 64 62 65 plots->fMuonDeltaPT = result->AddHist1D( 63 "muon deltapt", "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}",66 "muon_delta_pt", "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}", 64 67 "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}", "number of muons", 65 68 100, -0.1, 0.1); 66 69 67 70 plots->fMuonDeltaEta = result->AddHist1D( 68 "muon deltaeta", "(#eta^{particle} - #eta^{muon})/#eta^{particle}",71 "muon_delta_eta", "(#eta^{particle} - #eta^{muon})/#eta^{particle}", 69 72 "(#eta^{particle} - #eta^{muon})/#eta^{particle}", "number of muons", 70 73 100, -0.1, 0.1); 71 74 72 75 plots->fTrackDeltaPT = result->AddHist1D( 73 "track deltapt", "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}",76 "track_delta_pt", "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}", 74 77 "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}", "number of tracks", 75 78 100, -0.1, 0.1); 76 79 77 80 plots->fTrackDeltaEta = result->AddHist1D( 78 "track deltaeta", "(#eta^{particle} - #eta^{track})/#eta^{particle}",81 "track_delta_eta", "(#eta^{particle} - #eta^{track})/#eta^{particle}", 79 82 "(#eta^{particle} - #eta^{track})/#eta^{particle}", "number of tracks", 80 83 100, -0.1, 0.1); 81 84 82 85 plots->fJetDeltaPT = result->AddHist1D( 83 "jet deltapt", "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}",86 "jet_delta_pt", "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}", 84 87 "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}", "number of jets", 85 88 100, -1.0e-1, 1.0e-1); … … 179 182 } 180 183 181 cout<<"-- New event -- "<<endl;184 // cout<<"-- New event -- "<<endl; 182 185 183 186 // Loop over all jets in event … … 188 191 momentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0); 189 192 190 cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl;193 //cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl; 191 194 192 195 // Loop over all jet's constituents … … 201 204 { 202 205 particle = (GenParticle*) object; 203 cout << " GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl;206 //cout << " GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl; 204 207 momentum += particle->P4(); 205 208 } … … 207 210 { 208 211 track = (Track*) object; 209 cout << " Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl;212 //cout << " Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl; 210 213 momentum += track->P4(); 211 214 } … … 213 216 { 214 217 tower = (Tower*) object; 215 cout << " Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl;218 //cout << " Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl; 216 219 momentum += tower->P4(); 217 }218 else if(object->IsA() == Muon::Class())219 {220 muon = (Muon*) object;221 cout << " Muon pt: " << muon->PT << ", eta: " << muon->Eta << ", phi: " << muon->Phi << endl;222 momentum += muon->P4();223 220 } 224 221 } -
examples/delphes_card_ATLAS.tcl
rf6b6ee7 r49234af 29 29 MissingET 30 30 31 NeutrinoFilter 31 32 GenJetFinder 32 33 FastJetFinder … … 206 207 set PhotonOutputArray photons 207 208 209 set EcalTowerMinEnergy 0.50 210 set HcalTowerMinEnergy 1.00 211 212 set EcalTowerMinSignificance 1.0 213 set HcalTowerMinSignificance 1.0 214 208 215 set EFlowTrackOutputArray eflowTracks 209 216 set EFlowPhotonOutputArray eflowPhotons … … 266 273 set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \ 267 274 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \ 268 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0. 9420^2 + energy*0.075^2)}275 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 269 276 } 270 277 … … 406 413 } 407 414 415 416 ##################### 417 # Neutrino Filter 418 ##################### 419 420 module PdgCodeFilter NeutrinoFilter { 421 422 set InputArray Delphes/stableParticles 423 set OutputArray filteredParticles 424 425 set PTMin 0.0 426 427 add PdgCode {12} 428 add PdgCode {14} 429 add PdgCode {16} 430 add PdgCode {-12} 431 add PdgCode {-14} 432 add PdgCode {-16} 433 434 } 435 408 436 ##################### 409 437 # MC truth jet finder … … 411 439 412 440 module FastJetFinder GenJetFinder { 413 set InputArray Delphes/stableParticles441 set InputArray NeutrinoFilter/filteredParticles 414 442 415 443 set OutputArray jets … … 422 450 } 423 451 452 424 453 ############ 425 454 # Jet finder … … 446 475 set OutputArray jets 447 476 448 # scale formula for jets449 set ScaleFormula { 1.00}477 # scale formula for jets 478 set ScaleFormula { sqrt( (3.0 - 0.2*(abs(eta)))^2 / pt + 1.0 ) } 450 479 } 451 480 -
examples/delphes_card_ATLAS_PileUp.tcl
rf6b6ee7 r49234af 20 20 TrackPileUpSubtractor 21 21 NeutralTowerMerger 22 EFlowMergerAllTracks 22 23 EFlowMerger 23 24 25 NeutrinoFilter 24 26 GenJetFinder 25 27 … … 246 248 set TowerOutputArray towers 247 249 set PhotonOutputArray photons 250 251 set EcalTowerMinEnergy 0.50 252 set HcalTowerMinEnergy 1.00 253 254 set EcalTowerMinSignificance 1.0 255 set HcalTowerMinSignificance 1.0 248 256 249 257 set EFlowTrackOutputArray eflowTracks … … 307 315 set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \ 308 316 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \ 309 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0. 9420^2 + energy*0.075^2)}317 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 310 318 } 311 319 … … 334 342 add InputArray Calorimeter/eflowNeutralHadrons 335 343 set OutputArray eflowTowers 344 } 345 346 ################################## 347 # Energy flow merger (all tracks) 348 ################################## 349 350 module Merger EFlowMergerAllTracks { 351 # add InputArray InputArray 352 add InputArray TrackMerger/tracks 353 add InputArray Calorimeter/eflowPhotons 354 add InputArray Calorimeter/eflowNeutralHadrons 355 set OutputArray eflow 336 356 } 337 357 … … 349 369 } 350 370 351 352 371 ############# 353 372 # Rho pile-up 354 373 ############# 355 374 356 module FastJetFinder Rho { 375 module FastJetGridMedianEstimator Rho { 376 357 377 set InputArray Calorimeter/towers 358 359 set ComputeRho true360 378 set RhoOutputArray rho 361 379 362 # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area 363 set AreaAlgorithm 5 364 365 # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt 366 set JetAlgorithm 4 367 set ParameterR 0.6 368 set GhostEtaMax 5.0 369 set RhoEtaMax 5.0 370 371 add RhoEtaRange 0.0 5.0 372 373 set JetPTMin 0.0 380 # etamin etamax gridsize_eta gridsize_phi 381 382 add GridRange 0.0 2.5 0.5 0.5 383 add GridRange 2.5 5.0 0.5 0.5 384 385 } 386 387 388 ##################### 389 # Neutrino Filter 390 ##################### 391 392 module PdgCodeFilter NeutrinoFilter { 393 394 set InputArray Delphes/stableParticles 395 set OutputArray filteredParticles 396 397 set PTMin 0.0 398 399 add PdgCode {12} 400 add PdgCode {14} 401 add PdgCode {16} 402 add PdgCode {-12} 403 add PdgCode {-14} 404 add PdgCode {-16} 405 374 406 } 375 407 … … 379 411 380 412 module FastJetFinder GenJetFinder { 381 set InputArray Delphes/stableParticles413 set InputArray NeutrinoFilter/filteredParticles 382 414 383 415 set OutputArray jets … … 545 577 module Merger MissingET { 546 578 # add InputArray InputArray 547 add InputArray EFlowMerger /eflow579 add InputArray EFlowMergerAllTracks/eflow 548 580 set MomentumOutputArray momentum 549 581 } … … 644 676 645 677 # add Branch TrackMerger/tracks Track Track 646 #add Branch Calorimeter/towers Tower Tower678 add Branch Calorimeter/towers Tower Tower 647 679 648 680 # add Branch Calorimeter/eflowTracks EFlowTrack Track -
examples/delphes_card_CMS.tcl
rf6b6ee7 r49234af 29 29 MissingET 30 30 31 NeutrinoFilter 31 32 GenJetFinder 32 33 FastJetFinder … … 211 212 set PhotonOutputArray photons 212 213 214 set EcalTowerMinEnergy 0.5 215 set HcalTowerMinEnergy 1.0 216 217 set EcalTowerMinSignificance 1.0 218 set HcalTowerMinSignificance 1.0 219 213 220 set EFlowTrackOutputArray eflowTracks 214 221 set EFlowPhotonOutputArray eflowPhotons … … 416 423 } 417 424 425 426 ##################### 427 # Neutrino Filter 428 ##################### 429 430 module PdgCodeFilter NeutrinoFilter { 431 432 set InputArray Delphes/stableParticles 433 set OutputArray filteredParticles 434 435 set PTMin 0.0 436 437 add PdgCode {12} 438 add PdgCode {14} 439 add PdgCode {16} 440 add PdgCode {-12} 441 add PdgCode {-14} 442 add PdgCode {-16} 443 444 } 445 446 418 447 ##################### 419 448 # MC truth jet finder … … 421 450 422 451 module FastJetFinder GenJetFinder { 423 set InputArray Delphes/stableParticles452 set InputArray NeutrinoFilter/filteredParticles 424 453 425 454 set OutputArray jets … … 432 461 } 433 462 463 464 465 434 466 ############ 435 467 # Jet finder … … 457 489 set OutputArray jets 458 490 459 # scale formula for jets460 set ScaleFormula { 1.00}491 # scale formula for jets 492 set ScaleFormula {sqrt( (2.5 - 0.15*(abs(eta)))^2 / pt + 1.0 )} 461 493 } 462 494 -
examples/delphes_card_CMS_PileUp.tcl
rf6b6ee7 r49234af 1 2 1 ####################################### 3 2 # Order of execution of various modules … … 21 20 TrackPileUpSubtractor 22 21 NeutralTowerMerger 22 EFlowMergerAllTracks 23 23 EFlowMerger 24 24 25 NeutrinoFilter 25 26 GenJetFinder 26 27 … … 67 68 68 69 # average expected pile up 69 set MeanPileUp 1070 set MeanPileUp 50 70 71 71 72 # maximum spread in the beam direction in m … … 253 254 set TowerOutputArray towers 254 255 set PhotonOutputArray photons 256 257 set EcalTowerMinEnergy 0.5 258 set HcalTowerMinEnergy 1.0 259 260 set EcalTowerMinSignificance 1.0 261 set HcalTowerMinSignificance 1.0 255 262 256 263 set EFlowTrackOutputArray eflowTracks … … 347 354 } 348 355 356 ################################## 357 # Energy flow merger (all tracks) 358 ################################## 359 360 module Merger EFlowMergerAllTracks { 361 # add InputArray InputArray 362 add InputArray TrackMerger/tracks 363 add InputArray Calorimeter/eflowPhotons 364 add InputArray Calorimeter/eflowNeutralHadrons 365 set OutputArray eflow 366 } 367 349 368 350 369 #################### … … 361 380 362 381 382 363 383 ############# 364 384 # Rho pile-up 365 385 ############# 366 386 367 module FastJet Finder Rho {368 # set InputArray Calorimeter/towers 387 module FastJetGridMedianEstimator Rho { 388 369 389 set InputArray EFlowMerger/eflow 370 371 set ComputeRho true372 390 set RhoOutputArray rho 373 391 374 # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area 375 set AreaAlgorithm 5 376 377 # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt 378 set JetAlgorithm 4 379 set ParameterR 0.6 380 set GhostEtaMax 5.0 381 382 add RhoEtaRange 0.0 2.5 383 add RhoEtaRange 2.5 5.0 384 385 set JetPTMin 0.0 386 } 392 # etamin etamax gridsize_eta gridsize_phi 393 394 add GridRange 0.0 2.5 1.0 1.0 395 add GridRange 2.5 5.0 1.0 1.0 396 397 } 398 399 ##################### 400 # Neutrino Filter 401 ##################### 402 403 module PdgCodeFilter NeutrinoFilter { 404 405 set InputArray Delphes/stableParticles 406 set OutputArray filteredParticles 407 408 set PTMin 0.0 409 410 add PdgCode {12} 411 add PdgCode {14} 412 add PdgCode {16} 413 add PdgCode {-12} 414 add PdgCode {-14} 415 add PdgCode {-16} 416 417 } 418 419 387 420 388 421 ##################### … … 391 424 392 425 module FastJetFinder GenJetFinder { 393 set InputArray Delphes/stableParticles426 set InputArray NeutrinoFilter/filteredParticles 394 427 395 428 set OutputArray jets … … 583 616 module Merger MissingET { 584 617 # add InputArray InputArray 585 add InputArray EFlowMerger /eflow618 add InputArray EFlowMergerAllTracks/eflow 586 619 set MomentumOutputArray momentum 587 620 } -
examples/delphes_card_FCC_basic.tcl
rf6b6ee7 r49234af 24 24 25 25 MissingET 26 26 27 NeutrinoFilter 27 28 GenJetFinder 28 29 FastJetFinder … … 394 395 395 396 ##################### 397 # Neutrino Filter 398 ##################### 399 400 module PdgCodeFilter NeutrinoFilter { 401 402 set InputArray Delphes/stableParticles 403 set OutputArray filteredParticles 404 405 set PTMin 0.0 406 407 add PdgCode {12} 408 add PdgCode {14} 409 add PdgCode {16} 410 add PdgCode {-12} 411 add PdgCode {-14} 412 add PdgCode {-16} 413 414 } 415 416 417 ##################### 396 418 # MC truth jet finder 397 419 ##################### 398 420 399 421 module FastJetFinder GenJetFinder { 400 set InputArray Delphes/stableParticles422 set InputArray NeutrinoFilter/filteredParticles 401 423 402 424 set OutputArray jets
Note:
See TracChangeset
for help on using the changeset viewer.