Fork me on GitHub

Changes in / [5a989eb:67a6d8a] in git


Ignore:
Files:
11 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r5a989eb r67a6d8a  
    316316        modules/EnergySmearing.h \
    317317        modules/MomentumSmearing.h \
    318         modules/TrackSmearing.h \
    319318        modules/ImpactParameterSmearing.h \
    320319        modules/TimeSmearing.h \
     
    339338        modules/StatusPidFilter.h \
    340339        modules/PdgCodeFilter.h \
    341         modules/BeamSpotFilter.h \
    342340        modules/Cloner.h \
    343341        modules/Weighter.h \
     
    345343        modules/JetFlavorAssociation.h \
    346344        modules/JetFakeParticle.h \
    347         modules/VertexSorter.h \
    348         modules/VertexFinder.h \
    349345        modules/ExampleModule.h
    350346ModulesDict$(PcmSuf): \
     
    550546        classes/DelphesFactory.h \
    551547        classes/DelphesFormula.h
    552 tmp/modules/BeamSpotFilter.$(ObjSuf): \
    553         modules/BeamSpotFilter.$(SrcSuf) \
    554         modules/BeamSpotFilter.h \
    555         classes/DelphesClasses.h \
    556         classes/DelphesFactory.h \
    557         classes/DelphesFormula.h \
    558         external/ExRootAnalysis/ExRootResult.h \
    559         external/ExRootAnalysis/ExRootFilter.h \
    560         external/ExRootAnalysis/ExRootClassifier.h
    561548tmp/modules/Calorimeter.$(ObjSuf): \
    562549        modules/Calorimeter.$(SrcSuf) \
     
    849836        external/ExRootAnalysis/ExRootFilter.h \
    850837        external/ExRootAnalysis/ExRootClassifier.h
    851 tmp/modules/TrackSmearing.$(ObjSuf): \
    852         modules/TrackSmearing.$(SrcSuf) \
    853         modules/TrackSmearing.h \
    854         classes/DelphesClasses.h \
    855         classes/DelphesFactory.h \
    856         classes/DelphesFormula.h \
    857         external/ExRootAnalysis/ExRootResult.h \
    858         external/ExRootAnalysis/ExRootFilter.h \
    859         external/ExRootAnalysis/ExRootClassifier.h
    860838tmp/modules/TreeWriter.$(ObjSuf): \
    861839        modules/TreeWriter.$(SrcSuf) \
     
    874852        classes/DelphesFactory.h \
    875853        classes/DelphesFormula.h \
    876         external/ExRootAnalysis/ExRootResult.h \
    877         external/ExRootAnalysis/ExRootFilter.h \
    878         external/ExRootAnalysis/ExRootClassifier.h
    879 tmp/modules/VertexFinder.$(ObjSuf): \
    880         modules/VertexFinder.$(SrcSuf) \
    881         modules/VertexFinder.h \
    882         classes/DelphesClasses.h \
    883         classes/DelphesFactory.h \
    884         classes/DelphesFormula.h \
    885         classes/DelphesPileUpReader.h \
    886         external/ExRootAnalysis/ExRootResult.h \
    887         external/ExRootAnalysis/ExRootFilter.h \
    888         external/ExRootAnalysis/ExRootClassifier.h
    889 tmp/modules/VertexSorter.$(ObjSuf): \
    890         modules/VertexSorter.$(SrcSuf) \
    891         modules/VertexSorter.h \
    892         classes/DelphesClasses.h \
    893         classes/DelphesFactory.h \
    894         classes/DelphesFormula.h \
    895         classes/DelphesPileUpReader.h \
    896854        external/ExRootAnalysis/ExRootResult.h \
    897855        external/ExRootAnalysis/ExRootFilter.h \
     
    957915        tmp/modules/AngularSmearing.$(ObjSuf) \
    958916        tmp/modules/BTagging.$(ObjSuf) \
    959         tmp/modules/BeamSpotFilter.$(ObjSuf) \
    960917        tmp/modules/Calorimeter.$(ObjSuf) \
    961918        tmp/modules/Cloner.$(ObjSuf) \
     
    989946        tmp/modules/TrackCountingTauTagging.$(ObjSuf) \
    990947        tmp/modules/TrackPileUpSubtractor.$(ObjSuf) \
    991         tmp/modules/TrackSmearing.$(ObjSuf) \
    992948        tmp/modules/TreeWriter.$(ObjSuf) \
    993949        tmp/modules/UniqueObjectFinder.$(ObjSuf) \
    994         tmp/modules/VertexFinder.$(ObjSuf) \
    995         tmp/modules/VertexSorter.$(ObjSuf) \
    996950        tmp/modules/Weighter.$(ObjSuf)
    997951
     
    16001554        tmp/external/tcl/tclVar.$(ObjSuf)
    16011555
    1602 modules/TrackSmearing.h: \
    1603         classes/DelphesModule.h
    1604         @touch $@
    1605 
    16061556external/fastjet/ClusterSequence.hh: \
    16071557        external/fastjet/PseudoJet.hh \
     
    18601810        @touch $@
    18611811
    1862 modules/VertexSorter.h: \
    1863         classes/DelphesModule.h \
    1864         classes/DelphesClasses.h
    1865         @touch $@
    1866 
    18671812modules/Delphes.h: \
    18681813        classes/DelphesModule.h
    1869         @touch $@
    1870 
    1871 modules/VertexFinder.h: \
    1872         classes/DelphesModule.h \
    1873         classes/DelphesClasses.h
    18741814        @touch $@
    18751815
     
    20461986
    20471987modules/FastJetFinder.h: \
    2048         classes/DelphesModule.h
    2049         @touch $@
    2050 
    2051 modules/BeamSpotFilter.h: \
    20521988        classes/DelphesModule.h
    20531989        @touch $@
  • classes/DelphesClasses.cc

    r5a989eb r67a6d8a  
    4141CompBase *Tower::fgCompare = CompE<Tower>::Instance();
    4242CompBase *HectorHit::fgCompare = CompE<HectorHit>::Instance();
    43 CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance();
    4443CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance();
    4544
     
    122121  Charge(0), Mass(0.0),
    123122  IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0),
    124   ClusterIndex(-1), ClusterNDF(0), ClusterSigma(0), SumPT2(0), BTVSumPT2(0), GenDeltaZ(0), GenSumPT2(0),
    125123  Flavor(0), FlavorAlgo(0), FlavorPhys(0),
    126124  BTag(0), BTagAlgo(0), BTagPhys(0),
     
    129127  Momentum(0.0, 0.0, 0.0, 0.0),
    130128  Position(0.0, 0.0, 0.0, 0.0),
    131   PositionError(0.0, 0.0, 0.0, 0.0),
    132   InitialPosition(0.0, 0.0, 0.0, 0.0),
    133129  Area(0.0, 0.0, 0.0, 0.0),
    134   L(0),
    135   D0(0), ErrorD0(0),
    136   DZ(0), ErrorDZ(0),
    137   P(0),  ErrorP(0),
    138   PT(0), ErrorPT(0),
    139   CtgTheta(0), ErrorCtgTheta(0),
    140   Phi(0), ErrorPhi(0), 
    141   Xd(0), Yd(0), Zd(0),
     130  Dxy(0), SDxy(0), Xd(0), Yd(0), Zd(0),
    142131  TrackResolution(0),
    143132  NCharged(0),
     
    256245  object.IsConstituent = IsConstituent;
    257246  object.IsFromConversion = IsFromConversion;
    258   object.ClusterIndex = ClusterIndex;
    259   object.ClusterNDF = ClusterNDF;
    260   object.ClusterSigma = ClusterSigma;
    261   object.SumPT2 = SumPT2;
    262   object.BTVSumPT2 = BTVSumPT2;
    263   object.GenDeltaZ = GenDeltaZ;
    264   object.GenSumPT2 = GenSumPT2;
    265247  object.Flavor = Flavor;
    266248  object.FlavorAlgo = FlavorAlgo;
     
    280262  object.Momentum = Momentum;
    281263  object.Position = Position;
    282   object.InitialPosition = InitialPosition;
    283   object.PositionError = PositionError;
    284264  object.Area = Area;
    285   object.L = L;
    286   object.ErrorT = ErrorT;
    287   object.D0 = D0;
    288   object.ErrorD0 = ErrorD0;
    289   object.DZ = DZ;
    290   object.ErrorDZ = ErrorDZ;
    291   object.P = P;
    292   object.ErrorP = ErrorP;
    293   object.PT = PT;
    294   object.ErrorPT = ErrorPT;
    295   object.CtgTheta = CtgTheta ;
    296   object.ErrorCtgTheta = ErrorCtgTheta;
    297   object.Phi = Phi;
    298   object.ErrorPhi = ErrorPhi; 
     265  object.Dxy = Dxy;
     266  object.SDxy = SDxy;
    299267  object.Xd = Xd;
    300268  object.Yd = Yd;
     
    314282  object.SumPtChargedPU = SumPtChargedPU;
    315283  object.SumPt = SumPt;
    316   object.ClusterIndex = ClusterIndex;
    317   object.ClusterNDF = ClusterNDF;
    318   object.ClusterSigma = ClusterSigma;
    319   object.SumPT2 = SumPT2;
    320  
     284
    321285  object.FracPt[0] = FracPt[0];
    322286  object.FracPt[1] = FracPt[1];
     
    399363  Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0);
    400364  Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
    401   InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
    402365  Area.SetXYZT(0.0, 0.0, 0.0, 0.0);
    403   L = 0.0;
    404   ErrorT = 0.0;
    405   D0 = 0.0; 
    406   ErrorD0 = 0.0;
    407   DZ = 0.0;
    408   ErrorDZ = 0.0;
    409   P =0.0;
    410   ErrorP =0.0;
    411   PT = 0.0;
    412   ErrorPT = 0.0;
    413   CtgTheta = 0.0;
    414   ErrorCtgTheta = 0.0;
    415   Phi = 0.0;
    416   ErrorPhi = 0.0;
     366  Dxy = 0.0;
     367  SDxy = 0.0;
    417368  Xd = 0.0;
    418369  Yd = 0.0;
     
    436387  SumPt = -999;
    437388
    438   ClusterIndex = -1;
    439   ClusterNDF = -99;
    440   ClusterSigma = 0.0;
    441   SumPT2 = 0.0;
    442   BTVSumPT2 = 0.0;
    443   GenDeltaZ = 0.0;
    444   GenSumPT2 = 0.0;
    445  
    446389  FracPt[0] = 0.0;
    447390  FracPt[1] = 0.0;
  • classes/DelphesClasses.h

    r5a989eb r67a6d8a  
    147147  Float_t Pz; // particle momentum vector (z component) | hepevt.phep[number][2]
    148148
    149   Float_t D0;
    150   Float_t DZ;
    151   Float_t P;
    152   Float_t PT;
    153   Float_t CtgTheta;
    154   Float_t Phi;
     149  Float_t PT; // particle transverse momentum
    155150  Float_t Eta; // particle pseudorapidity
     151  Float_t Phi; // particle azimuthal angle
     152
    156153  Float_t Rapidity; // particle rapidity
    157154
     
    178175  Float_t Y; // vertex position (y component)
    179176  Float_t Z; // vertex position (z component)
    180  
    181   Double_t ErrorX;
    182   Double_t ErrorY;
    183   Double_t ErrorZ;
    184 
    185   Int_t Index;
    186   Int_t NDF;
    187   Double_t Sigma;
    188   Double_t SumPT2;
    189   Double_t BTVSumPT2;
    190   Double_t GenDeltaZ;
    191   Double_t GenSumPT2;
    192 
    193   static CompBase *fgCompare; //!
    194   const CompBase *GetCompare() const { return fgCompare; }
    195 
    196   ClassDef(Vertex, 3)
     177
     178  ClassDef(Vertex, 1)
    197179};
    198180
     
    415397  Int_t Charge; // track charge
    416398
     399  Float_t PT; // track transverse momentum
     400
    417401  Float_t Eta; // track pseudorapidity
    418  
     402  Float_t Phi; // track azimuthal angle
     403
    419404  Float_t EtaOuter; // track pseudorapidity at the tracker edge
    420405  Float_t PhiOuter; // track azimuthal angle at the tracker edge
     
    430415  Float_t TOuter; // track position (z component) at the tracker edge
    431416
    432   Float_t L; // track path length
    433   Float_t ErrorT; // error on the time measurement
    434      
    435   Float_t D0;     // track signed transverse impact parameter
    436   Float_t ErrorD0;    // signed error on the track signed transverse impact parameter
    437  
    438   Float_t DZ; // track transverse momentum
    439   Float_t ErrorDZ; // track transverse momentum error
    440  
    441   Float_t P; // track transverse momentum
    442   Float_t ErrorP; // track transverse momentum error
    443  
    444   Float_t PT; // track transverse momentum
    445   Float_t ErrorPT; // track transverse momentum error
    446  
    447   Float_t CtgTheta; // track transverse momentum
    448   Float_t ErrorCtgTheta; // track transverse momentum error
    449  
    450   Float_t Phi; // track azimuthal angle
    451   Float_t ErrorPhi; // track azimuthal angle
    452  
     417  Float_t Dxy;     // track signed transverse impact parameter
     418  Float_t SDxy;    // signed error on the track signed transverse impact parameter
    453419  Float_t Xd;      // X coordinate of point of closest approach to vertex
    454420  Float_t Yd;      // Y coordinate of point of closest approach to vertex
     
    457423  TRef Particle; // reference to generated particle
    458424
    459   Int_t VertexIndex; // reference to vertex
    460  
    461425  static CompBase *fgCompare; //!
    462426  const CompBase *GetCompare() const { return fgCompare; }
     
    562526  Float_t DeltaPhi;
    563527
    564   TLorentzVector Momentum, Position, InitialPosition, PositionError, Area;
    565 
    566   Float_t L; // path length
    567   Float_t ErrorT; // path length
    568   Float_t D0;
    569   Float_t ErrorD0;
    570   Float_t DZ;
    571   Float_t ErrorDZ;
    572   Float_t P;
    573   Float_t ErrorP;
    574   Float_t PT;
    575   Float_t ErrorPT;
    576   Float_t CtgTheta;
    577   Float_t ErrorCtgTheta;
    578   Float_t Phi;
    579   Float_t ErrorPhi;
    580 
     528  TLorentzVector Momentum, Position, Area;
     529
     530  Float_t Dxy;
     531  Float_t SDxy;
    581532  Float_t Xd;
    582533  Float_t Yd;
     
    611562  Float_t SumPt;
    612563
    613   // vertex variables
    614  
    615   Int_t ClusterIndex;
    616   Int_t ClusterNDF;
    617   Double_t ClusterSigma;
    618   Double_t SumPT2;
    619   Double_t BTVSumPT2;
    620   Double_t GenDeltaZ;
    621   Double_t GenSumPT2;
    622 
    623564  // N-subjettiness variables
    624565
     
    654595  void SetFactory(DelphesFactory *factory) { fFactory = factory; }
    655596
    656   ClassDef(Candidate, 5)
     597  ClassDef(Candidate, 4)
    657598};
    658599
  • classes/SortableObject.h

    r5a989eb r67a6d8a  
    156156      return -1;
    157157    else if(t1->ET < t2->ET)
    158       return 1;
    159     else
    160       return 0;
    161   }
    162 };
    163 
    164 //---------------------------------------------------------------------------
    165 
    166 template <typename T>
    167 class CompSumPT2: public CompBase
    168 {
    169   CompSumPT2() {}
    170 public:
    171   static CompSumPT2 *Instance()
    172   {
    173     static CompSumPT2 single;
    174     return &single;
    175   }
    176 
    177   Int_t Compare(const TObject *obj1, const TObject *obj2) const
    178   {
    179     const T *t1 = static_cast<const T*>(obj1);
    180     const T *t2 = static_cast<const T*>(obj2);
    181     if(t1->SumPT2 > t2->SumPT2)
    182       return -1;
    183     else if(t1->SumPT2 < t2->SumPT2)
    184158      return 1;
    185159    else
  • doc/genMakefile.tcl

    r5a989eb r67a6d8a  
    260260executableDeps {converters/*.cpp} {examples/*.cpp}
    261261
    262 executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} {readers/DelphesROOT.cpp}
     262executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp}
    263263
    264264puts {ifeq ($(HAS_CMSSW),true)}
  • modules/ImpactParameterSmearing.cc

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

    r5a989eb r67a6d8a  
    3535#include "modules/EnergySmearing.h"
    3636#include "modules/MomentumSmearing.h"
    37 #include "modules/TrackSmearing.h"
    3837#include "modules/ImpactParameterSmearing.h"
    3938#include "modules/TimeSmearing.h"
     
    5857#include "modules/StatusPidFilter.h"
    5958#include "modules/PdgCodeFilter.h"
    60 #include "modules/BeamSpotFilter.h"
    6159#include "modules/Cloner.h"
    6260#include "modules/Weighter.h"
     
    6462#include "modules/JetFlavorAssociation.h"
    6563#include "modules/JetFakeParticle.h"
    66 #include "modules/VertexSorter.h"
    67 #include "modules/VertexFinder.h"
    68 #include "modules/VertexFinder4D.h"
    6964#include "modules/ExampleModule.h"
    7065
     
    8479#pragma link C++ class EnergySmearing+;
    8580#pragma link C++ class MomentumSmearing+;
    86 #pragma link C++ class TrackSmearing+;
    8781#pragma link C++ class ImpactParameterSmearing+;
    8882#pragma link C++ class TimeSmearing+;
     
    107101#pragma link C++ class StatusPidFilter+;
    108102#pragma link C++ class PdgCodeFilter+;
    109 #pragma link C++ class BeamSpotFilter+;
    110103#pragma link C++ class Cloner+;
    111104#pragma link C++ class Weighter+;
     
    113106#pragma link C++ class JetFlavorAssociation+;
    114107#pragma link C++ class JetFakeParticle+;
    115 #pragma link C++ class VertexSorter+;
    116 #pragma link C++ class VertexFinder+;
    117 #pragma link C++ class VertexFinder4D+;
    118108#pragma link C++ class ExampleModule+;
    119109
  • modules/ParticlePropagator.cc

    r5a989eb r67a6d8a  
    6666{
    6767}
    68 
    6968
    7069//------------------------------------------------------------------------------
     
    9291  fItInputArray = fInputArray->MakeIterator();
    9392
    94   // import beamspot
    95   try
    96   {
    97     fBeamSpotInputArray = ImportArray(GetString("BeamSpotInputArray", "BeamSpotFilter/beamSpotParticle"));
    98   }
    99   catch(runtime_error &e)
    100   {
    101     fBeamSpotInputArray = 0;
    102   } 
    10393  // create output arrays
    10494
     
    121111{
    122112  Candidate *candidate, *mother;
    123   TLorentzVector candidatePosition, candidateMomentum, beamSpotPosition;
     113  TLorentzVector candidatePosition, candidateMomentum;
    124114  Double_t px, py, pz, pt, pt2, e, q;
    125115  Double_t x, y, z, t, r, phi;
     
    130120  Double_t tmp, discr, discr2;
    131121  Double_t delta, gammam, omega, asinrho;
    132   Double_t rcu, rc2, xd, yd, zd;
    133   Double_t l, d0, dz, p, ctgTheta, phip, etap, alpha;
    134   Double_t bsx, bsy, bsz;
    135          
     122  Double_t rcu, rc2, dxy, xd, yd, zd;
     123
    136124  const Double_t c_light = 2.99792458E8;
    137  
    138   if (!fBeamSpotInputArray || fBeamSpotInputArray->GetSize () == 0)
    139     beamSpotPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
    140   else
    141   {
    142     Candidate &beamSpotCandidate = *((Candidate *) fBeamSpotInputArray->At(0));
    143     beamSpotPosition = beamSpotCandidate.Position;
    144   }
    145  
     125
    146126  fItInputArray->Reset();
    147127  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    152132    y = candidatePosition.Y()*1.0E-3;
    153133    z = candidatePosition.Z()*1.0E-3;
    154    
    155     bsx = beamSpotPosition.X()*1.0E-3;
    156     bsy = beamSpotPosition.Y()*1.0E-3;
    157     bsz = beamSpotPosition.Z()*1.0E-3;
    158    
    159134    q = candidate->Charge;
    160135
     
    206181      y_t = y + py*t;
    207182      z_t = z + pz*t;
    208      
    209       l = TMath::Sqrt( (x_t - x)*(x_t - x) + (y_t - y)*(y_t - y) + (z_t - z)*(z_t - z));
    210183
    211184      mother = candidate;
    212185      candidate = static_cast<Candidate*>(candidate->Clone());
    213186
    214       candidate->InitialPosition = candidatePosition;
    215187      candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*e*1.0E3);
    216       candidate->L = l*1.0E3;
    217    
     188
    218189      candidate->Momentum = candidateMomentum;
    219190      candidate->AddCandidate(mother);
     
    267238      yd = (rc2 > 0.0) ? yd / rc2 : -999;
    268239      zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt;
    269      
    270       // use perigee momentum rather than original particle
    271       // momentum, since the orignal particle momentum isn't known
    272      
    273       px = TMath::Sign(1.0,r) * pt * (-y_c / r_c);
    274       py = TMath::Sign(1.0,r) * pt * (x_c / r_c);
    275       etap = candidateMomentum.Eta();
    276       phip = TMath::ATan2(py, px);
    277        
    278       candidateMomentum.SetPtEtaPhiE(pt, etap, phip, candidateMomentum.E());
    279      
    280       // calculate additional track parameters (correct for beamspot position)
    281        
    282       d0        = (  (x - bsx) * py - (y - bsy) * px) / pt;
    283       dz        = z - ((x - bsx) * px + (y - bsy) * py) / pt * (pz / pt);
    284       p         = candidateMomentum.P();
    285       ctgTheta  = 1.0 / TMath::Tan (candidateMomentum.Theta ());
    286          
     240
     241      // calculate impact paramater
     242      dxy = (xd*py - yd*px)/pt;
     243
    287244      // 3. time evaluation t = TMath::Min(t_r, t_z)
    288245      //    t_r : time to exit from the sides
     
    330287      r_t = TMath::Hypot(x_t, y_t);
    331288
    332      
    333       // compute path length for an helix
    334      
    335       alpha = pz*1.0E9 / c_light / gammam;
    336       l = t * TMath::Sqrt(alpha*alpha + r*r*omega*omega);
    337          
    338289      if(r_t > 0.0)
    339290      {
    340        
    341         // store these variables before cloning
    342            
    343         candidate->D0 = d0*1.0E3;
    344         candidate->DZ = dz*1.0E3;
    345         candidate->P  = p;
    346         candidate->PT = pt;
    347         candidate->CtgTheta = ctgTheta;
    348         candidate->Phi = phip;
    349      
    350291        mother = candidate;
    351292        candidate = static_cast<Candidate*>(candidate->Clone());
    352293
    353         candidate->InitialPosition = candidatePosition;
    354294        candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*c_light*1.0E3);
    355295
    356296        candidate->Momentum = candidateMomentum;
    357        
    358             candidate->L  =  l*1.0E3;
    359        
    360             candidate->Xd = xd*1.0E3;
     297        candidate->Dxy = dxy*1.0E3;
     298        candidate->Xd = xd*1.0E3;
    361299        candidate->Yd = yd*1.0E3;
    362300        candidate->Zd = zd*1.0E3;
  • modules/ParticlePropagator.h

    r5a989eb r67a6d8a  
    3535class TClonesArray;
    3636class TIterator;
    37 class TLorentzVector;
    3837
    3938class ParticlePropagator: public DelphesModule
     
    5655
    5756  const TObjArray *fInputArray; //!
    58   const TObjArray *fBeamSpotInputArray; //!
    5957
    6058  TObjArray *fOutputArray; //!
  • modules/PileUpMerger.cc

    r5a989eb r67a6d8a  
    115115  TDatabasePDG *pdg = TDatabasePDG::Instance();
    116116  TParticlePDG *pdgParticle;
    117   Int_t pid, nch, nvtx = -1;
    118   Float_t x, y, z, t, vx, vy, vz, vt;
    119   Float_t px, py, pz, e, pt;
    120   Double_t dz, dphi, dt, sumpt2, dz0, dt0;
     117  Int_t pid;
     118  Float_t x, y, z, t, vx, vy;
     119  Float_t px, py, pz, e;
     120  Double_t dz, dphi, dt;
    121121  Int_t numberOfEvents, event, numberOfParticles;
    122122  Long64_t allEntries, entry;
     
    132132  fFunction->GetRandom2(dz, dt);
    133133
    134   dz0 = -1.0e6;
    135   dt0 = -1.0e6;
    136 
    137134  dt *= c_light*1.0E3; // necessary in order to make t in mm/c
    138135  dz *= 1.0E3; // necessary in order to make z in mm
    139  
    140136  vx = 0.0;
    141137  vy = 0.0;
    142   vz = 0.0;
    143   vt = 0.0;
    144  
    145138  numberOfParticles = fInputArray->GetEntriesFast();
    146   nch = 0;
    147   sumpt2 = 0.0;
    148    
    149139  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    150140  {
     
    153143    z = candidate->Position.Z();
    154144    t = candidate->Position.T();
    155     pt = candidate->Momentum.Pt();
    156    
    157     // take postion and time from first stable particle
    158     if (dz0 < -999999.0)
    159       dz0 = z;
    160     if (dt0 < -999999.0)
    161       dt0 = t;
    162 
    163     // cancel any possible offset in position and time the input file
    164     candidate->Position.SetZ(z - dz0 + dz);
    165     candidate->Position.SetT(t - dt0 + dt);
    166    
    167     vz += z - dz0 + dz;
    168     vt += t - dt0 + dt;
    169    
     145    candidate->Position.SetZ(z + dz);
     146    candidate->Position.SetT(t + dt);
    170147    fParticleOutputArray->Add(candidate);
    171  
    172     if(TMath::Abs(candidate->Charge) >  1.0E-9)
    173     {
    174       nch++;   
    175       sumpt2 += pt*pt;
    176     } 
    177148  }
    178149
     
    181152    vx /= numberOfParticles;
    182153    vy /= numberOfParticles;
    183     vz /= numberOfParticles;
    184     vt /= numberOfParticles;
    185   }
    186 
    187   nvtx++;
     154  }
     155
    188156  factory = GetFactory();
    189157
    190158  vertex = factory->NewCandidate();
    191   vertex->Position.SetXYZT(vx, vy, vz, vt);
    192   vertex->ClusterIndex = nvtx;
    193   vertex->ClusterNDF = nch;
    194   vertex->SumPT2 = sumpt2;
    195   vertex->GenSumPT2 = sumpt2;
    196  
     159  vertex->Position.SetXYZT(vx, vy, dz, dt);
    197160  fVertexOutputArray->Add(vertex);
    198161
     
    207170      numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1);
    208171      break;
    209     case 2:
    210       numberOfEvents = fMeanPileUp;
    211       break;   
    212172    default:
    213173      numberOfEvents = gRandom->Poisson(fMeanPileUp);
     
    238198    vx = 0.0;
    239199    vy = 0.0;
    240    
    241200    numberOfParticles = 0;
    242     sumpt2 = 0.0;
    243    
    244201    while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
    245202    {
     
    267224      vx += candidate->Position.X();
    268225      vy += candidate->Position.Y();
    269       vz += z+dz;
    270       vt += t+dt;
    271      
    272226      ++numberOfParticles;
    273       if(TMath::Abs(candidate->Charge) >  1.0E-9)
    274       {
    275         nch++;   
    276         sumpt2 += pt*pt;
    277       }
    278        
     227
    279228      fParticleOutputArray->Add(candidate);
    280229    }
     
    285234      vy /= numberOfParticles;
    286235    }
    287    
    288     nvtx++;
    289236
    290237    vertex = factory->NewCandidate();
    291238    vertex->Position.SetXYZT(vx, vy, dz, dt);
    292    
    293     vertex->ClusterIndex = nvtx;
    294     vertex->ClusterNDF = nch;
    295     vertex->SumPT2 = sumpt2;
    296     vertex->GenSumPT2 = sumpt2;
    297    
    298239    vertex->IsPU = 1;
    299240
    300241    fVertexOutputArray->Add(vertex);
    301    
    302   }
    303 }
    304 
    305 //------------------------------------------------------------------------------
     242  }
     243}
     244
     245//------------------------------------------------------------------------------
  • modules/TimeSmearing.cc

    r5a989eb r67a6d8a  
    9999  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    100100  {
    101     const TLorentzVector &candidatePosition = candidate->InitialPosition;
     101    const TLorentzVector &candidatePosition = candidate->Position;
    102102    t = candidatePosition.T()*1.0E-3/c_light;
    103103
    104104    // apply smearing formula
    105105    t = gRandom->Gaus(t, fTimeResolution);
    106    
     106
    107107    mother = candidate;
    108108    candidate = static_cast<Candidate*>(candidate->Clone());
    109     candidate->InitialPosition.SetT(t*1.0E3*c_light);
    110     candidate->ErrorT = fTimeResolution*1.0E3*c_light;
     109    candidate->Position.SetT(t*1.0E3*c_light);
    111110
    112111    candidate->AddCandidate(mother);
  • modules/TrackCountingBTagging.cc

    r5a989eb r67a6d8a  
    9696
    9797  Double_t jpx, jpy;
    98   Double_t dr, tpt;
    99   Double_t xd, yd, d0, dd0, ip, sip;
     98  Double_t dr, tpx, tpy, tpt;
     99  Double_t xd, yd, dxy, ddxy, ip, sip;
    100100
    101101  Int_t sign;
     
    117117    {
    118118      const TLorentzVector &trkMomentum = track->Momentum;
    119      
     119
    120120      dr = jetMomentum.DeltaR(trkMomentum);
     121
    121122      tpt = trkMomentum.Pt();
     123      tpx = trkMomentum.Px();
     124      tpy = trkMomentum.Py();
     125
    122126      xd = track->Xd;
    123127      yd = track->Yd;
    124       d0 = TMath::Hypot(xd, yd);
    125       dd0 = track->ErrorD0;
     128      dxy = TMath::Hypot(xd, yd);
     129      ddxy = track->SDxy;
    126130
    127131      if(tpt < fPtMin) continue;
    128132      if(dr > fDeltaR) continue;
    129       if(d0 > fIPmax) continue;
     133      if(dxy > fIPmax) continue;
    130134
    131135      sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
    132136
    133       ip = sign*d0;
    134       sip = ip / TMath::Abs(dd0);
     137      ip = sign*dxy;
     138      sip = ip / TMath::Abs(ddxy);
    135139
    136140      if(sip > fSigMin) count++;
  • modules/TreeWriter.cc

    r5a989eb r67a6d8a  
    215215    entry->Pz = momentum.Pz();
    216216
    217     entry->D0            = candidate->D0;
    218     entry->DZ            = candidate->DZ;
    219     entry->P             = candidate->P;
    220     entry->PT            = candidate->PT;
    221     entry->CtgTheta      = candidate->CtgTheta;
    222     entry->Phi           = candidate->Phi;
    223 
    224217    entry->Eta = eta;
    225218    entry->Phi = momentum.Phi();
     
    244237
    245238  const Double_t c_light = 2.99792458E8;
    246  
    247   Double_t x, y, z, t, xError, yError, zError, sigma, sumPT2, btvSumPT2, genDeltaZ, genSumPT2;
    248   UInt_t index, ndf;
    249  
    250   array->Sort();
    251  
     239
    252240  // loop over all vertices
    253241  iterator.Reset();
    254242  while((candidate = static_cast<Candidate*>(iterator.Next())))
    255243  {
    256    
    257     index = candidate->ClusterIndex;
    258     ndf = candidate->ClusterNDF;
    259     sigma = candidate->ClusterSigma;
    260     sumPT2 = candidate->SumPT2;
    261     btvSumPT2 = candidate->BTVSumPT2;
    262     genDeltaZ = candidate->GenDeltaZ;
    263     genSumPT2 = candidate->GenSumPT2;
    264    
    265     x = candidate->Position.X();
    266     y = candidate->Position.Y();
    267     z = candidate->Position.Z();
    268     t = candidate->Position.T()*1.0E-3/c_light;
    269  
    270     xError = candidate->PositionError.X ();
    271     yError = candidate->PositionError.Y ();
    272     zError = candidate->PositionError.Z ();
     244    const TLorentzVector &position = candidate->Position;
    273245
    274246    entry = static_cast<Vertex*>(branch->NewEntry());
    275247
    276     entry->Index = index;
    277     entry->NDF = ndf;
    278     entry->Sigma = sigma;
    279     entry->SumPT2 = sumPT2;
    280     entry->BTVSumPT2 = btvSumPT2;
    281     entry->GenDeltaZ = genDeltaZ;
    282     entry->GenSumPT2 = genSumPT2;
    283    
    284     entry->X = x;
    285     entry->Y = y;
    286     entry->Z = z;
    287     entry->T = t;
    288    
    289     entry->ErrorX = xError;
    290     entry->ErrorY = yError;
    291     entry->ErrorZ = zError;
    292   }
    293 }
    294 
     248    entry->X = position.X();
     249    entry->Y = position.Y();
     250    entry->Z = position.Z();
     251    entry->T = position.T()*1.0E-3/c_light;
     252  }
     253}
    295254
    296255//------------------------------------------------------------------------------
     
    332291    entry->ZOuter = position.Z();
    333292    entry->TOuter = position.T()*1.0E-3/c_light;
    334  
    335     entry->L = candidate->L;
    336  
    337     entry->D0            = candidate->D0;
    338     entry->ErrorD0       = candidate->ErrorD0;
    339     entry->DZ            = candidate->DZ;
    340     entry->ErrorDZ       = candidate->ErrorDZ;
    341     entry->P             = candidate->P;
    342     entry->ErrorP        = candidate->ErrorP;
    343     entry->PT            = candidate->PT;
    344     entry->ErrorPT       = candidate->ErrorPT;
    345     entry->CtgTheta      = candidate->CtgTheta;
    346     entry->ErrorCtgTheta = candidate->ErrorCtgTheta;
    347     entry->Phi           = candidate->Phi;
    348     entry->ErrorPhi      = candidate->ErrorPhi;
    349    
     293
     294    entry->Dxy = candidate->Dxy;
     295    entry->SDxy = candidate->SDxy ;
    350296    entry->Xd = candidate->Xd;
    351297    entry->Yd = candidate->Yd;
     
    361307
    362308    entry->Eta = eta;
    363    
     309    entry->Phi = momentum.Phi();
     310    entry->PT = pt;
     311
    364312    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    365313    const TLorentzVector &initialPosition = particle->Position;
     
    371319
    372320    entry->Particle = particle;
    373 
    374     entry->VertexIndex = candidate->ClusterIndex;
    375 
    376321  }
    377322}
  • readers/DelphesCMSFWLite.cpp

    r5a989eb r67a6d8a  
    240240
    241241    branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class());
    242     branchRwgt = treeWriter->NewBranch("Weight", Weight::Class());
     242    branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());
    243243
    244244    confReader = new ExRootConfReader;
Note: See TracChangeset for help on using the changeset viewer.