- Timestamp:
- Jul 23, 2013, 2:00:42 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/Calorimeter.cc
r1240 r1241 431 431 Double_t energy, pt, eta, phi; 432 432 Double_t ecalEnergy, hcalEnergy; 433 TIterator *itTowerTrackArray , *itTowerArray;433 TIterator *itTowerTrackArray; 434 434 435 435 if(!fTower) return; … … 492 492 { 493 493 itTowerTrackArray = fItTowerTrackArray; 494 itTowerArray = 0;495 energy = 0.0;496 494 } 497 495 else if(fTowerECalHits == fTowerECalTrackHits) 498 496 { 499 497 itTowerTrackArray = fItTowerECalTrackArray; 500 itTowerArray = fItTowerHCalArray; 501 energy = hcalEnergy; 498 499 if(hcalEnergy > 0.0) 500 { 501 DelphesFactory *factory = GetFactory(); 502 503 // create new tower 504 tower = factory->NewCandidate(); 505 506 fItTowerHCalArray->Reset(); 507 while((particle = static_cast<Candidate*>(fItTowerHCalArray->Next()))) 508 { 509 tower->AddCandidate(particle); 510 } 511 512 pt = hcalEnergy / TMath::CosH(eta); 513 514 tower->Position.SetPtEtaPhiE(1.0, eta, phi, 0.0); 515 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy); 516 tower->Eem = 0.0; 517 tower->Ehad = hcalEnergy; 518 519 tower->Edges[0] = fTowerEdges[0]; 520 tower->Edges[1] = fTowerEdges[1]; 521 tower->Edges[2] = fTowerEdges[2]; 522 tower->Edges[3] = fTowerEdges[3]; 523 524 fEFlowTowerOutputArray->Add(tower); 525 } 502 526 } 503 527 else if(fTowerHCalHits == fTowerHCalTrackHits) 504 528 { 505 529 itTowerTrackArray = fItTowerHCalTrackArray; 506 itTowerArray = fItTowerECalArray; 507 energy = ecalEnergy; 530 531 if(ecalEnergy > 0.0) 532 { 533 DelphesFactory *factory = GetFactory(); 534 535 // create new tower 536 tower = factory->NewCandidate(); 537 538 fItTowerECalArray->Reset(); 539 while((particle = static_cast<Candidate*>(fItTowerECalArray->Next()))) 540 { 541 tower->AddCandidate(particle); 542 } 543 544 pt = ecalEnergy / TMath::CosH(eta); 545 546 tower->Position.SetPtEtaPhiE(1.0, eta, phi, 0.0); 547 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy); 548 tower->Eem = ecalEnergy; 549 tower->Ehad = 0.0; 550 551 tower->Edges[0] = fTowerEdges[0]; 552 tower->Edges[1] = fTowerEdges[1]; 553 tower->Edges[2] = fTowerEdges[2]; 554 tower->Edges[3] = fTowerEdges[3]; 555 556 fEFlowTowerOutputArray->Add(tower); 557 } 508 558 } 509 559 else 510 560 { 511 561 itTowerTrackArray = 0; 512 itTowerArray = 0;513 energy = 0.0;514 562 fEFlowTowerOutputArray->Add(fTower); 515 563 } … … 523 571 } 524 572 } 525 526 if(itTowerArray && energy > 0.0)527 {528 DelphesFactory *factory = GetFactory();529 530 // create new tower531 tower = factory->NewCandidate();532 533 itTowerArray->Reset();534 while((particle = static_cast<Candidate*>(itTowerArray->Next())))535 {536 tower->AddCandidate(particle);537 }538 539 pt = energy / TMath::CosH(eta);540 541 tower->Position.SetPtEtaPhiE(1.0, eta, phi, 0.0);542 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);543 tower->Eem = energy;544 tower->Ehad = 0.0;545 546 tower->Edges[0] = fTowerEdges[0];547 tower->Edges[1] = fTowerEdges[1];548 tower->Edges[2] = fTowerEdges[2];549 tower->Edges[3] = fTowerEdges[3];550 551 fEFlowTowerOutputArray->Add(tower);552 }553 573 } 554 574 else if(energy > 0.0)
Note:
See TracChangeset
for help on using the changeset viewer.