Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesProMC.cpp

    ra85a257 r7c0fcd5  
    4747#include "ExRootAnalysis/ExRootProgressBar.h"
    4848
    49 #include "ProMC.pb.h"
    50 #include "ProMCBook.h"
    51 #include "ProMCHeader.pb.h"
     49#include "ProMC/ProMC.pb.h"
     50#include "ProMC/ProMCBook.h"
     51#include "ProMC/ProMCHeader.pb.h"
    5252
    5353using namespace std;
     
    5555//---------------------------------------------------------------------------
    5656
    57 void ConvertInput(ProMCEvent &event, double momentumUnit, double positionUnit,
    58   ExRootTreeBranch *branch, DelphesFactory *factory,
    59   TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray,
    60   TObjArray *partonOutputArray, TStopwatch *readStopWatch, TStopwatch *procStopWatch)
     57void ConvertInput(ProMCEvent &event, ExRootTreeBranch *branch, DelphesFactory *factory,
     58  TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray,
     59  TStopwatch *readStopWatch, TStopwatch *procStopWatch)
    6160{
    6261  Int_t i;
     
    108107    pid = mutableParticles->pdg_id(i);
    109108    status = mutableParticles->status(i);
    110 
    111     px = mutableParticles->px(i)/momentumUnit;
    112     py = mutableParticles->py(i)/momentumUnit;
    113     pz = mutableParticles->pz(i)/momentumUnit;
    114     mass = mutableParticles->mass(i)/momentumUnit;
    115     x = mutableParticles->x(i)/positionUnit;
    116     y = mutableParticles->y(i)/positionUnit;
    117     z = mutableParticles->z(i)/positionUnit;
    118     t = mutableParticles->t(i)/positionUnit;
     109    px = mutableParticles->px(i); py = mutableParticles->py(i); pz = mutableParticles->pz(i); mass = mutableParticles->mass(i);
     110    x = mutableParticles->x(i); y = mutableParticles->y(i); z = mutableParticles->z(i); t = mutableParticles->t(i);
    119111
    120112    candidate = factory->NewCandidate();
     
    180172  Int_t i;
    181173  Long64_t eventCounter, numberOfEvents;
    182   double momentumUnit = 1.0, positionUnit = 1.0;
    183174
    184175  if(argc < 4)
     
    232223
    233224      inputFile = new ProMCBook(argv[i], "r");
    234 
    235       ProMCHeader header = inputFile->getHeader();
    236 
    237       momentumUnit = static_cast<double>(header.momentumunit());
    238       positionUnit = static_cast<double>(header.lengthunit());
    239 
    240 
    241225
    242226      if(inputFile == NULL)
     
    264248
    265249        procStopWatch.Start();
    266         ConvertInput(event, momentumUnit, positionUnit,
    267           branchEvent, factory,
    268           allParticleOutputArray, stableParticleOutputArray,
    269           partonOutputArray, &readStopWatch, &procStopWatch);
     250        ConvertInput(event, branchEvent, factory,
     251          allParticleOutputArray, stableParticleOutputArray, partonOutputArray,
     252          &readStopWatch, &procStopWatch);
    270253        modularDelphes->ProcessTask();
    271254        procStopWatch.Stop();
Note: See TracChangeset for help on using the changeset viewer.