Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/JetFakeParticle.cc

    r410f3a2 r341014c  
    1717 */
    1818
    19 
    2019/** \class JetFakeParticle
    2120 *
     
    3332#include "classes/DelphesFormula.h"
    3433
     34#include "ExRootAnalysis/ExRootClassifier.h"
     35#include "ExRootAnalysis/ExRootFilter.h"
    3536#include "ExRootAnalysis/ExRootResult.h"
    36 #include "ExRootAnalysis/ExRootFilter.h"
    37 #include "ExRootAnalysis/ExRootClassifier.h"
    38 
     37
     38#include "TDatabasePDG.h"
     39#include "TFormula.h"
     40#include "TLorentzVector.h"
    3941#include "TMath.h"
     42#include "TObjArray.h"
     43#include "TRandom3.h"
    4044#include "TString.h"
    41 #include "TFormula.h"
    42 #include "TRandom3.h"
    43 #include "TObjArray.h"
    44 #include "TDatabasePDG.h"
    45 #include "TLorentzVector.h"
    4645
    4746#include <algorithm>
    48 #include <stdexcept>
    4947#include <iostream>
    5048#include <sstream>
    51 
     49#include <stdexcept>
    5250
    5351using namespace std;
     
    8179  fEfficiencyMap.clear();
    8280
    83   for(i = 0; i < size/2; ++i)
     81  for(i = 0; i < size / 2; ++i)
    8482  {
    8583    formula = new DelphesFormula;
    86     formula->Compile(param[i*2 + 1].GetString());
    87     pdgCode = param[i*2].GetInt();
     84    formula->Compile(param[i * 2 + 1].GetString());
     85    pdgCode = param[i * 2].GetInt();
    8886
    8987    if(TMath::Abs(pdgCode) != 11 && TMath::Abs(pdgCode) != 13 && TMath::Abs(pdgCode) != 22)
     
    9290    }
    9391
    94     fEfficiencyMap[param[i*2].GetInt()] = formula;
     92    fEfficiencyMap[param[i * 2].GetInt()] = formula;
    9593  }
    9694
     
    116114  fPhotonOutputArray = ExportArray(GetString("PhotonOutputArray", "fakePhotons"));
    117115  fJetOutputArray = ExportArray(GetString("JetOutputArray", "jets"));
    118 
    119116}
    120117
     
    147144
    148145  fItInputArray->Reset();
    149   while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     146  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    150147  {
    151148    const TLorentzVector &candidatePosition = candidate->Position;
     
    170167      if(total <= r && r < total + p)
    171168      {
    172         fake = static_cast<Candidate*>(candidate->Clone());
     169        fake = static_cast<Candidate *>(candidate->Clone());
    173170
    174171        // convert jet
     
    178175          if(candidate->Charge != 0)
    179176          {
    180             fake->Charge = candidate->Charge/TMath::Abs(candidate->Charge);
     177            fake->Charge = candidate->Charge / TMath::Abs(candidate->Charge);
    181178          }
    182179          else
     
    184181            rs = gRandom->Uniform();
    185182            fake->Charge = (rs < 0.5) ? -1 : 1;
    186            
    187183          }
    188184        }
Note: See TracChangeset for help on using the changeset viewer.