Fork me on GitHub

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/TrackCovariance/ObsTrk.cc

    r66b1770 r90975be  
    4444        fCovILC = CovToILC(fCov);
    4545}
     46
     47// x[3] track origin, p[3] track momentum at origin, Q charge, B magnetic field in Tesla
     48ObsTrk::ObsTrk(Double_t *x, Double_t *p, Double_t Q, Double_t B, SolGridCov* GC)
     49{
     50        fGC = GC;
     51        fGenX.SetXYZ(x[0],x[1],x[2]);
     52        fGenP.SetXYZ(p[0],p[1],p[2]);
     53        fGenQ = Q;
     54        fB = B;
     55        fGenPar.ResizeTo(5);
     56        fGenParACTS.ResizeTo(6);
     57        fGenParILC.ResizeTo(5);
     58        fObsPar.ResizeTo(5);
     59        fObsParACTS.ResizeTo(6);
     60        fObsParILC.ResizeTo(5);
     61        fCov.ResizeTo(5, 5);
     62        fCovACTS.ResizeTo(6, 6);
     63        fCovILC.ResizeTo(5, 5);
     64        fGenPar = XPtoPar(fGenX, fGenP, Q);
     65        fGenParACTS = ParToACTS(fGenPar);
     66        fGenParILC = ParToILC(fGenPar);
     67        /*
     68        cout << "ObsTrk::ObsTrk: fGenPar";
     69        for (Int_t i = 0; i < 5; i++)cout << fGenPar(i) << ", ";
     70        cout << endl;
     71        */
     72        fObsPar = GenToObsPar(fGenPar, fGC);
     73        fObsParACTS = ParToACTS(fObsPar);
     74        fObsParILC = ParToILC(fObsPar);
     75        fObsX = ParToX(fObsPar);
     76        fObsP = ParToP(fObsPar);
     77        fObsQ = ParToQ(fObsPar);
     78        fCovACTS = CovToACTS(fCov);
     79        fCovILC = CovToILC(fCov);
     80}
     81
     82
    4683//
    4784// Destructor
     
    98135        //
    99136        TVector3 Xval;
    100         Xval(0) = -D*TMath::Sin(phi0); 
    101         Xval(1) =  D*TMath::Cos(phi0); 
     137        Xval(0) = -D*TMath::Sin(phi0);
     138        Xval(1) =  D*TMath::Cos(phi0);
    102139        Xval(2) =  z0;
    103140        //
     
    135172        // Check ranges
    136173        Double_t minPt = GC->GetMinPt ();
    137         if (pt < minPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is below grid range of " << minPt << std::endl;
     174        //if (pt < minPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is below grid range of " << minPt << std::endl;
    138175        Double_t maxPt = GC->GetMaxPt();
    139         if (pt > maxPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is above grid range of " << maxPt << std::endl;
     176        //if (pt > maxPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is above grid range of " << maxPt << std::endl;
    140177        Double_t minAn = GC->GetMinAng();
    141         if (angd < minAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd
    142                 << " is below grid range of " << minAn << std::endl;
     178  //if (angd < minAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd
     179        //      << " is below grid range of " << minAn << std::endl;
    143180        Double_t maxAn = GC->GetMaxAng();
    144         if (angd > maxAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd
    145                 << " is above grid range of " << maxAn << std::endl;
     181        //if (angd > maxAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd
     182        //      << " is above grid range of " << maxAn << std::endl;
    146183        //
    147184        TMatrixDSym Cov = GC->GetCov(pt, angd);
     
    179216        pACTS(1) = 1000 * Par(3);       // z0 from m to mm
    180217        pACTS(2) = Par(1);                      // Phi0 is unchanged
    181         pACTS(3) = TMath::ATan(1.0 / Par(4)) + TMath::PiOver2();                // Theta in [0, pi] range
     218        pACTS(3) = TMath::ATan2(1.0,Par(4));            // Theta in [0, pi] range
    182219        pACTS(4) = Par(2) / (b*TMath::Sqrt(1 + Par(4)*Par(4)));         // q/p in GeV
    183220        pACTS(5) = 0.0;                         // Time: currently undefined
     
    247284        return cILC;
    248285}
    249 
    250 
    251 
    252        
Note: See TracChangeset for help on using the changeset viewer.