Fork me on GitHub

Ignore:
Timestamp:
Apr 28, 2021, 9:35:32 AM (3 years ago)
Author:
michele <michele.selvaggi@…>
Branches:
master
Children:
d4fb268
Parents:
4739226
Message:

added v0 of Ionisation cluster counting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/TrackCovariance/TrkUtil.cc

    r4739226 ra95da74  
    233233}
    234234//
     235
     236//
     237void TrkUtil::SetBfield(Double_t Bz)
     238{
     239        fBz = Bz;
     240}
     241
    235242// Setup chamber volume
    236243void TrkUtil::SetDchBoundaries(Double_t Rmin, Double_t Rmax, Double_t Zmin, Double_t Zmax)
     
    267274                //      << ", C= " << C << ", z0= " << z0 << ", ct= " << ct << std::endl;
    268275                //
    269                 // Track length per unit phase change 
     276                // Track length per unit phase change
    270277                Double_t Scale = sqrt(1.0 + ct*ct) / (2.0*TMath::Abs(C));
    271278                //
    272279                // Find intersections with chamber boundaries
    273280                //
    274                 Double_t phRin = 0.0;                   // phase of inner cylinder 
     281                Double_t phRin = 0.0;                   // phase of inner cylinder
    275282                Double_t phRin2= 0.0;                   // phase of inner cylinder intersection (2nd branch)
    276283                Double_t phRhi = 0.0;                   // phase of outer cylinder intersection
     
    287294                        //std::cout << "Rin intersection: ph = " << ph<<", z= "<<z << std::endl;
    288295
    289                         if (z < fZmax && z > fZmin)     phRin = TMath::Abs(ph); // Intersection inside chamber volume   
     296                        if (z < fZmax && z > fZmin)     phRin = TMath::Abs(ph); // Intersection inside chamber volume
    290297                        //
    291298                        // Include second branch of loopers
     
    301308                        Double_t ph = 2 * asin(C*sqrt((fRmax*fRmax - D*D) / (1.0 + 2.0*C*D)));
    302309                        Double_t z = z0 + ct*ph / (2.0*C);
    303                         if (z < fZmax && z > fZmin)     phRhi = TMath::Abs(ph); // Intersection inside chamber volume   
     310                        if (z < fZmax && z > fZmin)     phRhi = TMath::Abs(ph); // Intersection inside chamber volume
    304311                }
    305312                //  ... with left wall
     
    309316                        Double_t ph = 2.0*C*Zdir;
    310317                        Double_t Rint = sqrt(D*D + (1.0 + 2.0*C*D)*pow(sin(ph / 2), 2) / (C*C));
    311                         if (Rint < fRmax && Rint > fRmin)       phZmn = TMath::Abs(ph); // Intersection inside chamber volume   
     318                        if (Rint < fRmax && Rint > fRmin)       phZmn = TMath::Abs(ph); // Intersection inside chamber volume
    312319                }
    313320                //  ... with right wall
     
    317324                        Double_t ph = 2.0*C*Zdir;
    318325                        Double_t Rint = sqrt(D*D + (1.0 + 2.0*C*D)*pow(sin(ph / 2), 2) / (C*C));
    319                         if (Rint < fRmax && Rint > fRmin)       phZmx = TMath::Abs(ph); // Intersection inside chamber volume   
     326                        if (Rint < fRmax && Rint > fRmin)       phZmx = TMath::Abs(ph); // Intersection inside chamber volume
    320327                }
    321328                //
     
    390397//
    391398//
    392 Double_t TrkUtil::Nclusters(Double_t begam) 
     399Double_t TrkUtil::Nclusters(Double_t begam)
    393400{
    394401        Int_t Opt = fGasSel;
     
    465472        {
    466473                case 0: std::copy(ncl_He_Iso, ncl_He_Iso + Npt, ncl);   // He-Isobutane
    467                 break;                                                 
     474                break;
    468475                case 1: std::copy(ncl_He, ncl_He + Npt, ncl);           // pure He
    469476                break;
     
    493500        TVectorD coeff = Xval * y;
    494501        Double_t interp = coeff[0] + coeff[1] * begam + coeff[2] * begam * begam;
    495         //std::cout << "val1= (" <<x(0)<<", "<< y(0) << "), val2= (" 
    496         //      <<x(1)<<", "<< y(1) << "), val3= (" 
     502        //std::cout << "val1= (" <<x(0)<<", "<< y(0) << "), val2= ("
     503        //      <<x(1)<<", "<< y(1) << "), val3= ("
    497504        //      <<x(2)<<", "<< y(2)
    498505        //      << "), result= (" <<begam<<", "<< interp<<")" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.