Changeset 1357 in svn
- Timestamp:
- Mar 9, 2014, 12:10:05 PM (11 years ago)
- Location:
- trunk/examples
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/Example3.C
r1339 r1357 20 20 TH1 *fTrackDeltaEta; 21 21 22 TH1 *fTowerDeltaEem;23 TH1 *fTowerDeltaEhad;24 25 22 TH1 *fJetDeltaPT; 26 23 }; … … 82 79 "(#eta^{particle} - #eta^{track})/#eta^{particle}", "number of tracks", 83 80 100, -0.1, 0.1); 84 85 plots->fTowerDeltaEem = result->AddHist1D(86 "tower delta Eem", "(Eem^{particles} - Eem^{tower})/Eem^{particles}",87 "(Eem^{particles} - Eem^{tower})/Eem^{particles}", "number of tower",88 100, -0.5, 0.5);89 90 plots->fTowerDeltaEhad = result->AddHist1D(91 "tower delta Ehad", "(Ehad^{particles} - Ehad^{tower})/Ehad^{particles}",92 "(Ehad^{particles} - Ehad^{tower})/Ehad^{particles}", "number of tower",93 100, -5.0, 5.0);94 81 95 82 plots->fJetDeltaPT = result->AddHist1D( … … 110 97 111 98 TClonesArray *branchEFlowTrack = treeReader->UseBranch("EFlowTrack"); 112 TClonesArray *branchEFlowTower = treeReader->UseBranch("EFlowTower"); 99 TClonesArray *branchEFlowPhoton = treeReader->UseBranch("EFlowPhoton"); 100 TClonesArray *branchEFlowNeutralHadron = treeReader->UseBranch("EFlowNeutralHadron"); 113 101 TClonesArray *branchJet = treeReader->UseBranch("Jet"); 114 102 … … 188 176 } 189 177 190 // Loop over all towers in event 191 for(i = 0; i < branchEFlowTower->GetEntriesFast(); ++i) 192 { 193 tower = (Tower*) branchEFlowTower->At(i); 194 195 Eem = 0.0; 196 Ehad = 0.0; 197 skip = kFALSE; 198 for(j = 0; j < tower->Particles.GetEntriesFast(); ++j) 199 { 200 particle = (GenParticle*) tower->Particles.At(j); 201 pdgCode = TMath::Abs(particle->PID); 202 203 // skip muons and neutrinos 204 if(pdgCode == 12 || pdgCode == 13 || pdgCode == 14 || pdgCode == 16) 205 { 206 continue; 207 } 208 209 // skip K0short and Lambda 210 if(pdgCode == 310 || pdgCode == 3122) 211 { 212 skip = kTRUE; 213 } 214 215 if(pdgCode == 11 || pdgCode == 22) 216 { 217 Eem += particle->E; 218 } 219 else 220 { 221 Ehad += particle->E; 222 } 223 } 224 if(skip) continue; 225 if(Eem > 0.0 && tower->Eem > 0.0) plots->fTowerDeltaEem->Fill((Eem - tower->Eem)/Eem); 226 if(Ehad > 0.0 && tower->Ehad > 0.0) plots->fTowerDeltaEhad->Fill((Ehad - tower->Ehad)/Ehad); 227 } 178 cout<<"-- New event -- "<<endl; 228 179 229 180 // Loop over all jets in event … … 233 184 234 185 momentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0); 186 187 cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl; 235 188 236 189 // Loop over all jet's constituents … … 244 197 if(object->IsA() == GenParticle::Class()) 245 198 { 199 cout<<" GenPart pt: "<<((GenParticle*) object)->PT<<", eta: "<<((GenParticle*) object)->Eta<<", phi: "<<((GenParticle*) object)->Phi<<endl; 246 200 momentum += ((GenParticle*) object)->P4(); 247 201 } 248 202 else if(object->IsA() == Track::Class()) 249 203 { 204 cout<<" Track pt: "<<((Track*) object)->PT<<", eta: "<<((Track*) object)->Eta<<", phi: "<<((Track*) object)->Phi<<endl; 250 205 momentum += ((Track*) object)->P4(); 251 206 } 252 207 else if(object->IsA() == Tower::Class()) 253 208 { 209 cout<<" Tower pt: "<<((Tower*) object)->ET<<", eta: "<<((Tower*) object)->Eta<<", phi: "<<((Tower*) object)->Phi<<endl; 254 210 momentum += ((Tower*) object)->P4(); 255 211 } 256 212 else if(object->IsA() == Muon::Class()) 257 213 { 214 cout<<" Muon pt: "<<((Muon*) object)->PT<<", eta: "<<((Muon*) object)->Eta<<", phi: "<<((Muon*) object)->Phi<<endl; 258 215 momentum += ((Muon*) object)->P4(); 259 216 } -
trunk/examples/delphes_card_ATLAS.tcl
r1334 r1357 207 207 208 208 set EFlowTrackOutputArray eflowTracks 209 set EFlowTowerOutputArray eflowTowers 209 set EFlowPhotonOutputArray eflowPhotons 210 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 210 211 211 212 set pi [expr {acos(-1)}] … … 275 276 # add InputArray InputArray 276 277 add InputArray Calorimeter/eflowTracks 277 add InputArray Calorimeter/eflowTowers 278 add InputArray Calorimeter/eflowPhotons 279 add InputArray Calorimeter/eflowNeutralHadrons 278 280 set OutputArray eflow 279 281 } … … 387 389 module Merger MissingET { 388 390 # add InputArray InputArray 389 add InputArray Calorimeter/eflowTracks 390 add InputArray Calorimeter/eflowTowers 391 add InputArray EFlowMerger/eflow 391 392 set MomentumOutputArray momentum 392 393 } … … 446 447 447 448 # scale formula for jets 448 set ScaleFormula {1.0 8}449 set ScaleFormula {1.00} 449 450 } 450 451 … … 521 522 ################## 522 523 524 525 # tracks, towers and eflow objects are not stored by default in the output. 526 # if needed (for jet constituent or other studies), uncomment the relevant 527 # "add Branch ..." lines. 528 529 523 530 module TreeWriter TreeWriter { 524 531 # add Branch InputArray BranchName BranchClass 525 532 add Branch Delphes/allParticles Particle GenParticle 526 add Branch TrackMerger/tracks Track Track 527 add Branch Calorimeter/towers Tower Tower 533 534 # add Branch TrackMerger/tracks Track Track 535 # add Branch Calorimeter/towers Tower Tower 528 536 # add Branch Calorimeter/eflowTracks EFlowTrack Track 529 # add Branch Calorimeter/eflowTowers EFlowTower Tower 537 # add Branch Calorimeter/eflowPhotons EFlowPhoton Tower 538 # add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower 539 530 540 add Branch GenJetFinder/jets GenJet Jet 531 541 add Branch UniqueObjectFinder/jets Jet Jet -
trunk/examples/delphes_card_ATLAS_PileUp.tcl
r1345 r1357 19 19 Calorimeter 20 20 TrackPileUpSubtractor 21 NeutralTowerMerger 21 22 EFlowMerger 22 23 … … 247 248 248 249 set EFlowTrackOutputArray eflowTracks 249 set EFlowTowerOutputArray eflowTowers 250 250 set EFlowPhotonOutputArray eflowPhotons 251 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 252 251 253 set pi [expr {acos(-1)}] 252 254 … … 324 326 325 327 #################### 328 # Neutral tower merger 329 #################### 330 331 module Merger NeutralTowerMerger { 332 # add InputArray InputArray 333 add InputArray Calorimeter/eflowPhotons 334 add InputArray Calorimeter/eflowNeutralHadrons 335 set OutputArray eflowTowers 336 } 337 338 339 #################### 326 340 # Energy flow merger 327 341 #################### 328 342 329 343 module Merger EFlowMerger { 330 344 # add InputArray InputArray 331 add InputArray TrackPileUpSubtractor/eflowTracks 332 add InputArray Calorimeter/eflowTowers 345 add InputArray Calorimeter/eflowTracks 346 add InputArray Calorimeter/eflowPhotons 347 add InputArray Calorimeter/eflowNeutralHadrons 333 348 set OutputArray eflow 334 } 349 } 350 335 351 336 352 ############# … … 529 545 module Merger MissingET { 530 546 # add InputArray InputArray 531 add InputArray Calorimeter/eflowTracks 532 add InputArray Calorimeter/eflowTowers 547 add InputArray EFlowMerger/eflow 533 548 set MomentumOutputArray momentum 534 549 } 550 535 551 536 552 ################## … … 619 635 ################## 620 636 637 638 # tracks, towers and eflow objects are not stored by default in the output. 639 # if needed (for jet constituent or other studies), uncomment the relevant 640 # "add Branch ..." lines. 641 642 621 643 module TreeWriter TreeWriter { 622 644 # add Branch InputArray BranchName BranchClass 623 645 add Branch Delphes/allParticles Particle GenParticle 624 add Branch TrackMerger/tracks Track Track 625 add Branch Calorimeter/towers Tower Tower 646 647 # add Branch TrackMerger/tracks Track Track 648 # add Branch Calorimeter/towers Tower Tower 626 649 # add Branch Calorimeter/eflowTracks EFlowTrack Track 627 # add Branch Calorimeter/eflowTowers EFlowTower Tower 650 # add Branch Calorimeter/eflowPhotons EFlowPhoton Tower 651 # add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower 652 628 653 add Branch GenJetFinder/jets GenJet Jet 629 654 add Branch UniqueObjectFinder/jets Jet Jet … … 635 660 add Branch Rho/rho Rho Rho 636 661 add Branch PileUpMerger/vertices Vertex Vertex 637 } 638 662 663 } 664 665 666 -
trunk/examples/delphes_card_CMS.tcl
r1320 r1357 212 212 213 213 set EFlowTrackOutputArray eflowTracks 214 set EFlowTowerOutputArray eflowTowers 214 set EFlowPhotonOutputArray eflowPhotons 215 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 215 216 216 217 set pi [expr {acos(-1)}] … … 283 284 # add InputArray InputArray 284 285 add InputArray Calorimeter/eflowTracks 285 add InputArray Calorimeter/eflowTowers 286 add InputArray Calorimeter/eflowPhotons 287 add InputArray Calorimeter/eflowNeutralHadrons 286 288 set OutputArray eflow 287 289 } … … 292 294 293 295 module Efficiency PhotonEfficiency { 294 set InputArray Calorimeter/ photons296 set InputArray Calorimeter/eflowPhotons 295 297 set OutputArray photons 296 298 … … 397 399 module Merger MissingET { 398 400 # add InputArray InputArray 399 add InputArray Calorimeter/eflowTracks 400 add InputArray Calorimeter/eflowTowers 401 add InputArray EFlowMerger/eflow 401 402 set MomentumOutputArray momentum 402 403 } … … 457 458 458 459 # scale formula for jets 459 set ScaleFormula {1.0 8}460 set ScaleFormula {1.00} 460 461 } 461 462 … … 533 534 ################## 534 535 536 # tracks, towers and eflow objects are not stored by default in the output. 537 # if needed (for jet constituent or other studies), uncomment the relevant 538 # "add Branch ..." lines. 539 535 540 module TreeWriter TreeWriter { 536 541 # add Branch InputArray BranchName BranchClass 542 537 543 add Branch Delphes/allParticles Particle GenParticle 538 add Branch TrackMerger/tracks Track Track 539 add Branch Calorimeter/towers Tower Tower 544 545 # add Branch TrackMerger/tracks Track Track 546 # add Branch Calorimeter/towers Tower Tower 540 547 add Branch Calorimeter/eflowTracks EFlowTrack Track 541 add Branch Calorimeter/eflowTowers EFlowTower Tower 548 add Branch Calorimeter/eflowPhotons EFlowPhoton Tower 549 add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower 550 542 551 add Branch GenJetFinder/jets GenJet Jet 543 552 add Branch UniqueObjectFinder/jets Jet Jet -
trunk/examples/delphes_card_CMS_PileUp.tcl
r1349 r1357 1 1 2 ####################################### 2 3 # Order of execution of various modules … … 19 20 Calorimeter 20 21 TrackPileUpSubtractor 22 NeutralTowerMerger 21 23 EFlowMerger 22 24 … … 253 255 254 256 set EFlowTrackOutputArray eflowTracks 255 set EFlowTowerOutputArray eflowTowers 257 set EFlowPhotonOutputArray eflowPhotons 258 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 256 259 257 260 set pi [expr {acos(-1)}] … … 334 337 335 338 #################### 339 # Neutral tower merger 340 #################### 341 342 module Merger NeutralTowerMerger { 343 # add InputArray InputArray 344 add InputArray Calorimeter/eflowPhotons 345 add InputArray Calorimeter/eflowNeutralHadrons 346 set OutputArray eflowTowers 347 } 348 349 350 #################### 336 351 # Energy flow merger 337 352 #################### … … 340 355 # add InputArray InputArray 341 356 add InputArray TrackPileUpSubtractor/eflowTracks 342 add InputArray Calorimeter/eflowTowers 357 add InputArray Calorimeter/eflowPhotons 358 add InputArray Calorimeter/eflowNeutralHadrons 343 359 set OutputArray eflow 344 360 } 361 345 362 346 363 ############# … … 412 429 set JetInputArray FastJetFinder/jets 413 430 set TrackInputArray Calorimeter/eflowTracks 414 set NeutralInputArray Calorimeter/eflowTowers431 set NeutralInputArray NeutralTowerMerger/eflowTowers 415 432 416 433 set VertexInputArray PileUpMerger/vertices … … 457 474 458 475 module Efficiency PhotonEfficiency { 459 set InputArray Calorimeter/ photons476 set InputArray Calorimeter/eflowPhotons 460 477 set OutputArray photons 461 478 … … 468 485 (abs(eta) > 2.5) * (0.00)} 469 486 } 487 470 488 471 489 ################## … … 565 583 module Merger MissingET { 566 584 # add InputArray InputArray 567 add InputArray Calorimeter/eflowTracks 568 add InputArray Calorimeter/eflowTowers 585 add InputArray EFlowMerger/eflow 569 586 set MomentumOutputArray momentum 570 587 } 588 589 571 590 572 591 ################## … … 656 675 ################## 657 676 677 # tracks, towers and eflow objects are not stored by default in the output. 678 # if needed (for jet constituent or other studies), uncomment the relevant 679 # "add Branch ..." lines. 680 681 658 682 module TreeWriter TreeWriter { 659 683 # add Branch InputArray BranchName BranchClass 684 660 685 add Branch Delphes/allParticles Particle GenParticle 661 add Branch TrackMerger/tracks Track Track 662 add Branch Calorimeter/towers Tower Tower 663 add Branch Calorimeter/eflowTracks EFlowTrack Track 664 add Branch Calorimeter/eflowTowers EFlowTower Tower 686 687 # add Branch TrackMerger/tracks Track Track 688 # add Branch Calorimeter/towers Tower Tower 689 # add Branch Calorimeter/eflowTracks EFlowTrack Track 690 # add Branch Calorimeter/eflowPhotons EFlowPhoton Tower 691 # add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower 692 665 693 add Branch GenJetFinder/jets GenJet Jet 666 694 add Branch UniqueObjectFinder/jets Jet Jet
Note:
See TracChangeset
for help on using the changeset viewer.