- Timestamp:
- Jun 10, 2015, 4:04:47 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 8707eeb
- Parents:
- 6ec8d18 (diff), 9c491e1 (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. - Location:
- modules
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/AngularSmearing.cc
r6ec8d18 rdd514ae 100 100 { 101 101 Candidate *candidate, *mother; 102 Double_t pt, eta, phi ;102 Double_t pt, eta, phi, e; 103 103 104 104 fItInputArray->Reset(); … … 110 110 phi = candidatePosition.Phi(); 111 111 pt = candidateMomentum.Pt(); 112 e = candidateMomentum.E(); 112 113 113 114 // apply smearing formula for eta,phi 114 115 115 eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta ));116 phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta ));116 eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta, phi, e)); 117 phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta, phi, e)); 117 118 118 119 if(pt <= 0.0) continue; -
modules/BTagging.cc
r6ec8d18 rdd514ae 171 171 { 172 172 Candidate *jet, *parton; 173 Double_t pt, eta, phi ;173 Double_t pt, eta, phi, e; 174 174 TObjArray *partonArray; 175 175 map< Int_t, DelphesFormula * >::iterator itEfficiencyMap; … … 194 194 phi = jetMomentum.Phi(); 195 195 pt = jetMomentum.Pt(); 196 196 e = jetMomentum.E(); 197 197 198 // loop over all input partons 198 199 itPartonArray.Reset(); … … 218 219 219 220 // apply an efficency formula 220 jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta )) << fBitNumber;221 } 222 } 223 224 //------------------------------------------------------------------------------ 221 jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber; 222 } 223 } 224 225 //------------------------------------------------------------------------------ -
modules/Efficiency.cc
r6ec8d18 rdd514ae 96 96 { 97 97 Candidate *candidate; 98 Double_t pt, eta, phi ;98 Double_t pt, eta, phi, e; 99 99 100 100 fItInputArray->Reset(); … … 106 106 phi = candidatePosition.Phi(); 107 107 pt = candidateMomentum.Pt(); 108 e = candidateMomentum.E(); 108 109 109 110 // apply an efficency formula 110 if(gRandom->Uniform() > fFormula->Eval(pt, eta )) continue;111 if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e)) continue; 111 112 112 113 fOutputArray->Add(candidate); -
modules/EnergyScale.cc
r6ec8d18 rdd514ae 104 104 momentum = candidate->Momentum; 105 105 106 scale = fFormula->Eval(momentum.Pt(), momentum.Eta() );106 scale = fFormula->Eval(momentum.Pt(), momentum.Eta(), momentum.Phi(), momentum.E()); 107 107 108 108 if(scale > 0.0) momentum *= scale; -
modules/EnergySmearing.cc
r6ec8d18 rdd514ae 96 96 { 97 97 Candidate *candidate, *mother; 98 Double_t energy, eta, phi;98 Double_t pt, energy, eta, phi; 99 99 100 100 fItInputArray->Reset(); … … 103 103 const TLorentzVector &candidatePosition = candidate->Position; 104 104 const TLorentzVector &candidateMomentum = candidate->Momentum; 105 106 pt = candidatePosition.Pt(); 105 107 eta = candidatePosition.Eta(); 106 108 phi = candidatePosition.Phi(); … … 108 110 109 111 // apply smearing formula 110 energy = gRandom->Gaus(energy, fFormula->Eval( 0.0, eta, 0.0, energy));112 energy = gRandom->Gaus(energy, fFormula->Eval(pt, eta, phi, energy)); 111 113 112 114 if(energy <= 0.0) continue; -
modules/IdentificationMap.cc
r6ec8d18 rdd514ae 127 127 { 128 128 Candidate *candidate; 129 Double_t pt, eta, phi ;129 Double_t pt, eta, phi, e; 130 130 TMisIDMap::iterator itEfficiencyMap; 131 131 pair <TMisIDMap::iterator, TMisIDMap::iterator> range; … … 143 143 phi = candidatePosition.Phi(); 144 144 pt = candidateMomentum.Pt(); 145 e = candidateMomentum.E(); 146 145 147 pdgCodeIn = candidate->PID; 146 148 charge = candidate->Charge; … … 164 166 pdgCodeOut = (it->second).first; 165 167 166 p = formula->Eval(pt, eta );168 p = formula->Eval(pt, eta, phi, e); 167 169 168 170 if(total <= r && r < total + p) -
modules/ImpactParameterSmearing.cc
r6ec8d18 rdd514ae 97 97 Candidate *candidate, *particle, *mother; 98 98 Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy; 99 Double_t pt, eta, px, py ;99 Double_t pt, eta, px, py, phi, e; 100 100 101 101 fItInputArray->Reset(); … … 110 110 eta = candidateMomentum.Eta(); 111 111 pt = candidateMomentum.Pt(); 112 phi = candidateMomentum.Phi(); 113 e = candidateMomentum.E(); 114 112 115 px = candidateMomentum.Px(); 113 116 py = candidateMomentum.Py(); … … 119 122 120 123 // calculate smeared values 121 sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));122 sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));123 sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));124 sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 125 sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 126 sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 124 127 125 128 xd += sx; … … 130 133 dxy = (xd*py - yd*px)/pt; 131 134 132 ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));135 ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 133 136 134 137 // fill smeared values in candidate -
modules/MomentumSmearing.cc
r6ec8d18 rdd514ae 96 96 { 97 97 Candidate *candidate, *mother; 98 Double_t pt, eta, phi ;98 Double_t pt, eta, phi, e; 99 99 100 100 fItInputArray->Reset(); … … 106 106 phi = candidatePosition.Phi(); 107 107 pt = candidateMomentum.Pt(); 108 e = candidateMomentum.E(); 108 109 109 110 // apply smearing formula 110 pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta ) * pt);111 pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt); 111 112 112 113 if(pt <= 0.0) continue; -
modules/SimpleCalorimeter.cc
r6ec8d18 rdd514ae 149 149 150 150 fEnergySignificanceMin = GetDouble("EnergySignificanceMin", 0.0); 151 152 // flag that says if current calo is Ecal of Hcal (will then fill correct values of Eem and Ehad) 153 fIsEcal = GetBool("IsEcal", false); 151 154 152 155 // switch on or off the dithering of the center of calorimeter towers … … 425 428 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 426 429 430 fTower->Eem = (!fIsEcal) ? 0 : energy; 431 fTower->Ehad = (fIsEcal) ? 0 : energy; 432 427 433 fTower->Edges[0] = fTowerEdges[0]; 428 434 fTower->Edges[1] = fTowerEdges[1]; … … 447 453 pt = energy / TMath::CosH(eta); 448 454 455 tower->Eem = (!fIsEcal) ? 0 : energy; 456 tower->Ehad = (fIsEcal) ? 0 : energy; 457 449 458 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 450 459 fEFlowTowerOutputArray->Add(tower); -
modules/SimpleCalorimeter.h
r6ec8d18 rdd514ae 1 1 2 /* 2 3 * Delphes: a framework for fast simulation of a generic collider experiment … … 74 75 Bool_t fSmearTowerCenter; 75 76 77 Bool_t fIsEcal; //! 78 76 79 TFractionMap fFractionMap; //! 77 80 TBinMap fBinMap; //! -
modules/TaggingParticlesSkimmer.cc
r6ec8d18 rdd514ae 162 162 163 163 eta = TMath::Abs(candidate->Momentum.Eta()); 164 if(eta <fEtaMax) continue;164 if(eta > fEtaMax) continue; 165 165 166 166 fOutputArray->Add(candidate); -
modules/TauTagging.cc
r6ec8d18 rdd514ae 73 73 74 74 if(tau->D1 < 0) return -1; 75 76 if(tau->D2 < tau->D1) return -1; 75 77 76 78 if(tau->D1 >= fParticleInputArray->GetEntriesFast() || … … 201 203 tauArray = fFilter->GetSubArray(fClassifier, 0); 202 204 203 if(tauArray == 0) return;204 205 TIter itTauArray(tauArray);206 207 205 // loop over all input jets 208 206 fItJetInputArray->Reset(); … … 217 215 218 216 // loop over all input taus 219 itTauArray.Reset(); 220 while((tau = static_cast<Candidate *>(itTauArray.Next()))) 221 { 222 if(tau->D1 < 0) continue; 223 224 if(tau->D1 >= fParticleInputArray->GetEntriesFast() || 225 tau->D2 >= fParticleInputArray->GetEntriesFast()) 217 if(tauArray){ 218 TIter itTauArray(tauArray); 219 while((tau = static_cast<Candidate *>(itTauArray.Next()))) 226 220 { 227 throw runtime_error("tau's daughter index is greater than the ParticleInputArray size"); 228 } 229 230 tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0); 231 232 for(i = tau->D1; i <= tau->D2; ++i) 233 { 234 daughter = static_cast<Candidate *>(fParticleInputArray->At(i)); 235 if(TMath::Abs(daughter->PID) == 16) continue; 236 tauMomentum += daughter->Momentum; 237 } 238 239 if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR) 240 { 241 pdgCode = 15; 242 charge = tau->Charge; 221 if(tau->D1 < 0) continue; 222 223 if(tau->D1 >= fParticleInputArray->GetEntriesFast() || 224 tau->D2 >= fParticleInputArray->GetEntriesFast()) 225 { 226 throw runtime_error("tau's daughter index is greater than the ParticleInputArray size"); 227 } 228 229 tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0); 230 231 for(i = tau->D1; i <= tau->D2; ++i) 232 { 233 daughter = static_cast<Candidate *>(fParticleInputArray->At(i)); 234 if(TMath::Abs(daughter->PID) == 16) continue; 235 tauMomentum += daughter->Momentum; 236 } 237 238 if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR) 239 { 240 pdgCode = 15; 241 charge = tau->Charge; 242 } 243 243 } 244 244 }
Note:
See TracChangeset
for help on using the changeset viewer.