25 return listFeatDefaults
28 def addToFeatures(self, theBaseName, theVarTypeName, theFeatureType, defaultValueOverride=0):
29 """ Add a single feature with given name, type and default value """
32 featureName = theVarTypeName +
"_" + theBaseName
34 if defaultValueOverride != 0:
35 defaultValue = defaultValueOverride
45 featureName = completeFeatureName
47 if defaultValueOverride != 0:
48 defaultValue = defaultValueOverride
58 """ Add the feature described by theName, theType and theDefault for all known constituent types"""
62 if defaultValueOverride != 0:
63 defaultValue = defaultValueOverride
67 featureName = iConstType +
"_" + theVarTypeName +
"_" + theBaseName
77 """ Add the feature described by theName, theType and theDefault for all known constituent types"""
79 featureName = theBaseName + iEnergyType
183 print(
"config_FeatureCalculator: Dumping features:")
188 print(
"\t" + string.ljust(featName, 50) +
" of type " + featType +
" defaults to " + string.rjust(
str(featDefault), 10) )
191 print(
"config_FeatureCalculator: Done dumping features")
197 Variables += [
"isPanTauCandidate"]
198 Variables += [
"RecoMode"]
199 Variables += [
"RecoMode_PanTau"]
200 Variables += [
"BDTValue_1p0n_vs_1p1n"]
201 Variables += [
"BDTValue_1p1n_vs_1pXn"]
202 Variables += [
"BDTValue_3p0n_vs_3pXn"]
203 Variables += [
"SumCharge"]
204 Variables += [
"AbsCharge"]
205 for iVar
in Variables:
207 if iVar ==
"isPanTauCandidate":
209 if iVar ==
"RecoMode" or iVar ==
"RecoMode_PanTau":
219 for iVar
in Variables:
220 featName =
"N" + iVar +
"Consts"
240 Types += [
"ProtoMomentumCore"]
241 Types += [
"ProtoMomentumWide"]
245 for iVar
in Variables:
247 curFeatName = iType +
"_" + iVar
249 if iVar ==
"eta" or iVar ==
"phi":
261 Variables += [
"ConstsIn00To01"]
262 Variables += [
"ConstsIn01To02"]
263 Variables += [
"ConstsIn02To03"]
264 Variables += [
"ConstsIn03To04"]
265 for iVar
in Variables:
272 Variables += [
"BDTValues"]
273 Variables += [
"BDTValuesSum"]
281 for iVar
in Variables:
283 for iNum
in range(1, MaxNum):
284 featName = iVar +
"_" + iSort +
"_" +
str(iNum)
294 Variables += [
"nPhotons"]
295 Variables += [
"nShots"]
296 Variables += [
"SumShots_Et"]
297 Variables += [
"SumShots_Eta"]
298 Variables += [
"SumShots_Phi"]
299 Variables += [
"SumShots_M"]
300 Variables += [
"ConstDeltaRToSumShots"]
301 Variables += [
"EtSumShotsOverConstEt"]
302 Variables += [
"TauDeltaRToSumShots"]
303 Variables += [
"EtSumShotsOverTauEt"]
310 for iVar
in Variables:
312 for iNum
in range(1, MaxNum):
313 featName = iVar +
"_" + iSort +
"_" +
str(iNum)
317 if iVar ==
"Eta" or iVar ==
"Phi":
331 Variables += [
"MaxDeltaRSumShotToConst"]
332 Variables += [
"MinDeltaRSumShotToConst"]
333 Variables += [
"MaxDeltaRSumShotToTau"]
334 Variables += [
"MinDeltaRSumShotToTau"]
335 Variables += [
"DeltaRAllShotsToTau"]
336 Variables += [
"EtAllShotsOverEtTau"]
337 Variables += [
"NShotsInSeed"]
338 Variables += [
"NPhotonsInSeed"]
339 Variables += [
"BestDiShotMass"]
340 Variables += [
"MinDiShotMass"]
341 Variables += [
"MaxDiShotMass"]
342 for iVar
in Variables:
345 if iVar ==
"BestDiShotMass" or iVar ==
"MinDiShotMass" or iVar ==
"MaxDiShotMass":
358 Variables_WithEnergyTypes = []
359 Variables_WithEnergyTypes += [
"EtOver"]
360 Variables_WithEnergyTypes += [
"1stEtOver"]
361 Variables_WithEnergyTypes += [
"1stBDTEtOver"]
362 for iVar
in Variables_WithEnergyTypes:
367 Variables += [
"1stEtOverTypeEt"]
368 Variables += [
"1stBDTEtOverTypeEt"]
369 Variables += [
"EFOsOverTotalEFOs"]
370 Variables += [
"Log1stEtOver2ndEt"]
371 Variables += [
"Log1stEtOver3rdEt"]
372 Variables += [
"Log2ndEtOver3rdEt"]
373 Variables += [
"Log1stEtOver2ndEt_BDTSort"]
374 Variables += [
"Log1stEtOver3rdEt_BDTSort"]
375 Variables += [
"Log2ndEtOver3rdEt_BDTSort"]
376 for iVar
in Variables:
384 Variables += [
"00To01"]
385 Variables += [
"01To02"]
386 Variables += [
"02To03"]
387 Variables += [
"03To04"]
388 Variables += [
"04To05"]
389 for iVar
in Variables:
398 Variables += [
"EtIn01Over"]
399 Variables += [
"EtIn02Over"]
400 Variables += [
"EtIn03Over"]
401 Variables += [
"EtIn04Over"]
402 Variables += [
"EtIn00To02Over"]
403 Variables += [
"EtIn02To04Over"]
405 for iVar
in Variables:
412 Variables += [
"EtIn01OverEtIn02"]
413 Variables += [
"EtIn01OverEtIn04"]
414 for iVar
in Variables:
423 Variables_WithEnergyTypes = []
424 Variables_WithEnergyTypes += [
"Et_Wrt"]
425 Variables_WithEnergyTypes += [
"DRToJetAxis_Wrt"]
426 Variables_WithEnergyTypes += [
"DRToLeading_Wrt"]
427 for iVar
in Variables_WithEnergyTypes:
437 Variables += [
"DRToJetAxis"]
438 Variables += [
"DRToLeading"]
439 for iVar
in Variables:
443 Variables_WithEnergyTypes = []
444 Variables_WithEnergyTypes += [
"Et_Wrt"]
445 for iVar
in Variables_WithEnergyTypes:
452 Variables += [
"SumPt"]
453 Variables += [
"SumEta"]
454 Variables += [
"SumPhi"]
455 Variables += [
"SumM"]
456 for iVar
in Variables:
458 if iVar ==
"SumEta" or iVar ==
"SumPhi":
474 VariablesVec += [
"Constituents_pt"]
475 VariablesVec += [
"Constituents_eta"]
476 VariablesVec += [
"Constituents_phi"]
477 VariablesVec += [
"Constituents_m"]
479 VariablesVecSort = []
480 VariablesVecSort += [
"EtSort"]
481 VariablesVecSort += [
"BDTSort"]
483 for iSort
in VariablesVecSort:
484 for iVecVar
in VariablesVec:
485 featName = iSort +
"_" + iVecVar
487 if iVecVar ==
"Constituents_eta" or iVecVar ==
"Constituents_phi":
489 if iVecVar ==
"Constituents_m":
506 Variables += [
"ToJetAxis"]
507 Variables += [
"1stToJetAxis"]
508 Variables += [
"2ndToJetAxis"]
509 Variables += [
"3rdToJetAxis"]
510 Variables += [
"1stTo2nd"]
511 Variables += [
"1stTo3rd"]
512 Variables += [
"2ndTo3rd"]
513 Variables += [
"MaxToJetAxis"]
514 Variables += [
"MeanValue123"]
515 Variables += [
"Btw1213Planes"]
516 for iVar
in Variables:
524 Variables += [
"ToJetAxis"]
525 Variables += [
"MaxToJetAxis"]
526 Variables += [
"1stToJetAxis"]
527 Variables += [
"2ndToJetAxis"]
528 Variables += [
"3rdToJetAxis"]
529 Variables += [
"1stTo2nd"]
530 Variables += [
"1stTo3rd"]
531 Variables += [
"2ndTo3rd"]
538 for iVar
in Variables:
539 featName = iVar +
"_" + iSort
547 Variables += [
"EtDR"]
548 Variables += [
"EtDRprime"]
549 Variables += [
"EtDR2"]
550 Variables += [
"EtAngle"]
551 Variables += [
"EtDRxTotalEt"]
552 for iVar
in Variables:
560 Variables += [
"NumChargedOverNumNeutral"]
561 Variables += [
"NumChargedOverNumTotal"]
562 Variables += [
"AnglePlane1stCharged1st2ndNeutral"]
563 Variables += [
"FarthestNeutral_AngleToCharged"]
564 Variables += [
"FarthestNeutral_BDTScore"]
565 Variables += [
"FarthestNeutral_EtOverChargedEt"]
567 for iVar
in Variables:
580 Variables += [ [
"Log1st",
"EtOver",
"Et"] ]
581 Variables += [ [
"Log",
"EtOver",
"Et"] ]
582 Variables += [ [
"Angle",
"To",
""] ]
583 Variables += [ [
"DeltaR1st",
"To1st",
""] ]
584 Variables += [ [
"Angle1st",
"To1st",
""] ]
592 for iVar
in Variables:
593 featName = iVar[0] + iType + iVar[1] + jType + iVar[2]
605 iTypes += [
"Charged"]
608 jTypes += [
"Pi0Neut"]
609 jTypes += [
"Neutral"]
611 Variables_WithEnergyTypes = []
612 Variables_WithEnergyTypes += [ [
"Mean",
"Et_Wrt"] ]
615 Variables += [ [
"InvMass",
""] ]
616 Variables += [ [
"Angle1st2nd",
""] ]
620 for iVar
in Variables:
621 featName = iVar[0] + iType + jType + iVar[1]
625 for iVar
in Variables_WithEnergyTypes:
626 featName = iVar[0] + iType + jType + iVar[1]
628 featNameWithEnergy = featName + iEnergyType
641 Variables += [
"JetThrust"]
642 Variables += [
"JetThrustMajor"]
643 Variables += [
"JetThrustMinor"]
644 Variables += [
"JetOblateness"]
645 Variables += [
"JetSphericity"]
646 Variables += [
"JetAplanarity"]
647 Variables += [
"JetPlanarity"]
650 Variables += [
"JetFoxWolfram1"]
651 Variables += [
"JetFoxWolfram1"]
652 Variables += [
"JetFoxWolfram1"]
653 Variables += [
"JetFoxWolfram1"]
654 Variables += [
"JetFoxWolframRatioFW2OverFW1"]
655 Variables += [
"JetFoxWolframRatioFW4pow4OverFW1"]
656 Variables += [
"JetFoxWolframRatioFW234OverFW1pow4"]
657 Variables += [
"JetFoxWolframRatioFW1PlusFW2OverFW4"]
659 for iVar
in Variables:
669 Variables += [ [
"TransIPTrack",
"_SortByEt"] ]
670 Variables += [ [
"LongIPTrack",
"_SortByEt"] ]
671 Variables += [ [
"TransSignfIPTrack",
"_SortByEt"] ]
672 Variables += [ [
"LongSignfIPTrack",
"_SortByEt"] ]
673 Variables += [ [
"TransIP",
"_SortByValue"] ]
674 Variables += [ [
"TransSignfIP",
"_SortByValue"] ]
676 for iTrk
in range(1, maxTrack):
677 for iVar
in Variables:
678 featName = iVar[0] +
str(iTrk) + iVar[1]