Fork me on GitHub

Changeset 341014c in git for readers/DelphesProMC.cpp


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesProMC.cpp

    r45e58be r341014c  
    1717 */
    1818
     19#include <iostream>
     20#include <memory>
     21#include <sstream>
    1922#include <stdexcept>
    20 #include <iostream>
    21 #include <sstream>
    22 #include <memory>
    2323
    2424#include <map>
    2525
    26 #include <stdlib.h>
    2726#include <signal.h>
    2827#include <stdio.h>
    29 
     28#include <stdlib.h>
     29
     30#include "TApplication.h"
    3031#include "TROOT.h"
    31 #include "TApplication.h"
    32 
     32
     33#include "TDatabasePDG.h"
    3334#include "TFile.h"
     35#include "TLorentzVector.h"
    3436#include "TObjArray.h"
     37#include "TParticlePDG.h"
    3538#include "TStopwatch.h"
    36 #include "TDatabasePDG.h"
    37 #include "TParticlePDG.h"
    38 #include "TLorentzVector.h"
    39 
    40 #include "modules/Delphes.h"
    41 #include "classes/DelphesStream.h"
     39
    4240#include "classes/DelphesClasses.h"
    4341#include "classes/DelphesFactory.h"
    44 
     42#include "classes/DelphesStream.h"
     43#include "modules/Delphes.h"
     44
     45#include "ExRootAnalysis/ExRootProgressBar.h"
     46#include "ExRootAnalysis/ExRootTreeBranch.h"
    4547#include "ExRootAnalysis/ExRootTreeWriter.h"
    46 #include "ExRootAnalysis/ExRootTreeBranch.h"
    47 #include "ExRootAnalysis/ExRootProgressBar.h"
    4848
    4949#include "ProMC.pb.h"
     
    109109    status = mutableParticles->status(i);
    110110
    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;
     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;
    119119
    120120    candidate = factory->NewCandidate();
     
    125125    candidate->Status = status;
    126126
    127     candidate->IsPU=0;
    128     if (mutableParticles->barcode(i)>0) candidate->IsPU=1; // pileup particle
     127    candidate->IsPU = 0;
     128    if(mutableParticles->barcode(i) > 0) candidate->IsPU = 1; // pileup particle
    129129
    130130    candidate->M1 = mutableParticles->mother1(i);
     
    135135
    136136    pdgParticle = pdg->GetParticle(pid);
    137     candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
     137    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
    138138    candidate->Mass = mass;
    139139
     
    187187  if(argc < 4)
    188188  {
    189     cout << " Usage: " << appName << " config_file" << " output_file" << " input_file(s)" << endl;
     189    cout << " Usage: " << appName << " config_file"
     190         << " output_file"
     191         << " input_file(s)" << endl;
    190192    cout << " config_file - configuration file in Tcl format," << endl;
    191193    cout << " output_file - output file in ROOT format," << endl;
     
    234236      cout << "** Reading " << argv[i] << endl;
    235237
    236       // use 64 bit 
     238      // use 64 bit
    237239      //inputFile = new ProMCBook(argv[i], "r", true);
    238240
     
    244246      momentumUnit = static_cast<double>(header.momentumunit());
    245247      positionUnit = static_cast<double>(header.lengthunit());
    246 
    247 
    248248
    249249      if(inputFile == NULL)
Note: See TracChangeset for help on using the changeset viewer.