Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/JetFlavorAssociation.cc

    r254db49 r341014c  
    1717 */
    1818
    19 
    2019/** \class JetFlavorAssociation
    2120 *
     
    3231#include "classes/DelphesFormula.h"
    3332
     33#include "ExRootAnalysis/ExRootClassifier.h"
     34#include "ExRootAnalysis/ExRootFilter.h"
    3435#include "ExRootAnalysis/ExRootResult.h"
    35 #include "ExRootAnalysis/ExRootFilter.h"
    36 #include "ExRootAnalysis/ExRootClassifier.h"
    37 
     36
     37#include "TDatabasePDG.h"
     38#include "TFormula.h"
     39#include "TLorentzVector.h"
    3840#include "TMath.h"
     41#include "TObjArray.h"
     42#include "TRandom3.h"
    3943#include "TString.h"
    40 #include "TFormula.h"
    41 #include "TRandom3.h"
    42 #include "TObjArray.h"
    43 #include "TDatabasePDG.h"
    44 #include "TLorentzVector.h"
    4544
    4645#include <algorithm>
    47 #include <stdexcept>
    4846#include <iostream>
    4947#include <sstream>
     48#include <stdexcept>
    5049
    5150using namespace std;
     
    5352//------------------------------------------------------------------------------
    5453
    55 class PartonClassifier: public ExRootClassifier
     54class PartonClassifier : public ExRootClassifier
    5655{
    5756public:
    58 
    5957  PartonClassifier() {}
    6058  Int_t GetCategory(TObject *object);
     
    6765Int_t PartonClassifier::GetCategory(TObject *object)
    6866{
    69  // select parton in the parton list
     67  // select parton in the parton list
    7068
    7169  Candidate *parton = static_cast<Candidate *>(object);
     
    8785//------------------------------------------------------------------------------
    8886
    89 class ParticleLHEFClassifier: public ExRootClassifier
     87class ParticleLHEFClassifier : public ExRootClassifier
    9088{
    9189public:
    92 
    9390  ParticleLHEFClassifier() {}
    9491  Int_t GetCategory(TObject *object);
     
    190187//------------------------------------------------------------------------------
    191188
    192 void JetFlavorAssociation::Process(){
     189void JetFlavorAssociation::Process()
     190{
    193191
    194192  Candidate *jet;
     
    201199  if(partonArray == 0) return;
    202200
    203   if(fParticleLHEFInputArray) 
     201  if(fParticleLHEFInputArray)
    204202  {
    205203    fParticleLHEFFilter->Reset();
     
    227225  Candidate *tempParton = 0, *tempPartonHighestPt = 0;
    228226  int pdgCode, pdgCodeMax = -1;
    229  
     227
    230228  TIter itPartonArray(partonArray);
    231229  TIter itPartonLHEFArray(partonLHEFArray);
     
    241239      if(pdgCodeMax < pdgCode) pdgCodeMax = pdgCode;
    242240    }
    243  
     241
    244242    if(!fParticleLHEFInputArray) continue;
    245  
     243
    246244    itPartonLHEFArray.Reset();
    247245    while((partonLHEF = static_cast<Candidate *>(itPartonLHEFArray.Next())))
    248246    {
    249       if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.001 &&
    250          parton->PID == partonLHEF->PID &&
    251          partonLHEF->Charge == parton->Charge)
    252       {     
    253          break;
     247      if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.001 && parton->PID == partonLHEF->PID && partonLHEF->Charge == parton->Charge)
     248      {
     249        break;
    254250      }
    255251
     
    330326    while((partonLHEF = static_cast<Candidate *>(itPartonLHEFArray.Next())))
    331327    {
    332       if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.01 &&
    333          parton->PID == partonLHEF->PID &&
    334          partonLHEF->Charge == parton->Charge)
     328      if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.01 && parton->PID == partonLHEF->PID && partonLHEF->Charge == parton->Charge)
    335329      {
    336330        isGoodCandidate = false;
Note: See TracChangeset for help on using the changeset viewer.