CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions
FWLite.WorkingPoints Class Reference
Inheritance diagram for FWLite.WorkingPoints:

Public Member Functions

def __init__ (self, name, tag, working_points, logistic_transform=False)
 
def passed (self, ele, mva, category, wp)
 

Public Attributes

 logistic_transform
 
 name
 
 tag
 
 working_points
 

Private Member Functions

def _reformat_cut_definitions (self, working_points)
 

Detailed Description

Working Points. Keeps track of the cuts associated to a given flavour of the MVA ID 
for each working point and allows to test the working points

Definition at line 56 of file FWLite.py.

Constructor & Destructor Documentation

◆ __init__()

def FWLite.WorkingPoints.__init__ (   self,
  name,
  tag,
  working_points,
  logistic_transform = False 
)

Definition at line 60 of file FWLite.py.

60  def __init__(self, name, tag, working_points, logistic_transform=False):
61  self.name = name
62  self.tag = tag
63  self.working_points = self._reformat_cut_definitions(working_points)
64  self.logistic_transform = logistic_transform
65 

Member Function Documentation

◆ _reformat_cut_definitions()

def FWLite.WorkingPoints._reformat_cut_definitions (   self,
  working_points 
)
private

Definition at line 66 of file FWLite.py.

66  def _reformat_cut_definitions(self, working_points):
67  new_definitions = dict()
68  for wpname, definitions in working_points.iteritems():
69  new_definitions[wpname] = dict()
70  for name, cut in definitions.cuts.iteritems():
71  categ_id = int(name.lstrip('cutCategory'))
72  cut = cut.replace('pt','x')
73  formula = ROOT.TFormula('_'.join([self.name, wpname, name]), cut)
74  new_definitions[wpname][categ_id] = formula
75  return new_definitions
76 

References createfilelist.int, join(), ElectronMVAID.ElectronMVAID.name, DigiComparisonTask.name, TestTask.name, TPComparisonTask.name, HcalOfflineHarvesting.name, HcalOnlineHarvesting.name, HFRaddamTask.name, LaserTask.name, NoCQTask.name, QIE11Task.name, PedestalTask.name, QIE10Task.name, RecHitTask.name, UMNioTask.name, ZDCTask.name, AlignableObjectId::entry.name, RawTask.name, average.Average.name, counter.Counter.name, TPTask.name, DigiTask.name, histograms.Histograms.name, LEDTask.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::NAME.name, TmModule.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.name, FWLite.ElectronMVAID.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::O2O_RUN::JOB_NAME.name, DQMRivetClient::NormOption.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cms::dd::NameValuePair< T >.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::LOG.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::TAG::MODIFICATION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, ParameterSet.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, PixelDCSObject< T >::Item.name, cms::DDSpecPar.name, SummaryTableOutputBranches::NamedBranchPtr.name, cms::dd::ValuePair< T, U >.name, dataset.BaseDataset.name, fit::RootMinuitCommand.name, personalPlayback.Applet.name, EventStringOutputBranches::NamedBranchPtr.name, Types._Untracked.name, MagCylinder.name, ParSet.name, analyzer.Analyzer.name, DQMRivetClient::LumiOption.name, production_tasks.Task.name, cond::persistency::GTProxyData.name, Barrel.name, TableOutputBranches::NamedBranchPtr.name, CharmTagger::MVAVar.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, TriggerOutputBranches::NamedBranchPtr.name, EgHLTOfflineSummaryClient::SumHistBinData.name, cms::DDAlgoArguments.name, SingleObjectCondition.name, perftools::EdmEventSize::BranchRecord.name, cond::TimeTypeSpecs.name, core.autovars.NTupleObjectType.name, MyWatcher.name, edm::PathSummary.name, EcalLogicID.name, lumi::TriggerInfo.name, alignment.Alignment.name, PixelEndcapLinkMaker::Item.name, XMLProcessor::_loaderBaseConfig.name, MEtoEDM< T >::MEtoEDMObject.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, Supermodule.name, python.rootplot.utilities.Hist2D.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, TreeCrawler.Package.name, genericValidation.GenericValidation.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, MVAVar.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, FWLite.WorkingPoints.name, cond::Tag_t.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, FastHFShowerLibrary.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, magneticfield::BaseVolumeHandle.name, PhysicsTools::Variable::Value.name, cms::DDParsingContext::CompositeMaterial.name, emtf::Node.name, h4DSegm.name, BTagProbabilityToDiscriminator::Discriminator.name, DQMGenericClient::NormOption.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, cond::persistency::PAYLOAD::HASH.name, DQMGenericClient::CDOption.name, looper.Looper.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, PhysicsTools::Calibration::Variable.name, cond::TagInfo_t.name, TriggerObjectTableProducer::SelectedObject.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TrackerSectorStruct.name, cond::persistency::PAYLOAD::VERSION.name, MuonGeometrySanityCheckPoint.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, FCDTask.name, DQMGenericClient::NoFlowOption.name, CounterChecker.name, Mapper::definition< ScannerT >.name, python.rootplot.tree2hists.Plot.name, EDMtoMEConverter.name, PhysicsTools::TreeReader::Value.name, classes.MonitorData.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, HistogramManager.name, classes.OutputData.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, Crystal.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, h2DSegm.name, cond::persistency::IOV::INSERTION_TIME.name, options.HLTProcessOptions.name, DQMNet::WaitObject.name, python.rootplot.utilities.Hist.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, AlpgenParameterName.name, config.Analyzer.name, geometry.Structure.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, SiStripMonitorDigi.name, PhysicsTools::Variable.name, BulkSilicon.name, config.Service.name, nanoaod::FlatTable::Column.name, APD.name, NanoAODDQM::SelGroupConfig.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, cond::payloadInspector::TagReference.name, BPHRecoBuilder::BPHCompSource.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, InnerLayerVolume.name, personalPlayback.FrameworkJob.name, Grid.name, Grille.name, BackPipe.name, plotscripts.SawTeethFunction.name, PatchPanel.name, BackCoolTank.name, DryAirTube.name, crabFunctions.CrabTask.name, python.rootplot.utilities.RootFile.name, MBCoolTube.name, MBManif.name, cscdqm::ParHistoDef.name, hTMaxCell.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, and BeautifulSoup.SoupStrainer.name.

◆ passed()

def FWLite.WorkingPoints.passed (   self,
  ele,
  mva,
  category,
  wp 
)
return true if ele passes wp

Definition at line 77 of file FWLite.py.

77  def passed(self, ele, mva, category, wp):
78  '''return true if ele passes wp'''
79  threshold = self.working_points[wp][category].Eval(ele.pt())
80  if self.logistic_transform:
81  mva = 2.0/(1.0+exp(-2.0*mva))-1
82  return mva > threshold
83 
84 
85 # Import information needed to construct the e/gamma MVAs
86 

References JetChargeProducer_cfi.exp, FWLite.WorkingPoints.logistic_transform, and FWLite.WorkingPoints.working_points.

Member Data Documentation

◆ logistic_transform

FWLite.WorkingPoints.logistic_transform

Definition at line 64 of file FWLite.py.

Referenced by FWLite.WorkingPoints.passed().

◆ name

FWLite.WorkingPoints.name

◆ tag

FWLite.WorkingPoints.tag

◆ working_points

FWLite.WorkingPoints.working_points

Definition at line 63 of file FWLite.py.

Referenced by FWLite.WorkingPoints.passed().

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
createfilelist.int
int
Definition: createfilelist.py:10
TriggerAnalyzer.passed
passed
Definition: TriggerAnalyzer.py:62
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6