- Timestamp:
- Jun 26, 2015, 3:13:55 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- f3c4047
- Parents:
- f53a4d2 (diff), fe0273c (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:
- classes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/ClassesLinkDef.h
rf53a4d2 r28027d5 46 46 #pragma link C++ class LHCOEvent+; 47 47 #pragma link C++ class LHEFEvent+; 48 #pragma link C++ class LHEFWeight+; 48 49 #pragma link C++ class HepMCEvent+; 49 50 #pragma link C++ class GenParticle+; -
classes/DelphesClasses.cc
rf53a4d2 r28027d5 120 120 PID(0), Status(0), M1(-1), M2(-1), D1(-1), D2(-1), 121 121 Charge(0), Mass(0.0), 122 IsPU(0), IsConstituent(0), 123 BTag(0), TauTag(0), Eem(0.0), Ehad(0.0), 122 IsPU(0), IsRecoPU(0), IsConstituent(0), 123 Flavor(0), FlavorAlgo(0), FlavorPhys(0), 124 BTag(0), BTagAlgo(0), BTagPhys(0), 125 TauTag(0), Eem(0.0), Ehad(0.0), 124 126 DeltaEta(0.0), DeltaPhi(0.0), 125 127 Momentum(0.0, 0.0, 0.0, 0.0), … … 129 131 NCharged(0), 130 132 NNeutrals(0), 133 NSubJetsTrimmed(0), 134 NSubJetsPruned(0), 135 NSubJetsSoftDropped(0), 131 136 Beta(0), 132 137 BetaStar(0), 133 138 MeanSqDeltaR(0), 134 139 PTD(0), 140 Ntimes(-1), 141 IsolationVar(-999), 142 IsolationVarRhoCorr(-999), 143 SumPtCharged(-999), 144 SumPtNeutral(-999), 145 SumPtChargedPU(-999), 146 SumPt(-999), 135 147 fFactory(0), 136 148 fArray(0) 137 149 { 150 int i; 138 151 Edges[0] = 0.0; 139 152 Edges[1] = 0.0; … … 150 163 Tau[3] = 0.0; 151 164 Tau[4] = 0.0; 165 for(i = 0; i < 5; ++i) 166 { 167 TrimmedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0); 168 PrunedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0); 169 SoftDroppedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0); 170 } 152 171 } 153 172 … … 224 243 object.IsPU = IsPU; 225 244 object.IsConstituent = IsConstituent; 245 object.Flavor = Flavor; 246 object.FlavorAlgo = FlavorAlgo; 247 object.FlavorPhys = FlavorPhys; 226 248 object.BTag = BTag; 249 object.BTagAlgo = BTagAlgo; 250 object.BTagPhys = BTagPhys; 227 251 object.TauTag = TauTag; 228 252 object.Eem = Eem; … … 249 273 object.MeanSqDeltaR = MeanSqDeltaR; 250 274 object.PTD = PTD; 275 object.Ntimes = Ntimes; 276 object.IsolationVar = IsolationVar; 277 object.IsolationVarRhoCorr = IsolationVarRhoCorr; 278 object.SumPtCharged = SumPtCharged; 279 object.SumPtNeutral = SumPtNeutral; 280 object.SumPtChargedPU = SumPtChargedPU; 281 object.SumPt = SumPt; 282 251 283 object.FracPt[0] = FracPt[0]; 252 284 object.FracPt[1] = FracPt[1]; … … 259 291 object.Tau[3] = Tau[3]; 260 292 object.Tau[4] = Tau[4]; 293 294 object.TrimmedP4[0] = TrimmedP4[0]; 295 object.TrimmedP4[1] = TrimmedP4[1]; 296 object.TrimmedP4[2] = TrimmedP4[2]; 297 object.TrimmedP4[3] = TrimmedP4[3]; 298 object.TrimmedP4[4] = TrimmedP4[4]; 299 object.PrunedP4[0] = PrunedP4[0]; 300 object.PrunedP4[1] = PrunedP4[1]; 301 object.PrunedP4[2] = PrunedP4[2]; 302 object.PrunedP4[3] = PrunedP4[3]; 303 object.PrunedP4[4] = PrunedP4[4]; 304 object.SoftDroppedP4[0] = SoftDroppedP4[0]; 305 object.SoftDroppedP4[1] = SoftDroppedP4[1]; 306 object.SoftDroppedP4[2] = SoftDroppedP4[2]; 307 object.SoftDroppedP4[3] = SoftDroppedP4[3]; 308 object.SoftDroppedP4[4] = SoftDroppedP4[4]; 309 310 object.NSubJetsTrimmed = NSubJetsTrimmed; 311 object.NSubJetsPruned = NSubJetsPruned; 312 object.NSubJetsSoftDropped = NSubJetsSoftDropped; 261 313 262 314 object.fFactory = fFactory; 263 315 object.fArray = 0; 316 317 // Copy cluster timing info 318 copy(Ecal_E_t.begin(),Ecal_E_t.end(),back_inserter(object.Ecal_E_t)); 264 319 265 320 if(fArray && fArray->GetEntriesFast() > 0) … … 278 333 void Candidate::Clear(Option_t* option) 279 334 { 335 int i; 280 336 SetUniqueID(0); 281 337 ResetBit(kIsReferenced); … … 287 343 IsPU = 0; 288 344 IsConstituent = 0; 345 Flavor = 0; 346 FlavorAlgo = 0; 347 FlavorPhys = 0; 289 348 BTag = 0; 349 BTagAlgo = 0; 350 BTagPhys = 0; 290 351 TauTag = 0; 291 352 Eem = 0.0; … … 311 372 MeanSqDeltaR = 0.0; 312 373 PTD = 0.0; 374 375 Ntimes = 0; 376 Ecal_E_t.clear(); 377 378 IsolationVar = -999; 379 IsolationVarRhoCorr = -999; 380 SumPtCharged = -999; 381 SumPtNeutral = -999; 382 SumPtChargedPU = -999; 383 SumPt = -999; 384 313 385 FracPt[0] = 0.0; 314 386 FracPt[1] = 0.0; … … 321 393 Tau[3] = 0.0; 322 394 Tau[4] = 0.0; 323 395 396 for(i = 0; i < 5; ++i) 397 { 398 TrimmedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0); 399 PrunedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0); 400 SoftDroppedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0); 401 } 402 403 NSubJetsTrimmed = 0; 404 NSubJetsPruned = 0; 405 NSubJetsSoftDropped = 0; 406 324 407 fArray = 0; 325 408 } -
classes/DelphesClasses.h
rf53a4d2 r28027d5 84 84 //--------------------------------------------------------------------------- 85 85 86 class LHEFWeight: public TObject 87 { 88 public: 89 Int_t ID; // weight ID 90 Float_t Weight; // weight value 91 92 ClassDef(LHEFWeight, 1) 93 }; 94 95 //--------------------------------------------------------------------------- 96 86 97 class HepMCEvent: public Event 87 98 { … … 231 242 TRefArray Particles; // references to generated particles 232 243 244 // Isolation variables 245 246 Float_t IsolationVar; 247 Float_t IsolationVarRhoCorr; 248 Float_t SumPtCharged; 249 Float_t SumPtNeutral; 250 Float_t SumPtChargedPU; 251 Float_t SumPt; 252 233 253 static CompBase *fgCompare; //! 234 254 const CompBase *GetCompare() const { return fgCompare; } … … 257 277 TRef Particle; // reference to generated particle 258 278 279 // Isolation variables 280 281 Float_t IsolationVar; 282 Float_t IsolationVarRhoCorr; 283 Float_t SumPtCharged; 284 Float_t SumPtNeutral; 285 Float_t SumPtChargedPU; 286 Float_t SumPt; 287 259 288 static CompBase *fgCompare; //! 260 289 const CompBase *GetCompare() const { return fgCompare; } … … 281 310 TRef Particle; // reference to generated particle 282 311 312 // Isolation variables 313 314 Float_t IsolationVar; 315 Float_t IsolationVarRhoCorr; 316 Float_t SumPtCharged; 317 Float_t SumPtNeutral; 318 Float_t SumPtChargedPU; 319 Float_t SumPt; 320 283 321 static CompBase *fgCompare; //! 284 322 const CompBase *GetCompare() const { return fgCompare; } … … 306 344 Float_t DeltaPhi; // jet radius in azimuthal angle 307 345 346 UInt_t Flavor; 347 UInt_t FlavorAlgo; 348 UInt_t FlavorPhys; 349 308 350 UInt_t BTag; // 0 or 1 for a jet that has been tagged as containing a heavy quark 351 UInt_t BTagAlgo; 352 UInt_t BTagPhys; 353 309 354 UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau 310 355 … … 313 358 Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter 314 359 315 Int_t NCharged; // number of charged constituents 316 Int_t NNeutrals; // number of neutral constituents 317 Float_t Beta; // (sum pt of charged pile-up constituents)/(sum pt of charged constituents) 318 Float_t BetaStar; // (sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents) 319 Float_t MeanSqDeltaR; // average distance (squared) between constituent and jet weighted by pt (squared) of constituent 320 Float_t PTD; // average pt between constituent and jet weighted by pt of constituent 321 Float_t FracPt[5]; // (sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents) 322 323 Float_t Tau1; // 1-subjettiness 324 Float_t Tau2; // 2-subjettiness 325 Float_t Tau3; // 3-subjettiness 326 Float_t Tau4; // 4-subjettiness 327 Float_t Tau5; // 5-subjettiness 360 Int_t NCharged; // number of charged constituents 361 Int_t NNeutrals; // number of neutral constituents 362 Float_t Beta; // (sum pt of charged pile-up constituents)/(sum pt of charged constituents) 363 Float_t BetaStar; // (sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents) 364 Float_t MeanSqDeltaR; // average distance (squared) between constituent and jet weighted by pt (squared) of constituent 365 Float_t PTD; // average pt between constituent and jet weighted by pt of constituent 366 Float_t FracPt[5]; // (sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents) 367 368 Float_t Tau[5]; // N-subjettiness 369 370 TLorentzVector TrimmedP4[5]; // first entry (i = 0) is the total Trimmed Jet 4-momenta and from i = 1 to 4 are the trimmed subjets 4-momenta 371 TLorentzVector PrunedP4[5]; // first entry (i = 0) is the total Pruned Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 372 TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 373 374 Int_t NSubJetsTrimmed; // number of subjets trimmed 375 Int_t NSubJetsPruned; // number of subjets pruned 376 Int_t NSubJetsSoftDropped; // number of subjets soft-dropped 328 377 329 378 TRefArray Constituents; // references to constituents … … 334 383 335 384 TLorentzVector P4() const; 336 337 ClassDef(Jet, 2) 385 TLorentzVector Area; 386 387 ClassDef(Jet, 3) 338 388 }; 339 389 … … 392 442 Float_t E; // calorimeter tower energy 393 443 394 Float_t T; //particle arrival time of flight 444 Float_t T; // ecal deposit time, averaged by sqrt(EM energy) over all particles, not smeared 445 Int_t Ntimes; // number of hits contributing to time measurement 395 446 396 447 Float_t Eem; // calorimeter tower electromagnetic energy … … 452 503 453 504 Int_t IsPU; 505 Int_t IsRecoPU; 506 454 507 Int_t IsConstituent; 455 508 509 UInt_t Flavor; 510 UInt_t FlavorAlgo; 511 UInt_t FlavorPhys; 512 456 513 UInt_t BTag; 514 UInt_t BTagAlgo; 515 UInt_t BTagPhys; 516 457 517 UInt_t TauTag; 458 518 … … 482 542 Float_t FracPt[5]; 483 543 544 //Timing information 545 546 Int_t Ntimes; 547 std::vector<std::pair<Float_t,Float_t> > Ecal_E_t; 548 549 // Isolation variables 550 551 Float_t IsolationVar; 552 Float_t IsolationVarRhoCorr; 553 Float_t SumPtCharged; 554 Float_t SumPtNeutral; 555 Float_t SumPtChargedPU; 556 Float_t SumPt; 557 484 558 // N-subjettiness variables 485 559 486 560 Float_t Tau[5]; 561 562 // Other Substructure variables 563 564 TLorentzVector TrimmedP4[5]; // first entry (i = 0) is the total Trimmed Jet 4-momenta and from i = 1 to 4 are the trimmed subjets 4-momenta 565 TLorentzVector PrunedP4[5]; // first entry (i = 0) is the total Pruned Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 566 TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 567 568 Int_t NSubJetsTrimmed; // number of subjets trimmed 569 Int_t NSubJetsPruned; // number of subjets pruned 570 Int_t NSubJetsSoftDropped; // number of subjets soft-dropped 571 487 572 488 573 static CompBase *fgCompare; //! … … 504 589 void SetFactory(DelphesFactory *factory) { fFactory = factory; } 505 590 506 ClassDef(Candidate, 2)591 ClassDef(Candidate, 3) 507 592 }; 508 593 -
classes/DelphesLHEFReader.cc
rf53a4d2 r28027d5 82 82 fEventCounter = -1; 83 83 fParticleCounter = -1; 84 f RwgtList.clear();84 fWeightList.clear(); 85 85 } 86 86 … … 99 99 TObjArray *partonOutputArray) 100 100 { 101 int rc ;101 int rc, id; 102 102 char *pch; 103 103 double weight; … … 158 158 else if(strstr(fBuffer, "<wgt")) 159 159 { 160 pch = str str(fBuffer, ">");160 pch = strpbrk(fBuffer, "\"'"); 161 161 if(!pch) 162 162 { … … 165 165 } 166 166 167 DelphesStream bufferStream(pch + 1); 168 rc = bufferStream.ReadDbl(weight); 167 DelphesStream idStream(pch + 1); 168 rc = idStream.ReadInt(id); 169 170 pch = strchr(fBuffer, '>'); 171 if(!pch) 172 { 173 cerr << "** ERROR: " << "invalid weight format" << endl; 174 return kFALSE; 175 } 176 177 DelphesStream weightStream(pch + 1); 178 rc = weightStream.ReadDbl(weight); 169 179 170 180 if(!rc) … … 174 184 } 175 185 176 f RwgtList.push_back(weight);186 fWeightList.push_back(make_pair(id, weight)); 177 187 } 178 188 else if(strstr(fBuffer, "</event>")) … … 206 216 //--------------------------------------------------------------------------- 207 217 208 void DelphesLHEFReader::AnalyzeRwgt(ExRootTreeBranch *branch) 209 { 210 Weight *element; 211 vector<double>::const_iterator itRwgtList; 212 213 for(itRwgtList = fRwgtList.begin(); itRwgtList != fRwgtList.end(); ++itRwgtList) 214 { 215 element = static_cast<Weight *>(branch->NewEntry()); 216 217 element->Weight = *itRwgtList; 218 void DelphesLHEFReader::AnalyzeWeight(ExRootTreeBranch *branch) 219 { 220 LHEFWeight *element; 221 vector< pair< int, double > >::const_iterator itWeightList; 222 223 for(itWeightList = fWeightList.begin(); itWeightList != fWeightList.end(); ++itWeightList) 224 { 225 element = static_cast<LHEFWeight *>(branch->NewEntry()); 226 227 element->ID = itWeightList->first; 228 element->Weight = itWeightList->second; 218 229 } 219 230 } -
classes/DelphesLHEFReader.h
rf53a4d2 r28027d5 31 31 32 32 #include <vector> 33 #include <utility> 33 34 34 35 class TObjArray; … … 58 59 TStopwatch *readStopWatch, TStopwatch *procStopWatch); 59 60 60 void Analyze Rwgt(ExRootTreeBranch *branch);61 void AnalyzeWeight(ExRootTreeBranch *branch); 61 62 62 63 private: … … 83 84 double fPx, fPy, fPz, fE, fMass; 84 85 85 std::vector< double> fRwgtList;86 std::vector< std::pair< int, double > > fWeightList; 86 87 }; 87 88
Note:
See TracChangeset
for help on using the changeset viewer.