Fork me on GitHub

Changes in / [3b99510:cb46568] in git


Ignore:
Files:
4 added
9 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r3b99510 rcb46568  
    316316        modules/EnergySmearing.h \
    317317        modules/MomentumSmearing.h \
     318        modules/TrackSmearing.h \
    318319        modules/ImpactParameterSmearing.h \
    319320        modules/TimeSmearing.h \
     
    338339        modules/StatusPidFilter.h \
    339340        modules/PdgCodeFilter.h \
     341        modules/BeamSpotFilter.h \
    340342        modules/Cloner.h \
    341343        modules/Weighter.h \
     
    546548        classes/DelphesFactory.h \
    547549        classes/DelphesFormula.h
     550tmp/modules/BeamSpotFilter.$(ObjSuf): \
     551        modules/BeamSpotFilter.$(SrcSuf) \
     552        modules/BeamSpotFilter.h \
     553        classes/DelphesClasses.h \
     554        classes/DelphesFactory.h \
     555        classes/DelphesFormula.h \
     556        external/ExRootAnalysis/ExRootResult.h \
     557        external/ExRootAnalysis/ExRootFilter.h \
     558        external/ExRootAnalysis/ExRootClassifier.h
    548559tmp/modules/Calorimeter.$(ObjSuf): \
    549560        modules/Calorimeter.$(SrcSuf) \
     
    830841        modules/TrackPileUpSubtractor.$(SrcSuf) \
    831842        modules/TrackPileUpSubtractor.h \
     843        classes/DelphesClasses.h \
     844        classes/DelphesFactory.h \
     845        classes/DelphesFormula.h \
     846        external/ExRootAnalysis/ExRootResult.h \
     847        external/ExRootAnalysis/ExRootFilter.h \
     848        external/ExRootAnalysis/ExRootClassifier.h
     849tmp/modules/TrackSmearing.$(ObjSuf): \
     850        modules/TrackSmearing.$(SrcSuf) \
     851        modules/TrackSmearing.h \
    832852        classes/DelphesClasses.h \
    833853        classes/DelphesFactory.h \
     
    915935        tmp/modules/AngularSmearing.$(ObjSuf) \
    916936        tmp/modules/BTagging.$(ObjSuf) \
     937        tmp/modules/BeamSpotFilter.$(ObjSuf) \
    917938        tmp/modules/Calorimeter.$(ObjSuf) \
    918939        tmp/modules/Cloner.$(ObjSuf) \
     
    946967        tmp/modules/TrackCountingTauTagging.$(ObjSuf) \
    947968        tmp/modules/TrackPileUpSubtractor.$(ObjSuf) \
     969        tmp/modules/TrackSmearing.$(ObjSuf) \
    948970        tmp/modules/TreeWriter.$(ObjSuf) \
    949971        tmp/modules/UniqueObjectFinder.$(ObjSuf) \
     
    15451567        tmp/external/tcl/tclVar.$(ObjSuf)
    15461568
     1569modules/TrackSmearing.h: \
     1570        classes/DelphesModule.h
     1571        @touch $@
     1572
    15471573external/fastjet/ClusterSequence.hh: \
    15481574        external/fastjet/PseudoJet.hh \
     
    19772003
    19782004modules/FastJetFinder.h: \
     2005        classes/DelphesModule.h
     2006        @touch $@
     2007
     2008modules/BeamSpotFilter.h: \
    19792009        classes/DelphesModule.h
    19802010        @touch $@
  • classes/DelphesClasses.cc

    r3b99510 rcb46568  
    127127  Momentum(0.0, 0.0, 0.0, 0.0),
    128128  Position(0.0, 0.0, 0.0, 0.0),
     129  InitialPosition(0.0, 0.0, 0.0, 0.0),
    129130  Area(0.0, 0.0, 0.0, 0.0),
    130   Dxy(0), SDxy(0), Xd(0), Yd(0), Zd(0),
     131  L(0),
     132  D0(0), ErrorD0(0),
     133  DZ(0), ErrorDZ(0),
     134  P(0),  ErrorP(0),
     135  PT(0), ErrorPT(0),
     136  CtgTheta(0), ErrorCtgTheta(0),
     137  Phi(0), ErrorPhi(0), 
     138  Xd(0), Yd(0), Zd(0),
    131139  TrackResolution(0),
    132140  NCharged(0),
     
    262270  object.Momentum = Momentum;
    263271  object.Position = Position;
     272  object.InitialPosition = Position;
    264273  object.Area = Area;
    265   object.Dxy = Dxy;
    266   object.SDxy = SDxy;
     274  object.L = L;
     275  object.D0 = D0;
     276  object.ErrorD0 = ErrorD0;
     277  object.DZ = DZ;
     278  object.ErrorDZ = ErrorDZ;
     279  object.P = P;
     280  object.ErrorP = ErrorP;
     281  object.PT = PT;
     282  object.ErrorPT = ErrorPT;
     283  object.CtgTheta = CtgTheta ;
     284  object.ErrorCtgTheta = ErrorCtgTheta;
     285  object.Phi = Phi;
     286  object.ErrorPhi = ErrorPhi; 
    267287  object.Xd = Xd;
    268288  object.Yd = Yd;
     
    363383  Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0);
    364384  Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
     385  InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
    365386  Area.SetXYZT(0.0, 0.0, 0.0, 0.0);
    366   Dxy = 0.0;
    367   SDxy = 0.0;
     387  L = 0.0;
     388  D0 = 0.0; 
     389  ErrorD0 = 0.0;
     390  DZ = 0.0;
     391  ErrorDZ = 0.0;
     392  P =0.0;
     393  ErrorP =0.0;
     394  PT = 0.0;
     395  ErrorPT = 0.0;
     396  CtgTheta = 0.0;
     397  ErrorCtgTheta = 0.0;
     398  Phi = 0.0;
     399  ErrorPhi = 0.0;
    368400  Xd = 0.0;
    369401  Yd = 0.0;
  • classes/DelphesClasses.h

    r3b99510 rcb46568  
    415415  Float_t TOuter; // track position (z component) at the tracker edge
    416416
    417   Float_t Dxy;     // track signed transverse impact parameter
    418   Float_t SDxy;    // signed error on the track signed transverse impact parameter
     417  Float_t D0;     // track signed transverse impact parameter
     418  Float_t ErrorD0;    // signed error on the track signed transverse impact parameter
    419419  Float_t Xd;      // X coordinate of point of closest approach to vertex
    420420  Float_t Yd;      // Y coordinate of point of closest approach to vertex
     
    526526  Float_t DeltaPhi;
    527527
    528   TLorentzVector Momentum, Position, Area;
    529 
    530   Float_t Dxy;
    531   Float_t SDxy;
     528  TLorentzVector Momentum, Position, InitialPosition, Area;
     529
     530  Float_t L; // path length
     531  Float_t D0;
     532  Float_t ErrorD0;
     533  Float_t DZ;
     534  Float_t ErrorDZ;
     535  Float_t P;
     536  Float_t ErrorP;
     537  Float_t PT;
     538  Float_t ErrorPT;
     539  Float_t CtgTheta;
     540  Float_t ErrorCtgTheta;
     541  Float_t Phi;
     542  Float_t ErrorPhi;
     543
    532544  Float_t Xd;
    533545  Float_t Yd;
  • modules/ImpactParameterSmearing.cc

    r3b99510 rcb46568  
    9696{
    9797  Candidate *candidate, *particle, *mother;
    98   Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy;
     98  Double_t xd, yd, zd, d0, sx, sy, sz, dd0;
    9999  Double_t pt, eta, px, py, phi, e;
    100100
     
    103103  {
    104104
    105     // take momentum before smearing (otherwise apply double smearing on dxy)
     105    // take momentum before smearing (otherwise apply double smearing on d0)
    106106    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    107107
     
    131131
    132132    // calculate impact parameter (after-smearing)
    133     dxy = (xd*py - yd*px)/pt;
     133    d0 = (xd*py - yd*px)/pt;
    134134
    135     ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
     135    dd0 = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
    136136
    137137    // fill smeared values in candidate
     
    143143    candidate->Zd = zd;
    144144
    145     candidate->Dxy = dxy;
    146     candidate->SDxy = ddxy;
     145    candidate->D0 = d0;
     146    candidate->ErrorD0 = dd0;
    147147
    148148    candidate->AddCandidate(mother);
  • modules/ModulesLinkDef.h

    r3b99510 rcb46568  
    3535#include "modules/EnergySmearing.h"
    3636#include "modules/MomentumSmearing.h"
     37#include "modules/TrackSmearing.h"
    3738#include "modules/ImpactParameterSmearing.h"
    3839#include "modules/TimeSmearing.h"
     
    5758#include "modules/StatusPidFilter.h"
    5859#include "modules/PdgCodeFilter.h"
     60#include "modules/BeamSpotFilter.h"
    5961#include "modules/Cloner.h"
    6062#include "modules/Weighter.h"
     
    7981#pragma link C++ class EnergySmearing+;
    8082#pragma link C++ class MomentumSmearing+;
     83#pragma link C++ class TrackSmearing+;
    8184#pragma link C++ class ImpactParameterSmearing+;
    8285#pragma link C++ class TimeSmearing+;
     
    101104#pragma link C++ class StatusPidFilter+;
    102105#pragma link C++ class PdgCodeFilter+;
     106#pragma link C++ class BeamSpotFilter+;
    103107#pragma link C++ class Cloner+;
    104108#pragma link C++ class Weighter+;
  • modules/ParticlePropagator.cc

    r3b99510 rcb46568  
    6666{
    6767}
     68
    6869
    6970//------------------------------------------------------------------------------
     
    9192  fItInputArray = fInputArray->MakeIterator();
    9293
     94  // import beamspot
     95 
     96  fBeamSpotInputArray = ImportArray(GetString("BeamSpotInputArray", "BeamSpotFilter/beamSpotParticle"));
     97
    9398  // create output arrays
    9499
     
    111116{
    112117  Candidate *candidate, *mother;
    113   TLorentzVector candidatePosition, candidateMomentum;
     118  TLorentzVector candidatePosition, candidateMomentum, beamSpotPosition;
    114119  Double_t px, py, pz, pt, pt2, e, q;
    115120  Double_t x, y, z, t, r, phi;
     
    120125  Double_t tmp, discr, discr2;
    121126  Double_t delta, gammam, omega, asinrho;
    122   Double_t rcu, rc2, dxy, xd, yd, zd;
    123 
     127  Double_t rcu, rc2, xd, yd, zd;
     128  Double_t l, d0, dz, p, ctgTheta, phip, etap, alpha;
     129  Double_t bsx, bsy, bsz;
     130         
    124131  const Double_t c_light = 2.99792458E8;
    125 
     132 
     133  if (!fBeamSpotInputArray->GetSize () || !fBeamSpotInputArray->At(0))
     134    beamSpotPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
     135  else
     136  {
     137    Candidate &beamSpotCandidate = *((Candidate *) fBeamSpotInputArray->At(0));
     138    beamSpotPosition = beamSpotCandidate.Position;
     139  }
     140 
    126141  fItInputArray->Reset();
    127142  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    132147    y = candidatePosition.Y()*1.0E-3;
    133148    z = candidatePosition.Z()*1.0E-3;
     149   
     150    bsx = beamSpotPosition.X()*1.0E-3;
     151    bsy = beamSpotPosition.Y()*1.0E-3;
     152    bsz = beamSpotPosition.Z()*1.0E-3;
     153   
    134154    q = candidate->Charge;
    135155
     
    181201      y_t = y + py*t;
    182202      z_t = z + pz*t;
     203     
     204      l = TMath::Sqrt( (x_t - x)*(x_t - x) + (y_t - y)*(y_t - y) + (z_t - z)*(z_t - z));
    183205
    184206      mother = candidate;
     
    186208
    187209      candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*e*1.0E3);
    188 
     210      candidate->L = l*1.0E3;
     211   
    189212      candidate->Momentum = candidateMomentum;
    190213      candidate->AddCandidate(mother);
     
    238261      yd = (rc2 > 0.0) ? yd / rc2 : -999;
    239262      zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt;
    240 
    241       // calculate impact paramater
    242       dxy = (xd*py - yd*px)/pt;
    243 
     263     
     264      // use perigee momentum rather than original particle
     265      // momentum, since the orignal particle momentum isn't known
     266     
     267      px = TMath::Sign(1.0,r) * pt * (-y_c / r_c);
     268      py = TMath::Sign(1.0,r) * pt * (x_c / r_c);
     269      etap = candidateMomentum.Eta();
     270      phip = TMath::ATan2(py, px);
     271       
     272      candidateMomentum.SetPtEtaPhiE(pt, etap, phip, candidateMomentum.E());
     273     
     274      // calculate additional track parameters (correct for beamspot position)
     275       
     276      d0        = (  (x - bsx) * py - (y - bsy) * px) / pt;
     277      dz        = z - ((x - bsx) * px + (py - bsy) * py) / pt * (pz / pt);
     278      p         = candidateMomentum.P();
     279      ctgTheta  = 1.0 / TMath::Tan (candidateMomentum.Theta ());
     280         
    244281      // 3. time evaluation t = TMath::Min(t_r, t_z)
    245282      //    t_r : time to exit from the sides
     
    287324      r_t = TMath::Hypot(x_t, y_t);
    288325
     326     
     327      // compute path length for an helix
     328     
     329      alpha = pz*1.0E9 / c_light / gammam;
     330      l = t * TMath::Sqrt(alpha*alpha + r*r*omega*omega);
     331         
    289332      if(r_t > 0.0)
    290333      {
     
    295338
    296339        candidate->Momentum = candidateMomentum;
    297         candidate->Dxy = dxy*1.0E3;
    298         candidate->Xd = xd*1.0E3;
     340       
     341        candidate->L =  l*1.0E3;
     342        candidate->D0 = d0*1.0E3;
     343        candidate->DZ = dz*1.0E3;
     344        candidate->P = p;
     345        candidate->PT = pt;
     346        candidate->CtgTheta = ctgTheta;
     347        candidate->Phi = phi;
     348
     349        candidate->Xd = xd*1.0E3;
    299350        candidate->Yd = yd*1.0E3;
    300351        candidate->Zd = zd*1.0E3;
  • modules/ParticlePropagator.h

    r3b99510 rcb46568  
    3535class TClonesArray;
    3636class TIterator;
     37class TLorentzVector;
    3738
    3839class ParticlePropagator: public DelphesModule
     
    5556
    5657  const TObjArray *fInputArray; //!
     58  const TObjArray *fBeamSpotInputArray; //!
    5759
    5860  TObjArray *fOutputArray; //!
  • modules/TrackCountingBTagging.cc

    r3b99510 rcb46568  
    9696
    9797  Double_t jpx, jpy;
    98   Double_t dr, tpx, tpy, tpt;
    99   Double_t xd, yd, dxy, ddxy, ip, sip;
     98  Double_t dr, tpt;
     99  Double_t xd, yd, d0, dd0, ip, sip;
    100100
    101101  Int_t sign;
     
    117117    {
    118118      const TLorentzVector &trkMomentum = track->Momentum;
    119 
     119     
    120120      dr = jetMomentum.DeltaR(trkMomentum);
    121 
    122121      tpt = trkMomentum.Pt();
    123       tpx = trkMomentum.Px();
    124       tpy = trkMomentum.Py();
    125 
    126122      xd = track->Xd;
    127123      yd = track->Yd;
    128       dxy = TMath::Hypot(xd, yd);
    129       ddxy = track->SDxy;
     124      d0 = TMath::Hypot(xd, yd);
     125      dd0 = track->ErrorD0;
    130126
    131127      if(tpt < fPtMin) continue;
    132128      if(dr > fDeltaR) continue;
    133       if(dxy > fIPmax) continue;
     129      if(d0 > fIPmax) continue;
    134130
    135131      sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
    136132
    137       ip = sign*dxy;
    138       sip = ip / TMath::Abs(ddxy);
     133      ip = sign*d0;
     134      sip = ip / TMath::Abs(dd0);
    139135
    140136      if(sip > fSigMin) count++;
  • modules/TreeWriter.cc

    r3b99510 rcb46568  
    292292    entry->TOuter = position.T()*1.0E-3/c_light;
    293293
    294     entry->Dxy = candidate->Dxy;
    295     entry->SDxy = candidate->SDxy ;
     294    entry->D0 = candidate->D0;
     295    entry->ErrorD0 = candidate->ErrorD0 ;
    296296    entry->Xd = candidate->Xd;
    297297    entry->Yd = candidate->Yd;
Note: See TracChangeset for help on using the changeset viewer.