Fork me on GitHub

Changeset 90975be in git for modules


Ignore:
Timestamp:
Jan 18, 2021, 12:29:36 PM (4 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
master
Children:
2671df6, 3e4e196, 44bfedd, f84b626
Parents:
66b1770 (diff), f17e10d (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 branch 'master' of github.com:delphes/delphes

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackCovariance.cc

    r66b1770 r90975be  
    2121 *  Smears track parameters according to appropriate covariance matrix.
    2222 *
    23  *  \authors P. Demin - UCLouvain, Louvain-la-Neuve
     23 *  \authors F. Bedeschi - INFN Pisa
     24*            P. Demin - UCLouvain, Louvain-la-Neuve
    2425 *           M. Selvaggi - CERN
     26 *
    2527 *
    2628 */
     
    5052
    5153TrackCovariance::TrackCovariance() :
    52   fGeometry(0), fCovariance(0), fItInputArray(0)
     54  fGeometry(0), fCovariance(0), fAcx(0), fItInputArray(0)
    5355{
    5456  fGeometry = new SolGeom();
     
    7072  fBz = GetDouble("Bz", 0.0);
    7173  fGeometry->Read(GetString("DetectorGeometry", ""));
     74  fNMinHits = GetInt("NMinHits", 6);
    7275
     76  // load geometry
    7377  fCovariance->Calc(fGeometry);
     78  fCovariance->SetMinHits(fNMinHits);
     79  // load geometry
     80  fAcx = fCovariance->AccPnt();
    7481
    7582  // import input array
    76 
    7783  fInputArray = ImportArray(GetString("InputArray", "TrackMerger/tracks"));
    7884  fItInputArray = fInputArray->MakeIterator();
     
    97103  Double_t mass, p, pt, q, ct;
    98104  Double_t dd0, ddz, dphi, dct, dp, dpt, dC;
    99  
     105
    100106
    101107  fItInputArray->Reset();
     
    107113    const TLorentzVector &candidateMomentum = candidate->Momentum;
    108114
     115    if ( !fCovariance->IsAccepted(candidateMomentum.Vect()) ) continue;
     116
    109117    mass = candidateMomentum.M();
    110118
     
    112120
    113121    mother    = candidate;
    114     candidate = static_cast<Candidate *>(candidate->Clone());
     122    candidate = static_cast<Candidate*>(candidate->Clone());
    115123
    116124    candidate->Momentum.SetVectM(track.GetObsP(), mass);
    117    
     125
    118126    // converting back to mm
    119127    candidate->InitialPosition.SetXYZT(track.GetObsX().X()*1e03,track.GetObsX().Y()*1e03,track.GetObsX().Z()*1e03,candidatePosition.T()*1e03);
     
    130138    candidate->Yd = track.GetObsX().Y()*1e03;
    131139    candidate->Zd = track.GetObsX().Z()*1e03;
    132    
     140
    133141    candidate->D0       = track.GetObsPar()[0]*1e03;
    134142    candidate->Phi      = track.GetObsPar()[1];
     
    142150    candidate->Charge   = q;
    143151
    144     dd0       = TMath::Sqrt(track.GetCov()(0, 0))*1e03; 
    145     ddz       = TMath::Sqrt(track.GetCov()(3, 3))*1e03; 
    146     dphi      = TMath::Sqrt(track.GetCov()(1, 1)); 
    147     dct       = TMath::Sqrt(track.GetCov()(4, 4)); 
     152    dd0       = TMath::Sqrt(track.GetCov()(0, 0))*1e03;
     153    ddz       = TMath::Sqrt(track.GetCov()(3, 3))*1e03;
     154    dphi      = TMath::Sqrt(track.GetCov()(1, 1));
     155    dct       = TMath::Sqrt(track.GetCov()(4, 4));
    148156    dpt       = 2 * TMath::Sqrt( track.GetCov()(2, 2))*pt*pt / (0.2998*fBz);
    149157    dp        = TMath::Sqrt((1.+ct*ct)*dpt*dpt + 4*pt*pt*ct*ct*dct*dct/(1.+ct*ct)/(1.+ct*ct));
     
    160168    candidate->TrackResolution = dp / p;
    161169
    162 
    163170    candidate->AddCandidate(mother);
    164171
  • modules/TrackCovariance.h

    r66b1770 r90975be  
    3636class SolGeom;
    3737class SolGridCov;
     38class AcceptanceClx;
    3839
    3940class TrackCovariance: public DelphesModule
     
    4950private:
    5051  Double_t fBz;
     52  Int_t fNMinHits;
    5153
    5254  SolGeom *fGeometry;
    5355  SolGridCov *fCovariance;
     56
     57  AcceptanceClx *fAcx;
    5458
    5559  TIterator *fItInputArray; //!
Note: See TracChangeset for help on using the changeset viewer.