Fork me on GitHub

Changeset fec809d in git for modules


Ignore:
Timestamp:
Jan 27, 2020, 12:26:15 PM (5 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
Timing
Children:
32b2ff1
Parents:
6777565
Message:

fixed bug in energy loss, removed printouts, and added comments in the card

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/EnergyLoss.cc

    r6777565 rfec809d  
    8181  fX1   =  GetDouble("x1", 2.8716);
    8282  fI    =  GetDouble("I", 173.0); // mean excitation potential in (eV)
    83   fX0   =  GetDouble("c0", 4.4355);
     83  fC0   =  GetDouble("c0", 4.4355);
    8484
    8585  // import arrays with output from other modules
     
    120120void EnergyLoss::Process()
    121121{
    122   Candidate *candidate, *particle;
     122  Candidate *candidate;
    123123  vector<TIterator *>::iterator itInputList;
    124124  TIterator *iterator;
     
    131131  vector<Double_t> elosses;
    132132
    133   cout<<"---------------- new event -------------------"<<endl;
     133  //cout<<"---------------- new event -------------------"<<endl;
    134134
    135135
     
    143143    while((candidate = static_cast<Candidate *>(iterator->Next())))
    144144    {
    145       cout<<"    ---------------- new candidate -------------------"<<endl;
     145      //cout<<"    ---------------- new candidate -------------------"<<endl;
    146146      const TLorentzVector &candidateMomentum = candidate->Momentum;
    147147
     
    149149      gamma     = candidateMomentum.Gamma();
    150150      charge    = TMath::Abs(candidate->Charge);
     151
    151152
    152153      // length of the track normalized by the fraction of active material and the charge collection efficiency in the tracker (in cm)
     
    161162      nhits = Int_t(L*fActiveFraction/dx);
    162163
     164
     165      //beta = 0.999945;
     166      //gamma = 95.6446;
     167      //charge = 1.;
     168      //nhits = 100;     
     169
    163170      //cout<<L<<","<<fActiveFraction<<","<<dx<<","<<nhits<<endl;
    164171
     
    180187      dP = chi*( TMath::Log(Wmax/I) + TMath::Log(chi/I) + 0.2 - beta*beta - delta);
    181188
    182       if (candidateMomentum.Pt() > 5) {
    183         cout<<"Nhits: "<<nhits<<", dx: "<<dx<<", Charge: "<<charge<<", Beta: "<< beta<<", Gamma: "<<gamma<<", PT: "<<candidateMomentum.Pt()<<endl;
     189      //cout<<"L: "<<L<<", PT: "<<candidateMomentum.Pt()<<", Eta: "<<candidateMomentum.Eta()<<", Phi: "<< candidateMomentum.Phi()<<endl;
     190      //cout<<"Nhits: "<<nhits<<", dx: "<<dx<<", Charge: "<<charge<<", Beta: "<< beta<<", Gamma: "<<gamma<<", PT: "<<candidateMomentum.Pt()<<endl;
    184191      //cout<<x<<","<<kappa<<endl;
    185         cout<<"    Wmax: "<<Wmax<<", Chi: "<<chi<<", delta: "<<delta<<", DeDx: "<<avdE<<", DeltaP: "<<dP<<endl;
    186       }
     192      //cout<<"    Wmax: "<<Wmax<<", Chi: "<<chi<<", delta: "<<delta<<", DeDx: "<<avdE<<", DeltaP: "<<dP<<endl;
    187193
    188194      // simulate Nhits energy loss measurements
  • modules/MomentumSmearing.cc

    r6777565 rfec809d  
    120120    candidate->ErrorPT = res*pt;
    121121    candidate->PT = pt;
    122    
     122       
    123123    candidate->TrackResolution = res;
    124124    candidate->AddCandidate(mother);
Note: See TracChangeset for help on using the changeset viewer.