Fork me on GitHub

Changeset d870fc5 in git for modules


Ignore:
Timestamp:
Dec 21, 2014, 4:03:35 PM (10 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
d77b51d
Parents:
7f12612 (diff), e5767b57 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'upstream/master'

Location:
modules
Files:
1 deleted
71 edited

Legend:

Unmodified
Added
Removed
  • modules/AngularSmearing.cc

    r7f12612 rd870fc5  
     1/*
     2 *  Delphes: a framework for fast simulation of a generic collider experiment
     3 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     4 *
     5 *  This program is free software: you can redistribute it and/or modify
     6 *  it under the terms of the GNU General Public License as published by
     7 *  the Free Software Foundation, either version 3 of the License, or
     8 *  (at your option) any later version.
     9 *
     10 *  This program is distributed in the hope that it will be useful,
     11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *  GNU General Public License for more details.
     14 *
     15 *  You should have received a copy of the GNU General Public License
     16 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 */
     18
    119
    220/** \class AngularSmearing
    321 *
    422 *  Performs transverse angular resolution smearing.
    5  *
    6  *  $Date: 2014-06-17 16:58:53 +0100  $
    7  * 
    8  *
    923 *
    1024 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/AngularSmearing.h

    r7f12612 rd870fc5  
     1/*
     2 *  Delphes: a framework for fast simulation of a generic collider experiment
     3 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     4 *
     5 *  This program is free software: you can redistribute it and/or modify
     6 *  it under the terms of the GNU General Public License as published by
     7 *  the Free Software Foundation, either version 3 of the License, or
     8 *  (at your option) any later version.
     9 *
     10 *  This program is distributed in the hope that it will be useful,
     11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *  GNU General Public License for more details.
     14 *
     15 *  You should have received a copy of the GNU General Public License
     16 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 */
     18
    119#ifndef AngularSmearing_h
    220#define AngularSmearing_h
     
    523 *
    624 *  Performs transverse angular resolution smearing.
    7  *
    8  *  $Date: 2014-06-17 16:58:53 +0100  $
    9  * 
    10  *
    1125 *
    1226 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/BTagging.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *  applies b-tagging efficiency (miss identification rate) formulas
    2424 *  and sets b-tagging flags
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/BTagging.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2525 *  applies b-tagging efficiency (miss identification rate) formulas
    2626 *  and sets b-tagging flags
    27  *
    28  *  $Date$
    29  *  $Revision$
    30  *
    3127 *
    3228 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Calorimeter.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2222 *  Fills calorimeter towers, performs calorimeter resolution smearing,
    2323 *  and creates energy flow objects (tracks, photons, and neutral hadrons).
    24  *
    25  *  $Date$
    26  *  $Revision$
    27  *
    2824 *
    2925 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    8682{
    8783  ExRootConfParam param, paramEtaBins, paramPhiBins, paramFractions;
    88   Long_t i, j, k, size, sizeEtaBins, sizePhiBins, sizeFractions;
     84  Long_t i, j, k, size, sizeEtaBins, sizePhiBins;
    8985  Double_t ecalFraction, hcalFraction;
    9086  TBinMap::iterator itEtaBin;
     
    139135  {
    140136    paramFractions = param[i*2 + 1];
    141     sizeFractions = paramFractions.GetSize();
    142137
    143138    ecalFraction = paramFractions[0].GetDouble();
     
    146141    fFractionMap[param[i*2].GetInt()] = make_pair(ecalFraction, hcalFraction);
    147142  }
     143
    148144/*
    149145  TFractionMap::iterator itFractionMap;
     
    155151
    156152  // read min E value for towers to be saved
    157   fEcalEnergyMin = GetDouble("EcalTowerMinEnergy", 0.0);
    158   fHcalEnergyMin = GetDouble("HcalTowerMinEnergy", 0.0);
    159  
    160   fEcalSigmaMin  = GetDouble("EcalTowerMinSignificance", 0.0);
    161   fHcalSigmaMin  = GetDouble("HcalTowerMinSignificance", 0.0);
    162 
    163  
     153  fECalEnergyMin = GetDouble("ECalEnergyMin", 0.0);
     154  fHCalEnergyMin = GetDouble("HCalEnergyMin", 0.0);
     155
     156  fECalEnergySignificanceMin = GetDouble("ECalEnergySignificanceMin", 0.0);
     157  fHCalEnergySignificanceMin = GetDouble("HCalEnergySignificanceMin", 0.0);
     158
     159  // switch on or off the dithering of the center of calorimeter towers
     160  fDitherTowerCenter = GetBool("DitherTowerCenter", true);
     161
    164162  // read resolution formulas
    165163  fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0"));
     
    176174  fTowerOutputArray = ExportArray(GetString("TowerOutputArray", "towers"));
    177175  fPhotonOutputArray = ExportArray(GetString("PhotonOutputArray", "photons"));
    178  
     176
    179177  fEFlowTrackOutputArray = ExportArray(GetString("EFlowTrackOutputArray", "eflowTracks"));
    180178  fEFlowPhotonOutputArray = ExportArray(GetString("EFlowPhotonOutputArray", "eflowPhotons"));
    181179  fEFlowNeutralHadronOutputArray = ExportArray(GetString("EFlowNeutralHadronOutputArray", "eflowNeutralHadrons"));
    182 
    183 
    184180}
    185181
     
    366362      fTrackHCalTime = 0.0;
    367363
    368       fTowerECalWeightTime = 0.0;
    369       fTowerHCalWeightTime = 0.0;
    370      
     364      fTowerECalTimeWeight = 0.0;
     365      fTowerHCalTimeWeight = 0.0;
     366
    371367      fTowerTrackHits = 0;
    372368      fTowerPhotonHits = 0;
    373      
     369
    374370      fTowerTrackArray->Clear();
    375371    }
     
    384380      position = track->Position;
    385381
    386      
     382
    387383      ecalEnergy = momentum.E() * fTrackECalFractions[number];
    388384      hcalEnergy = momentum.E() * fTrackHCalFractions[number];
     
    390386      fTrackECalEnergy += ecalEnergy;
    391387      fTrackHCalEnergy += hcalEnergy;
    392      
     388
    393389      fTrackECalTime += TMath::Sqrt(ecalEnergy)*position.T();
    394390      fTrackHCalTime += TMath::Sqrt(hcalEnergy)*position.T();
    395        
    396       fTrackECalWeightTime += TMath::Sqrt(ecalEnergy);
    397       fTrackHCalWeightTime += TMath::Sqrt(hcalEnergy);
     391
     392      fTrackECalTimeWeight += TMath::Sqrt(ecalEnergy);
     393      fTrackHCalTimeWeight += TMath::Sqrt(hcalEnergy);
    398394
    399395      fTowerTrackArray->Add(track);
     
    401397      continue;
    402398    }
    403    
     399
    404400    // check for photon and electron hits in current tower
    405401    if(flags & 2) ++fTowerPhotonHits;
    406    
     402
    407403    particle = static_cast<Candidate*>(fParticleInputArray->At(number));
    408404    momentum = particle->Momentum;
     
    419415    fTowerHCalTime += TMath::Sqrt(hcalEnergy)*position.T();
    420416
    421     fTowerECalWeightTime += TMath::Sqrt(ecalEnergy);
    422     fTowerHCalWeightTime += TMath::Sqrt(hcalEnergy);
    423    
     417    fTowerECalTimeWeight += TMath::Sqrt(ecalEnergy);
     418    fTowerHCalTimeWeight += TMath::Sqrt(hcalEnergy);
     419
    424420
    425421    fTower->AddCandidate(particle);
     
    441437
    442438  if(!fTower) return;
    443 //  cout<<"----------------------"<<endl;
    444 //  cout<<"Finalize Tower"<<endl;
    445 //  cout<<""<<endl;
    446 
    447439
    448440  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
    449 
    450 //  ecalEnergy = gRandom->Gaus(fTowerECalEnergy, ecalSigma);
    451 //  if(ecalEnergy < 0.0) ecalEnergy = 0.0;
     441  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);
    452442
    453443  ecalEnergy = LogNormal(fTowerECalEnergy, ecalSigma);
    454   ecalTime = (fTowerECalWeightTime < 1.0E-09 ) ? 0 : fTowerECalTime/fTowerECalWeightTime;
    455 
    456   hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);
    457 
    458 //  hcalEnergy = gRandom->Gaus(fTowerHCalEnergy, hcalSigma);
    459 //  if(hcalEnergy < 0.0) hcalEnergy = 0.0;
    460 
    461444  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    462   hcalTime = (fTowerHCalWeightTime < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalWeightTime;
    463 
    464  
     445
     446  ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight;
     447  hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight;
     448
    465449  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
    466450  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
    467451
    468   ecalEnergy = (ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*ecalSigma) ? 0 : ecalEnergy;
    469   hcalEnergy = (hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*hcalSigma) ? 0 : hcalEnergy;
     452  if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0;
     453  if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0;
    470454
    471455  energy = ecalEnergy + hcalEnergy;
    472   time = (TMath::Sqrt(ecalEnergy)*ecalTime + TMath::Sqrt(hcalEnergy)*hcalTime)/(TMath::Sqrt(ecalEnergy) + TMath::Sqrt(hcalEnergy));
    473 
    474 //  eta = fTowerEta;
    475 //  phi = fTowerPhi;
    476 
    477   eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
    478   phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     456  time = (TMath::Sqrt(ecalEnergy)*ecalTime + TMath::Sqrt(hcalEnergy)*hcalTime)/(TMath::Sqrt(ecalEnergy) + TMath::Sqrt(hcalEnergy));
     457
     458  if(fDitherTowerCenter)
     459  {
     460    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
     461    phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     462  }
     463  else
     464  {
     465    eta = fTowerEta;
     466    phi = fTowerPhi;
     467  }
    479468
    480469  pt = energy / TMath::CosH(eta);
    481470
    482  // fTower->Position.SetXYZT(-time, 0.0, 0.0, time);
    483471  fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time);
    484472  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
     
    491479  fTower->Edges[3] = fTowerEdges[3];
    492480
    493   if( energy > 0.0 )
     481  if(energy > 0.0)
    494482  {
    495483    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    497485      fPhotonOutputArray->Add(fTower);
    498486    }
    499    
     487
    500488    fTowerOutputArray->Add(fTower);
    501489  }
     
    511499
    512500  ecalEnergy -= fTrackECalEnergy;
    513   if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
    514 
    515501  hcalEnergy -= fTrackHCalEnergy;
    516   if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
     502
     503  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
     504  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
     505
     506  if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0;
     507  if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0;
    517508
    518509  energy = ecalEnergy + hcalEnergy;
     
    527518    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy);
    528519    tower->Eem = ecalEnergy;
    529     tower->Ehad = 0;
     520    tower->Ehad = 0.0;
    530521
    531522    fEFlowPhotonOutputArray->Add(tower);
     
    539530
    540531    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy);
    541     tower->Eem = 0;
     532    tower->Eem = 0.0;
    542533    tower->Ehad = hcalEnergy;
    543534
    544535    fEFlowNeutralHadronOutputArray->Add(tower);
    545536  }
    546 
    547 
    548 
    549 
    550537}
    551538
     
    561548    a = TMath::Log(mean) - 0.5*b*b;
    562549
    563     return TMath::Exp(a + b*gRandom->Gaus(0, 1));
     550    return TMath::Exp(a + b*gRandom->Gaus(0.0, 1.0));
    564551  }
    565552  else
  • modules/Calorimeter.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2424 *  Fills calorimeter towers, performs calorimeter resolution smearing,
    2525 *  and creates energy flow objects (tracks, photons, and neutral hadrons).
    26  *
    27  *  $Date$
    28  *  $Revision$
    29  *
    3026 *
    3127 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    6359  Double_t fTowerECalEnergy, fTowerHCalEnergy;
    6460  Double_t fTrackECalEnergy, fTrackHCalEnergy;
    65  
     61
    6662  Double_t fTowerECalTime, fTowerHCalTime;
    6763  Double_t fTrackECalTime, fTrackHCalTime;
    68    
    69   Double_t fTowerECalWeightTime, fTowerHCalWeightTime;
    70   Double_t fTrackECalWeightTime, fTrackHCalWeightTime;
    71  
     64
     65  Double_t fTowerECalTimeWeight, fTowerHCalTimeWeight;
     66  Double_t fTrackECalTimeWeight, fTrackHCalTimeWeight;
     67
    7268  Int_t fTowerTrackHits, fTowerPhotonHits;
    7369
    74   Double_t fEcalEnergyMin;
    75   Double_t fHcalEnergyMin;
    76  
    77   Double_t fEcalSigmaMin;
    78   Double_t fHcalSigmaMin;
     70  Double_t fECalEnergyMin;
     71  Double_t fHCalEnergyMin;
     72
     73  Double_t fECalEnergySignificanceMin;
     74  Double_t fHCalEnergySignificanceMin;
     75
     76  Bool_t fDitherTowerCenter;
    7977
    8078  TFractionMap fFractionMap; //!
     
    103101  TObjArray *fTowerOutputArray; //!
    104102  TObjArray *fPhotonOutputArray; //!
    105  
     103
    106104  TObjArray *fEFlowTrackOutputArray; //!
    107105  TObjArray *fEFlowPhotonOutputArray; //!
  • modules/Cloner.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Clone candidate array
    23  *
    24  *  $Date$
    25  *  $Revision$
    2623 *
    2724 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/Cloner.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Clone candidate array
    25  *
    26  *  $Date$
    27  *  $Revision$
    2825 *
    2926 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/ConstituentFilter.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Drops all input objects that are not constituents of any jet.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/ConstituentFilter.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Drops all input objects that are not constituents of any jet.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Delphes.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2222 *  Main Delphes module.
    2323 *  Controls execution of all other modules.
    24  *
    25  *  $Date$
    26  *  $Revision$
    27  *
    2824 *
    2925 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Delphes.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2424 *  Main Delphes module.
    2525 *  Controls execution of all other modules.
    26  *
    27  *  $Date$
    28  *  $Revision$
    29  *
    3026 *
    3127 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Efficiency.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Selects candidates from the InputArray according to the efficiency formula.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Efficiency.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Selects candidates from the InputArray according to the efficiency formula.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/EnergyScale.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Applies energy scale.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/EnergyScale.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Applies energy scale.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/EnergySmearing.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Performs energy resolution smearing.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/EnergySmearing.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Performs energy resolution smearing.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/ExampleModule.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Selects candidates from the InputArray according to the efficiency formula.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/ExampleModule.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Selects candidates from the InputArray according to the efficiency formula.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/FastJetFinder.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Finds jets using FastJet library.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    241237  Candidate *candidate, *constituent;
    242238  TLorentzVector momentum;
    243  
    244   TLorentzVector constmomentum;
    245  
     239
    246240  Double_t deta, dphi, detaMax, dphiMax;
    247   Double_t time, weightTime, avTime;
     241  Double_t time, timeWeight;
    248242  Int_t number;
    249   Double_t rho = 0;
     243  Double_t rho = 0.0;
    250244  PseudoJet jet, area;
    251245  vector<PseudoJet> inputList, outputList;
     
    309303    jet = *itOutputList;
    310304    if(fJetAlgorithm == 7) jet = join(jet.constituents());
    311    
     305
    312306    momentum.SetPxPyPzE(jet.px(), jet.py(), jet.pz(), jet.E());
    313    
     307
    314308    area.reset(0.0, 0.0, 0.0, 0.0);
    315309    if(fAreaDefinition) area = itOutputList->area_4vector();
     
    317311    candidate = factory->NewCandidate();
    318312
    319     time=0;
    320     weightTime=0;
     313    time = 0.0;
     314    timeWeight = 0.0;
    321315
    322316    inputList.clear();
    323317    inputList = sequence->constituents(*itOutputList);
    324 
    325     constmomentum.SetPxPyPzE(0.0,0.0,0.0,0.0);;
    326318
    327319    for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList)
    328320    {
    329321      constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index()));
    330 
    331       constmomentum += constituent->Momentum;
    332322
    333323      deta = TMath::Abs(momentum.Eta() - constituent->Momentum.Eta());
     
    337327
    338328      time += TMath::Sqrt(constituent->Momentum.E())*(constituent->Position.T());
    339       weightTime += TMath::Sqrt(constituent->Momentum.E());
     329      timeWeight += TMath::Sqrt(constituent->Momentum.E());
    340330
    341331      candidate->AddCandidate(constituent);
    342332    }
    343333
    344     avTime = time/weightTime;
    345 
    346334    candidate->Momentum = momentum;
    347     candidate->Position.SetT(avTime);
     335    candidate->Position.SetT(time/timeWeight);
    348336    candidate->Area.SetPxPyPzE(area.px(), area.py(), area.pz(), area.E());
    349337
  • modules/FastJetFinder.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Finds jets using FastJet library.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/FastJetGridMedianEstimator.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    1919
    2020/** \class FastJetGridMedianEstimator
    21  *
    2221 *
    2322 *  Computes median energy density per event using a fixed grid.
     
    9594void FastJetGridMedianEstimator::Init()
    9695{
    97   // read eta ranges
     96  ExRootConfParam param;
     97  Long_t i, size;
     98  Double_t drap, dphi, rapMin, rapMax;
    9899
    99   ExRootConfParam param = GetParam("GridRange");
    100   Long_t i, size;
    101  
    102   fGrid.clear();
     100  // read rapidity ranges
     101
     102  param = GetParam("GridRange");
    103103  size = param.GetSize();
     104
     105  fEstimators.clear();
    104106  for(i = 0; i < size/4; ++i)
    105107  {
    106     fGrid[make_pair(param[i*4].GetDouble(), param[i*4 + 1].GetDouble())] = make_pair(param[i*4 + 2].GetDouble(), param[i*4 + 3].GetDouble());
    107     //cout<<param[i*4].GetDouble()<<","<<  param[i*4 + 1].GetDouble()<<","<< param[i*4 + 2].GetDouble()<<","<< param[i*4 + 3].GetDouble()<<endl;
     108    rapMin = param[i*4].GetDouble();
     109    rapMax = param[i*4 + 1].GetDouble();
     110    drap = param[i*4 + 2].GetDouble();
     111    dphi = param[i*4 + 3].GetDouble();
     112    fEstimators.push_back(new GridMedianBackgroundEstimator(rapMin, rapMax, drap, dphi));
     113  }
    108114
    109   }
    110  
    111  
    112   //cout<<fGrid[make_pair(0.0,2.5)].first<<","<<fGrid[make_pair(0.0,2.5)].second<<endl;
    113  
    114  // import input array
     115  // import input array
    115116
    116117  fInputArray = ImportArray(GetString("InputArray", "Calorimeter/towers"));
     
    118119
    119120  fRhoOutputArray = ExportArray(GetString("RhoOutputArray", "rho"));
    120  
    121121}
    122122
     
    125125void FastJetGridMedianEstimator::Finish()
    126126{
     127  vector< GridMedianBackgroundEstimator * >::iterator itEstimators;
     128
     129  for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators)
     130  {
     131    if(*itEstimators) delete *itEstimators;
     132  }
     133
    127134  if(fItInputArray) delete fItInputArray;
    128135}
     
    134141  Candidate *candidate;
    135142  TLorentzVector momentum;
    136   Double_t deta, dphi, detaMin, detaMax;
    137143  Int_t number;
    138144  Double_t rho = 0;
    139145  PseudoJet jet;
    140   vector<PseudoJet> inputList, outputList;
    141  
    142   std::map< std::pair< Double_t , Double_t > , std::pair< Double_t , Double_t > >::iterator itGrid;
    143  
     146  vector< PseudoJet > inputList, outputList;
     147
     148  vector< GridMedianBackgroundEstimator * >::iterator itEstimators;;
     149
    144150  DelphesFactory *factory = GetFactory();
    145  
     151
    146152  inputList.clear();
    147  
     153
    148154  // loop over input objects
    149155  fItInputArray->Reset();
     
    158164  }
    159165
    160  
    161166  // compute rho and store it
    162  
    163   // cout<<"caio"<<endl;
    164   for(itGrid = fGrid.begin(); itGrid != fGrid.end(); ++itGrid)
     167
     168  for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators)
    165169  {
    166    //Selector select_rapidity = SelectorAbsRapRange(itEtaRangeMap->first, itEtaRangeMap->second);
    167    // JetMedianBackgroundEstimator estimator(select_rapidity, *fDefinition, *fAreaDefinition);
    168      
    169     //cout<<itGrid->first.first<<endl;
    170    
    171     detaMin = (itGrid->first).first;
    172     detaMax = (itGrid->first).second;
    173     deta    = (itGrid->second).first;
    174     dphi    = (itGrid->second).second;
    175    
    176     //cout<<detaMin<<","<<detaMax<<","<<deta<<","<<dphi<<endl;
    177    
    178    
    179     RectangularGrid grid(detaMin, detaMax, deta, dphi);
    180     //cout<<grid.is_initialised()<<endl;
    181     //cout<<grid.rapmin()<<","<<grid.rapmax()<<","<<grid.drap()<<","<<grid.dphi()<<endl;
    182      
    183     GridMedianBackgroundEstimator estimator(grid);
    184      
    185     estimator.set_particles(inputList);
    186      
    187     //cout<<estimator.description()<<endl;
    188      
    189     rho = estimator.rho();
    190     //cout<<rho<<endl;     
     170    (*itEstimators)->set_particles(inputList);
    191171
     172    rho = (*itEstimators)->rho();
    192173
    193174    candidate = factory->NewCandidate();
    194175    candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho);
    195     candidate->Edges[0] = detaMin;
    196     candidate->Edges[1] = detaMax;
     176    candidate->Edges[0] = (*itEstimators)->rapmin();
     177    candidate->Edges[1] = (*itEstimators)->rapmax();
    197178    fRhoOutputArray->Add(candidate);
    198179  }
    199  
    200180}
  • modules/FastJetGridMedianEstimator.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    3030
    3131#include "classes/DelphesModule.h"
    32 #include <map>
    33 #include <utility>
    34 
     32#include <vector>
    3533
    3634class TObjArray;
     
    3836
    3937namespace fastjet {
    40   class JetDefinition;
    41   class AreaDefinition;
    42   class Selector;
    43   namespace contrib {
    44     class NjettinessPlugin;
    45   }
     38  class GridMedianBackgroundEstimator;
    4639}
    4740
     
    5851
    5952private:
    60  
    61   typedef std::map< std::pair< Double_t , Double_t > , std::pair< Double_t , Double_t > > TGrid; //!
    62    
    63   TGrid fGrid; //!
    64  
     53
     54  std::vector< fastjet::GridMedianBackgroundEstimator * > fEstimators; //!
     55
    6556  TIterator *fItInputArray; //!
    6657
  • modules/FastJetLinkDef.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Lists classes to be included in cint dicitonary
    23  *
    24  *  $Date: 2014-04-16 17:17:35 +0200 (Wed, 16 Apr 2014) $
    25  *  $Revision: 1369 $
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Hector.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Propagates candidates using Hector library.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Hector.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Propagates candidates using Hector library.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/IdentificationMap.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2020/** \class IdentificationMap
    2121 *
    22  *  Converts particles with some PDG code into another particle, according to parametrized probability as function of pt eta
    23  given by user.
    24  *
    25  *  $Date: 2014-08-07 14:57:44 +0100 (Thu, 07 Aug 2014) $
    26  *  $Revision: 905 $
    27  *
     22 *  Converts particles with some PDG code into another particle,
     23 *  according to parametrized probability.
    2824 *
    2925 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
     
    4945#include "TLorentzVector.h"
    5046
    51 #include <algorithm> 
     47#include <algorithm>
    5248#include <stdexcept>
    5349#include <iostream>
     
    7571  // read efficiency formula
    7672
    77  
     73
    7874  TMisIDMap::iterator itEfficiencyMap;
    7975  ExRootConfParam param;
    8076  DelphesFormula *formula;
    8177  Int_t i, size, pdg;
    82  
     78
    8379  // read efficiency formulas
    8480  param = GetParam("EfficiencyFormula");
    8581  size = param.GetSize();
    86  
     82
    8783  fEfficiencyMap.clear();
    8884  for(i = 0; i < size/3; ++i)
     
    9288    pdg = param[i*3].GetInt();
    9389    fEfficiencyMap.insert(make_pair(pdg,make_pair(param[i*3 + 1].GetInt(),formula)));
    94  
     90
    9591   // cout<<param[i*3].GetInt()<<","<<param[i*3+1].GetInt()<<","<<param[i*3 + 2].GetString()<<endl;
    96  
     92
    9793  }
    9894
     
    106102    fEfficiencyMap.insert(make_pair(0,make_pair(0,formula)));
    107103  }
    108  
     104
    109105  // import input array
    110106
     
    122118{
    123119  if(fItInputArray) delete fItInputArray;
    124  
     120
    125121  TMisIDMap::iterator itEfficiencyMap;
    126122  DelphesFormula *formula;
     
    136132
    137133void IdentificationMap::Process()
    138 { 
     134{
    139135  Candidate *candidate;
    140136  Double_t pt, eta, phi;
     
    145141
    146142  Double_t P, Pi;
    147    
     143
    148144 // cout<<"------------ New Event ------------"<<endl;
    149    
     145
    150146  fItInputArray->Reset();
    151147  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    158154    pdgIn = candidate->PID;
    159155    charge = candidate->Charge;
    160    
     156
    161157   // cout<<"------------ New Candidate ------------"<<endl;
    162158   // cout<<candidate->PID<<"   "<<pt<<","<<eta<<","<<phi<<endl;
    163      
     159
    164160    P = 1.0;
    165    
     161
    166162    //first check that PID of this particle is specified in cfg, if not set look for PID=0
    167      
     163
    168164    itEfficiencyMap = fEfficiencyMap.find(pdgIn);
    169      
    170     range = fEfficiencyMap.equal_range(pdgIn); 
     165
     166    range = fEfficiencyMap.equal_range(pdgIn);
    171167    if(range.first == range.second) range = fEfficiencyMap.equal_range(-pdgIn);
    172168    if(range.first == range.second) range = fEfficiencyMap.equal_range(0);
    173    
     169
    174170    //loop over submap for this pid
    175171    for (TMisIDMap::iterator it=range.first; it!=range.second; ++it)
    176     { 
    177        
     172    {
     173
    178174      formula = (it->second).second;
    179175      pdgOut = (it->second).first;
    180176
    181177      Pi = formula->Eval(pt, eta);
    182    
     178
    183179      // check that sum of probabilities does not exceed 1.
    184180      P = (P - Pi)/P;
    185        
     181
    186182      if( P < 0.0 ) continue;
    187183      else
    188184      {
    189      
     185
    190186       //randomly assign a PID to particle according to map
    191187       Double_t rndm = gRandom->Uniform();
    192        
     188
    193189       if(rndm > P)
    194190       {
     
    198194         break;
    199195       }
    200       } 
    201        
     196      }
     197
    202198    }
    203      
     199
    204200   }
    205201
  • modules/IdentificationMap.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323/** \class IdentificationMap
    2424 *
    25  *  Converts particles with some PDG code into another particle, according to parametrized probability as function of pt eta
    26  given by user.
    27  *
    28  *  $Date: 2014-08-07 14:57:44 +0100 (Thu, 07 Aug 2014) $
    29  *  $Revision: 905 $
    30  *
     25 *  Converts particles with some PDG code into another particle,
     26 *  according to parametrized probability.
    3127 *
    3228 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
     
    5248
    5349private:
    54  
     50
    5551  typedef std::multimap< Int_t, std::pair<Int_t , DelphesFormula * > > TMisIDMap; //!
    56  
     52
    5753  TMisIDMap fEfficiencyMap;
    58  
     54
    5955  TIterator *fItInputArray; //!
    6056
  • modules/ImpactParameterSmearing.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *  Performs transverse impact parameter smearing.
    2222 *
    23  *  $Date: 2014-16-03 14:57:44 +0100   
    24  *
    25  *
    2623 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
    2724 *
    2825 */
    29  
     26
    3027
    3128#include "modules/ImpactParameterSmearing.h"
     
    4744#include "TLorentzVector.h"
    4845
    49 #include <algorithm> 
     46#include <algorithm>
    5047#include <stdexcept>
    5148#include <iostream>
     
    9996{
    10097  Candidate *candidate, *particle, *mother;
    101   Double_t xd, yd, zd, dxy, dz, sx, sy, sz, ddxy, ddz;
    102   Double_t pt, eta, px, py, ang_mom;
    103 
    104  // cout<<"New event"<<endl;
     98  Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy;
     99  Double_t pt, eta, px, py;
    105100
    106101  fItInputArray->Reset();
    107102  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    108103  {
    109  
    110     //take momentum before smearing (otherwise apply double smearing on dxy)
     104
     105    // take momentum before smearing (otherwise apply double smearing on dxy)
    111106    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    112  
     107
    113108    const TLorentzVector &candidateMomentum = particle->Momentum;
    114     //  const TLorentzVector &candidateMomentum = candidate->Momentum;
    115    
     109
    116110    eta = candidateMomentum.Eta();
    117111    pt = candidateMomentum.Pt();
    118112    px = candidateMomentum.Px();
    119113    py = candidateMomentum.Py();
    120      
     114
    121115    // calculate coordinates of closest approach to track circle in transverse plane xd, yd, zd
    122116    xd =  candidate->Xd;
    123117    yd =  candidate->Yd;
    124118    zd =  candidate->Zd;
    125    
    126     // calculate smeared values   
    127     sx = gRandom->Gaus(0,fFormula->Eval(pt, eta));
    128     sy = gRandom->Gaus(0,fFormula->Eval(pt, eta));
    129     sz = gRandom->Gaus(0,fFormula->Eval(pt, eta));
    130      
     119
     120    // calculate smeared values
     121    sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     122    sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     123    sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     124
    131125    xd += sx;
    132126    yd += sy;
    133     zd += sz;
    134      
    135     // calculate impact paramater (after-smearing)
    136     ang_mom = (xd*py - yd*px);
    137     dxy = ang_mom/pt;
    138     dz = zd;
    139  
    140     ddxy = gRandom->Gaus(0,fFormula->Eval(pt, eta));
    141     ddz = gRandom->Gaus(0,fFormula->Eval(pt, eta));
    142  
    143     //fill smeared values in candidate
     127    zd += sz;
     128
     129    // calculate impact parameter (after-smearing)
     130    dxy = (xd*py - yd*px)/pt;
     131
     132    ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     133
     134    // fill smeared values in candidate
    144135    mother = candidate;
    145    
     136
    146137    candidate = static_cast<Candidate*>(candidate->Clone());
    147138    candidate->Xd = xd;
    148139    candidate->Yd = yd;
    149140    candidate->Zd = zd;
    150    
     141
    151142    candidate->Dxy = dxy;
    152143    candidate->SDxy = ddxy;
    153      
     144
    154145    candidate->AddCandidate(mother);
    155146    fOutputArray->Add(candidate);
  • modules/ImpactParameterSmearing.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Performs transverse impact parameter smearing.
    25  *
    26  *  $Date: 2014-16-03 14:57:44 +0100   
    27  *
    2825 *
    2926 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/Isolation.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2424 *  to the candidate's transverse momentum. outputs candidates that have
    2525 *  the transverse momenta fraction within (PTRatioMin, PTRatioMax].
    26  *
    27  *  $Date$
    28  *  $Revision$
    29  *
    3026 *
    3127 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    192188
    193189      if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax &&
    194          !candidate->Overlaps(isolation))
     190         candidate->GetUniqueID() != isolation->GetUniqueID())
    195191      {
    196192        sum += isolationMomentum.Pt();
  • modules/Isolation.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2626 *  to the candidate's transverse momentum. outputs candidates that have
    2727 *  the transverse momenta fraction within (PTRatioMin, PTRatioMax].
    28  *
    29  *  $Date$
    30  *  $Revision$
    31  *
    3228 *
    3329 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/JetPileUpSubtractor.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Subtract pile-up contribution from jets using the fastjet area method
    23  *
    24  *  $Date: 2012-11-18 15:57:08 +0100 (Sun, 18 Nov 2012) $
    25  *  $Revision: 814 $
    2623 *
    2724 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/JetPileUpSubtractor.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Subtract pile-up contribution from jets using the fastjet area method
    25  *
    26  *  $Date: 2012-11-18 15:57:08 +0100 (Sun, 18 Nov 2012) $
    27  *  $Revision: 814 $
    2825 *
    2926 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/LeptonDressing.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2020/** \class LeptonDressing
    2121 *
    22  *
    23  * 
    2422 *
    2523 *
  • modules/LeptonDressing.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121
    2222/** \class LeptonDressing
    23  *
    2423 *
    2524 *  \author P. Demin && A. Mertens - UCL, Louvain-la-Neuve
  • modules/Merger.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2222 *  Merges multiple input arrays into one output array
    2323 *  and sums transverse momenta of all input objects.
    24  *
    25  *  $Date$
    26  *  $Revision$
    27  *
    2824 *
    2925 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Merger.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2424 *  Merges multiple input arrays into one output array
    2525 *  and sums transverse momenta of all input objects.
    26  *
    27  *  $Date$
    28  *  $Revision$
    29  *
    3026 *
    3127 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/ModulesLinkDef.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Lists classes to be included in cint dicitonary
    23  *
    24  *  $Date: 2014-04-16 17:17:35 +0200 (Wed, 16 Apr 2014) $
    25  *  $Revision: 1369 $
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/MomentumSmearing.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Performs transverse momentum resolution smearing.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/MomentumSmearing.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Performs transverse momentum resolution smearing.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/ParticlePropagator.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2424 *  its half-length, centered at (0,0,0) and with its axis
    2525 *  oriented along the z-axis.
    26  *
    27  *  $Date$
    28  *  $Revision$
    29  *
    3026 *
    3127 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    124120  Double_t tmp, discr, discr2;
    125121  Double_t delta, gammam, omega, asinrho;
    126   Double_t ang_mom, rcu, rc2, dxy, xd, yd, zd;
    127  
     122  Double_t rcu, rc2, dxy, xd, yd, zd;
     123
    128124  const Double_t c_light = 2.99792458E8;
    129125
     
    162158      discr2 = pt2*fRadius2 - tmp*tmp;
    163159
    164       if(discr2 < 0)
     160      if(discr2 < 0.0)
    165161      {
    166162        // no solutions
     
    172168      t1 = (-tmp + discr)/pt2;
    173169      t2 = (-tmp - discr)/pt2;
    174       t = (t1 < 0) ? t2 : t1;
     170      t = (t1 < 0.0) ? t2 : t1;
    175171
    176172      z_t = z + pz*t;
     
    179175        t3 = (+fHalfLength - z) / pz;
    180176        t4 = (-fHalfLength - z) / pz;
    181         t = (t3 < 0) ? t4 : t3;
     177        t = (t3 < 0.0) ? t4 : t3;
    182178      }
    183179
     
    213209    {
    214210
    215       // 1.  initial transverse momentum p_{T0} : Part->pt
    216       //     initial transverse momentum direction \phi_0 = -atan(p_X0/p_Y0)
    217       //     relativistic gamma : gamma = E/mc² ; gammam = gamma \times m
    218       //     giration frequency \omega = q/(gamma m) fBz
    219       //     helix radius r = p_T0 / (omega gamma m)
    220 
    221       gammam = e*1.0E9 / (c_light*c_light);      // gammam in [eV/c²]
    222       omega = q * fBz / (gammam);                // omega is here in [ 89875518 / s]
     211      // 1.  initial transverse momentum p_{T0}: Part->pt
     212      //     initial transverse momentum direction phi_0 = -atan(p_X0/p_Y0)
     213      //     relativistic gamma: gamma = E/mc^2; gammam = gamma * m
     214      //     gyration frequency omega = q/(gamma m) fBz
     215      //     helix radius r = p_{T0} / (omega gamma m)
     216
     217      gammam = e*1.0E9 / (c_light*c_light);      // gammam in [eV/c^2]
     218      omega = q * fBz / (gammam);                // omega is here in [89875518/s]
    223219      r = pt / (q * fBz) * 1.0E9/c_light;        // in [m]
    224220
    225       phi_0 = TMath::ATan2(py, px); // [rad] in [-pi; pi]
     221      phi_0 = TMath::ATan2(py, px); // [rad] in [-pi, pi]
    226222
    227223      // 2. helix axis coordinates
     
    235231      rcu = TMath::Abs(r);
    236232      rc2 = r_c*r_c;
    237      
     233
    238234      // calculate coordinates of closest approach to track circle in transverse plane xd, yd, zd
    239       xd = x_c*x_c*x_c - x_c*rcu*r_c + x_c*y_c*y_c; 
    240       xd  = ( rc2 > 0.0 ) ? xd / rc2 : -999;
    241       yd  = y_c*(-rcu*r_c + rc2);
    242       yd  = ( rc2 > 0.0 ) ? yd / rc2 : -999;
    243       zd  = z + (TMath::Sqrt(xd*xd+yd*yd) - TMath::Sqrt(x*x+y*y))*pz/pt;
     235      xd = x_c*x_c*x_c - x_c*rcu*r_c + x_c*y_c*y_c;
     236      xd = (rc2 > 0.0) ? xd / rc2 : -999;
     237      yd = y_c*(-rcu*r_c + rc2);
     238      yd = (rc2 > 0.0) ? yd / rc2 : -999;
     239      zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt;
    244240
    245241      // calculate impact paramater
    246       ang_mom = (xd*py - yd*px);
    247       dxy = ang_mom/pt;
    248    
    249          
     242      dxy = (xd*py - yd*px)/pt;
     243
    250244      // 3. time evaluation t = TMath::Min(t_r, t_z)
    251245      //    t_r : time to exit from the sides
     
    274268        t6 = (delta - TMath::Pi() + asinrho) / omega;
    275269
    276         if(t1 < 0) t1 = 1.0E99;
    277         if(t2 < 0) t2 = 1.0E99;
    278         if(t3 < 0) t3 = 1.0E99;
    279         if(t4 < 0) t4 = 1.0E99;
    280         if(t5 < 0) t5 = 1.0E99;
    281         if(t6 < 0) t6 = 1.0E99;
     270        if(t1 < 0.0) t1 = 1.0E99;
     271        if(t2 < 0.0) t2 = 1.0E99;
     272        if(t3 < 0.0) t3 = 1.0E99;
     273        if(t4 < 0.0) t4 = 1.0E99;
     274        if(t5 < 0.0) t5 = 1.0E99;
     275        if(t6 < 0.0) t6 = 1.0E99;
    282276
    283277        t_ra = TMath::Min(t1, TMath::Min(t2, t3));
     
    301295
    302296        candidate->Momentum = candidateMomentum;
    303         candidate->Xd = xd*1.0E3;
    304         candidate->Yd = yd*1.0E3;
     297        candidate->Dxy = dxy*1.0E3;
     298        candidate->Xd = xd*1.0E3;
     299        candidate->Yd = yd*1.0E3;
    305300        candidate->Zd = zd*1.0E3;
    306        
    307         candidate->AddCandidate(mother);
     301
     302        candidate->AddCandidate(mother);
    308303
    309304        fOutputArray->Add(candidate);
  • modules/ParticlePropagator.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2626 *  its half-length, centered at (0,0,0) and with its axis
    2727 *  oriented along the z-axis.
    28  *
    29  *  $Date$
    30  *  $Revision$
    31  *
    3228 *
    3329 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/PdgCodeFilter.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    1919/** \class PdgCodeFilter
    2020 *
    21  *  Removes particles with specific pdg codes
     21 *  Removes particles with specific PDG codes
    2222 *
    2323 *  \author M. Selvaggi
     
    4040#include "TRandom3.h"
    4141#include "TObjArray.h"
    42 //#include "TDatabasePDG.h"
     42#include "TDatabasePDG.h"
    4343#include "TLorentzVector.h"
    4444
     
    6767void PdgCodeFilter::Init()
    6868{
    69  
     69
    7070  ExRootConfParam param;
    7171  Size_t i, size;
    72  
     72
    7373  // PT threshold
    7474  fPTMin = GetDouble("PTMin", 0.0);
     
    7777  fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles"));
    7878  fItInputArray = fInputArray->MakeIterator();
    79  
     79
    8080  param = GetParam("PdgCode");
    8181  size = param.GetSize();
    8282
    8383  // read PdgCodes to be filtered out from the data card
    84  
     84
    8585  fPdgCodes.clear();
    8686  for(i = 0; i < size; ++i)
     
    8888    fPdgCodes.push_back(param[i].GetInt());
    8989  }
    90  
     90
    9191  // create output array
    9292  fOutputArray = ExportArray(GetString("OutputArray", "filteredParticles"));
     
    115115    const TLorentzVector &candidateMomentum = candidate->Momentum;
    116116    pt = candidateMomentum.Pt();
    117    
     117
    118118    pass = kTRUE;
    119119
    120     if( pt < fPTMin ) pass = kFALSE;
    121     if( find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end() ) pass = kFALSE;
     120    if(pt < fPTMin) pass = kFALSE;
     121    if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE;
    122122
    123     if (pass) fOutputArray->Add(candidate);
     123    if(pass) fOutputArray->Add(candidate);
    124124  }
    125125}
  • modules/PdgCodeFilter.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2424/** \class Efficiency
    2525 *
    26  *  Removes particles with specific pdg codes 
     26 *  Removes particles with specific pdg codes
    2727  *
    2828 *  \author M. Selvaggi
     
    5050
    5151  Double_t fPTMin; //!
    52  
    53   std::vector<Int_t> fPdgCodes; 
     52
     53  std::vector<Int_t> fPdgCodes;
    5454
    5555  TIterator *fItInputArray; //!
  • modules/PileUpJetID.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    1818
     19
    1920/** \class PileUpJetID
    2021 *
     
    2223 *
    2324 *  \author S. Zenz, December 2013
    24  *
    2525 *
    2626 */
     
    5454
    5555PileUpJetID::PileUpJetID() :
    56   fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0) 
     56  fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0)
    5757{
    5858
     
    8686  fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "Calorimeter/eflowTowers"));
    8787  fItNeutralInputArray = fNeutralInputArray->MakeIterator();
    88  
     88
    8989  fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices"));
    9090  fItVertexInputArray = fVertexInputArray->MakeIterator();
    91  
     91
    9292  fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
    93 // create output array(s)
     93
     94  // create output array(s)
    9495
    9596  fOutputArray = ExportArray(GetString("OutputArray", "jets"));
    96 
    9797}
    9898
     
    101101void PileUpJetID::Finish()
    102102{
    103 
    104103  if(fItJetInputArray) delete fItJetInputArray;
    105104  if(fItTrackInputArray) delete fItTrackInputArray;
    106105  if(fItNeutralInputArray) delete fItNeutralInputArray;
    107106  if(fItVertexInputArray) delete fItVertexInputArray;
    108 
    109107}
    110108
     
    115113  Candidate *candidate, *constituent;
    116114  TLorentzVector momentum, area;
    117   Double_t zvtx=0;
    118 
    119   Candidate *trk;
    120 
    121  // find z position of primary vertex
    122    
     115  Int_t i, nc, nn;
     116  Double_t sumpt, sumptch, sumptchpv, sumptchpu, sumdrsqptsq, sumptsq;
     117  Double_t dr, pt, pt_ann[5];
     118  Double_t zvtx = 0.0;
     119
     120  Candidate *track;
     121
     122  // find z position of primary vertex
     123
    123124  fItVertexInputArray->Reset();
    124125  while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next())))
     
    126127    if(!candidate->IsPU)
    127128    {
    128     zvtx = candidate->Position.Z();
    129     break;
     129      zvtx = candidate->Position.Z();
     130      break;
    130131    }
    131132  }
     
    138139    area = candidate->Area;
    139140
    140     float sumpt = 0.;
    141     float sumptch = 0.;
    142     float sumptchpv = 0.;
    143     float sumptchpu = 0.;
    144     float sumdrsqptsq = 0.;
    145     float sumptsq = 0.;
    146     int nc = 0;
    147     int nn = 0;
    148     float pt_ann[5];
    149 
    150     for (int i = 0 ; i < 5 ; i++) {
    151       pt_ann[i] = 0.;
    152     }
    153 
    154     if (fUseConstituents) {
     141    sumpt = 0.0;
     142    sumptch = 0.0;
     143    sumptchpv = 0.0;
     144    sumptchpu = 0.0;
     145    sumdrsqptsq = 0.0;
     146    sumptsq = 0.0;
     147    nc = 0;
     148    nn = 0;
     149
     150    for(i = 0; i < 5; ++i)
     151    {
     152      pt_ann[i] = 0.0;
     153    }
     154
     155    if(fUseConstituents)
     156    {
    155157      TIter itConstituents(candidate->GetCandidates());
    156       while((constituent = static_cast<Candidate*>(itConstituents.Next()))) {
    157         float pt = constituent->Momentum.Pt();
    158         float dr = candidate->Momentum.DeltaR(constituent->Momentum);
     158      while((constituent = static_cast<Candidate*>(itConstituents.Next())))
     159      {
     160        pt = constituent->Momentum.Pt();
     161        dr = candidate->Momentum.DeltaR(constituent->Momentum);
    159162        sumpt += pt;
    160163        sumdrsqptsq += dr*dr*pt*pt;
    161164        sumptsq += pt*pt;
    162         if (constituent->Charge == 0) {
    163           // neutrals
    164           nn++;
    165         } else {
    166           // charged
    167           if (constituent->IsPU && TMath::Abs(constituent->Position.Z()-zvtx) > fZVertexResolution) {
    168             sumptchpu += pt;
    169           } else {
    170             sumptchpv += pt;
    171           }
    172           sumptch += pt;
    173           nc++;
    174         }
    175         for (int i = 0 ; i < 5 ; i++) {
    176           if (dr > 0.1*i && dr < 0.1*(i+1)) {
    177             pt_ann[i] += pt;
    178           }
    179         }
    180       }
    181     } else {
     165        if(constituent->Charge == 0)
     166        {
     167          // neutrals
     168          ++nn;
     169        }
     170        else
     171        {
     172          // charged
     173          if(constituent->IsPU && TMath::Abs(constituent->Position.Z()-zvtx) > fZVertexResolution)
     174          {
     175            sumptchpu += pt;
     176          }
     177          else
     178          {
     179            sumptchpv += pt;
     180          }
     181          sumptch += pt;
     182          ++nc;
     183        }
     184        for(i = 0; i < 5; ++i)
     185        {
     186          if(dr > 0.1*i && dr < 0.1*(i + 1))
     187          {
     188            pt_ann[i] += pt;
     189          }
     190        }
     191      }
     192    }
     193    else
     194    {
    182195      // Not using constituents, using dr
    183196      fItTrackInputArray->Reset();
    184        while ((trk = static_cast<Candidate*>(fItTrackInputArray->Next()))) {
    185         if (trk->Momentum.DeltaR(candidate->Momentum) < fParameterR) {
    186           float pt = trk->Momentum.Pt();
    187           sumpt += pt;
    188           sumptch += pt;
    189           if (trk->IsPU && TMath::Abs(trk->Position.Z()-zvtx) > fZVertexResolution) {
    190             sumptchpu += pt;
    191           } else {
    192             sumptchpv += pt;
    193           }
    194           float dr = candidate->Momentum.DeltaR(trk->Momentum);
    195           sumdrsqptsq += dr*dr*pt*pt;
    196           sumptsq += pt*pt;
    197           nc++;
    198           for (int i = 0 ; i < 5 ; i++) {
    199             if (dr > 0.1*i && dr < 0.1*(i+1)) {
     197      while((track = static_cast<Candidate*>(fItTrackInputArray->Next())))
     198      {
     199        if(track->Momentum.DeltaR(candidate->Momentum) < fParameterR)
     200        {
     201          pt = track->Momentum.Pt();
     202          sumpt += pt;
     203          sumptch += pt;
     204          if(track->IsPU && TMath::Abs(track->Position.Z()-zvtx) > fZVertexResolution)
     205          {
     206            sumptchpu += pt;
     207          }
     208          else
     209          {
     210            sumptchpv += pt;
     211          }
     212          dr = candidate->Momentum.DeltaR(track->Momentum);
     213          sumdrsqptsq += dr*dr*pt*pt;
     214          sumptsq += pt*pt;
     215          nc++;
     216          for(i = 0; i < 5; ++i)
     217          {
     218            if(dr > 0.1*i && dr < 0.1*(i + 1))
     219            {
    200220              pt_ann[i] += pt;
    201             }
    202           }
    203         }
    204       }
     221            }
     222          }
     223        }
     224      }
     225
    205226      fItNeutralInputArray->Reset();
    206       while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next()))) {
    207         if (constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR) {
    208           float pt = constituent->Momentum.Pt();
    209           sumpt += pt;
    210           float dr = candidate->Momentum.DeltaR(constituent->Momentum);
    211           sumdrsqptsq += dr*dr*pt*pt;
    212           sumptsq += pt*pt;
    213           nn++;
    214           for (int i = 0 ; i < 5 ; i++) {
    215             if (dr > 0.1*i && dr < 0.1*(i+1)) {
    216               pt_ann[i] += pt;
    217             }
    218           }
    219         }
    220       }
    221     }
    222          
    223     if (sumptch > 0.) {
     227      while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next())))
     228      {
     229        if(constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR)
     230        {
     231          pt = constituent->Momentum.Pt();
     232          sumpt += pt;
     233          dr = candidate->Momentum.DeltaR(constituent->Momentum);
     234          sumdrsqptsq += dr*dr*pt*pt;
     235          sumptsq += pt*pt;
     236          nn++;
     237          for(i = 0; i < 5; ++i)
     238          {
     239            if(dr > 0.1*i && dr < 0.1*(i + 1))
     240            {
     241              pt_ann[i] += pt;
     242            }
     243          }
     244        }
     245      }
     246    }
     247
     248    if(sumptch > 0.0)
     249    {
    224250      candidate->Beta = sumptchpu/sumptch;
    225251      candidate->BetaStar = sumptchpv/sumptch;
    226     } else {
    227       candidate->Beta = -999.;
    228       candidate->BetaStar = -999.;
    229     }
    230     if (sumptsq > 0.) {
     252    }
     253    else
     254    {
     255      candidate->Beta = -999.0;
     256      candidate->BetaStar = -999.0;
     257    }
     258    if(sumptsq > 0.0)
     259    {
    231260      candidate->MeanSqDeltaR = sumdrsqptsq/sumptsq;
    232     } else {
    233       candidate->MeanSqDeltaR = -999.;
     261    }
     262    else
     263    {
     264      candidate->MeanSqDeltaR = -999.0;
    234265    }
    235266    candidate->NCharged = nc;
    236267    candidate->NNeutrals = nn;
    237     if (sumpt > 0.) {
     268    if(sumpt > 0.0)
     269    {
    238270      candidate->PTD = TMath::Sqrt(sumptsq) / sumpt;
    239       for (int i = 0 ; i < 5 ; i++) {
     271      for(i = 0; i < 5; ++i)
     272      {
    240273        candidate->FracPt[i] = pt_ann[i]/sumpt;
    241274      }
    242     } else {
    243       candidate->PTD = -999.;
    244       for (int i = 0 ; i < 5 ; i++) {
    245         candidate->FracPt[i] = -999.;
     275    }
     276    else
     277    {
     278      candidate->PTD = -999.0;
     279      for(i = 0; i < 5; ++i)
     280      {
     281        candidate->FracPt[i] = -999.0;
    246282      }
    247283    }
  • modules/PileUpJetID.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2525 *
    2626 *  \author S. Zenz, December 2013
    27  * 
    2827 *
    2928 */
     
    5554  // If set to false, uses everything within dR < fParameterR even if in other jets &c.
    5655  // Results should be very similar for PF
    57   Int_t fUseConstituents; 
     56  Int_t fUseConstituents;
    5857
    5958  Bool_t fAverageEachTower;
     
    6362  const TObjArray *fJetInputArray; //!
    6463
    65   const TObjArray *fTrackInputArray; // SCZ
    66   const TObjArray *fNeutralInputArray;
     64  const TObjArray *fTrackInputArray; //!
     65  const TObjArray *fNeutralInputArray; //!
    6766
    68   TIterator *fItTrackInputArray; // SCZ
    69   TIterator *fItNeutralInputArray; // SCZ
     67  TIterator *fItTrackInputArray; //!
     68  TIterator *fItNeutralInputArray; //!
    7069
    7170  TObjArray *fOutputArray; //!
    72  
     71
    7372  TIterator *fItVertexInputArray; //!
    7473  const TObjArray *fVertexInputArray; //!
  • modules/PileUpMerger.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2020 *
    2121 *  Merges particles from pile-up sample into event
    22  *
    23  *
    24  *  $Date: 2013-02-12 15:13:59 +0100 (Tue, 12 Feb 2013) $
    25  *  $Revision: 907 $
    26  *
    2722 *
    2823 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/PileUpMerger.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Merges particles from pile-up sample into event
    25  *
    26  *
    27  *  $Date: 2013-02-12 15:13:59 +0100 (Tue, 12 Feb 2013) $
    28  *  $Revision: 907 $
    29  *
    3025 *
    3126 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/PileUpMergerPythia8.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2020 *
    2121 *  Merges particles from pile-up sample into event
    22  *
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2722 *
    2823 *  \author P. Selvaggi - UCL, Louvain-la-Neuve
     
    4136#include "ExRootAnalysis/ExRootClassifier.h"
    4237
    43 #include "Pythia8/Pythia.h"
     38#include "Pythia.h"
    4439
    4540#include "TMath.h"
  • modules/PileUpMergerPythia8.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Merges particles from pile-up sample into event
    25  *
    26  *
    27  *  $Date$
    28  *  $Revision$
    29  *
    3025 *
    3126 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/Pythia8LinkDef.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Lists classes to be included in cint dicitonary
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/SimpleCalorimeter.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2222 *  Fills SimpleCalorimeter towers, performs SimpleCalorimeter resolution smearing,
    2323 *  and creates energy flow objects (tracks, photons, and neutral hadrons).
    24  *
    25  *  $Date: 2014-04-16 15:29:31 +0200 (Wed, 16 Apr 2014) $
    26  *  $Revision: 1364 $
    27  *
    2824 *
    2925 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    6460{
    6561  fResolutionFormula = new DelphesFormula;
    66  
     62
    6763  fTowerTrackArray = new TObjArray;
    6864  fItTowerTrackArray = fTowerTrackArray->MakeIterator();
     
    7470{
    7571  if(fResolutionFormula) delete fResolutionFormula;
    76  
     72
    7773  if(fTowerTrackArray) delete fTowerTrackArray;
    7874  if(fItTowerTrackArray) delete fItTowerTrackArray;
     
    140136    fFractionMap[param[i*2].GetInt()] = fraction;
    141137  }
     138
    142139/*
    143140  TFractionMap::iterator itFractionMap;
     
    149146
    150147  // read min E value for towers to be saved
    151   fEnergyMin = GetDouble("TowerMinEnergy", 0.0);
    152   fSigmaMin  = GetDouble("TowerMinSignificance", 0.0);
    153  
     148  fEnergyMin = GetDouble("EnergyMin", 0.0);
     149
     150  fEnergySignificanceMin = GetDouble("EnergySignificanceMin", 0.0);
     151
     152  // switch on or off the dithering of the center of calorimeter towers
     153  fDitherTowerCenter = GetBool("DitherTowerCenter", true);
     154
    154155  // read resolution formulas
    155156  fResolutionFormula->Compile(GetString("ResolutionFormula", "0"));
    156  
     157
    157158  // import array with output from other modules
    158159  fParticleInputArray = ImportArray(GetString("ParticleInputArray", "ParticlePropagator/particles"));
     
    165166  fTowerOutputArray = ExportArray(GetString("TowerOutputArray", "towers"));
    166167  fEFlowTowerOutputArray = ExportArray(GetString("EFlowTowerOutputArray", "eflowTowers"));
    167  
    168168}
    169169
     
    206206  fTowerFractions.clear();
    207207  fTrackFractions.clear();
    208  
     208
    209209  // loop over all particles
    210210  fItParticleInputArray->Reset();
     
    225225    fraction = itFractionMap->second;
    226226    fTowerFractions.push_back(fraction);
    227    
     227
    228228    if(fraction < 1.0E-9) continue;
    229229
     
    267267
    268268    fraction = itFractionMap->second;
    269  
     269
    270270    fTrackFractions.push_back(fraction);
    271  
     271
    272272    // find eta bin [1, fEtaBins.size - 1]
    273273    itEtaBin = lower_bound(fEtaBins.begin(), fEtaBins.end(), trackPosition.Eta());
     
    333333      fTowerEnergy = 0.0;
    334334      fTrackEnergy = 0.0;
    335      
     335
    336336      fTowerTime = 0.0;
    337337      fTrackTime = 0.0;
    338      
    339       fTowerWeightTime = 0.0;
    340      
     338
     339      fTowerTimeWeight = 0.0;
     340
    341341      fTowerTrackHits = 0;
    342342      fTowerPhotonHits = 0;
    343      
     343
    344344      fTowerTrackArray->Clear();
    345345    }
     
    353353      momentum = track->Momentum;
    354354      position = track->Position;
    355  
     355
    356356      energy = momentum.E() * fTrackFractions[number];
    357      
     357
    358358      fTrackEnergy += energy;
    359      
     359
    360360      fTrackTime += TMath::Sqrt(energy)*position.T();
    361       fTrackWeightTime += TMath::Sqrt(energy);
    362    
     361      fTrackTimeWeight += TMath::Sqrt(energy);
     362
    363363      fTowerTrackArray->Add(track);
    364364
    365365      continue;
    366366    }
    367    
     367
    368368    // check for photon and electron hits in current tower
    369369    if(flags & 2) ++fTowerPhotonHits;
    370    
     370
    371371    particle = static_cast<Candidate*>(fParticleInputArray->At(number));
    372372    momentum = particle->Momentum;
     
    375375    // fill current tower
    376376    energy = momentum.E() * fTowerFractions[number];
    377    
     377
    378378    fTowerEnergy += energy;
    379    
     379
    380380    fTowerTime += TMath::Sqrt(energy)*position.T();
    381     fTowerWeightTime += TMath::Sqrt(energy);
    382    
     381    fTowerTimeWeight += TMath::Sqrt(energy);
     382
    383383    fTower->AddCandidate(particle);
    384384  }
     
    401401  sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerEnergy);
    402402
    403 //  energy = gRandom->Gaus(fTowerEnergy, sigma);
    404 //  if(energy < 0.0) energy = 0.0;
    405 
    406403  energy = LogNormal(fTowerEnergy, sigma);
    407   time = (fTowerWeightTime < 1.0E-09 ) ? 0 : fTowerTime/fTowerWeightTime;
     404
     405  time = (fTowerTimeWeight < 1.0E-09 ) ? 0.0 : fTowerTime/fTowerTimeWeight;
    408406
    409407  sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy);
    410  
    411   energy = (energy < fEnergyMin || energy < fSigmaMin*sigma) ? 0 : energy;
    412  
    413   eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
    414   phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     408
     409  if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0;
     410
     411  if(fDitherTowerCenter)
     412  {
     413    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
     414    phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     415  }
     416  else
     417  {
     418    eta = fTowerEta;
     419    phi = fTowerPhi;
     420  }
    415421
    416422  pt = energy / TMath::CosH(eta);
    417423
    418  // fTower->Position.SetXYZT(-time, 0.0, 0.0, time);
    419424  fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time);
    420425  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    421  
     426
    422427  fTower->Edges[0] = fTowerEdges[0];
    423428  fTower->Edges[1] = fTowerEdges[1];
     
    425430  fTower->Edges[3] = fTowerEdges[3];
    426431
    427 
    428432  // fill SimpleCalorimeter towers
    429433  if(energy > 0.0) fTowerOutputArray->Add(fTower);
    430434
    431  
    432435  // fill energy flow candidates
    433436  energy -= fTrackEnergy;
    434   if(energy < fEnergyMin || energy < fSigmaMin*fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy)) energy = 0.0;
    435    
     437
     438  sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy);
     439
     440  if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0;
     441
    436442  // save energy excess as an energy flow tower
    437443  if(energy > 0.0)
     
    444450    fEFlowTowerOutputArray->Add(tower);
    445451  }
    446 
    447452}
    448453
     
    458463    a = TMath::Log(mean) - 0.5*b*b;
    459464
    460     return TMath::Exp(a + b*gRandom->Gaus(0, 1));
     465    return TMath::Exp(a + b*gRandom->Gaus(0.0, 1.0));
    461466  }
    462467  else
  • modules/SimpleCalorimeter.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2424 *  Fills SimpleCalorimeter towers, performs SimpleCalorimeter resolution smearing,
    2525 *  and creates energy flow objects (tracks, photons, and neutral hadrons).
    26  *
    27  *  $Date: 2014-04-16 15:29:31 +0200 (Wed, 16 Apr 2014) $
    28  *  $Revision: 1364 $
    29  *
    3026 *
    3127 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    6359  Double_t fTowerEnergy;
    6460  Double_t fTrackEnergy;
    65  
     61
    6662  Double_t fTowerTime;
    6763  Double_t fTrackTime;
    68    
    69   Double_t fTowerWeightTime;
    70   Double_t fTrackWeightTime;
    71  
     64
     65  Double_t fTowerTimeWeight;
     66  Double_t fTrackTimeWeight;
     67
    7268  Int_t fTowerTrackHits, fTowerPhotonHits;
    7369
    7470  Double_t fEnergyMin;
    75   Double_t fSigmaMin;
     71
     72  Double_t fEnergySignificanceMin;
     73
     74  Bool_t fDitherTowerCenter;
    7675
    7776  TFractionMap fFractionMap; //!
     
    8483
    8584  std::vector < Double_t > fTowerFractions;
    86  
     85
    8786  std::vector < Double_t > fTrackFractions;
    88  
     87
    8988  DelphesFormula *fResolutionFormula; //!
    90  
     89
    9190  TIterator *fItParticleInputArray; //!
    9291  TIterator *fItTrackInputArray; //!
     
    9695
    9796  TObjArray *fTowerOutputArray; //!
    98  
     97
    9998  TObjArray *fEFlowTowerOutputArray; //!
    100  
     99
    101100  TObjArray *fTowerTrackArray; //!
    102101  TIterator *fItTowerTrackArray; //!
  • modules/StatusPidFilter.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *  Removes all generated particles except electrons, muons, taus,
    2222 *  and particles with status == 3.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author J. Hirschauer - FNAL
  • modules/StatusPidFilter.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2626 *  Removes all generated particles except electrons, muons, taus,
    2727 *  and particles with status == 3.
    28  *
    29  *  $Date$
    30  *  $Revision$
    31  *
    3228 *
    3329 *  \author J. Hirschauer - FNAL
  • modules/TauTagging.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *  applies b-tagging efficiency (miss identification rate) formulas
    2424 *  and sets b-tagging flags
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/TauTagging.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2525 *  applies b-tagging efficiency (miss identification rate) formulas
    2626 *  and sets b-tagging flags
    27  *
    28  *  $Date$
    29  *  $Revision$
    30  *
    3127 *
    3228 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/TimeSmearing.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Performs transverse momentum resolution smearing.
    23  *
    24  *  $Date: 2013-02-13 16:58:53 +0100 (Wed, 13 Feb 2013) $
    25  *  $Revision: 911 $
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    4844#include "TLorentzVector.h"
    4945
    50 #include <algorithm> 
     46#include <algorithm>
    5147#include <stdexcept>
    5248#include <iostream>
     
    9995  Double_t t;
    10096  const Double_t c_light = 2.99792458E8;
    101  
     97
    10298  fItInputArray->Reset();
    10399  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    105101    const TLorentzVector &candidatePosition = candidate->Position;
    106102    t = candidatePosition.T()*1.0E-3/c_light;
    107    
     103
    108104    // apply smearing formula
    109105    t = gRandom->Gaus(t, fTimeResolution);
    110    
     106
    111107    mother = candidate;
    112108    candidate = static_cast<Candidate*>(candidate->Clone());
    113109    candidate->Position.SetT(t*1.0E3*c_light);
    114    
     110
    115111    candidate->AddCandidate(mother);
    116        
     112
    117113    fOutputArray->Add(candidate);
    118114  }
  • modules/TimeSmearing.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Performs transverse time smearing.
    25  *
    26  *  $Date: 2013-12-12 14:57:44 +0100 (Tue, 12 Dec 2013) $
    2725 *
    2826 *  \author Michele Selvaggi - UCL, Louvain-la-Neuve
     
    4947
    5048  Double_t fTimeResolution;
    51  
     49
    5250  TIterator *fItInputArray; //!
    5351
    5452  const TObjArray *fInputArray; //!
    55  
     53
    5654  TObjArray *fOutputArray; //!
    5755
  • modules/TrackCountingBTagging.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  b-tagging algorithm based on counting tracks with large impact parameter
    23  *
    24  *  $Date: 2014-03-27 12:39:14 +0200 (Fri, 27 March 2014) $
    25  *  $Revision: 1099 $
    26  *
    2723 *
    2824 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
     
    6965  fBitNumber = GetInt("BitNumber", 0);
    7066
    71   fPtMin     = GetDouble("TrackPtMin", 1.0);
    72   fDeltaR    = GetDouble("DeltaR", 0.3);
    73   fIPmax     = GetDouble("TrackIPMax", 2.0);
     67  fPtMin = GetDouble("TrackPtMin", 1.0);
     68  fDeltaR = GetDouble("DeltaR", 0.3);
     69  fIPmax = GetDouble("TrackIPMax", 2.0);
    7470
    75   fSigMin    = GetDouble("SigMin", 6.5);
    76   fNtracks   = GetInt("Ntracks", 3);
     71  fSigMin = GetDouble("SigMin", 6.5);
     72  fNtracks = GetInt("Ntracks", 3);
    7773
    7874  // import input array(s)
     
    128124      tpy = trkMomentum.Py();
    129125
    130       xd   = track->Xd;
    131       yd   = track->Yd;
    132       dxy  = TMath::Abs(track->Dxy);
     126      xd = track->Xd;
     127      yd = track->Yd;
     128      dxy = TMath::Abs(track->Dxy);
    133129      ddxy = track->SDxy;
    134130
    135131      if(tpt < fPtMin) continue;
    136       if(dr  > fDeltaR) continue;
     132      if(dr > fDeltaR) continue;
    137133      if(dxy > fIPmax) continue;
    138134
    139       sign  = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
     135      sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
    140136
    141       ip  = sign*dxy;
     137      ip = sign*dxy;
    142138      sip = ip / TMath::Abs(ddxy);
    143139
  • modules/TrackCountingBTagging.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  b-tagging algorithm based on counting tracks with large impact parameter
    25  *
    26  *  $Date: 2014-03-27 12:39:14 +0200 (Fri, 27 March 2014) $
    27  *  $Revision: 1099 $
    28  *
    2925 *
    3026 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
  • modules/TrackPileUpSubtractor.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Subtract pile-up contribution from tracks.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/TrackPileUpSubtractor.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Subtract pile-up contribution from tracks.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/TreeWriter.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Fills ROOT tree branches.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/TreeWriter.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Fills ROOT tree branches.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/UniqueObjectFinder.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Finds uniquely identified photons, electrons and jets.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/UniqueObjectFinder.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Finds uniquely identified photons, electrons, taus and jets.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Weighter.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Apply a weight depending on PDG code.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
  • modules/Weighter.h

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323 *
    2424 *  Apply a weight depending on PDG code.
    25  *
    26  *  $Date$
    27  *  $Revision$
    28  *
    2925 *
    3026 *  \author P. Demin - UCL, Louvain-la-Neuve
Note: See TracChangeset for help on using the changeset viewer.