Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/JetFlavorAssociation.cc

    r341014c r254db49  
    1717 */
    1818
     19
    1920/** \class JetFlavorAssociation
    2021 *
     
    3132#include "classes/DelphesFormula.h"
    3233
     34#include "ExRootAnalysis/ExRootResult.h"
     35#include "ExRootAnalysis/ExRootFilter.h"
    3336#include "ExRootAnalysis/ExRootClassifier.h"
    34 #include "ExRootAnalysis/ExRootFilter.h"
    35 #include "ExRootAnalysis/ExRootResult.h"
    36 
     37
     38#include "TMath.h"
     39#include "TString.h"
     40#include "TFormula.h"
     41#include "TRandom3.h"
     42#include "TObjArray.h"
    3743#include "TDatabasePDG.h"
    38 #include "TFormula.h"
    3944#include "TLorentzVector.h"
    40 #include "TMath.h"
    41 #include "TObjArray.h"
    42 #include "TRandom3.h"
    43 #include "TString.h"
    4445
    4546#include <algorithm>
     47#include <stdexcept>
    4648#include <iostream>
    4749#include <sstream>
    48 #include <stdexcept>
    4950
    5051using namespace std;
     
    5253//------------------------------------------------------------------------------
    5354
    54 class PartonClassifier : public ExRootClassifier
     55class PartonClassifier: public ExRootClassifier
    5556{
    5657public:
     58
    5759  PartonClassifier() {}
    5860  Int_t GetCategory(TObject *object);
     
    6567Int_t PartonClassifier::GetCategory(TObject *object)
    6668{
    67   // select parton in the parton list
     69 // select parton in the parton list
    6870
    6971  Candidate *parton = static_cast<Candidate *>(object);
     
    8587//------------------------------------------------------------------------------
    8688
    87 class ParticleLHEFClassifier : public ExRootClassifier
     89class ParticleLHEFClassifier: public ExRootClassifier
    8890{
    8991public:
     92
    9093  ParticleLHEFClassifier() {}
    9194  Int_t GetCategory(TObject *object);
     
    187190//------------------------------------------------------------------------------
    188191
    189 void JetFlavorAssociation::Process()
    190 {
     192void JetFlavorAssociation::Process(){
    191193
    192194  Candidate *jet;
     
    199201  if(partonArray == 0) return;
    200202
    201   if(fParticleLHEFInputArray)
     203  if(fParticleLHEFInputArray) 
    202204  {
    203205    fParticleLHEFFilter->Reset();
     
    225227  Candidate *tempParton = 0, *tempPartonHighestPt = 0;
    226228  int pdgCode, pdgCodeMax = -1;
    227 
     229 
    228230  TIter itPartonArray(partonArray);
    229231  TIter itPartonLHEFArray(partonLHEFArray);
     
    239241      if(pdgCodeMax < pdgCode) pdgCodeMax = pdgCode;
    240242    }
    241 
     243 
    242244    if(!fParticleLHEFInputArray) continue;
    243 
     245 
    244246    itPartonLHEFArray.Reset();
    245247    while((partonLHEF = static_cast<Candidate *>(itPartonLHEFArray.Next())))
    246248    {
    247       if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.001 && parton->PID == partonLHEF->PID && partonLHEF->Charge == parton->Charge)
    248       {
    249         break;
     249      if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.001 &&
     250         parton->PID == partonLHEF->PID &&
     251         partonLHEF->Charge == parton->Charge)
     252      {     
     253         break;
    250254      }
    251255
     
    326330    while((partonLHEF = static_cast<Candidate *>(itPartonLHEFArray.Next())))
    327331    {
    328       if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.01 && parton->PID == partonLHEF->PID && partonLHEF->Charge == parton->Charge)
     332      if(parton->Momentum.DeltaR(partonLHEF->Momentum) < 0.01 &&
     333         parton->PID == partonLHEF->PID &&
     334         partonLHEF->Charge == parton->Charge)
    329335      {
    330336        isGoodCandidate = false;
Note: See TracChangeset for help on using the changeset viewer.