Fork me on GitHub

Ignore:
Timestamp:
May 25, 2021, 7:33:19 PM (3 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
master
Children:
c1780a5
Parents:
f76741a
Message:

add DelphesHepMC3

File:
1 moved

Legend:

Unmodified
Added
Removed
  • classes/DelphesHepMC2Reader.cc

    rf76741a rb4786d3  
    1717 */
    1818
    19 /** \class DelphesHepMCReader
     19/** \class DelphesHepMC2Reader
    2020 *
    2121 *  Reads HepMC file
     
    2525 */
    2626
    27 #include "classes/DelphesHepMCReader.h"
     27#include "classes/DelphesHepMC2Reader.h"
    2828
    2929#include <iostream>
     
    5454//---------------------------------------------------------------------------
    5555
    56 DelphesHepMCReader::DelphesHepMCReader() :
     56DelphesHepMC2Reader::DelphesHepMC2Reader() :
    5757  fInputFile(0), fBuffer(0), fPDG(0),
    5858  fVertexCounter(-1), fInCounter(-1), fOutCounter(-1),
     
    6666//---------------------------------------------------------------------------
    6767
    68 DelphesHepMCReader::~DelphesHepMCReader()
     68DelphesHepMC2Reader::~DelphesHepMC2Reader()
    6969{
    7070  if(fBuffer) delete[] fBuffer;
     
    7373//---------------------------------------------------------------------------
    7474
    75 void DelphesHepMCReader::SetInputFile(FILE *inputFile)
     75void DelphesHepMC2Reader::SetInputFile(FILE *inputFile)
    7676{
    7777  fInputFile = inputFile;
     
    8080//---------------------------------------------------------------------------
    8181
    82 void DelphesHepMCReader::Clear()
     82void DelphesHepMC2Reader::Clear()
    8383{
    8484  fStateSize = 0;
     
    9898//---------------------------------------------------------------------------
    9999
    100 bool DelphesHepMCReader::EventReady()
     100bool DelphesHepMC2Reader::EventReady()
    101101{
    102102  return (fVertexCounter == 0) && (fInCounter == 0) && (fOutCounter == 0);
     
    105105//---------------------------------------------------------------------------
    106106
    107 bool DelphesHepMCReader::ReadBlock(DelphesFactory *factory,
     107bool DelphesHepMC2Reader::ReadBlock(DelphesFactory *factory,
    108108  TObjArray *allParticleOutputArray,
    109109  TObjArray *stableParticleOutputArray,
     
    202202    }
    203203  }
    204 
    205204  else if(key == 'C')
    206205  {
    207206    rc = bufferStream.ReadDbl(fCrossSection)
    208207      && bufferStream.ReadDbl(fCrossSectionError);
    209   }
    210 
     208
     209    if(!rc)
     210    {
     211      cerr << "** ERROR: "
     212           << "invalid cross section format" << endl;
     213      return kFALSE;
     214    }
     215  }
    211216  else if(key == 'F')
    212217  {
     
    317322//---------------------------------------------------------------------------
    318323
    319 void DelphesHepMCReader::AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,
     324void DelphesHepMC2Reader::AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,
    320325  TStopwatch *readStopWatch, TStopwatch *procStopWatch)
    321326{
     
    348353//---------------------------------------------------------------------------
    349354
    350 void DelphesHepMCReader::AnalyzeWeight(ExRootTreeBranch *branch)
     355void DelphesHepMC2Reader::AnalyzeWeight(ExRootTreeBranch *branch)
    351356{
    352357  Weight *element;
     
    363368//---------------------------------------------------------------------------
    364369
    365 void DelphesHepMCReader::AnalyzeParticle(DelphesFactory *factory,
     370void DelphesHepMC2Reader::AnalyzeParticle(DelphesFactory *factory,
    366371  TObjArray *allParticleOutputArray,
    367372  TObjArray *stableParticleOutputArray,
     
    430435//---------------------------------------------------------------------------
    431436
    432 void DelphesHepMCReader::FinalizeParticles(TObjArray *allParticleOutputArray)
     437void DelphesHepMC2Reader::FinalizeParticles(TObjArray *allParticleOutputArray)
    433438{
    434439  Candidate *candidate;
Note: See TracChangeset for help on using the changeset viewer.