Fork me on GitHub

Changeset b9ae4c3 in git for classes


Ignore:
Timestamp:
Sep 2, 2016, 3:46:14 PM (8 years ago)
Author:
GitHub <noreply@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
fa068d3
Parents:
ec5e04b (diff), 23389ff (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@…> (09/02/16 15:46:14)
git-committer:
GitHub <noreply@…> (09/02/16 15:46:14)
Message:

Merge pull request #32 from delphes/dev_01

Dev 01

Location:
classes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesClasses.cc

    rec5e04b rb9ae4c3  
    4141CompBase *Tower::fgCompare = CompE<Tower>::Instance();
    4242CompBase *HectorHit::fgCompare = CompE<HectorHit>::Instance();
     43CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance();
    4344CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance();
    4445
     
    121122  Charge(0), Mass(0.0),
    122123  IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0),
     124  ClusterIndex(-1), ClusterNDF(0), ClusterSigma(0), SumPT2(0), BTVSumPT2(0), GenDeltaZ(0), GenSumPT2(0),
    123125  Flavor(0), FlavorAlgo(0), FlavorPhys(0),
    124126  BTag(0), BTagAlgo(0), BTagPhys(0),
     
    127129  Momentum(0.0, 0.0, 0.0, 0.0),
    128130  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),
    129133  Area(0.0, 0.0, 0.0, 0.0),
    130   Dxy(0), SDxy(0), Xd(0), Yd(0), Zd(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),
    131142  TrackResolution(0),
    132143  NCharged(0),
     
    245256  object.IsConstituent = IsConstituent;
    246257  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;
    247265  object.Flavor = Flavor;
    248266  object.FlavorAlgo = FlavorAlgo;
     
    262280  object.Momentum = Momentum;
    263281  object.Position = Position;
     282  object.InitialPosition = InitialPosition;
     283  object.PositionError = PositionError;
    264284  object.Area = Area;
    265   object.Dxy = Dxy;
    266   object.SDxy = SDxy;
     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; 
    267299  object.Xd = Xd;
    268300  object.Yd = Yd;
     
    282314  object.SumPtChargedPU = SumPtChargedPU;
    283315  object.SumPt = SumPt;
    284 
     316  object.ClusterIndex = ClusterIndex;
     317  object.ClusterNDF = ClusterNDF;
     318  object.ClusterSigma = ClusterSigma;
     319  object.SumPT2 = SumPT2;
     320 
    285321  object.FracPt[0] = FracPt[0];
    286322  object.FracPt[1] = FracPt[1];
     
    363399  Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0);
    364400  Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
     401  InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
    365402  Area.SetXYZT(0.0, 0.0, 0.0, 0.0);
    366   Dxy = 0.0;
    367   SDxy = 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;
    368417  Xd = 0.0;
    369418  Yd = 0.0;
     
    387436  SumPt = -999;
    388437
     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 
    389446  FracPt[0] = 0.0;
    390447  FracPt[1] = 0.0;
  • classes/DelphesClasses.h

    rec5e04b rb9ae4c3  
    4949  Long64_t Number; // event number
    5050
    51   Float_t ReadTime;
    52   Float_t ProcTime;
     51  Float_t ReadTime; // read time
     52  Float_t ProcTime; // processing time
    5353
    5454  ClassDef(Event, 1)
     
    147147  Float_t Pz; // particle momentum vector (z component) | hepevt.phep[number][2]
    148148
     149  Float_t P; // particle momentum
    149150  Float_t PT; // particle transverse momentum
    150151  Float_t Eta; // particle pseudorapidity
     
    152153
    153154  Float_t Rapidity; // particle rapidity
     155  Float_t CtgTheta; // particle cotangent of theta
     156
     157  Float_t D0; // particle transverse impact parameter
     158  Float_t DZ; // particle longitudinal impact parameter
    154159
    155160  Float_t T; // particle vertex position (t component) | hepevt.vhep[number][3]
     
    163168  TLorentzVector P4() const;
    164169
    165   ClassDef(GenParticle, 1)
    166 };
    167 
    168 //---------------------------------------------------------------------------
    169 
    170 class Vertex: public TObject
    171 {
    172 public:
     170  ClassDef(GenParticle, 2)
     171};
     172
     173//---------------------------------------------------------------------------
     174
     175class Vertex: public SortableObject
     176{
     177public:
     178
    173179  Float_t T; // vertex position (t component)
    174180  Float_t X; // vertex position (x component)
     
    176182  Float_t Z; // vertex position (z component)
    177183
    178   ClassDef(Vertex, 1)
     184  Double_t ErrorT; // vertex position error (t component)
     185  Double_t ErrorX; // vertex position error (x component)
     186  Double_t ErrorY; // vertex position error (y component)
     187  Double_t ErrorZ; // vertex position error (z component)
     188
     189  Int_t Index; // vertex index
     190  Int_t NDF; // number of degrees of freedom
     191
     192  Double_t Sigma; // vertex position (z component) error
     193  Double_t SumPT2; // sum pt^2 of tracks attached to the vertex
     194  Double_t GenSumPT2; // sum pt^2 of gen tracks attached to the vertex
     195
     196  Double_t GenDeltaZ; // distance in z to closest generated vertex
     197  Double_t BTVSumPT2; // sum pt^2 of tracks attached to the secondary vertex
     198
     199  TRefArray Constituents; // references to constituents
     200
     201  static CompBase *fgCompare; //!
     202  const CompBase *GetCompare() const { return fgCompare; }
     203
     204  ClassDef(Vertex, 3)
    179205};
    180206
     
    236262  Float_t E; // photon energy
    237263
    238   Float_t T; //particle arrival time of flight
     264  Float_t T; // particle arrival time of flight
    239265
    240266  Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter
     
    242268  TRefArray Particles; // references to generated particles
    243269
    244   // Isolation variables
    245 
    246   Float_t IsolationVar;
    247   Float_t IsolationVarRhoCorr;
    248   Float_t SumPtCharged;
    249   Float_t SumPtNeutral;
    250   Float_t SumPtChargedPU;
    251   Float_t SumPt;
     270  Float_t IsolationVar; // isolation variable
     271  Float_t IsolationVarRhoCorr; // isolation variable
     272  Float_t SumPtCharged; // isolation variable
     273  Float_t SumPtNeutral; // isolation variable
     274  Float_t SumPtChargedPU; // isolation variable
     275  Float_t SumPt; // isolation variable
    252276
    253277  static CompBase *fgCompare; //!
     
    269293  Float_t Phi; // electron azimuthal angle
    270294
    271   Float_t T; //particle arrival time of flight
     295  Float_t T; // particle arrival time of flight
    272296
    273297  Int_t Charge; // electron charge
     
    277301  TRef Particle; // reference to generated particle
    278302
    279   // Isolation variables
    280 
    281   Float_t IsolationVar;
    282   Float_t IsolationVarRhoCorr;
    283   Float_t SumPtCharged;
    284   Float_t SumPtNeutral;
    285   Float_t SumPtChargedPU;
    286   Float_t SumPt;
     303  Float_t IsolationVar; // isolation variable
     304  Float_t IsolationVarRhoCorr; // isolation variable
     305  Float_t SumPtCharged; // isolation variable
     306  Float_t SumPtNeutral; // isolation variable
     307  Float_t SumPtChargedPU; // isolation variable
     308  Float_t SumPt; // isolation variable
    287309
    288310  static CompBase *fgCompare; //!
     
    304326  Float_t Phi; // muon azimuthal angle
    305327
    306   Float_t T; //particle arrival time of flight
     328  Float_t T; // particle arrival time of flight
    307329
    308330  Int_t Charge; // muon charge
     
    310332  TRef Particle; // reference to generated particle
    311333
    312    // Isolation variables
    313 
    314   Float_t IsolationVar;
    315   Float_t IsolationVarRhoCorr;
    316   Float_t SumPtCharged;
    317   Float_t SumPtNeutral;
    318   Float_t SumPtChargedPU;
    319   Float_t SumPt;
     334  Float_t IsolationVar; // isolation variable
     335  Float_t IsolationVarRhoCorr; // isolation variable
     336  Float_t SumPtCharged; // isolation variable
     337  Float_t SumPtNeutral; // isolation variable
     338  Float_t SumPtChargedPU; // isolation variable
     339  Float_t SumPt; // isolation variable
    320340
    321341  static CompBase *fgCompare; //!
     
    344364  Float_t DeltaPhi;  // jet radius in azimuthal angle
    345365
    346   UInt_t Flavor;
    347   UInt_t FlavorAlgo;
    348   UInt_t FlavorPhys;
     366  UInt_t Flavor; // jet flavor
     367  UInt_t FlavorAlgo; // jet flavor
     368  UInt_t FlavorPhys; // jet flavor
    349369
    350370  UInt_t BTag; // 0 or 1 for a jet that has been tagged as containing a heavy quark
    351   UInt_t BTagAlgo;
    352   UInt_t BTagPhys;
     371  UInt_t BTagAlgo; // 0 or 1 for a jet that has been tagged as containing a heavy quark
     372  UInt_t BTagPhys; // 0 or 1 for a jet that has been tagged as containing a heavy quark
    353373
    354374  UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau
     
    397417  Int_t Charge; // track charge
    398418
     419  Float_t P; // track momentum
    399420  Float_t PT; // track transverse momentum
    400 
    401421  Float_t Eta; // track pseudorapidity
    402422  Float_t Phi; // track azimuthal angle
     423  Float_t CtgTheta; // track cotangent of theta
    403424
    404425  Float_t EtaOuter; // track pseudorapidity at the tracker edge
    405426  Float_t PhiOuter; // track azimuthal angle at the tracker edge
    406427
     428  Float_t T; // track vertex position (t component)
    407429  Float_t X; // track vertex position (x component)
    408430  Float_t Y; // track vertex position (y component)
    409431  Float_t Z; // track vertex position (z component)
    410   Float_t T; // track vertex position (z component)
    411 
     432
     433  Float_t TOuter; // track position (t component) at the tracker edge
    412434  Float_t XOuter; // track position (x component) at the tracker edge
    413435  Float_t YOuter; // track position (y component) at the tracker edge
    414436  Float_t ZOuter; // track position (z component) at the tracker edge
    415   Float_t TOuter; // track position (z component) at the tracker edge
    416 
    417   Float_t Dxy;     // track signed transverse impact parameter
    418   Float_t SDxy;    // signed error on the track signed transverse impact parameter
    419   Float_t Xd;      // X coordinate of point of closest approach to vertex
    420   Float_t Yd;      // Y coordinate of point of closest approach to vertex
    421   Float_t Zd;      // Z coordinate of point of closest approach to vertex
     437
     438  Float_t Xd; // X coordinate of point of closest approach to vertex
     439  Float_t Yd; // Y coordinate of point of closest approach to vertex
     440  Float_t Zd; // Z coordinate of point of closest approach to vertex
     441
     442  Float_t L; // track path length
     443  Float_t D0; // track transverse impact parameter
     444  Float_t DZ; // track longitudinal impact parameter
     445
     446  Float_t ErrorP; // track momentum error
     447  Float_t ErrorPT; // track transverse momentum error
     448  Float_t ErrorPhi; // track azimuthal angle error
     449  Float_t ErrorCtgTheta; // track cotangent of theta error
     450
     451  Float_t ErrorT; // time measurement error
     452  Float_t ErrorD0; // track transverse impact parameter error
     453  Float_t ErrorDZ; // track longitudinal impact parameter error
    422454
    423455  TRef Particle; // reference to generated particle
    424456
    425   static CompBase *fgCompare; //!
    426   const CompBase *GetCompare() const { return fgCompare; }
    427 
    428   TLorentzVector P4() const;
    429 
    430   ClassDef(Track, 2)
     457  Int_t VertexIndex; // reference to vertex
     458
     459  static CompBase *fgCompare; //!
     460  const CompBase *GetCompare() const { return fgCompare; }
     461
     462  TLorentzVector P4() const;
     463
     464  ClassDef(Track, 3)
    431465};
    432466
     
    526560  Float_t DeltaPhi;
    527561
    528   TLorentzVector Momentum, Position, Area;
    529 
    530   Float_t Dxy;
    531   Float_t SDxy;
     562  TLorentzVector Momentum, Position, InitialPosition, PositionError, Area;
     563
     564  Float_t L; // path length
     565  Float_t ErrorT; // path length
     566  Float_t D0;
     567  Float_t ErrorD0;
     568  Float_t DZ;
     569  Float_t ErrorDZ;
     570  Float_t P;
     571  Float_t ErrorP;
     572  Float_t PT;
     573  Float_t ErrorPT;
     574  Float_t CtgTheta;
     575  Float_t ErrorCtgTheta;
     576  Float_t Phi;
     577  Float_t ErrorPhi;
     578
    532579  Float_t Xd;
    533580  Float_t Yd;
     
    535582
    536583  // tracking resolution
    537  
     584
    538585  Float_t TrackResolution;
    539586
     
    562609  Float_t SumPt;
    563610
     611  // vertex variables
     612
     613  Int_t ClusterIndex;
     614  Int_t ClusterNDF;
     615  Double_t ClusterSigma;
     616  Double_t SumPT2;
     617  Double_t BTVSumPT2;
     618  Double_t GenDeltaZ;
     619  Double_t GenSumPT2;
     620
    564621  // N-subjettiness variables
    565622
     
    595652  void SetFactory(DelphesFactory *factory) { fFactory = factory; }
    596653
    597   ClassDef(Candidate, 4)
     654  ClassDef(Candidate, 5)
    598655};
    599656
  • classes/SortableObject.h

    rec5e04b rb9ae4c3  
    156156      return -1;
    157157    else if(t1->ET < t2->ET)
     158      return 1;
     159    else
     160      return 0;
     161  }
     162};
     163
     164//---------------------------------------------------------------------------
     165
     166template <typename T>
     167class CompSumPT2: public CompBase
     168{
     169  CompSumPT2() {}
     170public:
     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)
    158184      return 1;
    159185    else
Note: See TracChangeset for help on using the changeset viewer.