Fork me on GitHub

Changeset 7c5b8f3 in git for classes


Ignore:
Timestamp:
Mar 27, 2020, 9:21:22 AM (5 years ago)
Author:
GitHub <noreply@…>
Branches:
ImprovedOutputFile, master
Children:
354b7f3
Parents:
288a5fc (diff), 36fb740 (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.
git-author:
Pavel Demin <pavel-demin@…> (03/27/20 09:21:22)
git-committer:
GitHub <noreply@…> (03/27/20 09:21:22)
Message:

Merge pull request #71 from preghenella/rdev

Radius and particle-density dependence of formula parameterisations

Location:
classes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesClasses.cc

    r288a5fc r7c5b8f3  
    172172  ExclYmerge45(0),
    173173  ExclYmerge56(0),
     174  ParticleDensity(0),
    174175  fFactory(0),
    175176  fArray(0)
  • classes/DelphesClasses.h

    r288a5fc r7c5b8f3  
    733733  Double_t ExclYmerge56;
    734734
     735  // event characteristics variables
     736  Double_t ParticleDensity; // particle multiplicity density in the proximity of the particle
     737 
    735738  static CompBase *fgCompare; //!
    736739  const CompBase *GetCompare() const { return fgCompare; }
  • classes/DelphesFormula.cc

    r288a5fc r7c5b8f3  
    1818
    1919#include "classes/DelphesFormula.h"
     20#include "classes/DelphesClasses.h"
    2021
    2122#include "TString.h"
     
    6364  buffer.ReplaceAll("dz", "[1]");
    6465  buffer.ReplaceAll("ctgTheta", "[2]");
     66  buffer.ReplaceAll("radius", "[3]");
     67  buffer.ReplaceAll("density", "[4]");
    6568
    6669#if ROOT_VERSION_CODE < ROOT_VERSION(6, 3, 0)
     
    7780//------------------------------------------------------------------------------
    7881
    79 Double_t DelphesFormula::Eval(Double_t pt, Double_t eta, Double_t phi,
    80   Double_t energy, Double_t d0, Double_t dz,
    81   Double_t ctgTheta)
     82Double_t DelphesFormula::Eval(Double_t pt, Double_t eta, Double_t phi, Double_t energy, Candidate *candidate)
    8283{
     84
     85  Double_t d0 = 0., dz = 0., ctgTheta = 0., radius = 0., density = 0.;
     86  if (candidate) {
     87    d0 = candidate->D0;
     88    dz = candidate->DZ;
     89    ctgTheta = candidate->CtgTheta;
     90    radius = candidate->Position.Pt();
     91    density = candidate->ParticleDensity;
     92  }
     93   
    8394  Double_t x[4] = {pt, eta, phi, energy};
    84   Double_t params[3] = {d0, dz, ctgTheta};
     95  Double_t params[5] = {d0, dz, ctgTheta, radius, density};
    8596  return EvalPar(x, params);
    8697}
  • classes/DelphesFormula.h

    r288a5fc r7c5b8f3  
    2222#include "TFormula.h"
    2323
     24class Candidate;
     25
    2426class DelphesFormula: public TFormula
    2527{
     
    3335  Int_t Compile(const char *expression);
    3436
    35   Double_t Eval(Double_t pt, Double_t eta = 0, Double_t phi = 0,
    36     Double_t energy = 0, Double_t d0 = 0, Double_t dz = 0,
    37     Double_t ctgTheta = 0);
     37  Double_t Eval(Double_t pt, Double_t eta = 0, Double_t phi = 0, Double_t energy = 0, Candidate *candidate = nullptr);
    3838};
    3939
Note: See TracChangeset for help on using the changeset viewer.