Fork me on GitHub

Changeset 34c28a9 in git


Ignore:
Timestamp:
Dec 9, 2019, 11:07:13 PM (5 years ago)
Author:
Kaan Yüksel Oyulmaz <kaanyukseloyulmaz@…>
Branches:
Timing
Children:
9117aaa4
Parents:
1363bf5
Message:

FCC-hh card with 4DVertex Algorithm

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • cards/FCC/FCChh_PileUpVtx.tcl

    r1363bf5 r34c28a9  
    1212#######################################
    1313
     14set MaxEvents 100
     15set RandomSeed 123
     16
    1417set ExecutionPath {
    1518
     19  BeamSpotFilter
     20  PileUpMerger
    1621  ParticlePropagator
    1722
     
    2530
    2631  TrackMerger
     32
     33  TrackSmearing
     34  TimeSmearing 
     35
     36  VertexFinderDA4D 
     37
     38  TrackPileUpSubtractor 
    2739
    2840  ECal
     
    6880}
    6981
     82#######################
     83# GenBeamSpotFilter
     84# Saves a particle intended to represent the beamspot
     85#######################
     86
     87module BeamSpotFilter BeamSpotFilter {
     88    set InputArray Delphes/stableParticles
     89    set OutputArray beamSpotParticle
     90
     91}
     92
     93###############
     94# PileUp Merger
     95###############
     96
     97module PileUpMerger PileUpMerger {
     98  set InputArray Delphes/stableParticles
     99
     100  set ParticleOutputArray stableParticles
     101  set VertexOutputArray vertices
     102
     103  # pre-generated minbias input file
     104  set PileUpFile MinBias.pileup
     105
     106  # average expected pile up
     107  set MeanPileUp 10
     108
     109  # 0-poisson, 1-uniform, 2-delta
     110  set PileUpDistribution 2
     111
     112  # maximum spread in the beam direction in m
     113  set ZVertexSpread 0.25
     114
     115  # maximum spread in time in s
     116  set TVertexSpread 800E-12
     117
     118  # vertex smearing formula f(z,t) (z,t need to be respectively given in m,s)
     119
     120  #set VertexDistributionFormula {exp(-(t^2/(2*(0.063/2.99792458E8*exp(-(z^2/(2*(0.063)^2))))^2)))}
     121  set VertexDistributionFormula {exp(-(t^2/160e-12^2/2))*exp(-(z^2/0.053^2/2))}
     122
     123  # taking 5.3 cm x 160 ps
     124
     125  #set VertexDistributionFormula { (abs(t) <= 160e-12) * (abs(z) <= 0.053) * (1.00) +
     126  #                                (abs(t) >  160e-12) * (abs(z) <= 0.053) * (0.00) +
     127  #                               (abs(t) <= 160e-12) * (abs(z) > 0.053)  * (0.00) +
     128  #                           (abs(t) >  160e-12) * (abs(z) > 0.053)  * (0.00)}
     129
     130}
     131
    70132#####################################
    71133# Track propagation to calorimeters
     
    73135
    74136module ParticlePropagator ParticlePropagator {
    75   set InputArray Delphes/stableParticles
     137  set InputArray PileUpMerger/stableParticles
    76138  set OutputArray stableParticles
    77139  set ChargedHadronOutputArray chargedHadrons
     
    203265
    204266
    205 #### ADD TRACKSMEARING
    206 #### ADD TIMESMEARING
    207 
     267########################################
     268#   Smear tracks
     269########################################
     270
     271module TrackSmearing TrackSmearing {
     272  set InputArray TrackMerger/tracks
     273  set OutputArray tracks
     274  set ApplyToPileUp true
     275
     276  # from http://mersi.web.cern.ch/mersi/layouts/.private/Baseline_tilted_200_Pixel_1_1_1/index.html
     277  source trackResolutionCMS.tcl
     278  # FIXME !!!! we need to add track resolution of FCC-hh baseline detector !!!!!
     279}
     280
     281########################################
     282#   Time Smearing
     283########################################
     284
     285module TimeSmearing TimeSmearing {
     286  set InputArray TrackSmearing/tracks
     287  set OutputArray tracks
     288
     289  # assume 20 ps resolution for now
     290  set TimeResolution 20E-12
     291}
     292
     293##################################
     294# Primary vertex reconstruction
     295##################################
     296
     297
     298module VertexFinderDA4D VertexFinderDA4D {
     299  set InputArray TimeSmearing/tracks
     300
     301  set OutputArray tracks
     302  set VertexOutputArray vertices
     303
     304  set Verbose 0
     305  set MinPT 1.0
     306
     307  # in mm
     308  set VertexSpaceSize 0.5
     309
     310  # in s
     311  set VertexTimeSize 10E-12
     312
     313  set UseTc 1
     314  set BetaMax 0.1
     315  set BetaStop 1.0
     316  set CoolingFactor 0.8
     317  set MaxIterations 100
     318
     319  # in mm
     320  set DzCutOff 40
     321  set D0CutOff 30
     322
     323}
     324
     325##########################
     326# Track pile-up subtractor
     327##########################
     328
     329module TrackPileUpSubtractor TrackPileUpSubtractor {
     330# add InputArray InputArray OutputArray
     331
     332  add InputArray ChargedHadronMomentumSmearing/chargedHadrons
     333  add InputArray ElectronMomentumSmearing/electrons
     334  add InputArray MuonMomentumSmearing/muons
     335 
     336  set VertexInputArray VertexFinderDA4D/vertices
     337  # assume perfect pile-up subtraction for tracks with |z| > fZVertexResolution
     338  # Z vertex resolution in m
     339  set ZVertexResolution {0.0001}
     340}
    208341
    209342
     
    216349module SimpleCalorimeter ECal {
    217350  set ParticleInputArray ParticlePropagator/stableParticles
    218   set TrackInputArray TrackMerger/tracks
     351  set TrackInputArray TrackSmearing/tracks
    219352
    220353  set TowerOutputArray ecalTowers
     
    373506}
    374507
     508
    375509#################
    376510# Electron filter
     
    8911025  add Branch MissingET/momentum MissingET MissingET
    8921026  add Branch ScalarHT/energy ScalarHT ScalarHT
    893 }
    894 
     1027  add Branch VertexFinderDA4D/vertices Vertex4D Vertex
     1028}
     1029
  • modules/TrackPileUpSubtractor.cc

    r1363bf5 r34c28a9  
    117117void TrackPileUpSubtractor::Process()
    118118{
    119   Candidate *candidate, *particle;
     119  Candidate *candidate, *particle, *particleTest;
    120120  map<TIterator *, TObjArray *>::iterator itInputMap;
    121121  TIterator *iterator;
     
    123123  Double_t z, zvtx = 0;
    124124  Double_t pt, eta, phi, e;
    125 
     125  Double_t sumPT2 = 0;
     126  Double_t sumSquare = 0;
     127  int counter = 0;
     128  Double_t tempPTSquare = 0;
     129  Double_t tempZVertex = 0;
    126130  // find z position of primary vertex
    127131
     132  cout << " ---------- NEW EVENT --------- " << endl;
     133
    128134  fItVertexInputArray->Reset();
     135  cout << " NUMBER OF VERTICES : " << fVertexInputArray->GetEntriesFast() << endl;
    129136  while((candidate = static_cast<Candidate *>(fItVertexInputArray->Next())))
    130137  {
    131     if(!candidate->IsPU)
    132     {
    133       zvtx = candidate->Position.Z();
    134       // break;
    135     }
     138      cout << " ---------- NEW VERTEX --------- " << candidate->IsPU << endl;
     139      tempZVertex = candidate->Position.Z();
     140      tempPTSquare = candidate->SumPT2;
     141      if(tempPTSquare > sumSquare)
     142      {
     143        sumSquare = tempPTSquare;
     144        zvtx = tempZVertex;
     145        cout << " Sum Square : " << sumSquare << " Z of Vertex : " << zvtx << "  Is PileUp : " << candidate->IsPU << endl;
     146      }
     147     
     148      /*
     149      for(int i = 0; i < candidate->GetCandidates()->GetEntriesFast(); i++)
     150      {
     151        particleTest = static_cast<Candidate *>(candidate->GetCandidates()->At(i));
     152        TLorentzVector &candidateMomentumNew = particleTest->Momentum;
     153        if(candidateMomentumNew.Pt() > 1.0)
     154          sumSquare += (candidateMomentumNew.Pt()*candidateMomentumNew.Pt());
     155        cout << candidateMomentumNew.Pt() << "  " << candidate->SumPT2 << " counter : " << candidate->GetCandidates()->GetEntriesFast() << endl;
     156      } 
     157      */
    136158  }
    137159
     
    147169    {
    148170      particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
    149       const TLorentzVector &candidateMomentum = particle->Momentum;
     171      const TLorentzVector &candidateMomentum = candidate->Momentum;
    150172
    151173      eta = candidateMomentum.Eta();
     
    154176      e = candidateMomentum.E();
    155177
    156       z = particle->Position.Z();
     178      z = candidate->Position.Z();
     179      counter ++;
     180      //sum = pt*pt;
     181      if(pt > 1.0)
     182        sumPT2 += pt*pt;
    157183
    158184      // apply pile-up subtraction
    159185      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    160 
    161       if(candidate->Charge != 0 && candidate->IsPU && TMath::Abs(z - zvtx) > fFormula->Eval(pt, eta, phi, e) * 1.0e3)
     186      // cout << particle->IsRecoPU << " ParticleSumSquare : " << sumPT2 << " VertexResult : " << sumSquare << " Added SumSquare : " << zvtx << endl;
     187      //cout << pt << "  " << candidate->IsPU << "  " <<  TMath::Abs(z - zvtx) << "   " << sumPT2 << "   " << sumPT2 << endl;
     188
     189     
     190      if(particle->Charge != 0 && TMath::Abs(z - zvtx) > fFormula->Eval(pt, eta, phi, e) * 1.0e3)
    162191      {
    163192        candidate->IsRecoPU = 1;
     193        //cout <<  TMath::Abs(z - zvtx) << "   " << fFormula->Eval(pt, eta, phi, e) * 1.0e3 << endl;
    164194      }
    165195      else
Note: See TracChangeset for help on using the changeset viewer.