Fork me on GitHub

Changes in / [e70228d:364dbe1] in git


Ignore:
Files:
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • cards/FCC/FCChh_PileUpVtx.tcl

    re70228d r364dbe1  
    1717set ExecutionPath {
    1818
     19  BeamSpotFilter
    1920  PileUpMerger
    2021  ParticlePropagator
     
    3435
    3536  TrackSmearing
    36   TimeSmearing     
     37  TimeSmearing 
     38
     39  VertexFinderDA4D 
     40
     41  TrackTimingPileUpSubtractor 
    3742
    3843  ECal
     
    4247  EFlowMerger
    4348  EFlowFilter
    44 
    45   TimeSmearingMIP
    46   TimeSmearingPhotons
    47   TimeSmearingNH   
    48 
    49   VertexFinderDA4D
    50   TrackTimingPileUpSubtractor
    51 
    52   HighMassVertexRecover   
    5349
    5450  PhotonEfficiency
     
    8581
    8682  TreeWriter
     83}
     84
     85#######################
     86# GenBeamSpotFilter
     87# Saves a particle intended to represent the beamspot
     88#######################
     89
     90module BeamSpotFilter BeamSpotFilter {
     91    set InputArray Delphes/stableParticles
     92    set OutputArray beamSpotParticle
     93
    8794}
    8895
     
    314321
    315322  # assume 20 ps resolution for now
    316   set TimeResolution {20E-12}
     323  set TimeResolution 20E-12
     324}
     325
     326##################################
     327# Primary vertex reconstruction
     328##################################
     329
     330
     331module VertexFinderDA4D VertexFinderDA4D {
     332  set InputArray TimeSmearing/tracks
     333
     334  set OutputArray tracks
     335  set VertexOutputArray vertices
     336
     337  set Verbose 0
     338  set MinPT 1.0
     339
     340  # in mm
     341  set VertexSpaceSize 0.5
     342
     343  # in s
     344  set VertexTimeSize 10E-12
     345
     346  set UseTc 1
     347  set BetaMax 0.1
     348  set BetaStop 1.0
     349  set CoolingFactor 0.8
     350  set MaxIterations 100
     351
     352  # in mm
     353  set DzCutOff 40
     354  set D0CutOff 30
     355
     356}
     357
     358##########################
     359# Track pile-up subtractor
     360##########################
     361
     362module TrackTimingPileUpSubtractor TrackTimingPileUpSubtractor {
     363# add InputArray InputArray OutputArray
     364
     365  add InputArray ChargedHadronMomentumSmearing/chargedHadrons
     366  add InputArray ElectronMomentumSmearing/electrons
     367  add InputArray MuonMomentumSmearing/muons
     368 
     369  set VertexInputArray VertexFinderDA4D/vertices
     370  # assume perfect pile-up subtraction for tracks with |z| > fZVertexResolution
     371  # Z vertex resolution in m
     372  set ZVertexResolution {0.0001}
    317373}
    318374
     
    483539}
    484540
     541
    485542#################
    486543# Electron filter
     
    549606}
    550607
    551 ########################################
    552 #   Time Smearing Neutral MIP
    553 ########################################
    554 
    555 module TimeSmearing TimeSmearingMIP {
    556   set InputArray HCal/eflowTracks
    557   set OutputArray timeSmearingMIP
    558 
    559   # assume 30 ps resolution for now
    560   set TimeResolution {30E-12}
    561 }
    562 
    563 ########################################
    564 #   Time Smearing Neutral Photons
    565 ########################################
    566 
    567 module TimeSmearing TimeSmearingPhotons {
    568   set InputArray ECal/eflowPhotons
    569   set OutputArray timeSmearingPhotons
    570 }
    571 
    572 ########################################
    573 #   Time Smearing Neutral NeutralHadrons
    574 ########################################
    575 #
    576 module TimeSmearing TimeSmearingNH {
    577   set InputArray HCal/eflowNeutralHadrons
    578   set OutputArray timeSmearingNH
    579 
    580   # assume 30 ps resolution for now
    581   set TimeResolution {30E-12}
    582 }
    583 
    584 
    585 ##################################
    586 # Primary vertex reconstruction
    587 ##################################
    588 
    589 
    590 module VertexFinderDA4D VertexFinderDA4D {
    591   set InputArray TimeSmearing/tracks
    592 
    593   set OutputArray tracks
    594   set VertexOutputArray vertices
    595 
    596   set Verbose 0
    597   set MinPT 1.0
    598 
    599   # in mm
    600   set VertexSpaceSize 0.5
    601 
    602   # in s
    603   set VertexTimeSize 10E-12
    604 
    605   set UseTc 1
    606   set BetaMax 0.1
    607   set BetaStop 1.0
    608   set CoolingFactor 0.8
    609   set MaxIterations 100
    610 
    611   # in mm
    612   set DzCutOff 40
    613   set D0CutOff 30
    614 
    615 }
    616 
    617 ##########################
    618 # Track pile-up subtractor
    619 ##########################
    620 
    621 module TrackTimingPileUpSubtractor TrackTimingPileUpSubtractor {
    622 # add InputArray InputArray OutputArray
    623 
    624   add InputArray TimeSmearing/tracks
    625   add InputArray TimeSmearingPhotons/timeSmearingPhotons
    626   add InputArray TimeSmearingNH/timeSmearingNH
    627 
    628   set VertexInputArray VertexFinderDA4D/vertices
    629 
    630   set fChargedMinSignificance {3}
    631   set fNeutralMinSignificance {3}
    632 }
    633 
    634 ######################################
    635 # Heavy(slow) particles vertex recover
    636 ######################################
    637 
    638 module HighMassVertexRecover HighMassVertexRecover {
    639   set TrackInputArray VertexFinderDA4D/tracks
    640   set VertexInputArray VertexFinderDA4D/vertices
    641 
    642   set TrackOutputArray tracks
    643   set VertexOutputArray vertices
    644 
    645   set Verbose 0
    646 
    647 }
    648608
    649609###################
     
    10971057  add Branch ScalarHT/energy ScalarHT ScalarHT
    10981058  add Branch VertexFinderDA4D/vertices Vertex4D Vertex
    1099 
    1100   add Branch HighMassVertexRecover/tracks Track Track
    1101 }
    1102 
     1059}
     1060
  • modules/ModulesLinkDef.h

    re70228d r364dbe1  
    5656#include "modules/PileUpMerger.h"
    5757#include "modules/JetPileUpSubtractor.h"
     58#include "modules/TrackPileUpSubtractor.h"
    5859#include "modules/TrackTimingPileUpSubtractor.h"
    5960#include "modules/TaggingParticlesSkimmer.h"
     
    113114#pragma link C++ class PileUpMerger+;
    114115#pragma link C++ class JetPileUpSubtractor+;
     116#pragma link C++ class TrackPileUpSubtractor+;
    115117#pragma link C++ class TrackTimingPileUpSubtractor+;
    116118#pragma link C++ class TaggingParticlesSkimmer+;
  • modules/TimeSmearing.cc

    re70228d r364dbe1  
    5353
    5454TimeSmearing::TimeSmearing() :
    55   fItInputArray(0)
     55  fFormula(0), fItInputArray(0)
    5656{
     57  fFormula = new DelphesFormula;
    5758}
    5859
     
    6061
    6162TimeSmearing::~TimeSmearing()
    62 
     63{
     64  if(fFormula) delete fFormula;
    6365}
    6466
     
    6971  // read resolution formula
    7072
    71   fTimeResolution = GetDouble("TimeResolution", 1.);
     73  fFormula->Compile(GetString("TimeResolution", "1.0"));
    7274
    7375  // import input array
     
    7577  fInputArray = ImportArray(GetString("InputArray", "MuonMomentumSmearing/muons"));
    7678  fItInputArray = fInputArray->MakeIterator();
     79
    7780  // create output array
    7881
     
    9295{
    9396  Candidate *candidate, *mother;
    94   Double_t ti, tf_smeared, tf;
    95   Double_t pt, eta, phi, e, p, l;
    96   Double_t sigma_t, beta_particle;
     97  Double_t ti, tf_smeared, tf, timeResolution;
     98  Double_t pt, eta, phi, e, d0, dz, ctgTheta;
    9799
    98100
    99101  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     p = candidateMomentum.P();
    117     beta_particle = p/e;
    118     l = candidate->L;
     116    d0 = candidate->D0;
     117    dz = candidate->DZ;
     118    ctgTheta = candidate->CtgTheta;
     119
    119120    // apply smearing formula
     121   
     122    timeResolution = fFormula->Eval(pt, eta, phi, e, d0, dz, ctgTheta);
     123    if(fabs(candidate->Position.Eta())<fEtaMax)
     124    {
     125      tf_smeared = tf + timeResolution*gRandom->Gaus(0, 1);
     126    }
     127    else continue;
    120128
    121     if(candidate->Charge != 0)
    122     {
    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);
    131     }
    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    
     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);
    141140  }
    142141}
  • modules/TimeSmearing.h

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

    re70228d r364dbe1  
    7575
    7676  // read resolution formula in m
    77   fChargedMinSignificance = GetDouble("ChargedMinSignificance", 3);
    78   fNeutralMinSignificance = GetDouble("NeutralMinSignificance", 3);
     77  fFormula->Compile(GetString("ZVertexResolution", "0.001"));
    7978
    8079  fPTMin = GetDouble("PTMin", 0.);
     
    129128  Double_t tempPTSquare = 0;
    130129  Double_t pt, eta, phi, e;
    131   Double_t distanceCharged, distanceNeutral = 0;
     130  Double_t distance = 0;
    132131
    133132  // find z position of primary vertex
     
    144143      tvtx = candidate->Position.T();
    145144      tvtx_err = candidate->PositionError.T();
     145      //cout << " initial : " << candidate->InitialPosition.T() << " final : " << candidate->Position.T() << endl;
    146146    }
    147147  }
     
    167167      z = particle->Position.Z();
    168168      z_err = particle->PositionError.Z();
    169       t = particle->InitialPosition.T();
     169      t = particle->Position.T();
    170170      t_err = particle->PositionError.T();
    171171
    172       distanceCharged = pow((zvtx - z),2)/pow((zvtx_err - z_err),2) + pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
    173       distanceNeutral = pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
     172      // apply pile-up subtraction
     173      distance = pow((zvtx - z),2)/pow((zvtx_err - z_err),2) + pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
     174      //cout << " t : " << tvtx << "  t(particle)" << t << endl;
     175      // here I calculated distance using Z and T of selected vertex (highest sum Pt square) and particles
     176      // however z_err of vertices is gives 0 because of using CMS trackResolutionCMS.tcl (in that formula, there is limitation on |eta| < 2.5)
     177      // thats why I used TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0
    174178
    175       if(candidate->Charge != 0 && distanceCharged < fChargedMinSignificance)
     179      if(candidate->Charge != 0 && TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0)
    176180      {
    177181        candidate->IsRecoPU = 1;
    178182      }
    179       else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance)
    180       {
    181         candidate->IsRecoPU = 1;
    182       } 
    183183      else
    184184      {
  • modules/TrackTimingPileUpSubtractor.h

    re70228d r364dbe1  
    4949  DelphesFormula *fFormula; //!
    5050
    51   Double_t fChargedMinSignificance;
    52   Double_t fNeutralMinSignificance;
    53 
    5451  Double_t fPTMin;
    5552
  • modules/VertexFinderDA4D.cc

    re70228d r364dbe1  
    425425    candidate->ClusterIndex = k;
    426426    candidate->Position.SetXYZT(0.0, 0.0, vtx.z[k] , vtx.t[k]*1E-9*c_light);
    427     candidate->InitialPosition.SetXYZT(0.0, 0.0, vtx.z[k] , vtx.t[k]*1E-9*c_light);   
    428427    candidate->PositionError.SetXYZT(0.0, 0.0, fVertexZSize , fVertexTSize*1E-9*c_light);
    429428    candidate->SumPT2 = 0;
Note: See TracChangeset for help on using the changeset viewer.