Fork me on GitHub

Changeset 3b3d0ad in git


Ignore:
Timestamp:
Jan 22, 2019, 5:01:10 PM (6 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, llp, master
Children:
70bb4cb
Parents:
03381ed
Message:

fix formatting in FastJetFinder

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/FastJetFinder.cc

    r03381ed r3b3d0ad  
    120120  fJetPTMin = GetDouble("JetPTMin", 10.0);
    121121
    122  
    123122  //-- N(sub)jettiness parameters --
    124123
     
    130129
    131130  //-- Exclusive clustering for e+e- collisions --
    132  
     131
    133132  fNJets = GetInt("NJets",2);
    134133  fExclusiveClustering = GetBool("ExclusiveClustering", false);
    135134
    136135  //-- Valencia Linear Collider algorithm
     136
    137137  fGamma = GetDouble("Gamma", 1.0);
    138138  //fBeta parameter see above
    139  
     139
    140140  fMeasureDef = new NormalizedMeasure(fBeta, fParameterR);
    141    
     141
    142142  switch(fAxisMode)
    143143  {
    144144    default:
    145       case 1:
    146         fAxesDef = new WTA_KT_Axes();
    147         break;
    148       case 2:
    149         fAxesDef = new OnePass_WTA_KT_Axes();
    150         break;
    151       case 3:
    152         fAxesDef = new KT_Axes();
    153         break;
    154       case 4:
    155         fAxesDef = new OnePass_KT_Axes();
    156    }
     145    case 1:
     146      fAxesDef = new WTA_KT_Axes();
     147      break;
     148    case 2:
     149      fAxesDef = new OnePass_WTA_KT_Axes();
     150      break;
     151    case 3:
     152      fAxesDef = new KT_Axes();
     153      break;
     154    case 4:
     155      fAxesDef = new OnePass_KT_Axes();
     156  }
    157157
    158158  //-- Trimming parameters --
    159  
     159
    160160  fComputeTrimming = GetBool("ComputeTrimming", false);
    161161  fRTrim = GetDouble("RTrim", 0.2);
    162162  fPtFracTrim = GetDouble("PtFracTrim", 0.05);
    163  
     163
    164164
    165165  //-- Pruning parameters --
    166  
     166
    167167  fComputePruning = GetBool("ComputePruning", false);
    168168  fZcutPrun = GetDouble("ZcutPrun", 0.1);
    169169  fRcutPrun = GetDouble("RcutPrun", 0.5);
    170170  fRPrun = GetDouble("RPrun", 0.8);
    171  
     171
    172172  //-- SoftDrop parameters --
    173  
     173
    174174  fComputeSoftDrop     = GetBool("ComputeSoftDrop", false);
    175175  fBetaSoftDrop        = GetDouble("BetaSoftDrop", 0.0);
    176176  fSymmetryCutSoftDrop = GetDouble("SymmetryCutSoftDrop", 0.1);
    177177  fR0SoftDrop= GetDouble("R0SoftDrop=", 0.8);
    178  
    179178
    180179  // ---  Jet Area Parameters ---
     180
    181181  fAreaAlgorithm = GetInt("AreaAlgorithm", 0);
    182182  fComputeRho = GetBool("ComputeRho", false);
     
    195195  switch(fAreaAlgorithm)
    196196  {
    197     case 1:
    198       fAreaDefinition = new AreaDefinition(active_area_explicit_ghosts, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    199       break;
    200     case 2:
    201       fAreaDefinition = new AreaDefinition(one_ghost_passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    202       break;
    203     case 3:
    204       fAreaDefinition = new AreaDefinition(passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    205       break;
    206     case 4:
    207       fAreaDefinition = new AreaDefinition(VoronoiAreaSpec(fEffectiveRfact));
    208       break;
    209     case 5:
    210       fAreaDefinition = new AreaDefinition(active_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    211       break;
    212197    default:
    213198    case 0:
    214199      fAreaDefinition = 0;
    215200      break;
     201    case 1:
     202      fAreaDefinition = new AreaDefinition(active_area_explicit_ghosts, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     203      break;
     204    case 2:
     205      fAreaDefinition = new AreaDefinition(one_ghost_passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     206      break;
     207    case 3:
     208      fAreaDefinition = new AreaDefinition(passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     209      break;
     210    case 4:
     211      fAreaDefinition = new AreaDefinition(VoronoiAreaSpec(fEffectiveRfact));
     212      break;
     213    case 5:
     214      fAreaDefinition = new AreaDefinition(active_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     215      break;
    216216  }
    217217
     
    248248      fDefinition = new JetDefinition(fNjettinessPlugin);
    249249      break;
    250   case 9:
     250    case 9:
    251251      fValenciaPlugin = new ValenciaPlugin(fParameterR, fBeta, fGamma);
    252252      fDefinition = new JetDefinition(fValenciaPlugin);
     
    255255  }
    256256
    257    
     257
    258258
    259259  fPlugin = plugin;
     
    325325  Double_t time, timeWeight;
    326326  Int_t number, ncharged, nneutrals;
    327   Int_t charge; 
     327  Int_t charge;
    328328  Double_t rho = 0.0;
    329329  PseudoJet jet, area;
     
    336336  Double_t excl_ymerge45 = 0.0;
    337337  Double_t excl_ymerge56 = 0.0;
    338  
     338
    339339  DelphesFactory *factory = GetFactory();
    340340
     
    381381  outputList.clear();
    382382
    383  
    384383  if(fExclusiveClustering)
    385384    {
     
    405404  detaMax = 0.0;
    406405  dphiMax = 0.0;
    407  
     406
    408407  for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList)
    409408  {
     
    416415    if(fAreaDefinition) area = itOutputList->area_4vector();
    417416
    418 
    419    
    420417    candidate = factory->NewCandidate();
    421418
     
    458455    candidate->DeltaEta = detaMax;
    459456    candidate->DeltaPhi = dphiMax;
    460     candidate->Charge = charge; 
     457    candidate->Charge = charge;
    461458    candidate->NNeutrals = nneutrals;
    462459    candidate->NCharged = ncharged;
     
    468465    candidate->ExclYmerge45 = excl_ymerge45;
    469466    candidate->ExclYmerge56 = excl_ymerge56;
    470    
     467
    471468    //------------------------------------
    472469    // Trimming
     
    478475      fastjet::Filter    trimmer(fastjet::JetDefinition(fastjet::kt_algorithm,fRTrim),fastjet::SelectorPtFractionMin(fPtFracTrim));
    479476      fastjet::PseudoJet trimmed_jet = trimmer(*itOutputList);
    480      
     477
    481478      trimmed_jet = join(trimmed_jet.constituents());
    482      
     479
    483480      candidate->TrimmedP4[0].SetPtEtaPhiM(trimmed_jet.pt(), trimmed_jet.eta(), trimmed_jet.phi(), trimmed_jet.m());
    484        
    485       // four hardest subjets 
     481
     482      // four hardest subjets
    486483      subjets.clear();
    487484      subjets = trimmed_jet.pieces();
    488485      subjets = sorted_by_pt(subjets);
    489      
     486
    490487      candidate->NSubJetsTrimmed = subjets.size();
    491488
    492489      for (size_t i = 0; i < subjets.size() and i < 4; i++)
    493490      {
    494             if(subjets.at(i).pt() < 0) continue ; 
     491            if(subjets.at(i).pt() < 0) continue ;
    495492            candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    496493      }
    497494    }
    498    
    499    
     495
     496
    500497    //------------------------------------
    501498    // Pruning
    502499    //------------------------------------
    503    
    504    
     500
     501
    505502    if(fComputePruning)
    506503    {
     
    510507
    511508      candidate->PrunedP4[0].SetPtEtaPhiM(pruned_jet.pt(), pruned_jet.eta(), pruned_jet.phi(), pruned_jet.m());
    512          
    513       // four hardest subjet 
     509
     510      // four hardest subjet
    514511      subjets.clear();
    515512      subjets = pruned_jet.pieces();
    516513      subjets = sorted_by_pt(subjets);
    517      
     514
    518515      candidate->NSubJetsPruned = subjets.size();
    519516
    520517      for (size_t i = 0; i < subjets.size() and i < 4; i++)
    521518      {
    522             if(subjets.at(i).pt() < 0) continue ; 
     519            if(subjets.at(i).pt() < 0) continue ;
    523520            candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    524521      }
    525522
    526     } 
    527      
     523    }
     524
    528525    //------------------------------------
    529526    // SoftDrop
    530527    //------------------------------------
    531    
     528
    532529    if(fComputeSoftDrop)
    533530    {
    534    
     531
    535532      contrib::SoftDrop softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop);
    536533      fastjet::PseudoJet softdrop_jet = softDrop(*itOutputList);
    537      
     534
    538535      candidate->SoftDroppedP4[0].SetPtEtaPhiM(softdrop_jet.pt(), softdrop_jet.eta(), softdrop_jet.phi(), softdrop_jet.m());
    539        
    540       // four hardest subjet 
    541      
     536
     537      // four hardest subjet
     538
    542539      subjets.clear();
    543540      subjets    = softdrop_jet.pieces();
     
    549546      for (size_t i = 0; i < subjets.size()  and i < 4; i++)
    550547      {
    551             if(subjets.at(i).pt() < 0) continue ; 
     548            if(subjets.at(i).pt() < 0) continue ;
    552549            candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    553550            if(i==0) candidate->SoftDroppedSubJet1 = candidate->SoftDroppedP4[i+1];
     
    555552      }
    556553    }
    557  
     554
    558555    // --- compute N-subjettiness with N = 1,2,3,4,5 ----
    559556
    560557    if(fComputeNsubjettiness)
    561558    {
    562      
     559
    563560      Nsubjettiness nSub1(1, *fAxesDef, *fMeasureDef);
    564561      Nsubjettiness nSub2(2, *fAxesDef, *fMeasureDef);
     
    566563      Nsubjettiness nSub4(4, *fAxesDef, *fMeasureDef);
    567564      Nsubjettiness nSub5(5, *fAxesDef, *fMeasureDef);
    568      
     565
    569566      candidate->Tau[0] = nSub1(*itOutputList);
    570567      candidate->Tau[1] = nSub2(*itOutputList);
     
    572569      candidate->Tau[3] = nSub4(*itOutputList);
    573570      candidate->Tau[4] = nSub5(*itOutputList);
    574          
     571
    575572    }
    576573
  • modules/FastJetFinder.h

    r03381ed r3b3d0ad  
    4242    class NjettinessPlugin;
    4343    class ValenciaPlugin;
    44     class AxesDefinition; 
    45     class MeasureDefinition;   
     44    class AxesDefinition;
     45    class MeasureDefinition;
    4646  }
    4747}
     
    6363  void *fRecomb; //!
    6464
    65   fastjet::contrib::AxesDefinition *fAxesDef; 
    66   fastjet::contrib::MeasureDefinition *fMeasureDef;   
     65  fastjet::contrib::AxesDefinition *fAxesDef;
     66  fastjet::contrib::MeasureDefinition *fMeasureDef;
    6767
    6868  fastjet::contrib::NjettinessPlugin *fNjettinessPlugin; //!
     
    9090  //-- Valencia Linear Collider algorithm
    9191  Double_t fGamma;
    92  
     92
    9393  //-- N (sub)jettiness parameters --
    9494
     
    100100
    101101  //-- Trimming parameters --
    102  
     102
    103103  Bool_t fComputeTrimming;
    104104  Double_t fRTrim;
    105105  Double_t fPtFracTrim;
    106  
     106
    107107  //-- Pruning parameters --
    108108
Note: See TracChangeset for help on using the changeset viewer.