Changes in modules/IdentificationMap.cc [f355a2c:856efb6] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/IdentificationMap.cc
rf355a2c r856efb6 181 181 Pi = formula->Eval(pt, eta); 182 182 183 // cout<<"PdgIn: "<<pdgIn<<", PdgOut: "<<pdgOut<<", Pi = "<<Pi<<endl; 184 183 185 // check that sum of probabilities does not exceed 1. 186 184 187 P = (P - Pi)/P; 185 188 186 if( P < 0.0 ) continue; 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 } 187 194 else 188 195 { 189 196 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 } 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 } 201 215 202 216 }
Note:
See TracChangeset
for help on using the changeset viewer.