Changeset dd514ae in git
- 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. - Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r6ec8d18 rdd514ae 29 29 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH))) 30 30 endif 31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormats PatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon 32 32 endif 33 33 -
cards/delphes_card_FCC_basic.tcl
r6ec8d18 rdd514ae 226 226 set EFlowTowerOutputArray eflowPhotons 227 227 228 set IsEcal true 229 228 230 set EnergyMin 0.5 229 231 set EnergySignificanceMin 1.0 … … 290 292 set EFlowTowerOutputArray eflowNeutralHadrons 291 293 294 set IsEcal false 295 292 296 set EnergyMin 1.0 293 297 set EnergySignificanceMin 1.0 … … 431 435 432 436 module FastJetFinder FastJetFinder { 433 # set InputArray Calorimeter/towers437 # set InputArray TowerMerger/towers 434 438 set InputArray EFlowMerger/eflow 435 439 -
cards/delphes_card_LHCb.tcl
r6ec8d18 rdd514ae 223 223 set TowerOutputArray ecalTowers 224 224 set EFlowTowerOutputArray eflowPhotons 225 226 set IsEcal true 225 227 226 228 set EnergyMin 0.0 … … 303 305 set TowerOutputArray hcalTowers 304 306 set EFlowTowerOutputArray eflowNeutralHadrons 307 308 set IsEcal false 305 309 306 310 set EnergyMin 0.0 -
classes/DelphesClasses.cc
r6ec8d18 rdd514ae 45 45 //------------------------------------------------------------------------------ 46 46 47 TLorentzVector GenParticle::P4() 47 TLorentzVector GenParticle::P4() const 48 48 { 49 49 TLorentzVector vec; … … 54 54 //------------------------------------------------------------------------------ 55 55 56 TLorentzVector MissingET::P4() 56 TLorentzVector MissingET::P4() const 57 57 { 58 58 TLorentzVector vec; … … 63 63 //------------------------------------------------------------------------------ 64 64 65 TLorentzVector Photon::P4() 65 TLorentzVector Photon::P4() const 66 66 { 67 67 TLorentzVector vec; … … 72 72 //------------------------------------------------------------------------------ 73 73 74 TLorentzVector Electron::P4() 74 TLorentzVector Electron::P4() const 75 75 { 76 76 TLorentzVector vec; … … 81 81 //------------------------------------------------------------------------------ 82 82 83 TLorentzVector Muon::P4() 83 TLorentzVector Muon::P4() const 84 84 { 85 85 TLorentzVector vec; … … 90 90 //------------------------------------------------------------------------------ 91 91 92 TLorentzVector Jet::P4() 92 TLorentzVector Jet::P4() const 93 93 { 94 94 TLorentzVector vec; … … 99 99 //------------------------------------------------------------------------------ 100 100 101 TLorentzVector Track::P4() 101 TLorentzVector Track::P4() const 102 102 { 103 103 TLorentzVector vec; … … 108 108 //------------------------------------------------------------------------------ 109 109 110 TLorentzVector Tower::P4() 110 TLorentzVector Tower::P4() const 111 111 { 112 112 TLorentzVector vec; -
classes/DelphesClasses.h
r6ec8d18 rdd514ae 161 161 const CompBase *GetCompare() const { return fgCompare; } 162 162 163 TLorentzVector P4() ;163 TLorentzVector P4() const; 164 164 165 165 ClassDef(GenParticle, 1) … … 188 188 Float_t Phi; // mising energy azimuthal angle 189 189 190 TLorentzVector P4() ;190 TLorentzVector P4() const; 191 191 192 192 ClassDef(MissingET, 1) … … 254 254 const CompBase *GetCompare() const { return fgCompare; } 255 255 256 TLorentzVector P4() ;256 TLorentzVector P4() const; 257 257 258 258 ClassDef(Photon, 2) … … 289 289 const CompBase *GetCompare() const { return fgCompare; } 290 290 291 TLorentzVector P4() ;291 TLorentzVector P4() const; 292 292 293 293 ClassDef(Electron, 2) … … 322 322 const CompBase *GetCompare() const { return fgCompare; } 323 323 324 TLorentzVector P4() ;324 TLorentzVector P4() const; 325 325 326 326 ClassDef(Muon, 2) … … 419 419 const CompBase *GetCompare() const { return fgCompare; } 420 420 421 TLorentzVector P4() ;421 TLorentzVector P4() const; 422 422 423 423 ClassDef(Track, 2) … … 448 448 const CompBase *GetCompare() const { return fgCompare; } 449 449 450 TLorentzVector P4() ;450 TLorentzVector P4() const; 451 451 452 452 ClassDef(Tower, 1) -
display/Delphes3DGeometry.cc
r6ec8d18 rdd514ae 20 20 #include <set> 21 21 #include <map> 22 #include <string> 22 23 #include <utility> 23 24 #include <vector> … … 37 38 #include "classes/DelphesClasses.h" 38 39 #include "TF2.h" 40 #include "TFormula.h" 39 41 #include "TH1F.h" 40 42 #include "TMath.h" … … 90 92 tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100.; // tk_length 91 93 tk_Bz_ = confReader->GetDouble("ParticlePropagator::Bz", 0.0); // tk_Bz 92 94 95 string buffer; 96 const char *it; 97 98 93 99 { 94 100 TString tkEffFormula = confReader->GetString(Form("%s::EfficiencyFormula",TrackingEfficiency),"abs(eta)<3.0"); … … 96 102 tkEffFormula.ReplaceAll("eta","y"); 97 103 tkEffFormula.ReplaceAll("phi","0."); 98 TF2* tkEffFunction = new TF2("tkEff",tkEffFormula,0,1000,-10,10); 104 105 for(it = tkEffFormula.Data(); *it; ++it) 106 { 107 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue; 108 buffer.push_back(*it); 109 } 110 111 TF2* tkEffFunction = new TF2("tkEff",buffer.c_str(),0,1000,-10,10); 99 112 TH1F etaHisto("eta","eta",100,5.,-5.); 100 113 Double_t pt,eta; … … 118 131 muonEffFormula.ReplaceAll("eta","y"); 119 132 muonEffFormula.ReplaceAll("phi","0."); 120 TF2* muEffFunction = new TF2("muEff",muonEffFormula,0,1000,-10,10); 133 134 buffer.clear(); 135 for(it = muonEffFormula.Data(); *it; ++it) 136 { 137 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue; 138 buffer.push_back(*it); 139 } 140 141 TF2* muEffFunction = new TF2("muEff",buffer.c_str(),0,1000,-10,10); 121 142 TH1F etaHisto("eta2","eta2",100,5.,-5.); 122 143 Double_t pt,eta; -
display/DelphesBranchElement.cc
r6ec8d18 rdd514ae 155 155 trkProp->SetMaxR(tkRadius_); 156 156 trkProp->SetMaxZ(tkHalfLength_); 157 GenParticle *particle; 157 158 if(type=="Track") { // CASE 1: TRACKS 158 159 Track *track; … … 161 162 track->P4().Px(), track->P4().Py(), 162 163 track->P4().Pz(), track->P4().E(), 163 track->X , track->Y, track->Z,0.0);164 track->X/10.0, track->Y/10.0, track->Z/10.0, track->T/10.0); 164 165 eveTrack = new TEveTrack(&pb, counter, trkProp); 165 166 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 173 174 Electron *electron; 174 175 while((electron = (Electron *) itTrack.Next())) { 176 particle = (GenParticle*) electron->Particle.GetObject(); 175 177 TParticle pb(electron->Charge<0?11:-11, 1, 0, 0, 0, 0, 176 178 electron->P4().Px(), electron->P4().Py(), 177 179 electron->P4().Pz(), electron->P4().E(), 178 0., 0., 0., 0.);180 particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0); 179 181 eveTrack = new TEveTrack(&pb, counter, trkProp); 180 182 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 188 190 Muon *muon; 189 191 while((muon = (Muon *) itTrack.Next())) { 192 particle = (GenParticle*) muon->Particle.GetObject(); 190 193 TParticle pb(muon->Charge<0?13:-13, 1, 0, 0, 0, 0, 191 194 muon->P4().Px(), muon->P4().Py(), 192 195 muon->P4().Pz(), muon->P4().E(), 193 0., 0., 0., 0.);196 particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0); 194 197 eveTrack = new TEveTrack(&pb, counter, trkProp); 195 198 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 206 209 photon->P4().Px(), photon->P4().Py(), 207 210 photon->P4().Pz(), photon->P4().E(), 208 0. , 0., 0., 0.);211 0.0, 0.0, 0.0, 0.0); 209 212 eveTrack = new TEveTrack(&pb, counter, trkProp); 210 213 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 223 226 particle->P4().Px(), particle->P4().Py(), 224 227 particle->P4().Pz(), particle->P4().E(), 225 particle->X , particle->Y, particle->Z, particle->T);228 particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0); 226 229 eveTrack = new TEveTrack(&pb, counter, trkProp); 227 230 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); -
doc/genMakefile.tcl
r6ec8d18 rdd514ae 219 219 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH))) 220 220 endif 221 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormats PatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon221 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon 222 222 endif 223 223 -
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 } -
readers/DelphesCMSFWLite.cpp
r6ec8d18 rdd514ae 56 56 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 57 57 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" 58 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h" 59 #include "SimDataFormats/GeneratorProducts/interface/WeightsInfo.h" 58 60 59 61 using namespace std; … … 62 64 63 65 void ConvertInput(fwlite::Event &event, Long64_t eventCounter, 64 ExRootTreeBranch *branchEvent, DelphesFactory *factory,65 TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray,66 TObjArray * partonOutputArray)66 ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt, 67 DelphesFactory *factory, TObjArray *allParticleOutputArray, 68 TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray) 67 69 { 68 70 fwlite::Handle< GenEventInfoProduct > handleGenEventInfo; 69 71 72 fwlite::Handle< LHEEventProduct > handleLHEEvent; 73 70 74 fwlite::Handle< vector< reco::GenParticle > > handleParticle; 71 75 vector< reco::GenParticle >::const_iterator itParticle; … … 75 79 76 80 handleGenEventInfo.getByLabel(event, "generator"); 81 handleLHEEvent.getByLabel(event, "source"); 77 82 handleParticle.getByLabel(event, "genParticles"); 78 83 79 84 HepMCEvent *element; 85 Weight *weight; 80 86 Candidate *candidate; 81 87 TDatabasePDG *pdg; … … 86 92 Double_t px, py, pz, e, mass; 87 93 Double_t x, y, z; 94 95 const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights(); 96 vector< gen::WeightsInfo >::const_iterator itWeightsInfo; 88 97 89 98 element = static_cast<HepMCEvent *>(branchEvent->NewEntry()); … … 108 117 element->ReadTime = 0.0; 109 118 element->ProcTime = 0.0; 119 120 for(itWeightsInfo = vectorWeightsInfo.begin(); itWeightsInfo != vectorWeightsInfo.end(); ++itWeightsInfo) 121 { 122 weight = static_cast<Weight *>(branchRwgt->NewEntry()); 123 weight->Weight = itWeightsInfo->wgt; 124 } 110 125 111 126 pdg = TDatabasePDG::Instance(); … … 186 201 TStopwatch eventStopWatch; 187 202 ExRootTreeWriter *treeWriter = 0; 188 ExRootTreeBranch *branchEvent = 0 ;203 ExRootTreeBranch *branchEvent = 0, *branchRwgt = 0; 189 204 ExRootConfReader *confReader = 0; 190 205 Delphes *modularDelphes = 0; … … 226 241 227 242 branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class()); 243 branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class()); 228 244 229 245 confReader = new ExRootConfReader; … … 268 284 for(event.toBegin(); !event.atEnd() && !interrupted; ++event) 269 285 { 270 ConvertInput(event, eventCounter, branchEvent, factory,286 ConvertInput(event, eventCounter, branchEvent, branchRwgt, factory, 271 287 allParticleOutputArray, stableParticleOutputArray, partonOutputArray); 272 288 modularDelphes->ProcessTask();
Note:
See TracChangeset
for help on using the changeset viewer.