Changeset 9040259 in git for modules/JetFlavorAssociation.cc
- Timestamp:
- Jun 17, 2015, 4:36:20 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- a446115
- Parents:
- edf10ba
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.