Fork me on GitHub

Changeset 341014c in git for classes


Ignore:
Timestamp:
Feb 12, 2019, 9:29:17 PM (6 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, llp, master
Children:
6455202
Parents:
45e58be
Message:

apply .clang-format to all .h, .cc and .cpp files

Location:
classes
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesClasses.cc

    r45e58be r341014c  
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    18 
    1918
    2019/**
     
    133132  Area(0.0, 0.0, 0.0, 0.0),
    134133  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), 
     134  D0(0), ErrorD0(0),
     135  DZ(0), ErrorDZ(0),
     136  P(0), ErrorP(0),
     137  PT(0), ErrorPT(0),
     138  CtgTheta(0), ErrorCtgTheta(0),
     139  Phi(0), ErrorPhi(0),
     140  Xd(0), Yd(0), Zd(0),
    142141  TrackResolution(0),
    143142  NCharged(0),
     
    236235  return kFALSE;
    237236}
    238 
    239237
    240238//------------------------------------------------------------------------------
     
    304302  object.PT = PT;
    305303  object.ErrorPT = ErrorPT;
    306   object.CtgTheta = CtgTheta ;
     304  object.CtgTheta = CtgTheta;
    307305  object.ErrorCtgTheta = ErrorCtgTheta;
    308306  object.Phi = Phi;
    309   object.ErrorPhi = ErrorPhi; 
     307  object.ErrorPhi = ErrorPhi;
    310308  object.Xd = Xd;
    311309  object.Yd = Yd;
     
    327325  object.ClusterIndex = ClusterIndex;
    328326  object.ClusterNDF = ClusterNDF;
    329   object.ClusterSigma = ClusterSigma; 
     327  object.ClusterSigma = ClusterSigma;
    330328  object.SumPT2 = SumPT2;
    331  
     329
    332330  object.FracPt[0] = FracPt[0];
    333331  object.FracPt[1] = FracPt[1];
     
    361359  object.NSubJetsSoftDropped = NSubJetsSoftDropped;
    362360
    363   object.SoftDroppedJet =SoftDroppedJet;
     361  object.SoftDroppedJet = SoftDroppedJet;
    364362  object.SoftDroppedSubJet1 = SoftDroppedSubJet1;
    365363  object.SoftDroppedSubJet2 = SoftDroppedSubJet2;
     
    384382//------------------------------------------------------------------------------
    385383
    386 void Candidate::Clear(Option_t* option)
     384void Candidate::Clear(Option_t *option)
    387385{
    388386  int i;
     
    391389  PID = 0;
    392390  Status = 0;
    393   M1 = -1; M2 = -1; D1 = -1; D2 = -1;
     391  M1 = -1;
     392  M2 = -1;
     393  D1 = -1;
     394  D2 = -1;
    394395  Charge = 0;
    395396  Mass = 0.0;
     
    420421  L = 0.0;
    421422  ErrorT = 0.0;
    422   D0 = 0.0; 
     423  D0 = 0.0;
    423424  ErrorD0 = 0.0;
    424425  DZ = 0.0;
    425426  ErrorDZ = 0.0;
    426   P =0.0;
    427   ErrorP =0.0;
     427  P = 0.0;
     428  ErrorP = 0.0;
    428429  PT = 0.0;
    429430  ErrorPT = 0.0;
     
    455456  ClusterIndex = -1;
    456457  ClusterNDF = -99;
    457   ClusterSigma = 0.0; 
     458  ClusterSigma = 0.0;
    458459  SumPT2 = 0.0;
    459460  BTVSumPT2 = 0.0;
    460461  GenDeltaZ = 0.0;
    461   GenSumPT2 = 0.0; 
    462  
     462  GenSumPT2 = 0.0;
     463
    463464  FracPt[0] = 0.0;
    464465  FracPt[1] = 0.0;
     
    476477  SoftDroppedSubJet2.SetXYZT(0.0, 0.0, 0.0, 0.0);
    477478
    478 
    479479  for(i = 0; i < 5; ++i)
    480480  {
  • classes/DelphesClasses.h

    r45e58be r341014c  
    3232// Dependencies (#includes)
    3333
     34#include "TLorentzVector.h"
     35#include "TObject.h"
    3436#include "TRef.h"
    35 #include "TObject.h"
    3637#include "TRefArray.h"
    37 #include "TLorentzVector.h"
    3838
    3939#include "classes/SortableObject.h"
     
    4646{
    4747public:
    48 
    4948  Long64_t Number; // event number
    5049
     
    6059{
    6160public:
    62 
    6361  Int_t Trigger; // trigger word
    6462
     
    7169{
    7270public:
    73 
    7471  Int_t ProcessID; // subprocess code for the event | hepup.IDPRUP
    7572
     
    9996{
    10097public:
    101 
    10298  Int_t ProcessID; // unique signal process id | signal_process_id()
    10399  Int_t MPI; // number of multi parton interactions | mpi ()
     
    121117  Float_t PDF1; // PDF (id1, x1, Q) | pdf_info()->pdf1()
    122118  Float_t PDF2; // PDF (id2, x2, Q) | pdf_info()->pdf2()
    123 
    124 
    125119
    126120  ClassDef(HepMCEvent, 3)
     
    181175{
    182176public:
    183 
    184177  Float_t T; // vertex position (t component)
    185178  Float_t X; // vertex position (x component)
     
    260253{
    261254public:
    262 
    263255  Float_t PT; // photon transverse momentum
    264256  Float_t Eta; // photon pseudorapidity
     
    295287{
    296288public:
    297 
    298289  Float_t PT; // electron transverse momentum
    299290  Float_t Eta; // electron pseudorapidity
     
    333324{
    334325public:
    335 
    336326  Float_t PT; // muon transverse momentum
    337327  Float_t Eta; // muon pseudorapidity
     
    369359{
    370360public:
    371 
    372361  Float_t PT; // jet transverse momentum
    373362  Float_t Eta; // jet pseudorapidity
     
    378367  Float_t Mass; // jet invariant mass
    379368
    380   Float_t DeltaEta;  // jet radius in pseudorapidity
    381   Float_t DeltaPhi;  // jet radius in azimuthal angle
     369  Float_t DeltaEta; // jet radius in pseudorapidity
     370  Float_t DeltaPhi; // jet radius in azimuthal angle
    382371
    383372  UInt_t Flavor; // jet flavor
     
    414403  TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta
    415404
    416 
    417405  Int_t NSubJetsTrimmed; // number of subjets trimmed
    418406  Int_t NSubJetsPruned; // number of subjets pruned
     
    423411  Double_t ExclYmerge45;
    424412  Double_t ExclYmerge56;
    425  
     413
    426414  TRefArray Constituents; // references to constituents
    427415  TRefArray Particles; // references to generated particles
     
    626614
    627615  Int_t NTimeHits;
    628   std::vector< std::pair< Float_t, Float_t > > ECalEnergyTimePairs;
     616  std::vector<std::pair<Float_t, Float_t>> ECalEnergyTimePairs;
    629617
    630618  // Isolation variables
     
    670658  Double_t ExclYmerge45;
    671659  Double_t ExclYmerge56;
    672      
     660
    673661  static CompBase *fgCompare; //!
    674662  const CompBase *GetCompare() const { return fgCompare; }
     
    681669  virtual void Copy(TObject &object) const;
    682670  virtual TObject *Clone(const char *newname = "") const;
    683   virtual void Clear(Option_t* option = "");
     671  virtual void Clear(Option_t *option = "");
    684672
    685673private:
     
    693681
    694682#endif // DelphesClasses_h
    695 
    696 
  • classes/DelphesCylindricalFormula.cc

    r45e58be r341014c  
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    18 
    1918
    2019#include "classes/DelphesCylindricalFormula.h"
     
    5453  for(it = expression; *it; ++it)
    5554  {
    56     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     55    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\') continue;
    5756    buffer.Append(*it);
    5857  }
  • classes/DelphesCylindricalFormula.h

    r45e58be r341014c  
    2525{
    2626public:
    27 
    2827  DelphesCylindricalFormula();
    2928
     
    3837
    3938#endif /* DelphesCylindricalFormula_h */
    40 
  • classes/DelphesFactory.cc

    r45e58be r341014c  
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    18 
    1918
    2019/** \class DelphesFactory
     
    5150  if(fObjArrays) delete fObjArrays;
    5251
    53   map< const TClass*, ExRootTreeBranch* >::iterator itBranches;
     52  map<const TClass *, ExRootTreeBranch *>::iterator itBranches;
    5453  for(itBranches = fBranches.begin(); itBranches != fBranches.end(); ++itBranches)
    5554  {
    56     delete (itBranches->second);
     55    delete(itBranches->second);
    5756  }
    5857}
     
    6059//------------------------------------------------------------------------------
    6160
    62 void DelphesFactory::Clear(Option_t* option)
     61void DelphesFactory::Clear(Option_t *option)
    6362{
    6463  set<TObject *>::iterator itPool;
     
    7069  TProcessID::SetObjectCount(0);
    7170
    72   map< const TClass*, ExRootTreeBranch* >::iterator itBranches;
     71  map<const TClass *, ExRootTreeBranch *>::iterator itBranches;
    7372  for(itBranches = fBranches.begin(); itBranches != fBranches.end(); ++itBranches)
    7473  {
     
    120119
    121120//------------------------------------------------------------------------------
    122 
  • classes/DelphesFactory.h

    r45e58be r341014c  
    4242{
    4343public:
    44  
    4544  DelphesFactory(const char *name = "ObjectFactory");
    4645  ~DelphesFactory();
    4746
    48   virtual void Clear(Option_t* option = "");
    49  
     47  virtual void Clear(Option_t *option = "");
     48
    5049  TObjArray *NewPermanentArray();
    5150
     
    5655  TObject *New(TClass *cl);
    5756
    58   template<typename T>
     57  template <typename T>
    5958  T *New() { return static_cast<T *>(New(T::Class())); }
    6059
    6160private:
    62 
    6361  ExRootTreeBranch *fObjArrays; //!
    6462
    6563#if !defined(__CINT__) && !defined(__CLING__)
    66   std::map< const TClass*, ExRootTreeBranch* > fBranches; //!
     64  std::map<const TClass *, ExRootTreeBranch *> fBranches; //!
    6765#endif
    6866
    69   std::set< TObject* > fPool; //!
    70  
     67  std::set<TObject *> fPool; //!
     68
    7169  ClassDef(DelphesFactory, 1)
    7270};
    7371
    7472#endif /* DelphesFactory */
    75 
  • classes/DelphesFormula.cc

    r45e58be r341014c  
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    18 
    1918
    2019#include "classes/DelphesFormula.h"
     
    5453  for(it = expression; *it; ++it)
    5554  {
    56     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     55    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\') continue;
    5756    buffer.Append(*it);
    5857  }
     
    6261  buffer.ReplaceAll("energy", "t");
    6362
     63#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
     64  TFormula::SetMaxima(100000, 1000, 1000000);
     65#endif
    6466
    65 
    66   #if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
    67     TFormula::SetMaxima(100000,1000,1000000);
    68   #endif
    69  
    7067  if(TFormula::Compile(buffer) != 0)
    7168  {
     
    7976Double_t DelphesFormula::Eval(Double_t pt, Double_t eta, Double_t phi, Double_t energy)
    8077{
    81    Double_t x[4] = {pt, eta, phi, energy};
    82    return EvalPar(x);
     78  Double_t x[4] = {pt, eta, phi, energy};
     79  return EvalPar(x);
    8380}
    8481
  • classes/DelphesFormula.h

    r45e58be r341014c  
    2525{
    2626public:
    27 
    2827  DelphesFormula();
    2928
     
    3837
    3938#endif /* DelphesFormula_h */
    40 
  • classes/DelphesHepMCReader.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesHepMCReader
    2120 *
     
    2827#include "classes/DelphesHepMCReader.h"
    2928
    30 #include <stdexcept>
    3129#include <iostream>
    3230#include <sstream>
     31#include <stdexcept>
    3332
    3433#include <map>
     
    3736#include <stdio.h>
    3837
     38#include "TDatabasePDG.h"
     39#include "TLorentzVector.h"
    3940#include "TObjArray.h"
     41#include "TParticlePDG.h"
    4042#include "TStopwatch.h"
    41 #include "TDatabasePDG.h"
    42 #include "TParticlePDG.h"
    43 #include "TLorentzVector.h"
    4443
    4544#include "classes/DelphesClasses.h"
     
    111110  TObjArray *partonOutputArray)
    112111{
    113   map< int, pair< int, int > >::iterator itMotherMap;
    114   map< int, pair< int, int > >::iterator itDaughterMap;
     112  map<int, pair<int, int>>::iterator itMotherMap;
     113  map<int, pair<int, int>>::iterator itDaughterMap;
    115114  char key, momentumUnit[4], positionUnit[3];
    116115  int i, rc, state;
     
    141140    if(!rc)
    142141    {
    143       cerr << "** ERROR: " << "invalid event format" << endl;
     142      cerr << "** ERROR: "
     143           << "invalid event format" << endl;
    144144      return kFALSE;
    145145    }
     
    155155    if(!rc)
    156156    {
    157       cerr << "** ERROR: " << "invalid event format" << endl;
     157      cerr << "** ERROR: "
     158           << "invalid event format" << endl;
    158159      return kFALSE;
    159160    }
     
    167168    if(!rc)
    168169    {
    169       cerr << "** ERROR: " << "invalid event format" << endl;
     170      cerr << "** ERROR: "
     171           << "invalid event format" << endl;
    170172      return kFALSE;
    171173    }
     
    177179    if(rc != 2)
    178180    {
    179       cerr << "** ERROR: " << "invalid units format" << endl;
     181      cerr << "** ERROR: "
     182           << "invalid units format" << endl;
    180183      return kFALSE;
    181184    }
     
    189192      fMomentumCoefficient = 0.001;
    190193    }
    191    
     194
    192195    if(strncmp(positionUnit, "MM", 3) == 0)
    193196    {
     
    199202    }
    200203  }
    201  
     204
    202205  else if(key == 'C')
    203206  {
     
    205208      && bufferStream.ReadDbl(fCrossSectionError);
    206209  }
    207  
     210
    208211  else if(key == 'F')
    209212  {
     
    218221    if(!rc)
    219222    {
    220       cerr << "** ERROR: " << "invalid PDF format" << endl;
     223      cerr << "** ERROR: "
     224           << "invalid PDF format" << endl;
    221225      return kFALSE;
    222226    }
     
    235239    if(!rc)
    236240    {
    237       cerr << "** ERROR: " << "invalid vertex format" << endl;
     241      cerr << "** ERROR: "
     242           << "invalid vertex format" << endl;
    238243      return kFALSE;
    239244    }
     
    256261    if(!rc)
    257262    {
    258       cerr << "** ERROR: " << "invalid particle format" << endl;
     263      cerr << "** ERROR: "
     264           << "invalid particle format" << endl;
    259265      return kFALSE;
    260266    }
     
    345351{
    346352  Weight *element;
    347   vector< double >::const_iterator itWeight;
     353  vector<double>::const_iterator itWeight;
    348354
    349355  for(itWeight = fWeight.begin(); itWeight != fWeight.end(); ++itWeight)
     
    374380
    375381  pdgParticle = fPDG->GetParticle(fPID);
    376   candidate->Charge = pdgParticle ? int(pdgParticle->Charge()/3.0) : -999;
     382  candidate->Charge = pdgParticle ? int(pdgParticle->Charge() / 3.0) : -999;
    377383  candidate->Mass = fMass;
    378384
     
    427433{
    428434  Candidate *candidate;
    429   map< int, pair< int, int > >::iterator itMotherMap;
    430   map< int, pair< int, int > >::iterator itDaughterMap;
     435  map<int, pair<int, int>>::iterator itMotherMap;
     436  map<int, pair<int, int>>::iterator itDaughterMap;
    431437  int i;
    432438
  • classes/DelphesHepMCReader.h

    r45e58be r341014c  
    4242{
    4343public:
    44 
    4544  DelphesHepMCReader();
    4645  ~DelphesHepMCReader();
     
    6261
    6362private:
    64 
    6563  void AnalyzeParticle(DelphesFactory *factory,
    6664    TObjArray *allParticleOutputArray,
     
    8280
    8381  int fStateSize;
    84   std::vector< int > fState;
     82  std::vector<int> fState;
    8583
    8684  int fWeightSize;
    87   std::vector< double > fWeight;
     85  std::vector<double> fWeight;
    8886
    8987  double fCrossSection, fCrossSectionError;
     
    10098  int fParticleCounter;
    10199
    102   std::map< int, std::pair < int, int > > fMotherMap;
    103   std::map< int, std::pair < int, int > > fDaughterMap;
     100  std::map<int, std::pair<int, int>> fMotherMap;
     101  std::map<int, std::pair<int, int>> fDaughterMap;
    104102};
    105103
    106104#endif // DelphesHepMCReader_h
    107 
    108 
  • classes/DelphesLHEFReader.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesLHEFReader
    2120 *
     
    2827#include "classes/DelphesLHEFReader.h"
    2928
    30 #include <stdexcept>
    3129#include <iostream>
    3230#include <sstream>
     31#include <stdexcept>
    3332
    3433#include <stdio.h>
    3534
     35#include "TDatabasePDG.h"
     36#include "TLorentzVector.h"
    3637#include "TObjArray.h"
     38#include "TParticlePDG.h"
    3739#include "TStopwatch.h"
    38 #include "TDatabasePDG.h"
    39 #include "TParticlePDG.h"
    40 #include "TLorentzVector.h"
    4140
    4241#include "classes/DelphesClasses.h"
     
    5453DelphesLHEFReader::DelphesLHEFReader() :
    5554  fInputFile(0), fBuffer(0), fPDG(0),
    56   fEventReady(kFALSE), fEventCounter(-1), fParticleCounter(-1),   fCrossSection(1)
     55  fEventReady(kFALSE), fEventCounter(-1), fParticleCounter(-1), fCrossSection(1)
    5756
    5857{
     
    124123    if(!rc)
    125124    {
    126       cerr << "** ERROR: " << "invalid event format" << endl;
     125      cerr << "** ERROR: "
     126           << "invalid event format" << endl;
    127127      return kFALSE;
    128128    }
     
    148148    if(!rc)
    149149    {
    150       cerr << "** ERROR: " << "invalid particle format" << endl;
     150      cerr << "** ERROR: "
     151           << "invalid particle format" << endl;
    151152      return kFALSE;
    152153    }
     
    162163    if(!pch)
    163164    {
    164       cerr << "** ERROR: " << "invalid weight format" << endl;
     165      cerr << "** ERROR: "
     166           << "invalid weight format" << endl;
    165167      return kFALSE;
    166168    }
     
    172174    if(!pch)
    173175    {
    174       cerr << "** ERROR: " << "invalid weight format" << endl;
     176      cerr << "** ERROR: "
     177           << "invalid weight format" << endl;
    175178      return kFALSE;
    176179    }
     
    181184    if(!rc)
    182185    {
    183       cerr << "** ERROR: " << "invalid weight format" << endl;
     186      cerr << "** ERROR: "
     187           << "invalid weight format" << endl;
    184188      return kFALSE;
    185189    }
     
    192196    if(!pch)
    193197    {
    194       cerr << "** ERROR: " << "invalid cross section format" << endl;
     198      cerr << "** ERROR: "
     199           << "invalid cross section format" << endl;
    195200      return kFALSE;
    196201    }
     
    199204    if(!pch)
    200205    {
    201       cerr << "** ERROR: " << "invalid cross section format" << endl;
     206      cerr << "** ERROR: "
     207           << "invalid cross section format" << endl;
    202208      return kFALSE;
    203209    }
     
    208214    if(!rc)
    209215    {
    210       cerr << "** ERROR: " << "invalid cross section format" << endl;
     216      cerr << "** ERROR: "
     217           << "invalid cross section format" << endl;
    211218      return kFALSE;
    212219    }
     
    249256{
    250257  LHEFWeight *element;
    251   vector< pair< int, double > >::const_iterator itWeightList;
     258  vector<pair<int, double>>::const_iterator itWeightList;
    252259
    253260  for(itWeightList = fWeightList.begin(); itWeightList != fWeightList.end(); ++itWeightList)
     
    279286
    280287  pdgParticle = fPDG->GetParticle(fPID);
    281   candidate->Charge = pdgParticle ? int(pdgParticle->Charge()/3.0) : -999;
     288  candidate->Charge = pdgParticle ? int(pdgParticle->Charge() / 3.0) : -999;
    282289  candidate->Mass = fMass;
    283290
  • classes/DelphesLHEFReader.h

    r45e58be r341014c  
    3030#include <stdio.h>
    3131
     32#include <utility>
    3233#include <vector>
    33 #include <utility>
    3434
    3535class TObjArray;
     
    4242{
    4343public:
    44 
    4544  DelphesLHEFReader();
    4645  ~DelphesLHEFReader();
     
    6261
    6362private:
    64 
    6563  void AnalyzeParticle(DelphesFactory *factory,
    6664    TObjArray *allParticleOutputArray,
     
    8381  int fPID, fStatus, fM1, fM2, fC1, fC2;
    8482  double fPx, fPy, fPz, fE, fMass;
    85  
    86   std::vector< std::pair< int, double > > fWeightList;
     83
     84  std::vector<std::pair<int, double>> fWeightList;
    8785};
    8886
    8987#endif // DelphesLHEFReader_h
    90 
    91 
  • classes/DelphesLongFormula.cc

    r45e58be r341014c  
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    18 
    1918
    2019#include "classes/DelphesLongFormula.h"
     
    5453  for(it = expression; *it; ++it)
    5554  {
    56     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     55    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\') continue;
    5756    buffer.Append(*it);
    5857  }
     
    6665  buffer.ReplaceAll("ctgTheta", "[ctgTheta]");
    6766
    68   #if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
    69     TFormula::SetMaxima(100000,1000,1000000);
    70   #endif
    71  
     67#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
     68  TFormula::SetMaxima(100000, 1000, 1000000);
     69#endif
     70
    7271  if(TFormula::Compile(buffer) != 0)
    7372  {
     
    8079//------------------------------------------------------------------------------
    8180
    82 Double_t DelphesLongFormula::Eval(Double_t pt,
    83                                   Double_t eta,
    84                                   Double_t phi,
    85                                   Double_t energy,
    86                                   Double_t d0,
    87                                   Double_t dz,
    88                                   Double_t ctgTheta
    89                                  )
     81Double_t DelphesLongFormula::Eval(Double_t pt, Double_t eta, Double_t phi,
     82  Double_t energy, Double_t d0, Double_t dz, Double_t ctgTheta)
    9083{
    9184
     
    9386  TVarValMap fVarValMap;
    9487
    95   fVarNameMap[this->GetParNumber("pt")]= "pt";
    96   fVarNameMap[this->GetParNumber("eta")]= "eta";
    97   fVarNameMap[this->GetParNumber("phi")]= "phi";
    98   fVarNameMap[this->GetParNumber("energy")]= "energy";
    99   fVarNameMap[this->GetParNumber("d0")]= "d0";
    100   fVarNameMap[this->GetParNumber("dz")]= "dz";
    101   fVarNameMap[this->GetParNumber("ctgTheta")]= "ctgTheta";
     88  fVarNameMap[this->GetParNumber("pt")] = "pt";
     89  fVarNameMap[this->GetParNumber("eta")] = "eta";
     90  fVarNameMap[this->GetParNumber("phi")] = "phi";
     91  fVarNameMap[this->GetParNumber("energy")] = "energy";
     92  fVarNameMap[this->GetParNumber("d0")] = "d0";
     93  fVarNameMap[this->GetParNumber("dz")] = "dz";
     94  fVarNameMap[this->GetParNumber("ctgTheta")] = "ctgTheta";
    10295
    103   fVarValMap["pt"]= pt;     
    104   fVarValMap["eta"]= eta;
    105   fVarValMap["phi"]= phi;
    106   fVarValMap["energy"]= energy;
    107   fVarValMap["d0"]= d0;
    108   fVarValMap["dz"]= dz;
    109   fVarValMap["ctgTheta"]= ctgTheta;
     96  fVarValMap["pt"] = pt;
     97  fVarValMap["eta"] = eta;
     98  fVarValMap["phi"] = phi;
     99  fVarValMap["energy"] = energy;
     100  fVarValMap["d0"] = d0;
     101  fVarValMap["dz"] = dz;
     102  fVarValMap["ctgTheta"] = ctgTheta;
    110103
    111104  Double_t vals[7];
    112105
    113106  Int_t j = 0;
    114   for (Int_t i=0; i != 7; i++)
     107  for(Int_t i = 0; i != 7; i++)
    115108  {
    116      if ( fVarNameMap.find(i) != fVarNameMap.end() )
    117      {
    118         TString var_name = fVarNameMap[i];
    119         vals[i] = fVarValMap[var_name];
    120      }
    121      else
    122         vals[i] = 0.;
    123   }   
     109    if(fVarNameMap.find(i) != fVarNameMap.end())
     110    {
     111      TString var_name = fVarNameMap[i];
     112      vals[i] = fVarValMap[var_name];
     113    }
     114    else
     115      vals[i] = 0.;
     116  }
    124117  return EvalPar(nullptr, vals);
    125118}
  • classes/DelphesLongFormula.h

    r45e58be r341014c  
    2626{
    2727public:
    28 
    2928  DelphesLongFormula();
    3029  DelphesLongFormula(const char *name, const char *expression);
     
    3433  Int_t Compile(const char *expression);
    3534
    36   Double_t Eval(Double_t pt,
    37                 Double_t eta = 0,
    38                 Double_t phi = 0,
    39                 Double_t energy = 0,
    40                 Double_t d0 = 0,
    41                 Double_t dz = 0,
    42                 Double_t ctgTheta = 0
    43                 );
     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, Double_t ctgTheta = 0);
    4437
    45   typedef std::map<Int_t,TString> TVarNameMap; //!
     38  typedef std::map<Int_t, TString> TVarNameMap; //!
    4639  typedef std::map<TString, Double_t> TVarValMap; //!
    47 
    48  
    4940};
    5041
  • classes/DelphesModule.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesModule
    2120 *
     
    3029#include "classes/DelphesFactory.h"
    3130
     31#include "ExRootAnalysis/ExRootResult.h"
     32#include "ExRootAnalysis/ExRootTreeBranch.h"
    3233#include "ExRootAnalysis/ExRootTreeReader.h"
    33 #include "ExRootAnalysis/ExRootTreeBranch.h"
    3434#include "ExRootAnalysis/ExRootTreeWriter.h"
    35 #include "ExRootAnalysis/ExRootResult.h"
    3635
    37 #include "TROOT.h"
    3836#include "TClass.h"
    3937#include "TFolder.h"
    4038#include "TObjArray.h"
     39#include "TROOT.h"
    4140
    4241#include <iostream>
     42#include <sstream>
    4343#include <stdexcept>
    44 #include <sstream>
    4544
    4645using namespace std;
     
    157156  return fFactory;
    158157}
    159 
    160 
  • classes/DelphesModule.h

    r45e58be r341014c  
    4141class DelphesFactory;
    4242
    43 class DelphesModule: public ExRootTask 
     43class DelphesModule: public ExRootTask
    4444{
    4545public:
    46 
    4746  DelphesModule();
    4847  ~DelphesModule();
     
    6160
    6261protected:
    63 
    6462  ExRootTreeWriter *fTreeWriter;
    6563  DelphesFactory *fFactory;
    6664
    6765private:
    68 
    6966  ExRootResult *fPlots;
    7067
     
    7572
    7673#endif /* DelphesModule_h */
    77 
  • classes/DelphesPileUpReader.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesPileUpReader
    2120 *
     
    2827#include "classes/DelphesPileUpReader.h"
    2928
    30 #include <stdexcept>
    3129#include <iostream>
    3230#include <sstream>
     31#include <stdexcept>
    3332
     33#include <stdint.h>
    3434#include <stdio.h>
    35 #include <stdint.h>
    3635
    3736#include "classes/DelphesXDRReader.h"
     
    5251  stringstream message;
    5352
    54   fIndex = new uint8_t[kIndexSize*8];
    55   fBuffer = new uint8_t[kBufferSize*kRecordSize*4];
     53  fIndex = new uint8_t[kIndexSize * 8];
     54  fBuffer = new uint8_t[kBufferSize * kRecordSize * 4];
    5655  fInputReader = new DelphesXDRReader;
    5756  fIndexReader = new DelphesXDRReader;
     
    8281
    8382  // read index of events
    84   fseeko(fPileUpFile, -8 - 8*fEntries, SEEK_END);
    85   fInputReader->ReadRaw(fIndex, fEntries*8);
     83  fseeko(fPileUpFile, -8 - 8 * fEntries, SEEK_END);
     84  fInputReader->ReadRaw(fIndex, fEntries * 8);
    8685}
    8786
     
    130129
    131130  // read event position
    132   fIndexReader->SetOffset(8*entry);
     131  fIndexReader->SetOffset(8 * entry);
    133132  fIndexReader->ReadValue(&offset, 8);
    134133
     
    142141  }
    143142
    144   fInputReader->ReadRaw(fBuffer, fEntrySize*kRecordSize*4);
     143  fInputReader->ReadRaw(fBuffer, fEntrySize * kRecordSize * 4);
    145144  fBufferReader->SetOffset(0);
    146145  fCounter = 0;
  • classes/DelphesPileUpReader.h

    r45e58be r341014c  
    2828 */
    2929
     30#include <stdint.h>
    3031#include <stdio.h>
    31 #include <stdint.h>
    3232
    3333class DelphesXDRReader;
     
    3636{
    3737public:
    38 
    3938  DelphesPileUpReader(const char *fileName);
    4039
     
    5049
    5150private:
    52 
    5351  int64_t fEntries;
    5452
  • classes/DelphesPileUpWriter.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesPileUpWriter
    2120 *
     
    2827#include "classes/DelphesPileUpWriter.h"
    2928
    30 #include <stdexcept>
    3129#include <iostream>
    3230#include <sstream>
     31#include <stdexcept>
    3332
     33#include <stdint.h>
    3434#include <stdio.h>
    35 #include <stdint.h>
    3635
    3736#include "classes/DelphesXDRWriter.h"
     
    5251  stringstream message;
    5352
    54   fIndex = new uint8_t[kIndexSize*8];
    55   fBuffer = new uint8_t[kBufferSize*kRecordSize*4];
     53  fIndex = new uint8_t[kIndexSize * 8];
     54  fBuffer = new uint8_t[kBufferSize * kRecordSize * 4];
    5655  fOutputWriter = new DelphesXDRWriter;
    5756  fIndexWriter = new DelphesXDRWriter;
     
    118117
    119118  fOutputWriter->WriteValue(&fEntrySize, 4);
    120   fOutputWriter->WriteRaw(fBuffer, fEntrySize*kRecordSize*4);
     119  fOutputWriter->WriteRaw(fBuffer, fEntrySize * kRecordSize * 4);
    121120
    122121  fIndexWriter->WriteValue(&fOffset, 8);
    123   fOffset += fEntrySize*kRecordSize*4 + 4;
     122  fOffset += fEntrySize * kRecordSize * 4 + 4;
    124123
    125124  fBufferWriter->SetOffset(0);
     
    133132void DelphesPileUpWriter::WriteIndex()
    134133{
    135   fOutputWriter->WriteRaw(fIndex, fEntries*8);
     134  fOutputWriter->WriteRaw(fIndex, fEntries * 8);
    136135  fOutputWriter->WriteValue(&fEntries, 8);
    137136}
  • classes/DelphesPileUpWriter.h

    r45e58be r341014c  
    2828 */
    2929
     30#include <stdint.h>
    3031#include <stdio.h>
    31 #include <stdint.h>
    3232
    3333class DelphesXDRWriter;
     
    3636{
    3737public:
    38 
    3938  DelphesPileUpWriter(const char *fileName);
    4039
     
    5049
    5150private:
    52 
    5351  int64_t fEntries;
    5452  int32_t fEntrySize;
  • classes/DelphesSTDHEPReader.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesSTDHEPReader
    2120 *
     
    2827#include "classes/DelphesSTDHEPReader.h"
    2928
    30 #include <stdexcept>
    3129#include <iostream>
    3230#include <sstream>
    33 
    34 #include <stdio.h>
     31#include <stdexcept>
     32
    3533#include <errno.h>
    3634#include <stdint.h>
     35#include <stdio.h>
    3736#include <string.h>
    3837
     38#include "TDatabasePDG.h"
     39#include "TLorentzVector.h"
    3940#include "TObjArray.h"
     41#include "TParticlePDG.h"
    4042#include "TStopwatch.h"
    41 #include "TDatabasePDG.h"
    42 #include "TParticlePDG.h"
    43 #include "TLorentzVector.h"
    4443
    4544#include "classes/DelphesClasses.h"
     
    5150using namespace std;
    5251
    53 static const int kBufferSize  = 1000000;
     52static const int kBufferSize = 1000000;
    5453
    5554//---------------------------------------------------------------------------
     
    5857  fInputFile(0), fBuffer(0), fPDG(0), fBlockType(-1)
    5958{
    60   fBuffer = new uint8_t[kBufferSize*96 + 24];
     59  fBuffer = new uint8_t[kBufferSize * 96 + 24];
    6160
    6261  fPDG = TDatabasePDG::Instance();
     
    117116    ReadEventHeader();
    118117  }
    119   else if(fBlockType == MCFIO_STDHEPBEG ||
    120           fBlockType == MCFIO_STDHEPEND)
     118  else if(fBlockType == MCFIO_STDHEPBEG || fBlockType == MCFIO_STDHEPEND)
    121119  {
    122120    ReadSTDCM1();
     
    170168  uint32_t size;
    171169  fReader[0].ReadValue(&size, 4);
    172   SkipBytes(size*elsize);
     170  SkipBytes(size * elsize);
    173171}
    174172
     
    178176{
    179177  uint32_t i;
    180   enum STDHEPVersion {UNKNOWN, V1, V2, V21} version;
     178  enum STDHEPVersion
     179  {
     180    UNKNOWN,
     181    V1,
     182    V2,
     183    V21
     184  } version;
    181185
    182186  // version
    183187  fReader[0].ReadString(fBuffer, 100);
    184   if(fBuffer[0] == '\0' || fBuffer[1] == '\0') version = UNKNOWN;
    185   else if(fBuffer[0] == '1') version = V1;
    186   else if(strncmp((char *)fBuffer, "2.01", 4) == 0) version = V21;
    187   else if(fBuffer[0] == '2') version = V2;
    188   else version = UNKNOWN;
     188  if(fBuffer[0] == '\0' || fBuffer[1] == '\0')
     189    version = UNKNOWN;
     190  else if(fBuffer[0] == '1')
     191    version = V1;
     192  else if(strncmp((char *)fBuffer, "2.01", 4) == 0)
     193    version = V21;
     194  else if(fBuffer[0] == '2')
     195    version = V2;
     196  else
     197    version = UNKNOWN;
    189198
    190199  if(version == UNKNOWN)
     
    363372  // 4 + 4 + 4 + 4 + 4 + 4 = 96*n + 24
    364373
    365   fReader[0].ReadRaw(fBuffer, 96*fEventSize + 24);
     374  fReader[0].ReadRaw(fBuffer, 96 * fEventSize + 24);
    366375
    367376  fReader[1].SetBuffer(fBuffer);
    368   fReader[2].SetBuffer(fBuffer + 4*1 + 4*1*fEventSize);
    369   fReader[3].SetBuffer(fBuffer + 4*2 + 4*2*fEventSize);
    370   fReader[4].SetBuffer(fBuffer + 4*3 + 4*4*fEventSize);
    371   fReader[5].SetBuffer(fBuffer + 4*4 + 4*6*fEventSize);
    372   fReader[6].SetBuffer(fBuffer + 4*5 + 4*16*fEventSize);
     377  fReader[2].SetBuffer(fBuffer + 4 * 1 + 4 * 1 * fEventSize);
     378  fReader[3].SetBuffer(fBuffer + 4 * 2 + 4 * 2 * fEventSize);
     379  fReader[4].SetBuffer(fBuffer + 4 * 3 + 4 * 4 * fEventSize);
     380  fReader[5].SetBuffer(fBuffer + 4 * 4 + 4 * 6 * fEventSize);
     381  fReader[6].SetBuffer(fBuffer + 4 * 5 + 4 * 16 * fEventSize);
    373382
    374383  fReader[1].ReadValue(&idhepSize, 4);
     
    391400  fAlphaQCD = 0.0;
    392401  fScaleSize = 0;
    393   memset(fScale, 0, 10*sizeof(double));
     402  memset(fScale, 0, 10 * sizeof(double));
    394403}
    395404
     
    494503
    495504    pdgParticle = fPDG->GetParticle(pid);
    496     candidate->Charge = pdgParticle ? int(pdgParticle->Charge()/3.0) : -999;
     505    candidate->Charge = pdgParticle ? int(pdgParticle->Charge() / 3.0) : -999;
    497506    candidate->Mass = mass;
    498507
  • classes/DelphesSTDHEPReader.h

    r45e58be r341014c  
    2828 */
    2929
     30#include <stdint.h>
    3031#include <stdio.h>
    31 #include <stdint.h>
    3232
    3333#include "classes/DelphesXDRReader.h"
     
    7272
    7373private:
    74 
    7574  void AnalyzeParticles(DelphesFactory *factory,
    7675    TObjArray *allParticleOutputArray,
  • classes/DelphesStream.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesStream
    2120 *
     
    2827#include "classes/DelphesStream.h"
    2928
     29#include <errno.h>
     30#include <limits.h>
     31#include <math.h>
     32#include <stdio.h>
    3033#include <stdlib.h>
    31 #include <limits.h>
    3234#include <string.h>
    33 #include <stdio.h>
    34 #include <errno.h>
    35 #include <math.h>
    3635
    3736#include <iostream>
     
    6564    if(fFirstHugePos && value == HUGE_VAL)
    6665    {
    67       fFirstHugePos = false; 
     66      fFirstHugePos = false;
    6867      cout << "** WARNING: too large positive value, return " << value << endl;
    6968    }
    7069    else if(fFirstHugeNeg && value == -HUGE_VAL)
    7170    {
    72       fFirstHugeNeg = false; 
     71      fFirstHugeNeg = false;
    7372      cout << "** WARNING: too large negative value, return " << value << endl;
    7473    }
    7574    else if(fFirstZero)
    7675    {
    77       fFirstZero = false; 
     76      fFirstZero = false;
    7877      value = 0.0;
    7978      cout << "** WARNING: too small value, return " << value << endl;
     
    9493    if(fFirstLongMin && value == LONG_MIN)
    9594    {
    96       fFirstLongMin = false; 
     95      fFirstLongMin = false;
    9796      cout << "** WARNING: too large positive value, return " << value << endl;
    9897    }
    9998    else if(fFirstLongMax && value == LONG_MAX)
    10099    {
    101       fFirstLongMax = false; 
     100      fFirstLongMax = false;
    102101      cout << "** WARNING: too large negative value, return " << value << endl;
    103102    }
  • classes/DelphesStream.h

    r45e58be r341014c  
    3131{
    3232public:
    33 
    3433  DelphesStream(char *buffer);
    3534
     
    3837
    3938private:
     39  char *fBuffer;
    4040
    41   char *fBuffer;
    42  
    4341  static bool fFirstLongMin;
    4442  static bool fFirstLongMax;
     
    4947
    5048#endif // DelphesStream_h
    51 
    52 
  • classes/DelphesTF2.cc

    r45e58be r341014c  
    3232{
    3333
    34 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,04,00)
     34#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 04, 00)
    3535  fFormula = new TFormula();
    3636#endif
    37 
    38 
    3937}
    4038
     
    6058  for(it = expression; *it; ++it)
    6159  {
    62     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     60    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\') continue;
    6361    buffer.Append(*it);
    6462  }
    6563  buffer.ReplaceAll("z", "x");
    6664  buffer.ReplaceAll("t", "y");
    67 #if ROOT_VERSION_CODE < ROOT_VERSION(6,04,00)
     65#if ROOT_VERSION_CODE < ROOT_VERSION(6, 04, 00)
    6866  if(TF2::Compile(buffer) != 0)
    6967#else
  • classes/DelphesTF2.h

    r45e58be r341014c  
    2525{
    2626public:
    27 
    2827  DelphesTF2();
    2928
  • classes/DelphesXDRReader.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesXDRReader
    2120 *
     
    2827#include "classes/DelphesXDRReader.h"
    2928
     29#include <stdint.h>
    3030#include <stdio.h>
    31 #include <stdint.h>
    3231#include <string.h>
    3332
     
    109108
    110109  if(size > maxSize) size = maxSize;
    111    
     110
    112111  if(fBuffer)
    113112  {
  • classes/DelphesXDRReader.h

    r45e58be r341014c  
    2828 */
    2929
     30#include <stdint.h>
    3031#include <stdio.h>
    31 #include <stdint.h>
    3232
    3333class DelphesXDRReader
    3434{
    3535public:
    36 
    3736  DelphesXDRReader();
    3837
     
    4645
    4746private:
    48 
    4947  FILE *fFile;
    5048  uint8_t *fBuffer;
  • classes/DelphesXDRWriter.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DelphesXDRWriter
    2120 *
     
    2827#include "classes/DelphesXDRWriter.h"
    2928
     29#include <stdint.h>
    3030#include <stdio.h>
    31 #include <stdint.h>
    3231#include <string.h>
    3332
  • classes/DelphesXDRWriter.h

    r45e58be r341014c  
    2828 */
    2929
     30#include <stdint.h>
    3031#include <stdio.h>
    31 #include <stdint.h>
    3232
    3333class DelphesXDRWriter
    3434{
    3535public:
    36 
    3736  DelphesXDRWriter();
    3837
     
    4544
    4645private:
    47 
    4846  FILE *fFile;
    4947  uint8_t *fBuffer;
  • classes/SortableObject.h

    r45e58be r341014c  
    2626 */
    2727
     28#include "TObject.h"
    2829#include "TRef.h"
    29 #include "TObject.h"
    3030#include "TRefArray.h"
    3131
     
    3737{
    3838public:
    39   virtual ~CompBase() { }
     39  virtual ~CompBase() {}
    4040  virtual Bool_t IsSortable(const TObject *) const { return kTRUE; }
    4141  virtual Int_t Compare(const TObject *obj1, const TObject *obj2) const = 0;
     
    4747{
    4848public:
    49 
    5049  Bool_t IsSortable() const { return GetCompare() ? GetCompare()->IsSortable(this) : kFALSE; }
    5150  Int_t Compare(const TObject *obj) const { return GetCompare()->Compare(this, obj); }
     
    6463{
    6564  CompE() {}
     65
    6666public:
    6767  static CompE *Instance()
     
    7373  Int_t Compare(const TObject *obj1, const TObject *obj2) const
    7474  {
    75     const T *t1 = static_cast<const T*>(obj1);
    76     const T *t2 = static_cast<const T*>(obj2);
     75    const T *t1 = static_cast<const T *>(obj1);
     76    const T *t2 = static_cast<const T *>(obj2);
    7777    if(t1->E > t2->E)
    7878      return -1;
     
    9090{
    9191  CompPT() {}
     92
    9293public:
    9394  static CompPT *Instance()
     
    99100  Int_t Compare(const TObject *obj1, const TObject *obj2) const
    100101  {
    101     const T *t1 = static_cast<const T*>(obj1);
    102     const T *t2 = static_cast<const T*>(obj2);
     102    const T *t1 = static_cast<const T *>(obj1);
     103    const T *t2 = static_cast<const T *>(obj2);
    103104    if(t1->PT > t2->PT)
    104105      return -1;
     
    116117{
    117118  CompMomentumPt() {}
     119
    118120public:
    119121  static CompMomentumPt *Instance()
     
    125127  Int_t Compare(const TObject *obj1, const TObject *obj2) const
    126128  {
    127     const T *t1 = static_cast<const T*>(obj1);
    128     const T *t2 = static_cast<const T*>(obj2);
     129    const T *t1 = static_cast<const T *>(obj1);
     130    const T *t2 = static_cast<const T *>(obj2);
    129131    if(t1->Momentum.Pt() > t2->Momentum.Pt())
    130132      return -1;
     
    142144{
    143145  CompET() {}
     146
    144147public:
    145148  static CompET *Instance()
     
    151154  Int_t Compare(const TObject *obj1, const TObject *obj2) const
    152155  {
    153     const T *t1 = static_cast<const T*>(obj1);
    154     const T *t2 = static_cast<const T*>(obj2);
     156    const T *t1 = static_cast<const T *>(obj1);
     157    const T *t2 = static_cast<const T *>(obj2);
    155158    if(t1->ET > t2->ET)
    156159      return -1;
     
    168171{
    169172  CompSumPT2() {}
     173
    170174public:
    171175  static CompSumPT2 *Instance()
     
    177181  Int_t Compare(const TObject *obj1, const TObject *obj2) const
    178182  {
    179     const T *t1 = static_cast<const T*>(obj1);
    180     const T *t2 = static_cast<const T*>(obj2);
     183    const T *t1 = static_cast<const T *>(obj1);
     184    const T *t2 = static_cast<const T *>(obj2);
    181185    if(t1->SumPT2 > t2->SumPT2)
    182186      return -1;
     
    193197class CompDeltaR: public CompBase
    194198{
    195   CompDeltaR(const T2 *obj = 0) : fObj(obj) {}
     199  CompDeltaR(const T2 *obj = 0) :
     200    fObj(obj) {}
    196201
    197202  Double_t DeltaPhi(Double_t phi1, Double_t phi2)
    198203  {
    199204    Double_t phi = TMath::Abs(phi1 - phi2);
    200     return (phi <= TMath::Pi()) ? phi : (2.0*TMath::Pi()) - phi;
    201   }
    202 
    203   Double_t Sqr(Double_t x) { return x*x; }
     205    return (phi <= TMath::Pi()) ? phi : (2.0 * TMath::Pi()) - phi;
     206  }
     207
     208  Double_t Sqr(Double_t x) { return x * x; }
    204209
    205210  Double_t SumSqr(Double_t a, Double_t b)
     
    207212    Double_t aAbs = TMath::Abs(a);
    208213    Double_t bAbs = TMath::Abs(b);
    209     if(aAbs > bAbs) return aAbs * TMath::Sqrt(1.0 + Sqr(bAbs / aAbs));
    210     else return (bAbs == 0) ? 0.0 : bAbs * TMath::Sqrt(1.0 + Sqr(aAbs / bAbs));
     214    if(aAbs > bAbs)
     215      return aAbs * TMath::Sqrt(1.0 + Sqr(bAbs / aAbs));
     216    else
     217      return (bAbs == 0) ? 0.0 : bAbs * TMath::Sqrt(1.0 + Sqr(aAbs / bAbs));
    211218  };
    212219
     
    214221
    215222public:
    216     static CompDeltaR *Instance(const T2 *obj = 0)
    217   {
    218       static CompDeltaR single(obj);
    219       return &single;
     223  static CompDeltaR *Instance(const T2 *obj = 0)
     224  {
     225    static CompDeltaR single(obj);
     226    return &single;
    220227  }
    221228
     
    225232  {
    226233    Double_t eta[3], phi[3], deltaR[2];
    227     const T1 *t1 = static_cast<const T1*>(obj1);
    228     const T1 *t2 = static_cast<const T1*>(obj2);
     234    const T1 *t1 = static_cast<const T1 *>(obj1);
     235    const T1 *t2 = static_cast<const T1 *>(obj2);
    229236
    230237    eta[0] = fObj->Eta;
     
    250257
    251258#endif // SortableObject_h
    252 
    253 
Note: See TracChangeset for help on using the changeset viewer.