Changeset 9040259 in git
- Timestamp:
- Jun 17, 2015, 4:36:20 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- a446115
- Parents:
- edf10ba
- Files:
-
- 2 added
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
Makefile
redf10ba r9040259 322 322 modules/UniqueObjectFinder.h \ 323 323 modules/TrackCountingBTagging.h \ 324 modules/BTaggingCMS.h \ 324 325 modules/BTagging.h \ 325 326 modules/TauTagging.h \ … … 339 340 modules/Hector.h \ 340 341 modules/RunPUPPI.h \ 341 modules/JetFlavo urAssociation.h \342 modules/JetFlavorAssociation.h \ 342 343 modules/ExampleModule.h 343 344 ModulesDict$(PcmSuf): \ … … 545 546 external/ExRootAnalysis/ExRootFilter.h \ 546 547 external/ExRootAnalysis/ExRootClassifier.h 548 tmp/modules/BTaggingCMS.$(ObjSuf): \ 549 modules/BTaggingCMS.$(SrcSuf) \ 550 modules/BTaggingCMS.h \ 551 classes/DelphesClasses.h \ 552 classes/DelphesFactory.h \ 553 classes/DelphesFormula.h \ 554 external/ExRootAnalysis/ExRootResult.h \ 555 external/ExRootAnalysis/ExRootFilter.h \ 556 external/ExRootAnalysis/ExRootClassifier.h 547 557 tmp/modules/Calorimeter.$(ObjSuf): \ 548 558 modules/Calorimeter.$(SrcSuf) \ … … 658 668 external/ExRootAnalysis/ExRootFilter.h \ 659 669 external/ExRootAnalysis/ExRootClassifier.h 660 tmp/modules/JetFlavo urAssociation.$(ObjSuf): \661 modules/JetFlavo urAssociation.$(SrcSuf) \662 modules/JetFlavo urAssociation.h \670 tmp/modules/JetFlavorAssociation.$(ObjSuf): \ 671 modules/JetFlavorAssociation.$(SrcSuf) \ 672 modules/JetFlavorAssociation.h \ 663 673 classes/DelphesClasses.h \ 664 674 classes/DelphesFactory.h \ … … 897 907 tmp/modules/AngularSmearing.$(ObjSuf) \ 898 908 tmp/modules/BTagging.$(ObjSuf) \ 909 tmp/modules/BTaggingCMS.$(ObjSuf) \ 899 910 tmp/modules/Calorimeter.$(ObjSuf) \ 900 911 tmp/modules/Cloner.$(ObjSuf) \ … … 909 920 tmp/modules/ImpactParameterSmearing.$(ObjSuf) \ 910 921 tmp/modules/Isolation.$(ObjSuf) \ 911 tmp/modules/JetFlavo urAssociation.$(ObjSuf) \922 tmp/modules/JetFlavorAssociation.$(ObjSuf) \ 912 923 tmp/modules/JetPileUpSubtractor.$(ObjSuf) \ 913 924 tmp/modules/LeptonDressing.$(ObjSuf) \ … … 1762 1773 @touch $@ 1763 1774 1764 modules/ JetFlavourAssociation.h: \1775 modules/BTaggingCMS.h: \ 1765 1776 classes/DelphesModule.h \ 1766 1777 classes/DelphesClasses.h … … 1779 1790 external/fastjet/ClusterSequenceAreaBase.hh \ 1780 1791 external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh 1792 @touch $@ 1793 1794 modules/JetFlavorAssociation.h: \ 1795 classes/DelphesModule.h \ 1796 classes/DelphesClasses.h 1781 1797 @touch $@ 1782 1798 -
modules/JetFlavorAssociation.cc
redf10ba r9040259 18 18 19 19 20 /** \class JetFlavo urAssociation20 /** \class JetFlavorAssociation 21 21 * 22 22 * Find origin of jet && evaluate jet flavor … … 26 26 */ 27 27 28 #include "modules/JetFlavo urAssociation.h"28 #include "modules/JetFlavorAssociation.h" 29 29 30 30 #include "classes/DelphesClasses.h" … … 117 117 //------------------------------------------------------------------------------ 118 118 119 JetFlavo urAssociation::JetFlavourAssociation() :119 JetFlavorAssociation::JetFlavorAssociation() : 120 120 fClassifier(0), fFilter(0), 121 121 fItPartonInputArray(0), fItPartonInputArrayLHEF(0), 122 122 fItJetInputArray(0), fItParticleInputArray(0) 123 123 { 124 fClassifier 124 fClassifier = new PartonClassifier; 125 125 fClassifierLHEF = new PartonClassifierLHEF; 126 126 } … … 128 128 //------------------------------------------------------------------------------ 129 129 130 JetFlavo urAssociation::~JetFlavourAssociation()130 JetFlavorAssociation::~JetFlavorAssociation() 131 131 { 132 132 if(fClassifier) delete fClassifier; … … 136 136 //------------------------------------------------------------------------------ 137 137 138 void JetFlavo urAssociation::Init()138 void JetFlavorAssociation::Init() 139 139 { 140 140 ExRootConfParam param; … … 168 168 //------------------------------------------------------------------------------ 169 169 170 void JetFlavo urAssociation::Finish()170 void JetFlavorAssociation::Finish() 171 171 { 172 172 if(fFilter) delete fFilter; … … 181 181 //------------------------------------------------------------------------------ 182 182 183 void JetFlavo urAssociation::Process(){183 void JetFlavorAssociation::Process(){ 184 184 185 185 Candidate *jet; … … 205 205 { 206 206 // get standard flavor 207 GetAlgoFlavo ur(jet, itPartonArray, itPartonLHEFArray);208 GetPhysicsFlavo ur(jet, itPartonArray, itPartonLHEFArray);207 GetAlgoFlavor(jet, itPartonArray, itPartonLHEFArray); 208 GetPhysicsFlavor(jet, itPartonArray, itPartonLHEFArray); 209 209 } 210 210 } … … 214 214 // https://cmssdt.cern.ch/SDT/lxr/source/PhysicsTools/JetMCAlgos/plugins/JetPartonMatcher.cc?v=CMSSW_7_3_0_pre1 215 215 216 void JetFlavo urAssociation::GetAlgoFlavour(Candidate *jet, TIter &itPartonArray, TIter &itPartonLHEFArray)216 void JetFlavorAssociation::GetAlgoFlavor(Candidate *jet, TIter &itPartonArray, TIter &itPartonLHEFArray) 217 217 { 218 218 float maxPt = 0; … … 254 254 { 255 255 // partons are only quarks || gluons 256 int daughterFlavo ur1 = -1;257 int daughterFlavo ur2 = -1;258 if(parton->D1 != -1) daughterFlavo ur1 = TMath::Abs(static_cast<Candidate *>(fParticleInputArray->At(parton->D1))->PID);259 if(parton->D2 != -1) daughterFlavo ur2 = TMath::Abs(static_cast<Candidate *>(fParticleInputArray->At(parton->D2))->PID);260 if((daughterFlavo ur1 == 1 || daughterFlavour1 == 2 || daughterFlavour1 == 3 || daughterFlavour1 == 4 || daughterFlavour1 == 5 || daughterFlavour1 == 21)) daughterCounter++;261 if((daughterFlavo ur2 == 1 || daughterFlavour2 == 2 || daughterFlavour2 == 3 || daughterFlavour2 == 4 || daughterFlavour1 == 5 || daughterFlavour2 == 21)) daughterCounter++;256 int daughterFlavor1 = -1; 257 int daughterFlavor2 = -1; 258 if(parton->D1 != -1) daughterFlavor1 = TMath::Abs(static_cast<Candidate *>(fParticleInputArray->At(parton->D1))->PID); 259 if(parton->D2 != -1) daughterFlavor2 = TMath::Abs(static_cast<Candidate *>(fParticleInputArray->At(parton->D2))->PID); 260 if((daughterFlavor1 == 1 || daughterFlavor1 == 2 || daughterFlavor1 == 3 || daughterFlavor1 == 4 || daughterFlavor1 == 5 || daughterFlavor1 == 21)) daughterCounter++; 261 if((daughterFlavor2 == 1 || daughterFlavor2 == 2 || daughterFlavor2 == 3 || daughterFlavor2 == 4 || daughterFlavor1 == 5 || daughterFlavor2 == 21)) daughterCounter++; 262 262 } 263 263 if(daughterCounter > 0) continue; … … 296 296 //------------------------------------------------------------------------------ 297 297 298 void JetFlavo urAssociation::GetPhysicsFlavour(Candidate *jet, TIter &itPartonArray, TIter &itPartonLHEFArray)298 void JetFlavorAssociation::GetPhysicsFlavor(Candidate *jet, TIter &itPartonArray, TIter &itPartonLHEFArray) 299 299 { 300 300 float minDr = 1000; … … 303 303 float dist; 304 304 bool isGoodCandidate; 305 int contaminatingFlavo ur = 0;305 int contaminatingFlavor = 0; 306 306 int motherCounter = 0; 307 307 Candidate *parton, *partonLHEF, *mother1, *mother2; … … 372 372 { 373 373 parton = *itContaminations; 374 contaminatingFlavo ur = TMath::Abs(parton->PID);374 contaminatingFlavor = TMath::Abs(parton->PID); 375 375 motherCounter = 0; 376 376 if(parton->M1 != -1) motherCounter++; … … 391 391 { 392 392 // keep association --> the initialParton is a c --> the contaminated parton is a c 393 if(contaminatingFlavo ur == 4) continue;393 if(contaminatingFlavor == 4) continue; 394 394 jet->FlavorPhysics = 0; // all the other cases reject! 395 395 break; -
modules/JetFlavorAssociation.h
redf10ba r9040259 17 17 */ 18 18 19 #ifndef JetFlavo urAssociation_h20 #define JetFlavo urAssociation_h19 #ifndef JetFlavorAssociation_h 20 #define JetFlavorAssociation_h 21 21 22 /** \class JetFlavo urAssociation22 /** \class JetFlavorAssociation 23 23 * 24 * Find origin of jet and evaluate jet flavo ur24 * Find origin of jet and evaluate jet flavor 25 25 * 26 26 * \author P. Demin - UCL, Louvain-la-Neuve … … 39 39 class PartonClassifierLHEF; 40 40 41 class JetFlavo urAssociation: public DelphesModule41 class JetFlavorAssociation: public DelphesModule 42 42 { 43 43 public: 44 44 45 JetFlavo urAssociation();46 ~JetFlavo urAssociation();45 JetFlavorAssociation(); 46 ~JetFlavorAssociation(); 47 47 48 48 void Init(); … … 50 50 void Finish(); 51 51 52 void GetAlgoFlavo ur(Candidate *jet, TIter &itPartonArray, TIter &itPartonArrayLHEF);53 void GetPhysicsFlavo ur(Candidate *jet, TIter &itPartonArray, TIter &itPartonArrayLHEF);52 void GetAlgoFlavor(Candidate *jet, TIter &itPartonArray, TIter &itPartonArrayLHEF); 53 void GetPhysicsFlavor(Candidate *jet, TIter &itPartonArray, TIter &itPartonArrayLHEF); 54 54 55 55 private: … … 73 73 const TObjArray *fParticleInputArray; //! 74 74 75 ClassDef(JetFlavo urAssociation, 1)75 ClassDef(JetFlavorAssociation, 1) 76 76 }; 77 77 -
modules/ModulesLinkDef.h
redf10ba r9040259 42 42 #include "modules/UniqueObjectFinder.h" 43 43 #include "modules/TrackCountingBTagging.h" 44 #include "modules/BTaggingCMS.h" 44 45 #include "modules/BTagging.h" 45 46 #include "modules/TauTagging.h" … … 59 60 #include "modules/Hector.h" 60 61 #include "modules/RunPUPPI.h" 61 #include "modules/JetFlavo urAssociation.h"62 #include "modules/JetFlavorAssociation.h" 62 63 #include "modules/ExampleModule.h" 63 64 … … 84 85 #pragma link C++ class UniqueObjectFinder+; 85 86 #pragma link C++ class TrackCountingBTagging+; 87 #pragma link C++ class BTaggingCMS+; 86 88 #pragma link C++ class BTagging+; 87 89 #pragma link C++ class TauTagging+; … … 101 103 #pragma link C++ class Hector+; 102 104 #pragma link C++ class RunPUPPI+; 103 #pragma link C++ class JetFlavo urAssociation+;105 #pragma link C++ class JetFlavorAssociation+; 104 106 #pragma link C++ class ExampleModule+; 105 107 -
modules/TreeWriter.cc
redf10ba r9040259 291 291 entry->ZOuter = position.Z(); 292 292 entry->TOuter = position.T()*1.0E-3/c_light; 293 293 294 294 entry->Dxy = candidate->Dxy; 295 295 entry->SDxy = candidate->SDxy ; … … 297 297 entry->Yd = candidate->Yd; 298 298 entry->Zd = candidate->Zd; 299 299 300 300 const TLorentzVector &momentum = candidate->Momentum; 301 301 … … 362 362 363 363 entry->T = position.T()*1.0E-3/c_light; 364 entry->Ntimes = candidate->Ntimes; 364 entry->Ntimes = candidate->Ntimes; 365 365 366 366 FillParticles(candidate, &entry->Particles); … … 405 405 406 406 // Isolation variables 407 407 408 408 entry->IsolationVar = candidate->IsolationVar; 409 409 entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ; … … 453 453 454 454 // Isolation variables 455 455 456 456 entry->IsolationVar = candidate->IsolationVar; 457 457 entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ; … … 507 507 508 508 entry->T = position.T()*1.0E-3/c_light; 509 509 510 510 // Isolation variables 511 511 512 512 entry->IsolationVar = candidate->IsolationVar; 513 513 entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ; … … 568 568 569 569 entry->BTag = candidate->BTag; 570 571 entry->BTagAlgo = candidate->BTagAlgo; 572 entry->BTagDefault = candidate->BTagDefault; 573 entry->BTagPhysics = candidate->BTagPhysics; 574 entry->BTagNearest2 = candidate->BTagNearest2; 575 entry->BTagNearest3 = candidate->BTagNearest3; 576 entry->BTagHeaviest = candidate->BTagHeaviest; 577 entry->BTagHighestPt = candidate->BTagHighestPt; 578 579 entry->FlavorAlgo = candidate->FlavorAlgo; 580 entry->FlavorDefault = candidate->FlavorDefault; 581 entry->FlavorPhysics = candidate->FlavorPhysics; 582 entry->FlavorNearest2 = candidate->FlavorNearest2; 583 entry->FlavorNearest3 = candidate->FlavorNearest3; 584 entry->FlavorHeaviest = candidate->FlavorHeaviest; 585 entry->FlavorHighestPt = candidate->FlavorHighestPt; 586 570 587 entry->TauTag = candidate->TauTag; 571 588 … … 593 610 entry->MeanSqDeltaR = candidate->MeanSqDeltaR; 594 611 entry->PTD = candidate->PTD; 595 612 596 613 //--- Sub-structure variables ---- 597 598 entry->NSubJetsTrimmed 599 entry->NSubJetsPruned = candidate->NSubJetsPruned;614 615 entry->NSubJetsTrimmed = candidate->NSubJetsTrimmed; 616 entry->NSubJetsPruned = candidate->NSubJetsPruned; 600 617 entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped; 601 618 602 619 for(i = 0; i < 5; i++) 603 620 { 604 entry->FracPt[i] 605 entry->Tau[i] 606 entry->TrimmedP4[i] 607 entry->PrunedP4[i] 621 entry->FracPt[i] = candidate -> FracPt[i]; 622 entry->Tau[i] = candidate -> Tau[i]; 623 entry->TrimmedP4[i] = candidate -> TrimmedP4[i]; 624 entry->PrunedP4[i] = candidate -> PrunedP4[i]; 608 625 entry->SoftDroppedP4[i] = candidate -> SoftDroppedP4[i]; 609 626 } 610 627 611 628 FillParticles(candidate, &entry->Particles); 612 629 }
Note:
See TracChangeset
for help on using the changeset viewer.