Fork me on GitHub

Changeset 38bf1ae in git for modules


Ignore:
Timestamp:
Dec 21, 2014, 12:12:45 PM (10 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
f10999a
Parents:
6cdc544
Message:

replace CalMinEnergy and CalMinSignificance with CalEnergyMin and CalEnergySignificanceMin

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    r6cdc544 r38bf1ae  
    151151
    152152  // read min E value for towers to be saved
    153   fECalEnergyMin = GetDouble("ECalMinEnergy", 0.0);
    154   fHCalEnergyMin = GetDouble("HCalMinEnergy", 0.0);
    155 
    156   fECalSigmaMin  = GetDouble("ECalMinSignificance", 0.0);
    157   fHCalSigmaMin  = GetDouble("HCalMinSignificance", 0.0);
     153  fECalEnergyMin = GetDouble("ECalEnergyMin", 0.0);
     154  fHCalEnergyMin = GetDouble("HCalEnergyMin", 0.0);
     155
     156  fECalEnergySignificanceMin = GetDouble("ECalEnergySignificanceMin", 0.0);
     157  fHCalEnergySignificanceMin = GetDouble("HCalEnergySignificanceMin", 0.0);
    158158
    159159  // switch on or off the dithering of the center of calorimeter towers
     
    178178  fEFlowPhotonOutputArray = ExportArray(GetString("EFlowPhotonOutputArray", "eflowPhotons"));
    179179  fEFlowNeutralHadronOutputArray = ExportArray(GetString("EFlowNeutralHadronOutputArray", "eflowNeutralHadrons"));
    180 
    181180}
    182181
     
    440439
    441440  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     441  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);
    442442
    443443  ecalEnergy = LogNormal(fTowerECalEnergy, ecalSigma);
    444   ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0 : fTowerECalTime/fTowerECalTimeWeight;
    445 
    446   hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);
    447 
    448444  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    449   hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalTimeWeight;
    450 
     445
     446  ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight;
     447  hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight;
    451448
    452449  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
    453450  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
    454451
    455   ecalEnergy = (ecalEnergy < fECalEnergyMin || ecalEnergy < fECalSigmaMin*ecalSigma) ? 0 : ecalEnergy;
    456   hcalEnergy = (hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalSigmaMin*hcalSigma) ? 0 : hcalEnergy;
     452  if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0;
     453  if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0;
    457454
    458455  energy = ecalEnergy + hcalEnergy;
     
    461458  if(fDitherTowerCenter)
    462459  {
    463      eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
    464      phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     460    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
     461    phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
    465462  }
    466463  else
    467464  {
    468      eta = fTowerEta;
    469      phi = fTowerPhi;
     465    eta = fTowerEta;
     466    phi = fTowerPhi;
    470467  }
    471468
     
    482479  fTower->Edges[3] = fTowerEdges[3];
    483480
    484   if( energy > 0.0 )
     481  if(energy > 0.0)
    485482  {
    486483    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    502499
    503500  ecalEnergy -= fTrackECalEnergy;
    504   if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
    505 
    506501  hcalEnergy -= fTrackHCalEnergy;
    507   if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
     502
     503  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
     504  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
     505
     506  if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0;
     507  if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0;
    508508
    509509  energy = ecalEnergy + hcalEnergy;
     
    518518    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy);
    519519    tower->Eem = ecalEnergy;
    520     tower->Ehad = 0;
     520    tower->Ehad = 0.0;
    521521
    522522    fEFlowPhotonOutputArray->Add(tower);
     
    530530
    531531    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy);
    532     tower->Eem = 0;
     532    tower->Eem = 0.0;
    533533    tower->Ehad = hcalEnergy;
    534534
     
    548548    a = TMath::Log(mean) - 0.5*b*b;
    549549
    550     return TMath::Exp(a + b*gRandom->Gaus(0, 1));
     550    return TMath::Exp(a + b*gRandom->Gaus(0.0, 1.0));
    551551  }
    552552  else
  • modules/Calorimeter.h

    r6cdc544 r38bf1ae  
    7171  Double_t fHCalEnergyMin;
    7272
    73   Double_t fECalSigmaMin;
    74   Double_t fHCalSigmaMin;
     73  Double_t fECalEnergySignificanceMin;
     74  Double_t fHCalEnergySignificanceMin;
    7575
    7676  Bool_t fDitherTowerCenter;
Note: See TracChangeset for help on using the changeset viewer.