Fork me on GitHub

Changeset cd75093 in git for modules/IdentificationMap.cc


Ignore:
Timestamp:
Dec 12, 2014, 2:58:04 PM (10 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
0c871e5
Parents:
17826f2 (diff), 3d10d1f (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 pull request #8 from selvaggi/master

Added external fast jet examples.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/IdentificationMap.cc

    r17826f2 rcd75093  
    181181      Pi = formula->Eval(pt, eta);
    182182   
    183      // cout<<"PdgIn: "<<pdgIn<<", PdgOut: "<<pdgOut<<", Pi = "<<Pi<<endl;
    184    
    185183      // check that sum of probabilities does not exceed 1.
    186      
    187184      P = (P - Pi)/P;
    188185       
    189       if( P < 0.0 )
    190       {
    191        // cout<<"Sum of probabilities exceeds 1 for particle ID "<<pdgIn<<", check formulas in IdentificationMap module"<<endl;
    192         continue;
    193       }
     186      if( P < 0.0 ) continue;
    194187      else
    195188      {
    196189     
    197         //randomly assign a PID to particle according to map
    198      
    199         Double_t rndm = gRandom->Uniform();
    200        // cout<<"Random number vs P //  "<<rndm<<"  "<<P<<endl;
    201      
    202         if(rndm > P)
    203         //if(gRandom->Uniform() > P)
    204         {
    205          // cout<<"particle "<<candidate->PID<<" --> ";
    206        
    207           //change PID of particle
    208           if(pdgOut != 0) candidate->PID = charge*pdgOut;
    209          // cout<<"Final PID: "<<candidate->PID<<endl;
    210        
    211           fOutputArray->Add(candidate);
    212           break;
    213       }
    214      } 
     190       //randomly assign a PID to particle according to map
     191       Double_t rndm = gRandom->Uniform();
     192       
     193       if(rndm > P)
     194       {
     195         //change PID of particle
     196         if(pdgOut != 0) candidate->PID = charge*pdgOut;
     197         fOutputArray->Add(candidate);
     198         break;
     199       }
     200      }
    215201       
    216202    }
Note: See TracChangeset for help on using the changeset viewer.