Changeset de2e39d in git
- Timestamp:
- Jun 11, 2020, 6:07:17 PM (5 years ago)
- Branches:
- master
- Children:
- 6c6efd1
- Parents:
- 5c716fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/DualReadoutCalorimeter.cc
r5c716fa rde2e39d 172 172 fECalEnergyMin = GetDouble("ECalEnergyMin", 0.0); 173 173 fHCalEnergyMin = GetDouble("HCalEnergyMin", 0.0); 174 fEnergyMin = GetDouble("EnergyMin", 0.0); 174 175 175 176 fECalEnergySignificanceMin = GetDouble("ECalEnergySignificanceMin", 0.0); 176 177 fHCalEnergySignificanceMin = GetDouble("HCalEnergySignificanceMin", 0.0); 178 fEnergySignificanceMin = GetDouble("EnergySignificanceMin", 0.0); 177 179 178 180 // switch on or off the dithering of the center of DualReadoutCalorimeter towers … … 631 633 //cout<<"trackEnergy: "<<fTrackEnergy<<", trackSigma: "<<fTrackSigma<<", Ntracks: "<<fTowerTrackArray->GetEntries()<<endl; 632 634 633 //cout<<"neutralEnergy: "<<neutralEnergy<<", neutralSigma: "<<neutralSigma<< endl;635 //cout<<"neutralEnergy: "<<neutralEnergy<<", neutralSigma: "<<neutralSigma<<", :fEnergyMin "<<fEnergyMin<<", fEnergySignificanceMin: "<<fEnergySignificanceMin<<endl; 634 636 635 637 // 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 FIXED … … 647 649 tower->PID = 22; 648 650 651 652 649 653 fEFlowPhotonOutputArray->Add(tower); 650 654 … … 688 692 689 693 690 /*691 // fill energy flow candidates692 fECalTrackSigma = TMath::Sqrt(fECalTrackSigma);693 fHCalTrackSigma = TMath::Sqrt(fHCalTrackSigma);694 695 //compute neutral excesses696 ecalNeutralEnergy = max( (ecalEnergy - fECalTrackEnergy) , 0.0);697 hcalNeutralEnergy = max( (hcalEnergy - fHCalTrackEnergy) , 0.0);698 699 ecalNeutralSigma = ecalNeutralEnergy / TMath::Sqrt(fECalTrackSigma*fECalTrackSigma + ecalSigma*ecalSigma);700 hcalNeutralSigma = hcalNeutralEnergy / TMath::Sqrt(fHCalTrackSigma*fHCalTrackSigma + hcalSigma*hcalSigma);701 702 // if ecal neutral excess is significant, simply create neutral EflowPhoton tower and clone each track into eflowtrack703 if(ecalNeutralEnergy > fECalEnergyMin && ecalNeutralSigma > fECalEnergySignificanceMin)704 {705 // create new photon tower706 tower = static_cast<Candidate*>(fTower->Clone());707 pt = ecalNeutralEnergy / TMath::CosH(eta);708 709 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalNeutralEnergy);710 tower->Eem = ecalNeutralEnergy;711 tower->Ehad = 0.0;712 tower->PID = 22;713 714 fEFlowPhotonOutputArray->Add(tower);715 716 //clone tracks717 fItECalTowerTrackArray->Reset();718 while((track = static_cast<Candidate*>(fItECalTowerTrackArray->Next())))719 {720 mother = track;721 track = static_cast<Candidate*>(track->Clone());722 track->AddCandidate(mother);723 724 fEFlowTrackOutputArray->Add(track);725 }726 727 }728 729 // if neutral excess is not significant, rescale eflow tracks, such that the total charged equals the best measurement given by the DualReadoutCalorimeter and tracking730 else if(fECalTrackEnergy > 0.0)731 {732 weightTrack = (fECalTrackSigma > 0.0) ? 1 / (fECalTrackSigma*fECalTrackSigma) : 0.0;733 weightCalo = (ecalSigma > 0.0) ? 1 / (ecalSigma*ecalSigma) : 0.0;734 735 bestEnergyEstimate = (weightTrack*fECalTrackEnergy + weightCalo*ecalEnergy) / (weightTrack + weightCalo);736 rescaleFactor = bestEnergyEstimate/fECalTrackEnergy;737 738 //rescale tracks739 fItECalTowerTrackArray->Reset();740 while((track = static_cast<Candidate*>(fItECalTowerTrackArray->Next())))741 {742 mother = track;743 track = static_cast<Candidate*>(track->Clone());744 track->AddCandidate(mother);745 746 track->Momentum *= rescaleFactor;747 748 fEFlowTrackOutputArray->Add(track);749 }750 }751 752 753 // if hcal neutral excess is significant, simply create neutral EflowNeutralHadron tower and clone each track into eflowtrack754 if(hcalNeutralEnergy > fHCalEnergyMin && hcalNeutralSigma > fHCalEnergySignificanceMin)755 {756 // create new photon tower757 tower = static_cast<Candidate*>(fTower->Clone());758 pt = hcalNeutralEnergy / TMath::CosH(eta);759 760 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalNeutralEnergy);761 tower->Ehad = hcalNeutralEnergy;762 tower->Eem = 0.0;763 764 fEFlowNeutralHadronOutputArray->Add(tower);765 766 //clone tracks767 fItHCalTowerTrackArray->Reset();768 while((track = static_cast<Candidate*>(fItHCalTowerTrackArray->Next())))769 {770 mother = track;771 track = static_cast<Candidate*>(track->Clone());772 track->AddCandidate(mother);773 774 fEFlowTrackOutputArray->Add(track);775 }776 777 }778 779 // if neutral excess is not significant, rescale eflow tracks, such that the total charged equals the best measurement given by the DualReadoutCalorimeter and tracking780 else if(fHCalTrackEnergy > 0.0)781 {782 weightTrack = (fHCalTrackSigma > 0.0) ? 1 / (fHCalTrackSigma*fHCalTrackSigma) : 0.0;783 weightCalo = (hcalSigma > 0.0) ? 1 / (hcalSigma*hcalSigma) : 0.0;784 785 bestEnergyEstimate = (weightTrack*fHCalTrackEnergy + weightCalo*hcalEnergy) / (weightTrack + weightCalo);786 rescaleFactor = bestEnergyEstimate / fHCalTrackEnergy;787 788 //rescale tracks789 fItHCalTowerTrackArray->Reset();790 while((track = static_cast<Candidate*>(fItHCalTowerTrackArray->Next())))791 {792 mother = track;793 track = static_cast<Candidate*>(track->Clone());794 track->AddCandidate(mother);795 796 track->Momentum *= rescaleFactor;797 798 fEFlowTrackOutputArray->Add(track);799 }800 }801 802 */803 694 } 804 695
Note:
See TracChangeset
for help on using the changeset viewer.