Fork me on GitHub

Changeset eee94204 in git


Ignore:
Timestamp:
Oct 15, 2021, 11:37:55 AM (3 years ago)
Author:
michele <michele.selvaggi@…>
Branches:
master
Children:
10c0ebe
Parents:
83e77ee
Message:

fixed bug introduced on calo tower postion

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/DualReadoutCalorimeter.cc

    r83e77ee reee94204  
    510510  if(!fTower) return;
    511511
    512 
    513512  // if no hadronic energy, use ECAL resolution
    514513  if (fHCalTowerEnergy <= fHCalEnergyMin)
     
    528527
    529528  energy = LogNormal(energy, sigma);
    530   //cout<<energy<<","<<ecalEnergy<<","<<hcalEnergy<<endl;
    531529
    532530  if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0;
     
    561559
    562560  // check whether barrel or endcap tower
    563   if ((fTowerRmax - fTower->Position.Perp()) < 1.e-06 && TMath::Abs(eta) > 0.)
     561
     562  // endcap
     563  if (TMath::Abs(fTower->Position.Pt() - fTowerRmax) > 1.e-06 && TMath::Abs(eta) > 0.){
    564564    r = fTower->Position.Z()/TMath::SinH(eta);
    565   else
     565  }
     566  // barrel
     567  else {
    566568    r = fTower->Position.Pt();
     569  }
    567570
    568571  fTower->Position.SetPtEtaPhiE(r, eta, phi, time);
    569 
    570572  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    571573  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;
    573574
    574575  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
  • modules/SimpleCalorimeter.cc

    r83e77ee reee94204  
    450450  pt = energy / TMath::CosH(eta);
    451451
    452   // check whether barrel or endcap tower
    453   if ((fTowerRmax - fTower->Position.Perp()) < 1.e-06 && TMath::Abs(eta) > 0.)
     452  // endcap
     453  if (TMath::Abs(fTower->Position.Pt() - fTowerRmax) > 1.e-06 && TMath::Abs(eta) > 0.){
    454454    r = fTower->Position.Z()/TMath::SinH(eta);
    455   else
     455  }
     456  // barrel
     457  else {
    456458    r = fTower->Position.Pt();
     459  }
    457460
    458461  fTower->Position.SetPtEtaPhiE(r, eta, phi, time);
Note: See TracChangeset for help on using the changeset viewer.