Fork me on GitHub

Changeset dd514ae in git for modules


Ignore:
Timestamp:
Jun 10, 2015, 4:04:47 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
8707eeb
Parents:
6ec8d18 (diff), 9c491e1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

resolve conflict in DelphesClasses.h

Location:
modules
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • modules/AngularSmearing.cc

    r6ec8d18 rdd514ae  
    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

    r6ec8d18 rdd514ae  
    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

    r6ec8d18 rdd514ae  
    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

    r6ec8d18 rdd514ae  
    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

    r6ec8d18 rdd514ae  
    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

    r6ec8d18 rdd514ae  
    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

    r6ec8d18 rdd514ae  
    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

    r6ec8d18 rdd514ae  
    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;
  • modules/SimpleCalorimeter.cc

    r6ec8d18 rdd514ae  
    149149
    150150  fEnergySignificanceMin = GetDouble("EnergySignificanceMin", 0.0);
     151
     152  // flag that says if current calo is Ecal of Hcal (will then fill correct values of Eem and Ehad)
     153  fIsEcal = GetBool("IsEcal", false);
    151154
    152155  // switch on or off the dithering of the center of calorimeter towers
     
    425428  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    426429
     430  fTower->Eem = (!fIsEcal) ? 0 : energy;
     431  fTower->Ehad = (fIsEcal) ? 0 : energy;
     432
    427433  fTower->Edges[0] = fTowerEdges[0];
    428434  fTower->Edges[1] = fTowerEdges[1];
     
    447453    pt = energy / TMath::CosH(eta);
    448454
     455    tower->Eem = (!fIsEcal) ? 0 : energy;
     456    tower->Ehad = (fIsEcal) ? 0 : energy;
     457
    449458    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    450459    fEFlowTowerOutputArray->Add(tower);
  • modules/SimpleCalorimeter.h

    r6ec8d18 rdd514ae  
     1
    12/*
    23 *  Delphes: a framework for fast simulation of a generic collider experiment
     
    7475  Bool_t fSmearTowerCenter;
    7576
     77  Bool_t fIsEcal; //!
     78
    7679  TFractionMap fFractionMap; //!
    7780  TBinMap fBinMap; //!
  • modules/TaggingParticlesSkimmer.cc

    r6ec8d18 rdd514ae  
    162162   
    163163    eta = TMath::Abs(candidate->Momentum.Eta());
    164     if(eta < fEtaMax) continue;
     164    if(eta > fEtaMax) continue;
    165165       
    166166    fOutputArray->Add(candidate);
  • modules/TauTagging.cc

    r6ec8d18 rdd514ae  
    7373
    7474  if(tau->D1 < 0) return -1;
     75
     76  if(tau->D2 < tau->D1) return -1;
    7577
    7678  if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
     
    201203  tauArray = fFilter->GetSubArray(fClassifier, 0);
    202204
    203   if(tauArray == 0) return;
    204 
    205   TIter itTauArray(tauArray);
    206 
    207205  // loop over all input jets
    208206  fItJetInputArray->Reset();
     
    217215
    218216    // loop over all input taus
    219     itTauArray.Reset();
    220     while((tau = static_cast<Candidate *>(itTauArray.Next())))
    221     {
    222       if(tau->D1 < 0) continue;
    223 
    224       if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
    225          tau->D2 >= fParticleInputArray->GetEntriesFast())
     217    if(tauArray){
     218      TIter itTauArray(tauArray);
     219      while((tau = static_cast<Candidate *>(itTauArray.Next())))
    226220      {
    227         throw runtime_error("tau's daughter index is greater than the ParticleInputArray size");
    228       }
    229 
    230       tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
    231 
    232       for(i = tau->D1; i <= tau->D2; ++i)
    233       {
    234         daughter = static_cast<Candidate *>(fParticleInputArray->At(i));
    235         if(TMath::Abs(daughter->PID) == 16) continue;
    236         tauMomentum += daughter->Momentum;
    237       }
    238 
    239       if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR)
    240       {
    241         pdgCode = 15;
    242         charge = tau->Charge;
     221        if(tau->D1 < 0) continue;
     222
     223        if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
     224           tau->D2 >= fParticleInputArray->GetEntriesFast())
     225        {
     226          throw runtime_error("tau's daughter index is greater than the ParticleInputArray size");
     227        }
     228
     229        tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
     230
     231        for(i = tau->D1; i <= tau->D2; ++i)
     232        {
     233          daughter = static_cast<Candidate *>(fParticleInputArray->At(i));
     234          if(TMath::Abs(daughter->PID) == 16) continue;
     235          tauMomentum += daughter->Momentum;
     236        }
     237
     238        if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR)
     239        {
     240          pdgCode = 15;
     241          charge = tau->Charge;
     242        }
    243243      }
    244244    }
Note: See TracChangeset for help on using the changeset viewer.