Fork me on GitHub

Changeset 95aa610 in git for modules


Ignore:
Timestamp:
May 11, 2015, 1:41:01 PM (10 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
3241a0e
Parents:
4a93785
Message:

fixed phi, energy dependence in efficiency, smearing, identification, btagging, angular smearing modules

Location:
modules
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • modules/AngularSmearing.cc

    r4a93785 r95aa610  
    100100{
    101101  Candidate *candidate, *mother;
    102   Double_t pt, eta, phi;
     102  Double_t pt, eta, phi, e;
    103103
    104104  fItInputArray->Reset();
     
    110110    phi = candidatePosition.Phi();
    111111    pt = candidateMomentum.Pt();
     112    e = candidateMomentum.E();
    112113
    113114    // apply smearing formula for eta,phi
    114115
    115     eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta));
    116     phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta));
     116    eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta, phi, e));
     117    phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta, phi, e));
    117118   
    118119    if(pt <= 0.0) continue;
  • modules/BTagging.cc

    r4a93785 r95aa610  
    171171{
    172172  Candidate *jet, *parton;
    173   Double_t pt, eta, phi;
     173  Double_t pt, eta, phi, e;
    174174  TObjArray *partonArray;
    175175  map< Int_t, DelphesFormula * >::iterator itEfficiencyMap;
     
    194194    phi = jetMomentum.Phi();
    195195    pt = jetMomentum.Pt();
    196 
     196    e = jetMomentum.E();
     197   
    197198    // loop over all input partons
    198199    itPartonArray.Reset();
     
    218219
    219220    // apply an efficency formula
    220     jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta)) << fBitNumber;
    221   }
    222 }
    223 
    224 //------------------------------------------------------------------------------
     221    jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber;
     222  }
     223}
     224
     225//------------------------------------------------------------------------------
  • modules/Efficiency.cc

    r4a93785 r95aa610  
    9696{
    9797  Candidate *candidate;
    98   Double_t pt, eta, phi;
     98  Double_t pt, eta, phi, e;
    9999
    100100  fItInputArray->Reset();
     
    106106    phi = candidatePosition.Phi();
    107107    pt = candidateMomentum.Pt();
     108    e = candidateMomentum.E();
    108109
    109110    // apply an efficency formula
    110     if(gRandom->Uniform() > fFormula->Eval(pt, eta)) continue;
     111    if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e)) continue;
    111112   
    112113    fOutputArray->Add(candidate);
  • modules/EnergyScale.cc

    r4a93785 r95aa610  
    104104    momentum = candidate->Momentum;
    105105
    106     scale = fFormula->Eval(momentum.Pt(), momentum.Eta());
     106    scale = fFormula->Eval(momentum.Pt(), momentum.Eta(), momentum.Phi(), momentum.E());
    107107
    108108    if(scale > 0.0) momentum *= scale;
  • modules/EnergySmearing.cc

    r4a93785 r95aa610  
    9696{
    9797  Candidate *candidate, *mother;
    98   Double_t energy, eta, phi;
     98  Double_t pt, energy, eta, phi;
    9999
    100100  fItInputArray->Reset();
     
    103103    const TLorentzVector &candidatePosition = candidate->Position;
    104104    const TLorentzVector &candidateMomentum = candidate->Momentum;
     105   
     106    pt = candidatePosition.Pt();
    105107    eta = candidatePosition.Eta();
    106108    phi = candidatePosition.Phi();
     
    108110 
    109111    // apply smearing formula
    110     energy = gRandom->Gaus(energy, fFormula->Eval(0.0, eta, 0.0, energy));
     112    energy = gRandom->Gaus(energy, fFormula->Eval(pt, eta, phi, energy));
    111113     
    112114    if(energy <= 0.0) continue;
  • modules/IdentificationMap.cc

    r4a93785 r95aa610  
    127127{
    128128  Candidate *candidate;
    129   Double_t pt, eta, phi;
     129  Double_t pt, eta, phi, e;
    130130  TMisIDMap::iterator itEfficiencyMap;
    131131  pair <TMisIDMap::iterator, TMisIDMap::iterator> range;
     
    143143    phi = candidatePosition.Phi();
    144144    pt = candidateMomentum.Pt();
     145    e = candidateMomentum.E();
     146   
    145147    pdgCodeIn = candidate->PID;
    146148    charge = candidate->Charge;
     
    164166      pdgCodeOut = (it->second).first;
    165167
    166       p = formula->Eval(pt, eta);
     168      p = formula->Eval(pt, eta, phi, e);
    167169
    168170      if(total <= r && r < total + p)
  • modules/ImpactParameterSmearing.cc

    r4a93785 r95aa610  
    9797  Candidate *candidate, *particle, *mother;
    9898  Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy;
    99   Double_t pt, eta, px, py;
     99  Double_t pt, eta, px, py, phi, e;
    100100
    101101  fItInputArray->Reset();
     
    110110    eta = candidateMomentum.Eta();
    111111    pt = candidateMomentum.Pt();
     112    phi = candidateMomentum.Phi();
     113    e = candidateMomentum.E();
     114   
    112115    px = candidateMomentum.Px();
    113116    py = candidateMomentum.Py();
     
    119122
    120123    // calculate smeared values
    121     sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
    122     sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
    123     sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     124    sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
     125    sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
     126    sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
    124127
    125128    xd += sx;
     
    130133    dxy = (xd*py - yd*px)/pt;
    131134
    132     ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     135    ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
    133136
    134137    // fill smeared values in candidate
  • modules/MomentumSmearing.cc

    r4a93785 r95aa610  
    9696{
    9797  Candidate *candidate, *mother;
    98   Double_t pt, eta, phi;
     98  Double_t pt, eta, phi, e;
    9999
    100100  fItInputArray->Reset();
     
    106106    phi = candidatePosition.Phi();
    107107    pt = candidateMomentum.Pt();
     108    e = candidateMomentum.E();
    108109
    109110    // apply smearing formula
    110     pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta) * pt);
     111    pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt);
    111112   
    112113    if(pt <= 0.0) continue;
Note: See TracChangeset for help on using the changeset viewer.