Fork me on GitHub

Changeset 071a8d7 in git for modules


Ignore:
Timestamp:
Oct 2, 2020, 6:25:52 PM (4 years ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
47327f8
Parents:
f0f1443 (diff), e7cccc2 (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.
git-author:
Aleksander Filip Żarnecki <zarnecki@…> (10/02/20 18:25:52)
git-committer:
GitHub <noreply@…> (10/02/20 18:25:52)
Message:

Merge pull request #2 from delphes/master

Fork update

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/DualReadoutCalorimeter.cc

    rf0f1443 r071a8d7  
    645645    //cout<<"Creating tower with Pt, Eta, Phi, Energy: "<<pt<<","<<eta<<","<<phi<<","<<neutralEnergy<<endl;
    646646    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, neutralEnergy);
    647     tower->Eem = neutralEnergy;
    648     tower->Ehad = 0.0;
    649     tower->PID = 22;
    650 
     647
     648    // if no hadronic energy, use ECAL resolution
     649    if (fHCalTowerEnergy <= fHCalEnergyMin)
     650    {
     651      tower->Eem = neutralEnergy;
     652      tower->Ehad = 0.0;
     653      tower->PID = 22;
     654    }
     655
     656    // if hadronic fraction > 0, use HCAL resolution
     657    else
     658    {
     659      tower->Eem = 0;
     660      tower->Ehad = neutralEnergy;
     661      tower->PID = 130;
     662    }
     663
     664    fEFlowPhotonOutputArray->Add(tower);
    651665   
    652 
    653     fEFlowPhotonOutputArray->Add(tower);
    654 
    655666
    656667    //clone tracks
  • modules/TrackCovariance.cc

    rf0f1443 r071a8d7  
    102102  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    103103  {
    104     const TLorentzVector &candidatePosition = candidate->InitialPosition;
     104
     105    // converting to meters
     106    const TLorentzVector &candidatePosition = candidate->InitialPosition*1e-03;
    105107    const TLorentzVector &candidateMomentum = candidate->Momentum;
    106108
     
    113115
    114116    candidate->Momentum.SetVectM(track.GetObsP(), mass);
    115     candidate->InitialPosition.SetXYZT(track.GetObsX().X(),track.GetObsX().Y(),track.GetObsX().Z(),candidatePosition.T());
    116117   
     118    // converting back to mm
     119    candidate->InitialPosition.SetXYZT(track.GetObsX().X()*1e03,track.GetObsX().Y()*1e03,track.GetObsX().Z()*1e03,candidatePosition.T()*1e03);
     120
    117121    // save full covariance 5x5 matrix internally (D0, phi, Curvature, dz, ctg(theta))
    118122    candidate->TrackCovariance = track.GetCov();
     
    123127    ct = track.GetObsPar()[4];
    124128
    125     candidate->Xd = track.GetObsX().X();
    126     candidate->Yd = track.GetObsX().Y();
    127     candidate->Zd = track.GetObsX().Z();
     129    candidate->Xd = track.GetObsX().X()*1e03;
     130    candidate->Yd = track.GetObsX().Y()*1e03;
     131    candidate->Zd = track.GetObsX().Z()*1e03;
    128132   
    129     candidate->D0 = track.GetObsPar()[0];
    130     candidate->Phi = track.GetObsPar()[1];
    131     candidate->C = track.GetObsPar()[2];
    132     candidate->DZ = track.GetObsPar()[3];
     133    candidate->D0       = track.GetObsPar()[0]*1e03;
     134    candidate->Phi      = track.GetObsPar()[1];
     135    candidate->C        = track.GetObsPar()[2]*1e03;
     136    candidate->DZ       = track.GetObsPar()[3]*1e03;
    133137    candidate->CtgTheta = track.GetObsPar()[4];
    134     candidate->P  = track.GetObsP().Mag();
    135     candidate->PT = pt;
    136     candidate->Charge = q;
     138    candidate->P        = track.GetObsP().Mag();
     139    candidate->PT       = pt;
     140    candidate->Charge   = q;
    137141
    138     dd0       = TMath::Sqrt(track.GetCov()(0, 0));
    139     ddz       = TMath::Sqrt(track.GetCov()(3, 3));
     142    dd0       = TMath::Sqrt(track.GetCov()(0, 0))*1e03;
     143    ddz       = TMath::Sqrt(track.GetCov()(3, 3))*1e03;
    140144    dphi      = TMath::Sqrt(track.GetCov()(1, 1));
    141145    dct       = TMath::Sqrt(track.GetCov()(4, 4));
    142146    dpt       = 2 * TMath::Sqrt( track.GetCov()(2, 2))*pt*pt / (0.2998*fBz);
    143147    dp        = TMath::Sqrt((1.+ct*ct)*dpt*dpt + 4*pt*pt*ct*ct*dct*dct/(1.+ct*ct)/(1.+ct*ct));
    144     dC        = TMath::Sqrt(track.GetCov()(2, 2));
     148    dC        = TMath::Sqrt(track.GetCov()(2, 2))*1e03;
    145149
    146150    candidate->ErrorD0 = dd0;
Note: See TracChangeset for help on using the changeset viewer.