Changeset 61dccd3 in git
- Timestamp:
- Aug 24, 2021, 11:57:44 AM (3 years ago)
- Branches:
- master
- Children:
- 83e77ee
- Parents:
- 1ad8eca
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/DelphesClasses.cc
r1ad8eca r61dccd3 213 213 Flavor(0), FlavorAlgo(0), FlavorPhys(0), 214 214 BTag(0), BTagAlgo(0), BTagPhys(0), 215 TauTag(0), TauWeight(0.0), Eem(0.0), Ehad(0.0), 215 TauTag(0), TauWeight(0.0), Eem(0.0), Ehad(0.0), Etrk(0.0), 216 216 DeltaEta(0.0), DeltaPhi(0.0), 217 217 Momentum(0.0, 0.0, 0.0, 0.0), … … 378 378 object.Eem = Eem; 379 379 object.Ehad = Ehad; 380 object.Etrk = Etrk; 380 381 object.Edges[0] = Edges[0]; 381 382 object.Edges[1] = Edges[1]; … … 512 513 Eem = 0.0; 513 514 Ehad = 0.0; 515 Etrk = 0.0; 514 516 Edges[0] = 0.0; 515 517 Edges[1] = 0.0; -
classes/DelphesClasses.h
r1ad8eca r61dccd3 515 515 Float_t Eem; // calorimeter tower electromagnetic energy 516 516 Float_t Ehad; // calorimeter tower hadronic energy 517 Float_t Etrk; // total charged energy hitting tower 517 518 518 519 Float_t Edges[4]; // calorimeter tower edges … … 525 526 TLorentzVector P4() const; 526 527 527 ClassDef(Tower, 2)528 ClassDef(Tower, 3) 528 529 }; 529 530 … … 604 605 Float_t Eem; // calorimeter tower electromagnetic energy 605 606 Float_t Ehad; // calorimeter tower hadronic energy 607 Float_t Etrk; // total charged energy hitting tower 606 608 607 609 Float_t Edges[4]; // calorimeter tower edges … … 609 611 TRefArray Particles; // references to generated particles 610 612 611 ClassDef(ParticleFlowCandidate, 2)613 ClassDef(ParticleFlowCandidate, 3) 612 614 613 615 }; … … 674 676 Float_t Eem; 675 677 Float_t Ehad; 678 Float_t Etrk; 676 679 677 680 Float_t Edges[4]; -
modules/DualReadoutCalorimeter.cc
r1ad8eca r61dccd3 248 248 number = -1; 249 249 fTowerRmax=0.; 250 251 //cout<<"--------- new event ---------- "<<endl; 252 250 253 while((particle = static_cast<Candidate*>(fItParticleInputArray->Next()))) 251 254 { … … 391 394 fTowerTrackHits = 0; 392 395 fTowerPhotonHits = 0; 396 397 fTowerTime = 0.0; 398 fTowerTimeWeight = 0.0; 393 399 394 400 fECalTowerTrackArray->Clear(); … … 455 461 position = particle->Position; 456 462 463 457 464 // fill current tower 458 465 ecalEnergy = momentum.E() * fECalTowerFractions[number]; … … 462 469 fHCalTowerEnergy += hcalEnergy; 463 470 464 if(ecalEnergy > fTimingEnergyMin && fTower) 465 { 466 if (abs(particle->PID) != 11 || !fElectronsFromTrack) 467 { 468 fTower->ECalEnergyTimePairs.push_back(make_pair<Float_t, Float_t>(ecalEnergy, particle->Position.T())); 469 } 470 } 471 // assume combined timing measurements in ECAL/HCAL sections 472 fTowerTime += (ecalEnergy + hcalEnergy) * position.T(); //sigma_t ~ 1/sqrt(E) 473 fTowerTimeWeight += ecalEnergy + hcalEnergy; 474 //fTowerTime += (hcalEnergy) * position.T(); //sigma_t ~ 1/sqrt(E) 475 //fTowerTimeWeight += hcalEnergy; 476 //fTowerTime += position.T(); //sigma_t ~ 1/sqrt(E) 477 //fTowerTimeWeight += 1; 478 479 //cout<<" tower particle PID, pt, eta, phi, l, tof: "<<particle->PID<<", "<<momentum.E()<<", "<<momentum.Eta()<<", "<<momentum.Phi()<<", "<<position.Vect().Mag()<<", "<<position.T()/2.99792458E2<<endl; 480 //cout<<" tower particle time, weight: "<<fTowerTime/2.99792458E2<<", "<<fTowerTimeWeight<<endl; 471 481 472 482 fTower->AddCandidate(particle); … … 484 494 485 495 Candidate *track, *tower, *mother; 486 Double_t energy, pt, eta, phi, r ;496 Double_t energy, pt, eta, phi, r, time; 487 497 Double_t ecalEnergy, hcalEnergy; 488 498 Double_t ecalNeutralEnergy, hcalNeutralEnergy, neutralEnergy; … … 529 539 hcalEnergy = LogNormal(fHCalTowerEnergy, hcalSigma); 530 540 541 time = (fTowerTimeWeight < 1.0E-09) ? 0.0 : fTowerTime / fTowerTimeWeight; 542 531 543 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy); 532 544 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy); … … 535 547 if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0; 536 548 537 //cout<<"Measured energy: "<<energy<<endl;538 539 549 if(fSmearTowerCenter) 540 550 { … … 550 560 pt = energy / TMath::CosH(eta); 551 561 552 // Time calculation for tower553 fTower->NTimeHits = 0;554 sumWeightedTime = 0.0;555 sumWeight = 0.0;556 557 for(size_t i = 0; i < fTower->ECalEnergyTimePairs.size(); ++i)558 {559 weight = TMath::Power((fTower->ECalEnergyTimePairs[i].first),2);560 sumWeightedTime += weight * fTower->ECalEnergyTimePairs[i].second;561 sumWeight += weight;562 fTower->NTimeHits++;563 }564 565 562 // check whether barrel or endcap tower 566 if ( fTower->Position.Perp() < fTowerRmax&& TMath::Abs(eta) > 0.)563 if ((fTowerRmax - fTower->Position.Perp()) < 1.e-06 && TMath::Abs(eta) > 0.) 567 564 r = fTower->Position.Z()/TMath::SinH(eta); 568 565 else 569 566 r = fTower->Position.Pt(); 570 567 571 if(sumWeight > 0.0) 572 { 573 fTower->Position.SetPtEtaPhiE(r, eta, phi, sumWeightedTime/sumWeight); 574 } 575 else 576 { 577 fTower->Position.SetPtEtaPhiE(r, eta, phi, 999999.9); 578 } 568 fTower->Position.SetPtEtaPhiE(r, eta, phi, time); 569 570 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 571 fTower->L = fTower->Position.Vect().Mag(); 572 //cout<<" tower pt, eta, phi, l, tof: "<<fTower->Momentum.E()<<", "<<fTower->Momentum.Eta()<<", "<<fTower->Momentum.Phi()<<", "<<fTower->L<<", "<<fTower->Position.T()/2.99792458E2<<endl; 579 573 580 574 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 581 575 fTower->Eem = ecalEnergy; 582 576 fTower->Ehad = hcalEnergy; 583 577 fTower->Etrk = fTrackEnergy; 584 578 fTower->Edges[0] = fTowerEdges[0]; 585 579 fTower->Edges[1] = fTowerEdges[1]; … … 602 596 neutralSigma = neutralEnergy / TMath::Sqrt(fTrackSigma*fTrackSigma + sigma*sigma); 603 597 604 //cout<<"trackEnergy: "<<fTrackEnergy<<", trackSigma: "<<fTrackSigma<<", Ntracks: "<<fTowerTrackArray->GetEntries()<<endl;605 606 //cout<<"neutralEnergy: "<<neutralEnergy<<", neutralSigma: "<<neutralSigma<<", :fEnergyMin "<<fEnergyMin<<", fEnergySignificanceMin: "<<fEnergySignificanceMin<<endl;607 608 // For now, if neutral excess is significant, simply create neutral EflowPhoton tower and clone each track into eflowtrack !!! -> Creating only photons !! EFlowNeutralHadron collection will be empy!!! TO BE FIXED609 598 if(neutralEnergy > fEnergyMin && neutralSigma > fEnergySignificanceMin) 610 599 { 611 612 //cout<<"significant neutral excess found:"<<endl;613 600 // create new photon tower 614 601 tower = static_cast<Candidate*>(fTower->Clone()); 615 602 pt = neutralEnergy / TMath::CosH(eta); 616 //cout<<"Creating tower with Pt, Eta, Phi, Energy: "<<pt<<","<<eta<<","<<phi<<","<<neutralEnergy<<endl;617 603 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, neutralEnergy); 618 604 -
modules/DualReadoutCalorimeter.h
r1ad8eca r61dccd3 79 79 Double_t fTrackSigma; 80 80 81 Double_t fTowerTime; 82 Double_t fTowerTimeWeight; 83 81 84 Bool_t fSmearTowerCenter; 82 85 -
modules/SimpleCalorimeter.cc
r1ad8eca r61dccd3 451 451 452 452 // check whether barrel or endcap tower 453 if ( fTower->Position.Perp() < fTowerRmax&& TMath::Abs(eta) > 0.)453 if ((fTowerRmax - fTower->Position.Perp()) < 1.e-06 && TMath::Abs(eta) > 0.) 454 454 r = fTower->Position.Z()/TMath::SinH(eta); 455 455 else … … 458 458 fTower->Position.SetPtEtaPhiE(r, eta, phi, time); 459 459 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 460 fTower->L = fTower->Position.Vect().Mag(); 460 461 461 462 fTower->Eem = (!fIsEcal) ? 0 : energy; 462 463 fTower->Ehad = (fIsEcal) ? 0 : energy; 464 fTower->Etrk = fTrackEnergy; 463 465 464 466 fTower->Edges[0] = fTowerEdges[0]; -
modules/TreeWriter.cc
r1ad8eca r61dccd3 455 455 entry->Eem = candidate->Eem; 456 456 entry->Ehad = candidate->Ehad; 457 entry->Etrk = candidate->Etrk; 457 458 entry->Edges[0] = candidate->Edges[0]; 458 459 entry->Edges[1] = candidate->Edges[1]; … … 575 576 entry->Eem = candidate->Eem; 576 577 entry->Ehad = candidate->Ehad; 578 entry->Etrk = candidate->Etrk; 577 579 entry->Edges[0] = candidate->Edges[0]; 578 580 entry->Edges[1] = candidate->Edges[1];
Note:
See TracChangeset
for help on using the changeset viewer.