Fork me on GitHub

Changeset 7939c6c in git


Ignore:
Timestamp:
Jan 9, 2020, 1:40:08 AM (5 years ago)
Author:
Kaan Yüksel Oyulmaz <kaanyukseloyulmaz@…>
Branches:
Timing
Children:
9c52415
Parents:
03b9c0f
Message:

TimeSmearing Module is updated for neutral particles

Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • cards/FCC/FCChh_PileUpVtx.tcl

    r03b9c0f r7939c6c  
    3636  HCal
    3737
    38   TimeSmearingMIP
    39   TimeSmearingPhotons
    40   TimeSmearingNH 
    41 
    4238  Calorimeter
    4339  EFlowMerger
    4440  EFlowFilter
     41
     42  TimeSmearingMIP
     43  TimeSmearingPhotons
     44  TimeSmearingNH   
    4545
    4646  VertexFinderDA4D
     
    450450}
    451451
    452 ########################################
    453 #   Time Smearing Neutral MIP
    454 ########################################
    455 
    456 module TimeSmearingNeutral TimeSmearingMIP {
    457   set InputArray HCal/eflowTracks
    458   set OutputArray timeSmearingMIP
    459 
    460   # assume 20 ps resolution for now
    461   set TimeResolution {30E-12}
    462 }
    463 
    464 ########################################
    465 #   Time Smearing Neutral Photons
    466 ########################################
    467 
    468 module TimeSmearingNeutral TimeSmearingPhotons {
    469   set InputArray HCal/eflowTracks
    470   set OutputArray timeSmearingPhotons
    471 }
    472 
    473 ########################################
    474 #   Time Smearing Neutral NeutralHadrons
    475 ########################################
    476 
    477 module TimeSmearingNeutral TimeSmearingNH {
    478   set InputArray HCal/eflowTracks
    479   set OutputArray timeSmearingNH
    480 
    481   # assume 20 ps resolution for now
    482   set TimeResolution {30E-12}
    483 }
    484 
    485 
    486452#################
    487453# Electron filter
     
    550516}
    551517
     518########################################
     519#   Time Smearing Neutral MIP
     520########################################
     521
     522module TimeSmearing TimeSmearingMIP {
     523  set InputArray HCal/eflowTracks
     524  set OutputArray timeSmearingMIP
     525
     526  # assume 30 ps resolution for now
     527  set TimeResolution {30E-12}
     528}
     529
     530########################################
     531#   Time Smearing Neutral Photons
     532########################################
     533
     534module TimeSmearing TimeSmearingPhotons {
     535  set InputArray ECal/eflowPhotons
     536  set OutputArray timeSmearingPhotons
     537}
     538
     539########################################
     540#   Time Smearing Neutral NeutralHadrons
     541########################################
     542#
     543module TimeSmearing TimeSmearingNH {
     544  set InputArray HCal/eflowNeutralHadrons
     545  set OutputArray timeSmearingNH
     546
     547  # assume 30 ps resolution for now
     548  set TimeResolution {30E-12}
     549}
     550
     551
    552552##################################
    553553# Primary vertex reconstruction
     
    589589# add InputArray InputArray OutputArray
    590590
    591   add InputArray ChargedHadronMomentumSmearing/chargedHadrons
    592   add InputArray ElectronMomentumSmearing/electrons
    593   add InputArray MuonMomentumSmearing/muons
    594   add InputArray EFlowMerger/eflow
     591  add InputArray TimeSmearing/tracks
     592  add InputArray TimeSmearing/timeSmearingPhotons
     593  add InputArray TimeSmearing/timeSmearingNH
    595594
    596595  set VertexInputArray VertexFinderDA4D/vertices
    597596
    598   set ZVertexResolution {3}
    599   set TVertexResolution {3}
     597  set fChargedMinSignificance {3}
     598  set fNeutralMinSignificance {3}
    600599}
    601600
  • modules/ModulesLinkDef.h

    r03b9c0f r7939c6c  
    3838#include "modules/ImpactParameterSmearing.h"
    3939#include "modules/TimeSmearing.h"
    40 #include "modules/TimeSmearingNeutral.h"
    4140#include "modules/SimpleCalorimeter.h"
    4241#include "modules/DenseTrackFilter.h"
     
    9594#pragma link C++ class ImpactParameterSmearing+;
    9695#pragma link C++ class TimeSmearing+;
    97 #pragma link C++ class TimeSmearingNeutral+;
    9896#pragma link C++ class SimpleCalorimeter+;
    9997#pragma link C++ class DenseTrackFilter+;
  • modules/TimeSmearing.cc

    r03b9c0f r7939c6c  
    5353
    5454TimeSmearing::TimeSmearing() :
    55   fFormula(0), fItInputArray(0)
     55  fItInputArray(0)
    5656{
    57   fFormula = new DelphesFormula;
    5857}
    5958
     
    6160
    6261TimeSmearing::~TimeSmearing()
    63 {
    64   if(fFormula) delete fFormula;
     62
    6563}
    6664
     
    7169  // read resolution formula
    7270
    73   fFormula->Compile(GetString("TimeResolution", "1.0"));
     71  fTimeResolution = GetDouble("TimeResolution", 1.);
    7472
    7573  // import input array
     
    7775  fInputArray = ImportArray(GetString("InputArray", "MuonMomentumSmearing/muons"));
    7876  fItInputArray = fInputArray->MakeIterator();
    79 
    8077  // create output array
    8178
     
    9592{
    9693  Candidate *candidate, *mother;
    97   Double_t ti, tf_smeared, tf, timeResolution;
    98   Double_t pt, eta, phi, e, d0, dz, ctgTheta;
     94  Double_t ti, tf_smeared, tf;
     95  Double_t pt, eta, phi, e, p, l;
     96  Double_t sigma_t, beta_particle;
    9997
    10098
    10199  const Double_t c_light = 2.99792458E8;
     100
     101  cout << " STARTINNNGG ---------->" << endl;
    102102
    103103  fItInputArray->Reset();
     
    114114    pt = candidateMomentum.Pt();
    115115    e = candidateMomentum.E();
    116     d0 = candidate->D0;
    117     dz = candidate->DZ;
    118     ctgTheta = candidate->CtgTheta;
     116    p = candidateMomentum.P();
     117    beta_particle = p/e;
     118    l = candidate->L;
     119    // apply smearing formula
    119120
    120     // apply smearing formula
    121    
    122     timeResolution = fFormula->Eval(pt, eta, phi, e, d0, dz, ctgTheta);
    123     if(fabs(candidate->Position.Eta())<fEtaMax)
     121    if(candidate->Charge != 0)
    124122    {
    125       tf_smeared = tf + timeResolution*gRandom->Gaus(0, 1);
     123      tf_smeared = tf + fTimeResolution*gRandom->Gaus(0, 1);
     124      //mother = candidate;
     125      //candidate = static_cast<Candidate*>(candidate->Clone());  // I am not sure that we need these lines !!!
     126      //candidate->AddCandidate(mother);
     127      candidate->InitialPosition.SetT((100+ti)*1.0E3*c_light);
     128      candidate->Position.SetT(tf_smeared*1.0E3*c_light);
     129      candidate->ErrorT = fTimeResolution*1.0E3*c_light;
     130      fOutputArray->Add(candidate);
    126131    }
    127     else continue;
    128 
    129     // double beta_particle = candidate->Momentum.P()/candidate->Momentum.E();
    130     // ti = tf_smeared - candidate->Ld*1.0E-3/(c_light*beta_particle);
    131 
    132     mother = candidate;
    133     candidate = static_cast<Candidate*>(candidate->Clone());
    134     candidate->AddCandidate(mother);
    135     candidate->InitialPosition.SetT((100+ti)*1.0E3*c_light);
    136     candidate->Position.SetT(tf_smeared*1.0E3*c_light);
    137     candidate->ErrorT = timeResolution*1.0E3*c_light;
    138 
    139     fOutputArray->Add(candidate);
     132    else
     133    {
     134        sigma_t = sqrt(pow(20,2) + pow(150,2)/e);
     135        ti = sigma_t - l*1.0E3/(c_light*beta_particle);   
     136        candidate->InitialPosition.SetT(ti);
     137        candidate->ErrorT = sigma_t*1.0E3*c_light;              // Do we need to sum with 100 like in upside ?
     138        fOutputArray->Add(candidate);
     139    }
     140   
    140141  }
    141142}
  • modules/TimeSmearing.h

    r03b9c0f r7939c6c  
    4545
    4646private:
    47   DelphesFormula *fFormula; //!
     47  Double_t fTimeResolution; //!
    4848  Double_t fEtaMax;
    4949
  • modules/TrackTimingPileUpSubtractor.cc

    r03b9c0f r7939c6c  
    7575
    7676  // read resolution formula in m
    77   fZVertexResolution = GetDouble("ZVertexResolution", 3);
    78   fTVertexResolution = GetDouble("TVertexResolution", 3);
     77  fChargedMinSignificance = GetDouble("ChargedMinSignificance", 3);
     78  fNeutralMinSignificance = GetDouble("NeutralMinSignificance", 3);
    7979
    8080  fPTMin = GetDouble("PTMin", 0.);
     
    173173      distanceNeutral = pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
    174174
    175       if(candidate->Charge != 0 && distanceCharged < fZVertexResolution)
     175      if(candidate->Charge != 0 && distanceCharged < fChargedMinSignificance)
    176176      {
    177177        candidate->IsRecoPU = 1;
    178178      }
    179       else if(candidate->Charge == 0 && distanceNeutral < fTVertexResolution)
     179      else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance)
    180180      {
    181181        candidate->IsRecoPU = 1;
  • modules/TrackTimingPileUpSubtractor.h

    r03b9c0f r7939c6c  
    4949  DelphesFormula *fFormula; //!
    5050
    51   Double_t fZVertexResolution;
    52   Double_t fTVertexResolution;
     51  Double_t fChargedMinSignificance;
     52  Double_t fNeutralMinSignificance;
    5353
    5454  Double_t fPTMin;
Note: See TracChangeset for help on using the changeset viewer.