Changeset fe0273c in git
- Timestamp:
- Jun 26, 2015, 12:08:48 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 28027d5
- Parents:
- d38348d
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rd38348d rfe0273c 322 322 modules/UniqueObjectFinder.h \ 323 323 modules/TrackCountingBTagging.h \ 324 modules/BTaggingCMS.h \325 324 modules/BTagging.h \ 326 325 modules/TauTagging.h \ … … 546 545 external/ExRootAnalysis/ExRootFilter.h \ 547 546 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.h557 547 tmp/modules/Calorimeter.$(ObjSuf): \ 558 548 modules/Calorimeter.$(SrcSuf) \ … … 907 897 tmp/modules/AngularSmearing.$(ObjSuf) \ 908 898 tmp/modules/BTagging.$(ObjSuf) \ 909 tmp/modules/BTaggingCMS.$(ObjSuf) \910 899 tmp/modules/Calorimeter.$(ObjSuf) \ 911 900 tmp/modules/Cloner.$(ObjSuf) \ … … 1396 1385 display/Delphes3DGeometry.$(SrcSuf) \ 1397 1386 display/Delphes3DGeometry.h \ 1398 external/ExRootAnalysis/ExRootConfReader.h \1399 classes/DelphesClasses.h1387 classes/DelphesClasses.h \ 1388 external/ExRootAnalysis/ExRootConfReader.h 1400 1389 tmp/display/DelphesBranchElement.$(ObjSuf): \ 1401 1390 display/DelphesBranchElement.$(SrcSuf) \ … … 1410 1399 tmp/display/DelphesEventDisplay.$(ObjSuf): \ 1411 1400 display/DelphesEventDisplay.$(SrcSuf) \ 1412 external/ExRootAnalysis/ExRootConfReader.h \1413 external/ExRootAnalysis/ExRootTreeReader.h \1414 1401 display/DelphesCaloData.h \ 1415 1402 display/DelphesBranchElement.h \ 1416 1403 display/Delphes3DGeometry.h \ 1417 1404 display/DelphesEventDisplay.h \ 1418 classes/DelphesClasses.h 1405 display/DelphesDisplay.h \ 1406 display/Delphes3DGeometry.h \ 1407 display/DelphesHtmlSummary.h \ 1408 display/DelphesPlotSummary.h \ 1409 classes/DelphesClasses.h \ 1410 external/ExRootAnalysis/ExRootConfReader.h \ 1411 external/ExRootAnalysis/ExRootTreeReader.h 1419 1412 tmp/display/DelphesHtmlSummary.$(ObjSuf): \ 1420 1413 display/DelphesHtmlSummary.$(SrcSuf) \ … … 1737 1730 @touch $@ 1738 1731 1739 display/DelphesEventDisplay.h: \1740 external/ExRootAnalysis/ExRootTreeReader.h \1741 display/DelphesDisplay.h \1742 display/Delphes3DGeometry.h \1743 display/DelphesHtmlSummary.h \1744 display/DelphesPlotSummary.h1745 @touch $@1746 1747 1732 modules/TauTagging.h: \ 1748 1733 classes/DelphesModule.h \ … … 1771 1756 modules/UniqueObjectFinder.h: \ 1772 1757 classes/DelphesModule.h 1773 @touch $@1774 1775 modules/BTaggingCMS.h: \1776 classes/DelphesModule.h \1777 classes/DelphesClasses.h1778 1758 @touch $@ 1779 1759 -
classes/DelphesClasses.cc
rd38348d rfe0273c 121 121 Charge(0), Mass(0.0), 122 122 IsPU(0), IsRecoPU(0), IsConstituent(0), 123 BTag(0), BTagAlgo(0), BTagDefault(0), BTagPhysics(0), BTagNearest2(0), BTagNearest3(0), BTagHeaviest(0), BTagHighestPt(0),124 FlavorAlgo(0), FlavorDefault(0), FlavorPhysics(0), FlavorNearest2(0), FlavorNearest3(0), FlavorHeaviest(0), FlavorHighestPt(0),123 Flavor(0), FlavorAlgo(0), FlavorPhys(0), 124 BTag(0), BTagAlgo(0), BTagPhys(0), 125 125 TauTag(0), Eem(0.0), Ehad(0.0), 126 126 DeltaEta(0.0), DeltaPhi(0.0), … … 243 243 object.IsPU = IsPU; 244 244 object.IsConstituent = IsConstituent; 245 object.Flavor = Flavor; 246 object.FlavorAlgo = FlavorAlgo; 247 object.FlavorPhys = FlavorPhys; 245 248 object.BTag = BTag; 246 249 object.BTagAlgo = BTagAlgo; 247 object.BTagDefault = BTagDefault; 248 object.BTagPhysics = BTagPhysics; 249 object.BTagNearest2 = BTagNearest2; 250 object.BTagNearest3 = BTagNearest3; 251 object.BTagHeaviest = BTagHeaviest; 252 object.BTagHighestPt = BTagHighestPt; 253 object.FlavorAlgo = FlavorAlgo; 254 object.FlavorDefault = FlavorDefault; 255 object.FlavorPhysics = FlavorPhysics; 256 object.FlavorNearest2 = FlavorNearest2; 257 object.FlavorNearest3 = FlavorNearest3; 258 object.FlavorHeaviest = FlavorHeaviest; 259 object.FlavorHighestPt = FlavorHighestPt; 250 object.BTagPhys = BTagPhys; 260 251 object.TauTag = TauTag; 261 252 object.Eem = Eem; … … 352 343 IsPU = 0; 353 344 IsConstituent = 0; 345 Flavor = 0; 346 FlavorAlgo = 0; 347 FlavorPhys = 0; 354 348 BTag = 0; 355 349 BTagAlgo = 0; 356 BTagDefault = 0; 357 BTagPhysics = 0; 358 BTagNearest2 = 0; 359 BTagNearest3 = 0; 360 BTagHeaviest = 0; 361 BTagHighestPt = 0; 362 FlavorAlgo = 0; 363 FlavorDefault = 0; 364 FlavorPhysics = 0; 365 FlavorNearest2 = 0; 366 FlavorNearest3 = 0; 367 FlavorHeaviest = 0; 368 FlavorHighestPt = 0; 350 BTagPhys = 0; 369 351 TauTag = 0; 370 352 Eem = 0.0; -
classes/DelphesClasses.h
rd38348d rfe0273c 344 344 Float_t DeltaPhi; // jet radius in azimuthal angle 345 345 346 UInt_t Flavor; 347 UInt_t FlavorAlgo; 348 UInt_t FlavorPhys; 349 346 350 UInt_t BTag; // 0 or 1 for a jet that has been tagged as containing a heavy quark 347 348 351 UInt_t BTagAlgo; 349 UInt_t BTagDefault; 350 UInt_t BTagPhysics; 351 UInt_t BTagNearest2; 352 UInt_t BTagNearest3; 353 UInt_t BTagHeaviest; 354 UInt_t BTagHighestPt; 355 356 UInt_t FlavorAlgo; 357 UInt_t FlavorDefault; 358 UInt_t FlavorPhysics; 359 UInt_t FlavorNearest2; 360 UInt_t FlavorNearest3; 361 UInt_t FlavorHeaviest; 362 UInt_t FlavorHighestPt; 352 UInt_t BTagPhys; 363 353 364 354 UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau … … 517 507 Int_t IsConstituent; 518 508 509 UInt_t Flavor; 510 UInt_t FlavorAlgo; 511 UInt_t FlavorPhys; 512 519 513 UInt_t BTag; 520 521 514 UInt_t BTagAlgo; 522 UInt_t BTagDefault; 523 UInt_t BTagPhysics; 524 UInt_t BTagNearest2; 525 UInt_t BTagNearest3; 526 UInt_t BTagHeaviest; 527 UInt_t BTagHighestPt; 528 529 UInt_t FlavorAlgo; 530 UInt_t FlavorDefault; 531 UInt_t FlavorPhysics; 532 UInt_t FlavorNearest2; 533 UInt_t FlavorNearest3; 534 UInt_t FlavorHeaviest; 535 UInt_t FlavorHighestPt; 515 UInt_t BTagPhys; 536 516 537 517 UInt_t TauTag; -
modules/BTagging.cc
rd38348d rfe0273c 22 22 * Determines origin of jet, 23 23 * applies b-tagging efficiency (miss identification rate) formulas 24 * and sets b-tagging flags 24 * and sets b-tagging flags 25 25 * 26 26 * \author P. Demin - UCL, Louvain-la-Neuve … … 46 46 #include "TLorentzVector.h" 47 47 48 #include <algorithm> 48 #include <algorithm> 49 49 #include <stdexcept> 50 50 #include <iostream> … … 62 62 63 63 Int_t GetCategory(TObject *object); 64 64 65 65 Double_t fEtaMax, fPTMin; 66 66 }; … … 75 75 76 76 if(momentum.Pt() <= fPTMin || TMath::Abs(momentum.Eta()) > fEtaMax) return -1; 77 77 78 78 pdgCode = TMath::Abs(parton->PID); 79 79 if(pdgCode != 21 && pdgCode > 5) return -1; … … 117 117 param = GetParam("EfficiencyFormula"); 118 118 size = param.GetSize(); 119 119 120 120 fEfficiencyMap.clear(); 121 121 for(i = 0; i < size/2; ++i) … … 143 143 144 144 fFilter = new ExRootFilter(fPartonInputArray); 145 145 146 146 fJetInputArray = ImportArray(GetString("JetInputArray", "FastJetFinder/jets")); 147 147 fItJetInputArray = fJetInputArray->MakeIterator(); … … 170 170 void BTagging::Process() 171 171 { 172 Candidate *jet , *parton;172 Candidate *jet; 173 173 Double_t pt, eta, phi, e; 174 174 TObjArray *partonArray; 175 175 map< Int_t, DelphesFormula * >::iterator itEfficiencyMap; 176 176 DelphesFormula *formula; 177 Int_t pdgCode, pdgCodeMax;178 177 179 178 // select quark and gluons 180 179 fFilter->Reset(); 181 180 partonArray = fFilter->GetSubArray(fClassifier, 0); 182 181 183 182 if(partonArray == 0) return; 184 183 185 184 TIter itPartonArray(partonArray); 186 185 187 186 // loop over all input jets 188 187 fItJetInputArray->Reset(); … … 190 189 { 191 190 const TLorentzVector &jetMomentum = jet->Momentum; 192 pdgCodeMax = -1;193 191 eta = jetMomentum.Eta(); 194 192 phi = jetMomentum.Phi(); 195 193 pt = jetMomentum.Pt(); 196 194 e = jetMomentum.E(); 197 198 // loop over all input partons199 itPartonArray.Reset();200 while((parton = static_cast<Candidate*>(itPartonArray.Next())))201 {202 pdgCode = TMath::Abs(parton->PID);203 if(pdgCode == 21) pdgCode = 0;204 if(jetMomentum.DeltaR(parton->Momentum) <= fDeltaR)205 {206 if(pdgCodeMax < pdgCode) pdgCodeMax = pdgCode;207 }208 }209 if(pdgCodeMax == 0) pdgCodeMax = 21;210 if(pdgCodeMax == -1) pdgCodeMax = 0;211 195 212 196 // find an efficency formula 213 itEfficiencyMap = fEfficiencyMap.find( pdgCodeMax);197 itEfficiencyMap = fEfficiencyMap.find(jet->Flavor); 214 198 if(itEfficiencyMap == fEfficiencyMap.end()) 215 199 { … … 220 204 // apply an efficency formula 221 205 jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber; 222 } 223 } 224 225 //------------------------------------------------------------------------------ 206 207 // find an efficency formula for algo flavor definition 208 itEfficiencyMap = fEfficiencyMap.find(jet->FlavorAlgo); 209 if(itEfficiencyMap == fEfficiencyMap.end()) 210 { 211 itEfficiencyMap = fEfficiencyMap.find(0); 212 } 213 formula = itEfficiencyMap->second; 214 215 // apply an efficency formula 216 jet->BTagAlgo |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber; 217 218 // find an efficency formula for phys flavor definition 219 itEfficiencyMap = fEfficiencyMap.find(jet->FlavorPhys); 220 if(itEfficiencyMap == fEfficiencyMap.end()) 221 { 222 itEfficiencyMap = fEfficiencyMap.find(0); 223 } 224 formula = itEfficiencyMap->second; 225 226 // apply an efficency formula 227 jet->BTagPhys |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber; 228 } 229 } 230 231 //------------------------------------------------------------------------------ -
modules/JetFlavorAssociation.cc
rd38348d rfe0273c 216 216 { 217 217 float maxPt = 0; 218 float minDr = 1000;219 218 bool isGoodParton = true; 220 219 int daughterCounter = 0; 221 220 Candidate *parton, *partonLHEF; 222 Candidate *tempParton = 0, *tempParton Nearest = 0, *tempPartonHighestPt = 0;221 Candidate *tempParton = 0, *tempPartonHighestPt = 0; 223 222 int pdgCode, pdgCodeMax = -1; 224 223 … … 263 262 if(jet->Momentum.DeltaR(parton->Momentum) <= fDeltaR) 264 263 { 265 if(jet->Momentum.DeltaR(parton->Momentum) < minDr)266 {267 minDr = jet->Momentum.DeltaR(parton->Momentum);268 tempPartonNearest = parton;269 }270 271 264 // if not yet found && pdgId is a c, take as c 272 265 if(TMath::Abs(parton->PID) == 4) tempParton = parton; … … 281 274 } 282 275 283 jet->FlavorHeaviest = tempParton ? TMath::Abs(tempParton->PID) : 0;284 jet->FlavorHighestPt = tempPartonHighestPt ? TMath::Abs(tempPartonHighestPt->PID) : 0;285 jet->FlavorNearest2 = tempPartonNearest ? TMath::Abs(tempPartonNearest->PID) : 0;286 276 if(!tempParton) tempParton = tempPartonHighestPt; 287 277 jet->FlavorAlgo = tempParton ? TMath::Abs(tempParton->PID) : 0; … … 290 280 if(pdgCodeMax == -1) pdgCodeMax = 0; 291 281 292 jet->Flavor Default= pdgCodeMax;282 jet->Flavor = pdgCodeMax; 293 283 } 294 284 … … 297 287 void JetFlavorAssociation::GetPhysicsFlavor(Candidate *jet, TIter &itPartonArray, TIter &itPartonLHEFArray) 298 288 { 299 float minDr = 1000;300 289 int partonCounter = 0; 301 290 float biggerConeSize = 0.7; … … 305 294 int motherCounter = 0; 306 295 Candidate *parton, *partonLHEF, *mother1, *mother2; 307 Candidate *tempParton = 0 , *tempPartonNearest = 0;296 Candidate *tempParton = 0; 308 297 vector<Candidate *> contaminations; 309 298 vector<Candidate *>::iterator itContaminations; … … 315 304 { 316 305 dist = jet->Momentum.DeltaR(partonLHEF->Momentum); // take the DR 317 if(partonLHEF->Status == 1 && dist < minDr)318 {319 tempPartonNearest = partonLHEF;320 minDr = dist;321 }322 306 323 307 if(partonLHEF->Status == 1 && dist <= fDeltaR) … … 354 338 } 355 339 356 jet->FlavorNearest3 = tempPartonNearest ? TMath::Abs(tempPartonNearest->PID) : 0;357 358 340 if(partonCounter != 1) 359 341 { 360 jet->FlavorPhys ics= 0;342 jet->FlavorPhys = 0; 361 343 } 362 344 else if(contaminations.size() == 0) 363 345 { 364 jet->FlavorPhys ics= TMath::Abs(tempParton->PID);346 jet->FlavorPhys = TMath::Abs(tempParton->PID); 365 347 } 366 348 else if(contaminations.size() > 0) 367 349 { 368 jet->FlavorPhys ics= TMath::Abs(tempParton->PID);350 jet->FlavorPhys = TMath::Abs(tempParton->PID); 369 351 370 352 for(itContaminations = contaminations.begin(); itContaminations != contaminations.end(); ++itContaminations) … … 391 373 // keep association --> the initialParton is a c --> the contaminated parton is a c 392 374 if(contaminatingFlavor == 4) continue; 393 jet->FlavorPhys ics= 0; // all the other cases reject!375 jet->FlavorPhys = 0; // all the other cases reject! 394 376 break; 395 377 } -
modules/ModulesLinkDef.h
rd38348d rfe0273c 42 42 #include "modules/UniqueObjectFinder.h" 43 43 #include "modules/TrackCountingBTagging.h" 44 #include "modules/BTaggingCMS.h"45 44 #include "modules/BTagging.h" 46 45 #include "modules/TauTagging.h" … … 85 84 #pragma link C++ class UniqueObjectFinder+; 86 85 #pragma link C++ class TrackCountingBTagging+; 87 #pragma link C++ class BTaggingCMS+;88 86 #pragma link C++ class BTagging+; 89 87 #pragma link C++ class TauTagging+; -
modules/TreeWriter.cc
rd38348d rfe0273c 490 490 const TLorentzVector &position = candidate->Position; 491 491 492 493 492 pt = momentum.Pt(); 494 493 cosTheta = TMath::Abs(momentum.CosTheta()); … … 567 566 entry->DeltaPhi = candidate->DeltaPhi; 568 567 568 entry->Flavor = candidate->Flavor; 569 entry->FlavorAlgo = candidate->FlavorAlgo; 570 entry->FlavorPhys = candidate->FlavorPhys; 571 569 572 entry->BTag = candidate->BTag; 570 573 571 574 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; 575 entry->BTagPhys = candidate->BTagPhys; 586 576 587 577 entry->TauTag = candidate->TauTag;
Note:
See TracChangeset
for help on using the changeset viewer.