Fork me on GitHub

Changes in / [b982244:93bf9c6] in git


Ignore:
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • cards/FCC/FCChh_PileUpVtx.tcl

    rb982244 r93bf9c6  
    1717set ExecutionPath {
    1818
    19   BeamSpotFilter
    2019  PileUpMerger
    2120  ParticlePropagator
     
    3534
    3635  TrackSmearing
    37   TimeSmearing 
    38 
    39   VertexFinderDA4D 
    40 
    41   TrackTimingPileUpSubtractor 
     36  TimeSmearing     
    4237
    4338  ECal
     
    4742  EFlowMerger
    4843  EFlowFilter
     44
     45  TimeSmearingMIP
     46  TimeSmearingPhotons
     47  TimeSmearingNH   
     48
     49  VertexFinderDA4D
     50  TrackTimingPileUpSubtractor
     51
     52  HighMassVertexRecover   
    4953
    5054  PhotonEfficiency
     
    8185
    8286  TreeWriter
    83 }
    84 
    85 #######################
    86 # GenBeamSpotFilter
    87 # Saves a particle intended to represent the beamspot
    88 #######################
    89 
    90 module BeamSpotFilter BeamSpotFilter {
    91     set InputArray Delphes/stableParticles
    92     set OutputArray beamSpotParticle
    93 
    9487}
    9588
     
    301294
    302295  # assume 20 ps resolution for now
    303   set TimeResolution 20E-12
    304 }
    305 
    306 ##################################
    307 # Primary vertex reconstruction
    308 ##################################
    309 
    310 
    311 module VertexFinderDA4D VertexFinderDA4D {
    312   set InputArray TimeSmearing/tracks
    313 
    314   set OutputArray tracks
    315   set VertexOutputArray vertices
    316 
    317   set Verbose 0
    318   set MinPT 1.0
    319 
    320   # in mm
    321   set VertexSpaceSize 0.5
    322 
    323   # in s
    324   set VertexTimeSize 10E-12
    325 
    326   set UseTc 1
    327   set BetaMax 0.1
    328   set BetaStop 1.0
    329   set CoolingFactor 0.8
    330   set MaxIterations 100
    331 
    332   # in mm
    333   set DzCutOff 40
    334   set D0CutOff 30
    335 
    336 }
    337 
    338 ##########################
    339 # Track pile-up subtractor
    340 ##########################
    341 
    342 module TrackTimingPileUpSubtractor TrackTimingPileUpSubtractor {
    343 # add InputArray InputArray OutputArray
    344 
    345   add InputArray ChargedHadronMomentumSmearing/chargedHadrons
    346   add InputArray ElectronMomentumSmearing/electrons
    347   add InputArray MuonMomentumSmearing/muons
    348  
    349   set VertexInputArray VertexFinderDA4D/vertices
    350   # assume perfect pile-up subtraction for tracks with |z| > fZVertexResolution
    351   # Z vertex resolution in m
    352   set ZVertexResolution {0.0001}
     296  set TimeResolution {20E-12}
    353297}
    354298
     
    519463}
    520464
    521 
    522465#################
    523466# Electron filter
     
    586529}
    587530
     531########################################
     532#   Time Smearing Neutral MIP
     533########################################
     534
     535module TimeSmearing TimeSmearingMIP {
     536  set InputArray HCal/eflowTracks
     537  set OutputArray timeSmearingMIP
     538
     539  # assume 30 ps resolution for now
     540  set TimeResolution {30E-12}
     541}
     542
     543########################################
     544#   Time Smearing Neutral Photons
     545########################################
     546
     547module TimeSmearing TimeSmearingPhotons {
     548  set InputArray ECal/eflowPhotons
     549  set OutputArray timeSmearingPhotons
     550}
     551
     552########################################
     553#   Time Smearing Neutral NeutralHadrons
     554########################################
     555#
     556module TimeSmearing TimeSmearingNH {
     557  set InputArray HCal/eflowNeutralHadrons
     558  set OutputArray timeSmearingNH
     559
     560  # assume 30 ps resolution for now
     561  set TimeResolution {30E-12}
     562}
     563
     564
     565##################################
     566# Primary vertex reconstruction
     567##################################
     568
     569
     570module VertexFinderDA4D VertexFinderDA4D {
     571  set InputArray TimeSmearing/tracks
     572
     573  set OutputArray tracks
     574  set VertexOutputArray vertices
     575
     576  set Verbose 0
     577  set MinPT 1.0
     578
     579  # in mm
     580  set VertexSpaceSize 0.5
     581
     582  # in s
     583  set VertexTimeSize 10E-12
     584
     585  set UseTc 1
     586  set BetaMax 0.1
     587  set BetaStop 1.0
     588  set CoolingFactor 0.8
     589  set MaxIterations 100
     590
     591  # in mm
     592  set DzCutOff 40
     593  set D0CutOff 30
     594
     595}
     596
     597##########################
     598# Track pile-up subtractor
     599##########################
     600
     601module TrackTimingPileUpSubtractor TrackTimingPileUpSubtractor {
     602# add InputArray InputArray OutputArray
     603
     604  add InputArray TimeSmearing/tracks
     605  add InputArray TimeSmearingPhotons/timeSmearingPhotons
     606  add InputArray TimeSmearingNH/timeSmearingNH
     607
     608  set VertexInputArray VertexFinderDA4D/vertices
     609
     610  set fChargedMinSignificance {3}
     611  set fNeutralMinSignificance {3}
     612}
     613
     614######################################
     615# Heavy(slow) particles vertex recover
     616######################################
     617
     618module HighMassVertexRecover HighMassVertexRecover {
     619  set TrackInputArray VertexFinderDA4D/tracks
     620  set VertexInputArray VertexFinderDA4D/vertices
     621
     622  set TrackOutputArray tracks
     623  set VertexOutputArray vertices
     624
     625  set Verbose 0
     626
     627}
    588628
    589629###################
     
    10371077  add Branch ScalarHT/energy ScalarHT ScalarHT
    10381078  add Branch VertexFinderDA4D/vertices Vertex4D Vertex
    1039 }
    1040 
     1079
     1080  add Branch HighMassVertexRecover/tracks Track Track
     1081}
     1082
  • modules/ModulesLinkDef.h

    rb982244 r93bf9c6  
    5656#include "modules/PileUpMerger.h"
    5757#include "modules/JetPileUpSubtractor.h"
    58 #include "modules/TrackPileUpSubtractor.h"
    5958#include "modules/TrackTimingPileUpSubtractor.h"
    6059#include "modules/TaggingParticlesSkimmer.h"
     
    114113#pragma link C++ class PileUpMerger+;
    115114#pragma link C++ class JetPileUpSubtractor+;
    116 #pragma link C++ class TrackPileUpSubtractor+;
    117115#pragma link C++ class TrackTimingPileUpSubtractor+;
    118116#pragma link C++ class TaggingParticlesSkimmer+;
  • modules/TimeSmearing.cc

    rb982244 r93bf9c6  
    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

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

    rb982244 r93bf9c6  
    7575
    7676  // read resolution formula in m
    77   fFormula->Compile(GetString("ZVertexResolution", "0.001"));
     77  fChargedMinSignificance = GetDouble("ChargedMinSignificance", 3);
     78  fNeutralMinSignificance = GetDouble("NeutralMinSignificance", 3);
    7879
    7980  fPTMin = GetDouble("PTMin", 0.);
     
    128129  Double_t tempPTSquare = 0;
    129130  Double_t pt, eta, phi, e;
    130   Double_t distance = 0;
     131  Double_t distanceCharged, distanceNeutral = 0;
    131132
    132133  // find z position of primary vertex
     
    143144      tvtx = candidate->Position.T();
    144145      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->Position.T();
     169      t = particle->InitialPosition.T();
    170170      t_err = particle->PositionError.T();
    171171
    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
     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);
    178174
    179       if(candidate->Charge != 0 && TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0)
     175      if(candidate->Charge != 0 && distanceCharged < fChargedMinSignificance)
    180176      {
    181177        candidate->IsRecoPU = 1;
    182178      }
     179      else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance)
     180      {
     181        candidate->IsRecoPU = 1;
     182      } 
    183183      else
    184184      {
  • modules/TrackTimingPileUpSubtractor.h

    rb982244 r93bf9c6  
    4949  DelphesFormula *fFormula; //!
    5050
     51  Double_t fChargedMinSignificance;
     52  Double_t fNeutralMinSignificance;
     53
    5154  Double_t fPTMin;
    5255
  • modules/VertexFinderDA4D.cc

    rb982244 r93bf9c6  
    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);   
    427428    candidate->PositionError.SetXYZT(0.0, 0.0, fVertexZSize , fVertexTSize*1E-9*c_light);
    428429    candidate->SumPT2 = 0;
Note: See TracChangeset for help on using the changeset viewer.