CMS 3D CMS Logo

Functions | Variables
isotrackTrainRegressor Namespace Reference

Functions

def fac0 (jeta)
 
def fac1 (jeta)
 
def fac2 (jeta)
 
def propweights (y_true)
 

Variables

 _ = plt.plot(lims, lims)
 
list a0 = [0.973, 0.998, 0.992, 0.965 ]
 marinas correction form More...
 
list a1 = [0, -0.318, -0.261, -0.406]
 
list a2 = [0, 0, 0.047, 0.089]
 
 alpha
 
 bins
 
list cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal_x']
 
 data = df.values
 
 default
 
 df = pd.read_pickle(fName)
 
tuple dop = (X_test[:,16]/X_test[:,13])
 
tuple eop = (X_test[:,15]/X_test[:,13])
 
 fName = parser.parse_args().input
 
 help
 
 history = model.fit(X_train,Y_train , batch_size=5000, epochs=100, validation_split=0.2, verbose=1,sample_weight=propweights(Y_train))
 
list keya = []
 
 label
 
list lims = [0, 200]
 
 loc
 
 loss
 
tuple marinascorr = X_test[:,15]*mcorrval
 
list maxa = []
 
tuple mcorrval = vec0(abs(X_test[:,17])) + vec1(abs(X_test[:,17]))*eop*dop*( 1 + vec2(abs(X_test[:,17]))*dop)
 
 meany = np.mean(Y_train)
 
list mina = []
 
 model = Sequential()
 
 modv = parser.parse_args().modelv
 
int ntest = 20000
 
 optimizer
 
 parser = argparse.ArgumentParser()
 
 pmom = X_test[:,13]
 
 preds = model.predict(X_test[:,0:12])
 
 range
 
 RMS = tensorflow.keras.optimizers.RMSprop(learning_rate=0.001, rho=0.9)
 
 stdy = np.std(Y_train)
 
 targets = data[:,12]
 
int testindx = data.shape[0] - ntest
 
 uncorrected = X_test[:,15]
 
 vec0 = np.vectorize(fac0)
 
 vec1 = np.vectorize(fac1)
 
 vec2 = np.vectorize(fac2)
 
 X_test = data[testindx:,:]
 
 X_train = data[:testindx,0:12]
 
 Y_train = data[:testindx,12]
 

Function Documentation

◆ fac0()

def isotrackTrainRegressor.fac0 (   jeta)

Definition at line 101 of file isotrackTrainRegressor.py.

References createfilelist.int.

Referenced by MonopoleSteppingAction.update().

101 def fac0(jeta):
102  PU_IETA_1 = 9
103  PU_IETA_2 = 16
104  PU_IETA_3 = 25
105  idx = (int(jeta >= PU_IETA_1) + int(jeta >= PU_IETA_2) + int(jeta >= PU_IETA_3))
106  return a0[idx]

◆ fac1()

def isotrackTrainRegressor.fac1 (   jeta)

Definition at line 107 of file isotrackTrainRegressor.py.

References createfilelist.int.

Referenced by algorithm(), DDBHMAngular.execute(), and MonopoleSteppingAction.update().

107 def fac1(jeta):
108  PU_IETA_1 = 9
109  PU_IETA_2 = 16
110  PU_IETA_3 = 25
111  idx = (int(jeta >= PU_IETA_1) + int(jeta >= PU_IETA_2) + int(jeta >= PU_IETA_3))
112  return a1[idx]

◆ fac2()

def isotrackTrainRegressor.fac2 (   jeta)

Definition at line 113 of file isotrackTrainRegressor.py.

References createfilelist.int.

Referenced by algorithm(), DDBHMAngular.execute(), and MonopoleSteppingAction.update().

113 def fac2(jeta):
114  PU_IETA_1 = 9
115  PU_IETA_2 = 16
116  PU_IETA_3 = 25
117  idx = (int(jeta >= PU_IETA_1) + int(jeta >= PU_IETA_2) + int(jeta >= PU_IETA_3))
118  return a2[idx]
119 

◆ propweights()

def isotrackTrainRegressor.propweights (   y_true)

Definition at line 135 of file isotrackTrainRegressor.py.

References funct.abs().

135 def propweights(y_true):
136  weight = np.copy(y_true)
137  weight[abs(y_true - meany) > 0] = 1.90*abs(y_true - meany)/stdy #1.25
138 # weight[abs(y_true - meany) > stdy] = 1.75*abs((weight[abs(y_true - meany) > stdy]) - meany)/(stdy)
139  weight[abs(y_true - meany) < stdy] = 1
140  return weight
141 
142 
143 # In[6]:
144 
145 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Variable Documentation

◆ _

isotrackTrainRegressor._ = plt.plot(lims, lims)
private

◆ a0

list isotrackTrainRegressor.a0 = [0.973, 0.998, 0.992, 0.965 ]

marinas correction form

Definition at line 98 of file isotrackTrainRegressor.py.

◆ a1

list isotrackTrainRegressor.a1 = [0, -0.318, -0.261, -0.406]

Definition at line 99 of file isotrackTrainRegressor.py.

Referenced by LA_Filler_Fitter.allAndOne(), npstat::ArrayND< Numeric >.ArrayND(), gen::FortranInstance.call(), MEtoEDM< T >.CheckBinLabels(), DQMTTreeIO::DQMMergeHelper.CheckBinLabels(), dqm::impl::MonitorElement.CheckBinLabels(), HBHENegativeEFilter.checkPassFilter(), FFTJetCorrectorSequence< Jet, InitialConverter, FinalConverter >.correct(), dqm::impl::MonitorElement.divide(), SurveyPxbDicer.doDice(), PulseFitWithShape.doFit(), HcalSimHitsValidation.dPhiWsign(), HcalRecHitsValidation.dPhiWsign(), HcalRecHitsAnalyzer.dPhiWsign(), CMTRawAnalyzer.dPhiWsign(), EcalMatacqAnalyzer.endJob(), VVIObjDetails.expint(), VVIObjFDetails.expint(), sistripvvi::VVIObjDetails.expint(), VVIObj.fcn(), sistripvvi::VVIObj.fcn(), VVIObjF.fcn(), MillePedeMonitor.fillPxbSurveyHistsLocalPars(), heppy::Davismt2.find_high(), DTLinearFit.fitNpar(), TFParams.fitpj(), fnc_dscb(), DeDxHitCalibrator.getAlphaBeta(), lumi::fPoly.getCorrection(), LowEnergyFastSimParam.GetInPointEnergyFraction(), PhotonMIPHaloTagger.getMipTrailFit(), HepMCValidationHelper.GreaterByE(), GridInterpolator3DException.GridInterpolator3DException(), HGCalDDDConstants.HGCalDDDConstants(), HGCalTBDDDConstants.HGCalTBDDDConstants(), EvolutionECAL.LightCollectionEfficiency(), EvolutionECAL.LightCollectionEfficiencyWeighted(), TruncatedPyramid.localCorners(), FlatTrd.localCorners(), heppy::Davismt2.mt2_bisect(), heppy::Davismt2.nsols(), NumericSafeLessByEt< T >.operator()(), NumericSafeLessByPt< T >.operator()(), NumericSafeGreaterByEt< T >.operator()(), NumericSafeGreaterByPt< T >.operator()(), GreaterByPtRef< T >.operator()(), GreaterByPtPtr< T >.operator()(), GreaterByEtRef< T >.operator()(), edm.operator+(), operator==(), npstat::ArrayND< Numeric >.outerProductLoop(), Thrust.parabola(), reco::PFTau3ProngSummary.PFTau3ProngSummary(), HcalSimHitsValidation.phi12(), HcalRecHitsValidation.phi12(), HcalRecHitsAnalyzer.phi12(), CMTRawAnalyzer.phi12(), TFParams.pulseShapepj(), TFParams.pulseShapepj2(), FullModelReactionDynamics.Rotate(), SiG4UniversalFluctuation.SampleFluctuations(), DTTSCand.setBitsBkmod(), DTSectCollPhCand.setBitsSectColl(), L1MuKBMTrack.setKalmanGain(), l1t::KMTFTrack.setKalmanGain(), heppy::mt2w_bisect::mt2w.teco(), SurveyPxbDicer.transform(), TrapezoidalCartesianMFGrid.TrapezoidalCartesianMFGrid(), and TrapezoidalCylindricalMFGrid.TrapezoidalCylindricalMFGrid().

◆ a2

list isotrackTrainRegressor.a2 = [0, 0, 0.047, 0.089]

Definition at line 100 of file isotrackTrainRegressor.py.

Referenced by npstat::ArrayND< Numeric >.ArrayND(), gen::FortranInstance.call(), MEtoEDM< T >.CheckBinLabels(), DQMTTreeIO::DQMMergeHelper.CheckBinLabels(), dqm::impl::MonitorElement.CheckBinLabels(), HBHENegativeEFilter.checkPassFilter(), FFTJetCorrectorSequence< Jet, InitialConverter, FinalConverter >.correct(), dqm::impl::MonitorElement.divide(), SurveyPxbDicer.doDice(), PulseFitWithShape.doFit(), HcalSimHitsValidation.dPhiWsign(), HcalRecHitsValidation.dPhiWsign(), HcalRecHitsAnalyzer.dPhiWsign(), CMTRawAnalyzer.dPhiWsign(), EcalMatacqAnalyzer.endJob(), VVIObjDetails.expint(), VVIObjFDetails.expint(), sistripvvi::VVIObjDetails.expint(), VVIObj.fcn(), sistripvvi::VVIObj.fcn(), VVIObjF.fcn(), magfieldparam::bcylDetails.ffunkti(), CMTRawAnalyzer.fillDigiAmplitudeQIE11(), heppy::Davismt2.find_high(), DTLinearFit.fitNpar(), TFParams.fitpj(), fnc_dscb(), lumi::fPoly.getCorrection(), LowEnergyFastSimParam.GetInPointEnergyFraction(), HepMCValidationHelper.GreaterByE(), GridInterpolator3DException.GridInterpolator3DException(), mkfit.intersectThirdLayer(), EvolutionECAL.LightCollectionEfficiency(), EvolutionECAL.LightCollectionEfficiencyWeighted(), TruncatedPyramid.localCorners(), main(), heppy::Davismt2.mt2_bisect(), heppy::Davismt2.mt2_massless(), heppy::Davismt2.nsols(), heppy::Davismt2.nsols_massless(), NumericSafeLessByEt< T >.operator()(), NumericSafeLessByPt< T >.operator()(), NumericSafeGreaterByEt< T >.operator()(), NumericSafeGreaterByPt< T >.operator()(), GreaterByPtRef< T >.operator()(), GreaterByPtPtr< T >.operator()(), GreaterByEtRef< T >.operator()(), edm.operator+(), operator==(), npstat::ArrayND< Numeric >.outerProductLoop(), Thrust.parabola(), HcalSimHitsValidation.phi12(), HcalRecHitsValidation.phi12(), HcalRecHitsAnalyzer.phi12(), CMTRawAnalyzer.phi12(), TFParams.pulseShapepj(), TFParams.pulseShapepj2(), SiG4UniversalFluctuation.SampleFluctuations(), DTTSCand.setBitsBkmod(), DTSectCollPhCand.setBitsSectColl(), L1MuKBMTrack.setKalmanGain(), l1t::KMTFTrack.setKalmanGain(), heppy::mt2w_bisect::mt2w.teco(), and SurveyPxbDicer.transform().

◆ alpha

isotrackTrainRegressor.alpha

Definition at line 181 of file isotrackTrainRegressor.py.

◆ bins

isotrackTrainRegressor.bins

Definition at line 181 of file isotrackTrainRegressor.py.

◆ cols_to_minmax

list isotrackTrainRegressor.cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal_x']

Definition at line 64 of file isotrackTrainRegressor.py.

◆ data

isotrackTrainRegressor.data = df.values

Definition at line 70 of file isotrackTrainRegressor.py.

◆ default

isotrackTrainRegressor.default

Definition at line 28 of file isotrackTrainRegressor.py.

◆ df

isotrackTrainRegressor.df = pd.read_pickle(fName)

Definition at line 38 of file isotrackTrainRegressor.py.

◆ dop

tuple isotrackTrainRegressor.dop = (X_test[:,16]/X_test[:,13])

◆ eop

tuple isotrackTrainRegressor.eop = (X_test[:,15]/X_test[:,13])

Definition at line 125 of file isotrackTrainRegressor.py.

Referenced by reco::PreId.setECALMatchingProperties().

◆ fName

isotrackTrainRegressor.fName = parser.parse_args().input

◆ help

isotrackTrainRegressor.help

Definition at line 28 of file isotrackTrainRegressor.py.

◆ history

isotrackTrainRegressor.history = model.fit(X_train,Y_train , batch_size=5000, epochs=100, validation_split=0.2, verbose=1,sample_weight=propweights(Y_train))

◆ keya

list isotrackTrainRegressor.keya = []

Definition at line 49 of file isotrackTrainRegressor.py.

◆ label

isotrackTrainRegressor.label

Definition at line 181 of file isotrackTrainRegressor.py.

◆ lims

list isotrackTrainRegressor.lims = [0, 200]

Definition at line 214 of file isotrackTrainRegressor.py.

◆ loc

isotrackTrainRegressor.loc

Definition at line 172 of file isotrackTrainRegressor.py.

Referenced by SiStripMonitorDigi.analyze(), SiPixelCalSingleMuonAnalyzer.analyze(), NearbyPixelClustersAnalyzer.analyze(), PickEvents.beginJob(), emtf.calc_phi_glob_deg(), emtf.calc_phi_glob_rad(), emtf.calc_phi_loc_deg(), emtf.calc_phi_loc_deg_from_glob(), emtf.calc_phi_loc_int(), emtf.calc_phi_loc_int_rpc(), emtf::phase2::tp.calcPhiGlobDegFromLoc(), emtf::phase2::tp.calcPhiGlobRadFromLoc(), emtf::phase2::tp.calcPhiInt(), emtf::phase2::tp.calcPhiLocDegFromGlob(), emtf::phase2::tp.calcPhiLocDegFromInt(), emtf::phase2::tp.calcPhiLocRadFromInt(), SiPixelCalibDigiProducer.checkPixel(), SiPixelOfflineCalibAnalysisBase.checkPixel(), PrimitiveConversion.convert_dt(), SiStripLorentzAnglePCLHarvester.dqmEndJob(), HBHELinearMap.find(), edm::MapOfVectors< std::string, AnalysisDescription * >.find(), edm::SortedCollection< EcalRecHit >.find(), SiPixelCalSingleMuonAnalyzer.findClosestCluster(), NearbyPixelClustersAnalyzer.findClosestCluster(), SiPixelInformationExtractor.findNoisyPixels(), TritonData< IO >.fullLoc(), StripCPE.getAlgoParam(), HGCalCassette.getShift(), HCALResponse.HCALResponse(), SiStripPsuDetIdMap.IsHVChannel(), StripCPEfromTrackAngle.localParameters(), SiPixelSCurveCalibrationAnalysis.makeThresholdSummary(), SiPixelTopoFinder.onlineRocColRow(), ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::CountModules< TrackerTraits >.operator()(), TkMSParameterizationBuilder.produce(), edm::FileInPath.read(), edm::FileInPath.readFromParameterSetBlob(), RecHitsSortedInPhi.RecHitsSortedInPhi(), PrintG4Solids.reducedName(), LocationDef.setLocation(), TritonData< IO >.setShape(), SiStripGainsCalibTreeWorker.SiStripGainsCalibTreeWorker(), SiStripGainsPCLWorker.SiStripGainsPCLWorker(), StripCPEfromTrackAngle.stripErrorSquared(), sipixelobjects::PixelROC.toGlobal(), CustomParticleFactory.ToLower(), ResidualRefitting.trkExtrap(), and HGCalDDDConstants.waferLocal2Global().

◆ loss

isotrackTrainRegressor.loss

◆ marinascorr

tuple isotrackTrainRegressor.marinascorr = X_test[:,15]*mcorrval

Definition at line 180 of file isotrackTrainRegressor.py.

◆ maxa

list isotrackTrainRegressor.maxa = []

Definition at line 48 of file isotrackTrainRegressor.py.

◆ mcorrval

tuple isotrackTrainRegressor.mcorrval = vec0(abs(X_test[:,17])) + vec1(abs(X_test[:,17]))*eop*dop*( 1 + vec2(abs(X_test[:,17]))*dop)

Definition at line 129 of file isotrackTrainRegressor.py.

◆ meany

isotrackTrainRegressor.meany = np.mean(Y_train)

◆ mina

list isotrackTrainRegressor.mina = []

Definition at line 47 of file isotrackTrainRegressor.py.

◆ model

isotrackTrainRegressor.model = Sequential()

Definition at line 148 of file isotrackTrainRegressor.py.

◆ modv

isotrackTrainRegressor.modv = parser.parse_args().modelv

Definition at line 34 of file isotrackTrainRegressor.py.

◆ ntest

int isotrackTrainRegressor.ntest = 20000

Definition at line 80 of file isotrackTrainRegressor.py.

◆ optimizer

isotrackTrainRegressor.optimizer

Definition at line 159 of file isotrackTrainRegressor.py.

◆ parser

isotrackTrainRegressor.parser = argparse.ArgumentParser()

Definition at line 27 of file isotrackTrainRegressor.py.

◆ pmom

isotrackTrainRegressor.pmom = X_test[:,13]

◆ preds

isotrackTrainRegressor.preds = model.predict(X_test[:,0:12])

Definition at line 177 of file isotrackTrainRegressor.py.

◆ range

isotrackTrainRegressor.range

Definition at line 181 of file isotrackTrainRegressor.py.

◆ RMS

isotrackTrainRegressor.RMS = tensorflow.keras.optimizers.RMSprop(learning_rate=0.001, rho=0.9)

Definition at line 156 of file isotrackTrainRegressor.py.

◆ stdy

isotrackTrainRegressor.stdy = np.std(Y_train)

Definition at line 90 of file isotrackTrainRegressor.py.

◆ targets

isotrackTrainRegressor.targets = data[:,12]

◆ testindx

int isotrackTrainRegressor.testindx = data.shape[0] - ntest

Definition at line 81 of file isotrackTrainRegressor.py.

◆ uncorrected

isotrackTrainRegressor.uncorrected = X_test[:,15]

◆ vec0

isotrackTrainRegressor.vec0 = np.vectorize(fac0)

◆ vec1

isotrackTrainRegressor.vec1 = np.vectorize(fac1)

Definition at line 121 of file isotrackTrainRegressor.py.

◆ vec2

isotrackTrainRegressor.vec2 = np.vectorize(fac2)

Definition at line 122 of file isotrackTrainRegressor.py.

◆ X_test

isotrackTrainRegressor.X_test = data[testindx:,:]

Definition at line 84 of file isotrackTrainRegressor.py.

◆ X_train

isotrackTrainRegressor.X_train = data[:testindx,0:12]

Definition at line 82 of file isotrackTrainRegressor.py.

◆ Y_train

isotrackTrainRegressor.Y_train = data[:testindx,12]

Definition at line 83 of file isotrackTrainRegressor.py.