Fork me on GitHub

Changeset 3a105e5 in git


Ignore:
Timestamp:
Feb 24, 2022, 4:15:47 PM (2 years ago)
Author:
michele <michele.selvaggi@…>
Branches:
master
Children:
2a2f310
Parents:
56fb0be
Message:

added first hit to track

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesClasses.cc

    r56fb0be r3a105e5  
    230230  Phi(0), ErrorPhi(0),
    231231  Xd(0), Yd(0), Zd(0),
     232  XFirstHit(0), YFirstHit(0), ZFirstHit(0),
    232233  Nclusters(0.0),
    233234  dNdx(0.0),
     
    409410  object.Yd = Yd;
    410411  object.Zd = Zd;
     412  object.XFirstHit = XFirstHit;
     413  object.YFirstHit = YFirstHit;
     414  object.ZFirstHit = ZFirstHit;
    411415  object.Nclusters = Nclusters;
    412416  object.dNdx = dNdx;
     
    544548  Yd = 0.0;
    545549  Zd = 0.0;
     550  XFirstHit = 0.0;
     551  YFirstHit = 0.0;
     552  ZFirstHit = 0.0;
    546553  Nclusters = 0.0;
    547554  dNdx = 0.0;
  • classes/DelphesClasses.h

    r56fb0be r3a105e5  
    458458  Float_t Zd; // Z coordinate of point of closest approach to vertex
    459459
     460  Float_t XFirstHit; // X coordinate of point of closest approach to vertex
     461  Float_t YFirstHit; // Y coordinate of point of closest approach to vertex
     462  Float_t ZFirstHit; // Z coordinate of point of closest approach to vertex
     463
    460464  Float_t L; // track path length
    461465  Float_t D0; // track transverse impact parameter
     
    564568  Float_t Yd; // Y coordinate of point of closest approach to vertex
    565569  Float_t Zd; // Z coordinate of point of closest approach to vertex
     570
     571  Float_t XFirstHit; // X coordinate of point of closest approach to vertex
     572  Float_t YFirstHit; // Y coordinate of point of closest approach to vertex
     573  Float_t ZFirstHit; // Z coordinate of point of closest approach to vertex
    566574
    567575  Float_t L; // track path length
     
    708716  Float_t Zd;
    709717
     718  Float_t XFirstHit;
     719  Float_t YFirstHit;
     720  Float_t ZFirstHit;
     721
    710722  // tracking resolution
    711723
  • external/TrackCovariance/ObsTrk.cc

    r56fb0be r3a105e5  
    120120        //if (pt > maxPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is above grid range of " << maxPt << std::endl;
    121121        Double_t minAn = fGC->GetMinAng();
    122         //if (angd < minAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd 
     122        //if (angd < minAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd
    123123        //      << " is below grid range of " << minAn << std::endl;
    124124        Double_t maxAn = fGC->GetMaxAng();
     
    137137        Double_t Xfirst, Yfirst, Zfirst;
    138138        Int_t iLay = trk->FirstHit(Xfirst, Yfirst, Zfirst);
    139         TVector3 fXfirst(Xfirst, Yfirst, Zfirst);
     139        fXfirst = TVector3(Xfirst, Yfirst, Zfirst);
     140  //std::cout<<"obs trk: "<<Xfirst<<","<<Yfirst<<","<<Zfirst<<std::endl;
     141
    140142        if (inside)
    141143        {
  • external/TrackCovariance/SolTrack.cc

    r56fb0be r3a105e5  
    176176{
    177177        //
    178         // Return lists of hits associated to a track including all scattering layers. 
     178        // Return lists of hits associated to a track including all scattering layers.
    179179        // Return value is the total number of measurement hits
    180180        // kmh = total number of measurement layers hit for given type
     
    190190        {
    191191                Double_t R; Double_t phi; Double_t zz;
    192                 if (HitLayer(i, R, phi, zz)) 
     192                if (HitLayer(i, R, phi, zz))
    193193                {
    194194                        zhh[kh] = zz;
     
    207207{
    208208        //
    209         // Return lists of hits associated to a track for all measurement layers. 
     209        // Return lists of hits associated to a track for all measurement layers.
    210210        // Return value is the total number of measurement hits
    211211        // kmh = total number of measurement layers hit for given type
     
    236236Int_t SolTrack::FirstHit(Double_t &Xfirst, Double_t &Yfirst, Double_t &Zfirst)
    237237{
    238         Int_t iFirst = -1;     
     238        Int_t iFirst = -1;
    239239        Int_t iFirstLay = -1;   // Default return with no hits
    240240        Xfirst = 0.;
     
    249249                Double_t *dh = new Double_t[Nmh];
    250250                //
    251                 Int_t n = HitListXYZ(ih, Xh, Yh, Zh);   
     251                Int_t n = HitListXYZ(ih, Xh, Yh, Zh);
    252252                //
    253253                for(Int_t i=0; i<Nmh; i++){
    254                         Double_t rr = TMath::Sqrt(Xh[i]*Xh[i]+Yh[i]*Yh[i]);     // Hit radius           
     254                        Double_t rr = TMath::Sqrt(Xh[i]*Xh[i]+Yh[i]*Yh[i]);     // Hit radius
    255255                        dh[i] = TMath::ASin(C() * TMath::Sqrt((rr * rr - D() * D()) / (1. + 2 * C() * D()))) / C();     // Arc length traveled
    256256                }
     
    327327        //
    328328        //
    329         // Input flags: 
     329        // Input flags:
    330330        //                              Res = .TRUE. turn on resolution effects/Use standard resolutions
    331331        //                                        .FALSE. set all resolutions to 0
     
    410410                        nz = 1.0;
    411411                }
    412                 Double_t corr = TMath::Abs(pxi*nx + pyi * ny + pzi * nz) / p(); 
     412                Double_t corr = TMath::Abs(pxi*nx + pyi * ny + pzi * nz) / p();
    413413                Double_t Rlf = fG->lTh(i) / (corr*fG->lX0(i));                                  // Rad. length fraction
    414414                thms[ii] = 0.0136*TMath::Sqrt(Rlf)*(1.0 + 0.038*TMath::Log(Rlf)) / p();         // MS angle
     
    438438                Int_t ityp  = fG->lTyp(i);                      // Layer type Barrel or Z
    439439                Int_t nmeai = fG->lND(i);                       // # measurements in layer
    440                
     440
    441441                if (fG->isMeasure(i))
    442442                {
     
    470470                                                Rm(im, 2) = csa * dRphi(2) - ssa * dRz(2);      // C derivative
    471471                                                Rm(im, 3) = csa * dRphi(3) - ssa * dRz(3);      // z0 derivative
    472                                                 Rm(im, 4) = csa * dRphi(4) - ssa * dRz(4);      // cot(theta) derivative       
     472                                                Rm(im, 4) = csa * dRphi(4) - ssa * dRz(4);      // cot(theta) derivative
    473473                                        }
    474474                                        if (ityp == 2)          // Z type layer (Measure R-phi at const. Z)
     
    531531                                                {
    532532                                                        Double_t strk = 0;
    533                                                         if (nmk + 1 == 1) strk = fG->lStU(k);   // Stereo angle upper 
     533                                                        if (nmk + 1 == 1) strk = fG->lStU(k);   // Stereo angle upper
    534534                                                        if (nmk + 1 == 2) strk = fG->lStL(k);   // Stereo angle lower
    535535                                                        //if (im == km && Res) Sm(im, km) += sig*sig;   // Detector resolution on diagonal
     
    542542                                                        //
    543543                                                        // Loop on all layers below for MS contributions
    544                                                         for (Int_t jj = 0; jj < kk; jj++)               
     544                                                        for (Int_t jj = 0; jj < kk; jj++)
    545545                                                        {
    546546                                                                Double_t di = dik(ii, jj);
  • modules/TrackCovariance.cc

    r56fb0be r3a105e5  
    121121    const TLorentzVector &candidateMomentum = particle->Momentum;
    122122
     123
    123124    Bool_t inside = TrkUtil::IsInside(candidatePosition.Vect(), Rin, ZinNeg, ZinPos); // Check if in inner box
    124125    Bool_t Accept = kTRUE;
     
    130131
    131132    ObsTrk track(candidatePosition.Vect(), candidateMomentum.Vect(), candidate->Charge, fCovariance, fGeometry);
     133
    132134
    133135    mother    = candidate;
     
    150152    candidate->Yd = track.GetObsX().Y()*1e03;
    151153    candidate->Zd = track.GetObsX().Z()*1e03;
     154
     155    candidate->XFirstHit = track.GetFirstHit().X()*1e03;
     156    candidate->YFirstHit = track.GetFirstHit().Y()*1e03;
     157    candidate->ZFirstHit = track.GetFirstHit().Z()*1e03;
    152158
    153159    candidate->D0       = track.GetObsPar()[0]*1e03;
  • modules/TreeWriter.cc

    r56fb0be r3a105e5  
    384384    entry->Zd = candidate->Zd;
    385385
     386    entry->XFirstHit = candidate->XFirstHit;
     387    entry->YFirstHit = candidate->YFirstHit;
     388    entry->ZFirstHit = candidate->ZFirstHit;
     389
    386390    const TLorentzVector &momentum = candidate->Momentum;
    387391
     
    544548    entry->Zd = candidate->Zd;
    545549
     550    entry->XFirstHit = candidate->XFirstHit;
     551    entry->YFirstHit = candidate->YFirstHit;
     552    entry->ZFirstHit = candidate->ZFirstHit;
     553
    546554    const TLorentzVector &momentum = candidate->Momentum;
    547555
Note: See TracChangeset for help on using the changeset viewer.