CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PuppiAlgo Class Reference

#include <PuppiAlgo.h>

Public Member Functions

void add (const PuppiCandidate &iParticle, const double &iVal, const unsigned int iAlgo)
 
int algoId (unsigned int iAlgo) const
 
const std::vector< float > & alphas ()
 
double compute (std::vector< double > const &iVals, double iChi2) const
 
void computeMedRMS (const unsigned int &iAlgo)
 
double coneSize (unsigned int iAlgo) const
 
int etaBins () const
 
double etaMax (int i) const
 
double etaMin (int i) const
 
void fixAlgoEtaBin (int i_eta)
 
bool isCharged (unsigned int iAlgo) const
 
double median () const
 
double neutralPt (int iNPV) const
 
int numAlgos () const
 
double ptMin () const
 
 PuppiAlgo (edm::ParameterSet &iConfig)
 
void reset ()
 
double rms () const
 
 ~PuppiAlgo ()
 

Static Public Member Functions

static void fillDescriptionsPuppiAlgo (edm::ParameterSetDescription &desc)
 

Private Attributes

double cur_Med
 
double cur_NeutralPtMin
 
double cur_NeutralPtSlope
 
double cur_PtMin
 
double cur_RMS
 
std::vector< bool > fAdjust
 
std::vector< int > fAlgoId
 
std::vector< bool > fCharged
 
std::vector< int > fCombId
 
std::vector< double > fConeSize
 
std::vector< double > fEtaMax
 
double fEtaMaxExtrap
 
std::vector< double > fEtaMin
 
std::vector< double > fMean
 
std::vector< double > fMedEtaSF
 
std::vector< double > fMedian
 
std::vector< std::vector< double > > fMedian_perEta
 
unsigned int fNAlgos
 
std::vector< int > fNCount
 
std::vector< double > fNeutralPtMin
 
std::vector< double > fNeutralPtSlope
 
std::vector< double > fPtMin
 
std::vector< float > fPups
 
std::vector< float > fPupsPV
 
std::vector< double > fRMS
 
std::vector< std::vector< double > > fRMS_perEta
 
std::vector< double > fRMSEtaSF
 
std::vector< double > fRMSPtMin
 
std::vector< double > fRMSScaleFactor
 

Detailed Description

Definition at line 10 of file PuppiAlgo.h.

Constructor & Destructor Documentation

PuppiAlgo::PuppiAlgo ( edm::ParameterSet iConfig)

Definition at line 8 of file PuppiAlgo.cc.

References cur_Med, cur_NeutralPtMin, cur_NeutralPtSlope, cur_PtMin, cur_RMS, fAdjust, fAlgoId, fCharged, fCombId, fConeSize, fEtaMax, fEtaMaxExtrap, fEtaMin, fMean, fMedEtaSF, fMedian, fMedian_perEta, fNAlgos, fNCount, fNeutralPtMin, fNeutralPtSlope, fPtMin, fRMS, fRMS_perEta, fRMSEtaSF, fRMSPtMin, fRMSScaleFactor, and edm::ParameterSet::getParameter().

8  {
9  fEtaMin = iConfig.getParameter<std::vector<double>>("etaMin");
10  fEtaMax = iConfig.getParameter<std::vector<double>>("etaMax");
11  fPtMin = iConfig.getParameter<std::vector<double>>("ptMin");
12  fNeutralPtMin = iConfig.getParameter<std::vector<double>>("MinNeutralPt"); // Weighted Neutral Pt Cut
13  fNeutralPtSlope = iConfig.getParameter<std::vector<double>>("MinNeutralPtSlope"); // Slope vs #pv
14  fRMSEtaSF = iConfig.getParameter<std::vector<double>>("RMSEtaSF");
15  fMedEtaSF = iConfig.getParameter<std::vector<double>>("MedEtaSF");
16  fEtaMaxExtrap = iConfig.getParameter<double>("EtaMaxExtrap");
17 
18  std::vector<edm::ParameterSet> lAlgos = iConfig.getParameter<std::vector<edm::ParameterSet>>("puppiAlgos");
19  fNAlgos = lAlgos.size();
20  //Uber Configurable Puppi
21  std::vector<double> tmprms;
22  std::vector<double> tmpmed;
23 
24  for (unsigned int i0 = 0; i0 < lAlgos.size(); i0++) {
25  int pAlgoId = lAlgos[i0].getParameter<int>("algoId");
26  bool pCharged = lAlgos[i0].getParameter<bool>("useCharged");
27  bool pWeight0 = lAlgos[i0].getParameter<bool>("applyLowPUCorr");
28  int pComb = lAlgos[i0].getParameter<int>("combOpt"); // 0=> add in chi2/1=>Multiply p-values
29  double pConeSize = lAlgos[i0].getParameter<double>("cone"); // Min Pt when computing pt and rms
30  double pRMSPtMin = lAlgos[i0].getParameter<double>("rmsPtMin"); // Min Pt when computing pt and rms
31  double pRMSSF = lAlgos[i0].getParameter<double>("rmsScaleFactor"); // Additional Tuning parameter for Jokers
32  fAlgoId.push_back(pAlgoId);
33  fCharged.push_back(pCharged);
34  fAdjust.push_back(pWeight0);
35  fCombId.push_back(pComb);
36  fConeSize.push_back(pConeSize);
37  fRMSPtMin.push_back(pRMSPtMin);
38  fRMSScaleFactor.push_back(pRMSSF);
39  double pRMS = 0;
40  double pMed = 0;
41  double pMean = 0;
42  int pNCount = 0;
43  fRMS.push_back(pRMS);
44  fMedian.push_back(pMed);
45  fMean.push_back(pMean);
46  fNCount.push_back(pNCount);
47 
48  tmprms.clear();
49  tmpmed.clear();
50  for (unsigned int j0 = 0; j0 < fEtaMin.size(); j0++) {
51  tmprms.push_back(pRMS);
52  tmpmed.push_back(pMed);
53  }
54  fRMS_perEta.push_back(tmprms);
55  fMedian_perEta.push_back(tmpmed);
56  }
57 
58  cur_PtMin = -99.;
59  cur_NeutralPtMin = -99.;
60  cur_NeutralPtSlope = -99.;
61  cur_RMS = -99.;
62  cur_Med = -99.;
63 }
T getParameter(std::string const &) const
double cur_PtMin
Definition: PuppiAlgo.h:50
std::vector< double > fEtaMin
Definition: PuppiAlgo.h:41
std::vector< bool > fAdjust
Definition: PuppiAlgo.h:65
double cur_NeutralPtSlope
Definition: PuppiAlgo.h:52
std::vector< double > fConeSize
Definition: PuppiAlgo.h:67
double cur_Med
Definition: PuppiAlgo.h:54
std::vector< std::vector< double > > fMedian_perEta
Definition: PuppiAlgo.h:59
std::vector< double > fRMS
Definition: PuppiAlgo.h:56
std::vector< double > fNeutralPtMin
Definition: PuppiAlgo.h:43
double cur_NeutralPtMin
Definition: PuppiAlgo.h:51
std::vector< double > fMean
Definition: PuppiAlgo.h:70
std::vector< int > fAlgoId
Definition: PuppiAlgo.h:63
std::vector< double > fRMSPtMin
Definition: PuppiAlgo.h:68
std::vector< int > fCombId
Definition: PuppiAlgo.h:66
std::vector< double > fRMSScaleFactor
Definition: PuppiAlgo.h:69
std::vector< double > fPtMin
Definition: PuppiAlgo.h:42
std::vector< double > fRMSEtaSF
Definition: PuppiAlgo.h:46
std::vector< double > fNeutralPtSlope
Definition: PuppiAlgo.h:44
std::vector< double > fMedEtaSF
Definition: PuppiAlgo.h:47
std::vector< double > fEtaMax
Definition: PuppiAlgo.h:40
double fEtaMaxExtrap
Definition: PuppiAlgo.h:48
double cur_RMS
Definition: PuppiAlgo.h:53
std::vector< bool > fCharged
Definition: PuppiAlgo.h:64
std::vector< std::vector< double > > fRMS_perEta
Definition: PuppiAlgo.h:58
unsigned int fNAlgos
Definition: PuppiAlgo.h:39
std::vector< int > fNCount
Definition: PuppiAlgo.h:71
std::vector< double > fMedian
Definition: PuppiAlgo.h:57
PuppiAlgo::~PuppiAlgo ( )

Definition at line 64 of file PuppiAlgo.cc.

References fPups, and fPupsPV.

64  {
65  fPups.clear();
66  fPupsPV.clear();
67 }
std::vector< float > fPupsPV
Definition: PuppiAlgo.h:62
std::vector< float > fPups
Definition: PuppiAlgo.h:61

Member Function Documentation

void PuppiAlgo::add ( const PuppiCandidate iParticle,
const double &  iVal,
const unsigned int  iAlgo 
)

Definition at line 87 of file PuppiAlgo.cc.

References funct::abs(), PuppiCandidate::eta(), Exception, fEtaMaxExtrap, fNCount, fPups, fPupsPV, fRMSPtMin, and PuppiCandidate::puppi_register().

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

87  {
88  if (iParticle.pt() < fRMSPtMin[iAlgo])
89  return;
90  // Change from SRR : Previously used fastjet::PseudoJet::user_index to decide the particle type.
91  // In CMSSW we use the user_index to specify the index in the input collection, so I invented
92  // a new mechanism using the fastjet UserInfo functionality. Of course, it's still just an integer
93  // but that interface could be changed (or augmented) if desired / needed.
94  int puppi_id = iParticle.puppi_register();
95  if (puppi_id == std::numeric_limits<int>::lowest()) {
96  throw cms::Exception("PuppiRegisterNotSet") << "The puppi register is not set. This must be set before use.\n";
97  }
98 
99  // added by Nhan -- for all eta regions, compute mean/RMS from the central charged PU
100  if ((std::abs(iParticle.eta()) < fEtaMaxExtrap) && (puppi_id == 2)) {
101  fPups.push_back(iVal);
102  fNCount[iAlgo]++;
103  }
104  // for the low PU case, correction. for checking that the PU-only median will be below the PV particles
105  if (std::abs(iParticle.eta()) < fEtaMaxExtrap && (puppi_id == 1))
106  fPupsPV.push_back(iVal);
107 }
double eta() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int puppi_register() const
std::vector< float > fPupsPV
Definition: PuppiAlgo.h:62
std::vector< float > fPups
Definition: PuppiAlgo.h:61
std::vector< double > fRMSPtMin
Definition: PuppiAlgo.h:68
double fEtaMaxExtrap
Definition: PuppiAlgo.h:48
std::vector< int > fNCount
Definition: PuppiAlgo.h:71
int PuppiAlgo::algoId ( unsigned int  iAlgo) const
inline

Definition at line 30 of file PuppiAlgo.h.

References fAlgoId.

30 { return fAlgoId.at(iAlgo); }
std::vector< int > fAlgoId
Definition: PuppiAlgo.h:63
const std::vector<float>& PuppiAlgo::alphas ( )
inline

Definition at line 22 of file PuppiAlgo.h.

References fPups.

22 { return fPups; }
std::vector< float > fPups
Definition: PuppiAlgo.h:61
double PuppiAlgo::compute ( std::vector< double > const &  iVals,
double  iChi2 
) const

Definition at line 184 of file PuppiAlgo.cc.

References cur_Med, cur_RMS, fAlgoId, fCombId, fNAlgos, and fNCount.

184  {
185  if (fAlgoId[0] == -1)
186  return 1;
187  double lVal = 0.;
188  double lPVal = 1.;
189  int lNDOF = 0;
190  for (unsigned int i0 = 0; i0 < fNAlgos; i0++) {
191  if (fNCount[i0] == 0)
192  return 1.; //in the NoPU case return 1.
193  if (fCombId[i0] == 1 && i0 > 0) { //Compute the previous p-value so that p-values can be multiplieed
194  double pPVal = ROOT::Math::chisquared_cdf(lVal, lNDOF);
195  lPVal *= pPVal;
196  lNDOF = 0;
197  lVal = 0;
198  }
199  double pVal = iVals[i0];
200  //Special Check for any algo with log(0)
201  if (fAlgoId[i0] == 0 && iVals[i0] == 0)
202  pVal = cur_Med;
203  if (fAlgoId[i0] == 3 && iVals[i0] == 0)
204  pVal = cur_Med;
205  if (fAlgoId[i0] == 5 && iVals[i0] == 0)
206  pVal = cur_Med;
207  lVal += (pVal - cur_Med) * (fabs(pVal - cur_Med)) / cur_RMS / cur_RMS;
208  lNDOF++;
209  if (i0 == 0 && iChi2 != 0)
210  lNDOF++; //Add external Chi2 to first element
211  if (i0 == 0 && iChi2 != 0)
212  lVal += iChi2; //Add external Chi2 to first element
213  }
214  //Top it off with the last calc
215  lPVal *= ROOT::Math::chisquared_cdf(lVal, lNDOF);
216  return lPVal;
217 }
double cur_Med
Definition: PuppiAlgo.h:54
std::vector< int > fAlgoId
Definition: PuppiAlgo.h:63
std::vector< int > fCombId
Definition: PuppiAlgo.h:66
double cur_RMS
Definition: PuppiAlgo.h:53
unsigned int fNAlgos
Definition: PuppiAlgo.h:39
std::vector< int > fNCount
Definition: PuppiAlgo.h:71
void PuppiAlgo::computeMedRMS ( const unsigned int &  iAlgo)

Definition at line 112 of file PuppiAlgo.cc.

References MillePedeFileConverter_cfg::e, fAdjust, fEtaMin, fMean, fMedEtaSF, fMedian, fMedian_perEta, fNAlgos, fNCount, fPups, fPupsPV, fRMS, fRMS_perEta, fRMSEtaSF, fRMSScaleFactor, createfilelist::int, and mathSSE::sqrt().

112  {
113  //std::cout << "fNCount[iAlgo] = " << fNCount[iAlgo] << std::endl;
114  if (iAlgo >= fNAlgos)
115  return;
116  if (fNCount[iAlgo] == 0)
117  return;
118 
119  // sort alphas
120  int lNBefore = 0;
121  for (unsigned int i0 = 0; i0 < iAlgo; i0++)
122  lNBefore += fNCount[i0];
123  std::sort(fPups.begin() + lNBefore, fPups.begin() + lNBefore + fNCount[iAlgo]);
124 
125  // in case you have alphas == 0
126  int lNum0 = 0;
127  for (int i0 = lNBefore; i0 < lNBefore + fNCount[iAlgo]; i0++) {
128  if (fPups[i0] == 0)
129  lNum0 = i0 - lNBefore;
130  }
131 
132  // comput median, removed lCorr for now
133  int lNHalfway = lNBefore + lNum0 + int(double(fNCount[iAlgo] - lNum0) * 0.50);
134  fMedian[iAlgo] = fPups[lNHalfway];
135  double lMed = fMedian[iAlgo]; //Just to make the readability easier
136 
137  int lNRMS = 0;
138  for (int i0 = lNBefore; i0 < lNBefore + fNCount[iAlgo]; i0++) {
139  fMean[iAlgo] += fPups[i0];
140  if (fPups[i0] == 0)
141  continue;
142  // if(!fCharged[iAlgo] && fAdjust[iAlgo] && fPups[i0] > lMed) continue;
143  if (fAdjust[iAlgo] && fPups[i0] > lMed)
144  continue;
145  lNRMS++;
146  fRMS[iAlgo] += (fPups[i0] - lMed) * (fPups[i0] - lMed);
147  }
148  fMean[iAlgo] /= fNCount[iAlgo];
149  if (lNRMS > 0)
150  fRMS[iAlgo] /= lNRMS;
151  if (fRMS[iAlgo] == 0)
152  fRMS[iAlgo] = 1e-5;
153  // here is the raw RMS
154  fRMS[iAlgo] = sqrt(fRMS[iAlgo]);
155 
156  // some ways to do corrections to fRMS and fMedian
157  fRMS[iAlgo] *= fRMSScaleFactor[iAlgo];
158 
159  if (fAdjust[iAlgo]) {
160  //Adjust the p-value to correspond to the median
161  std::sort(fPupsPV.begin(), fPupsPV.end());
162  int lNPV = 0;
163  for (unsigned int i0 = 0; i0 < fPupsPV.size(); i0++)
164  if (fPupsPV[i0] <= lMed)
165  lNPV++;
166  double lAdjust = double(lNPV) / double(lNPV + 0.5 * fNCount[iAlgo]);
167  if (lAdjust > 0) {
168  fMedian[iAlgo] -= sqrt(ROOT::Math::chisquared_quantile(lAdjust, 1.) * fRMS[iAlgo]);
169  fRMS[iAlgo] -= sqrt(ROOT::Math::chisquared_quantile(lAdjust, 1.) * fRMS[iAlgo]);
170  }
171  }
172 
173  // fRMS_perEta[iAlgo] *= cur_RMSEtaSF;
174  // fMedian_perEta[iAlgo] *= cur_MedEtaSF;
175 
176  for (unsigned int j0 = 0; j0 < fEtaMin.size(); j0++) {
177  fRMS_perEta[iAlgo][j0] = fRMS[iAlgo] * fRMSEtaSF[j0];
178  fMedian_perEta[iAlgo][j0] = fMedian[iAlgo] * fMedEtaSF[j0];
179  }
180 }
std::vector< double > fEtaMin
Definition: PuppiAlgo.h:41
std::vector< bool > fAdjust
Definition: PuppiAlgo.h:65
std::vector< std::vector< double > > fMedian_perEta
Definition: PuppiAlgo.h:59
T sqrt(T t)
Definition: SSEVec.h:19
std::vector< double > fRMS
Definition: PuppiAlgo.h:56
std::vector< float > fPupsPV
Definition: PuppiAlgo.h:62
std::vector< float > fPups
Definition: PuppiAlgo.h:61
std::vector< double > fMean
Definition: PuppiAlgo.h:70
std::vector< double > fRMSScaleFactor
Definition: PuppiAlgo.h:69
std::vector< double > fRMSEtaSF
Definition: PuppiAlgo.h:46
std::vector< double > fMedEtaSF
Definition: PuppiAlgo.h:47
std::vector< std::vector< double > > fRMS_perEta
Definition: PuppiAlgo.h:58
unsigned int fNAlgos
Definition: PuppiAlgo.h:39
std::vector< int > fNCount
Definition: PuppiAlgo.h:71
std::vector< double > fMedian
Definition: PuppiAlgo.h:57
double PuppiAlgo::coneSize ( unsigned int  iAlgo) const
inline

Definition at line 32 of file PuppiAlgo.h.

References fConeSize.

32 { return fConeSize.at(iAlgo); }
std::vector< double > fConeSize
Definition: PuppiAlgo.h:67
int PuppiAlgo::etaBins ( ) const
inline

Definition at line 24 of file PuppiAlgo.h.

References fEtaMin.

24 { return fEtaMin.size(); }
std::vector< double > fEtaMin
Definition: PuppiAlgo.h:41
double PuppiAlgo::etaMax ( int  i) const
inline

Definition at line 26 of file PuppiAlgo.h.

References fEtaMax, and mps_fire::i.

26 { return fEtaMax[i]; }
std::vector< double > fEtaMax
Definition: PuppiAlgo.h:40
double PuppiAlgo::etaMin ( int  i) const
inline

Definition at line 25 of file PuppiAlgo.h.

References fEtaMin, and mps_fire::i.

25 { return fEtaMin[i]; }
std::vector< double > fEtaMin
Definition: PuppiAlgo.h:41
void PuppiAlgo::fillDescriptionsPuppiAlgo ( edm::ParameterSetDescription desc)
static

Definition at line 219 of file PuppiAlgo.cc.

References edm::ParameterSetDescription::add(), edm::ParameterSet::addParameter(), edm::ParameterSetDescription::addVPSet(), and hltMVAJetPuId_cff::algos.

Referenced by PuppiProducer::fillDescriptions().

219  {
220  edm::ParameterSetDescription puppialgos;
221  puppialgos.add<int>("algoId", 5);
222  puppialgos.add<bool>("useCharged", false);
223  puppialgos.add<bool>("applyLowPUCorr", false);
224  puppialgos.add<int>("combOpt", 5);
225  puppialgos.add<double>("cone", .4);
226  puppialgos.add<double>("rmsPtMin", .1);
227  puppialgos.add<double>("rmsScaleFactor", 1.0);
228  std::vector<edm::ParameterSet> VPSetPuppiAlgos;
229  edm::ParameterSet puppiset;
230  puppiset.addParameter<int>("algoId", 5);
231  puppiset.addParameter<bool>("useCharged", false);
232  puppiset.addParameter<bool>("applyLowPUCorr", false);
233  puppiset.addParameter<int>("combOpt", 5);
234  puppiset.addParameter<double>("cone", .4);
235  puppiset.addParameter<double>("rmsPtMin", .1);
236  puppiset.addParameter<double>("rmsScaleFactor", 1.0);
237  VPSetPuppiAlgos.push_back(puppiset);
238 
240  algos.addVPSet("puppiAlgos", puppialgos, VPSetPuppiAlgos);
241  std::vector<edm::ParameterSet> VPSetAlgos;
242  edm::ParameterSet algosset;
243  algos.add<std::vector<double>>("etaMin", {0.});
244  algos.add<std::vector<double>>("etaMax", {2.5});
245  algos.add<std::vector<double>>("ptMin", {0.});
246  algos.add<std::vector<double>>("MinNeutralPt", {0.2});
247  algos.add<std::vector<double>>("MinNeutralPtSlope", {0.015});
248  algos.add<std::vector<double>>("RMSEtaSF", {1.0});
249  algos.add<std::vector<double>>("MedEtaSF", {1.0});
250  algos.add<double>("EtaMaxExtrap", 2.0);
251  algosset.addParameter<std::vector<double>>("etaMin", {0.});
252  algosset.addParameter<std::vector<double>>("etaMax", {2.5});
253  algosset.addParameter<std::vector<double>>("ptMin", {0.});
254  algosset.addParameter<std::vector<double>>("MinNeutralPt", {0.2});
255  algosset.addParameter<std::vector<double>>("MinNeutralPtSlope", {0.015});
256  algosset.addParameter<std::vector<double>>("RMSEtaSF", {1.0});
257  algosset.addParameter<std::vector<double>>("MedEtaSF", {1.0});
258  algosset.addParameter<double>("EtaMaxExtrap", 2.0);
259  algosset.addParameter<std::vector<edm::ParameterSet>>("puppiAlgos", VPSetPuppiAlgos);
260  VPSetAlgos.push_back(algosset);
261  desc.addVPSet("algos", algos, VPSetAlgos);
262 }
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:124
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void PuppiAlgo::fixAlgoEtaBin ( int  i_eta)

Definition at line 79 of file PuppiAlgo.cc.

References cur_Med, cur_NeutralPtMin, cur_NeutralPtSlope, cur_PtMin, cur_RMS, fMedian_perEta, fNeutralPtMin, fNeutralPtSlope, fPtMin, and fRMS_perEta.

79  {
80  cur_PtMin = fPtMin[i_eta];
83  cur_RMS = fRMS_perEta[0][i_eta]; // 0 is number of algos within this eta bin
84  cur_Med = fMedian_perEta[0][i_eta]; // 0 is number of algos within this eta bin
85 }
double cur_PtMin
Definition: PuppiAlgo.h:50
double cur_NeutralPtSlope
Definition: PuppiAlgo.h:52
double cur_Med
Definition: PuppiAlgo.h:54
std::vector< std::vector< double > > fMedian_perEta
Definition: PuppiAlgo.h:59
std::vector< double > fNeutralPtMin
Definition: PuppiAlgo.h:43
double cur_NeutralPtMin
Definition: PuppiAlgo.h:51
std::vector< double > fPtMin
Definition: PuppiAlgo.h:42
std::vector< double > fNeutralPtSlope
Definition: PuppiAlgo.h:44
double cur_RMS
Definition: PuppiAlgo.h:53
std::vector< std::vector< double > > fRMS_perEta
Definition: PuppiAlgo.h:58
bool PuppiAlgo::isCharged ( unsigned int  iAlgo) const
inline

Definition at line 31 of file PuppiAlgo.h.

References fCharged.

31 { return fCharged.at(iAlgo); }
std::vector< bool > fCharged
Definition: PuppiAlgo.h:64
double PuppiAlgo::median ( ) const
inline

Definition at line 36 of file PuppiAlgo.h.

References cur_Med.

36 { return cur_Med; }
double cur_Med
Definition: PuppiAlgo.h:54
double PuppiAlgo::neutralPt ( int  iNPV) const
inline

Definition at line 33 of file PuppiAlgo.h.

References cur_NeutralPtMin, and cur_NeutralPtSlope.

33 { return cur_NeutralPtMin + iNPV * cur_NeutralPtSlope; }
double cur_NeutralPtSlope
Definition: PuppiAlgo.h:52
double cur_NeutralPtMin
Definition: PuppiAlgo.h:51
int PuppiAlgo::numAlgos ( ) const
inline

Definition at line 29 of file PuppiAlgo.h.

References fNAlgos.

29 { return fNAlgos; }
unsigned int fNAlgos
Definition: PuppiAlgo.h:39
double PuppiAlgo::ptMin ( ) const
inline

Definition at line 27 of file PuppiAlgo.h.

References cur_PtMin.

27 { return cur_PtMin; }
double cur_PtMin
Definition: PuppiAlgo.h:50
void PuppiAlgo::reset ( void  )

Definition at line 68 of file PuppiAlgo.cc.

References fMean, fMedian, fNAlgos, fNCount, fPups, fPupsPV, and fRMS.

Referenced by MatrixReader.MatrixReader::__init__(), data_sources.json_list::next(), and MatrixReader.MatrixReader::showRaw().

68  {
69  fPups.clear();
70  fPupsPV.clear();
71  for (unsigned int i0 = 0; i0 < fNAlgos; i0++) {
72  fMedian[i0] = 0;
73  fRMS[i0] = 0;
74  fMean[i0] = 0;
75  fNCount[i0] = 0;
76  }
77 }
std::vector< double > fRMS
Definition: PuppiAlgo.h:56
std::vector< float > fPupsPV
Definition: PuppiAlgo.h:62
std::vector< float > fPups
Definition: PuppiAlgo.h:61
std::vector< double > fMean
Definition: PuppiAlgo.h:70
unsigned int fNAlgos
Definition: PuppiAlgo.h:39
std::vector< int > fNCount
Definition: PuppiAlgo.h:71
std::vector< double > fMedian
Definition: PuppiAlgo.h:57
double PuppiAlgo::rms ( ) const
inline

Definition at line 35 of file PuppiAlgo.h.

References cur_RMS.

35 { return cur_RMS; }
double cur_RMS
Definition: PuppiAlgo.h:53

Member Data Documentation

double PuppiAlgo::cur_Med
private

Definition at line 54 of file PuppiAlgo.h.

Referenced by compute(), fixAlgoEtaBin(), median(), and PuppiAlgo().

double PuppiAlgo::cur_NeutralPtMin
private

Definition at line 51 of file PuppiAlgo.h.

Referenced by fixAlgoEtaBin(), neutralPt(), and PuppiAlgo().

double PuppiAlgo::cur_NeutralPtSlope
private

Definition at line 52 of file PuppiAlgo.h.

Referenced by fixAlgoEtaBin(), neutralPt(), and PuppiAlgo().

double PuppiAlgo::cur_PtMin
private

Definition at line 50 of file PuppiAlgo.h.

Referenced by fixAlgoEtaBin(), ptMin(), and PuppiAlgo().

double PuppiAlgo::cur_RMS
private

Definition at line 53 of file PuppiAlgo.h.

Referenced by compute(), fixAlgoEtaBin(), PuppiAlgo(), and rms().

std::vector<bool> PuppiAlgo::fAdjust
private

Definition at line 65 of file PuppiAlgo.h.

Referenced by computeMedRMS(), and PuppiAlgo().

std::vector<int> PuppiAlgo::fAlgoId
private

Definition at line 63 of file PuppiAlgo.h.

Referenced by algoId(), compute(), and PuppiAlgo().

std::vector<bool> PuppiAlgo::fCharged
private

Definition at line 64 of file PuppiAlgo.h.

Referenced by isCharged(), and PuppiAlgo().

std::vector<int> PuppiAlgo::fCombId
private

Definition at line 66 of file PuppiAlgo.h.

Referenced by compute(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fConeSize
private

Definition at line 67 of file PuppiAlgo.h.

Referenced by coneSize(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fEtaMax
private

Definition at line 40 of file PuppiAlgo.h.

Referenced by etaMax(), and PuppiAlgo().

double PuppiAlgo::fEtaMaxExtrap
private

Definition at line 48 of file PuppiAlgo.h.

Referenced by add(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fEtaMin
private

Definition at line 41 of file PuppiAlgo.h.

Referenced by computeMedRMS(), etaBins(), etaMin(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fMean
private

Definition at line 70 of file PuppiAlgo.h.

Referenced by computeMedRMS(), PuppiAlgo(), and reset().

std::vector<double> PuppiAlgo::fMedEtaSF
private

Definition at line 47 of file PuppiAlgo.h.

Referenced by computeMedRMS(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fMedian
private

Definition at line 57 of file PuppiAlgo.h.

Referenced by computeMedRMS(), PuppiAlgo(), and reset().

std::vector<std::vector<double> > PuppiAlgo::fMedian_perEta
private

Definition at line 59 of file PuppiAlgo.h.

Referenced by computeMedRMS(), fixAlgoEtaBin(), and PuppiAlgo().

unsigned int PuppiAlgo::fNAlgos
private

Definition at line 39 of file PuppiAlgo.h.

Referenced by compute(), computeMedRMS(), numAlgos(), PuppiAlgo(), and reset().

std::vector<int> PuppiAlgo::fNCount
private

Definition at line 71 of file PuppiAlgo.h.

Referenced by add(), compute(), computeMedRMS(), PuppiAlgo(), and reset().

std::vector<double> PuppiAlgo::fNeutralPtMin
private

Definition at line 43 of file PuppiAlgo.h.

Referenced by fixAlgoEtaBin(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fNeutralPtSlope
private

Definition at line 44 of file PuppiAlgo.h.

Referenced by fixAlgoEtaBin(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fPtMin
private

Definition at line 42 of file PuppiAlgo.h.

Referenced by fixAlgoEtaBin(), and PuppiAlgo().

std::vector<float> PuppiAlgo::fPups
private

Definition at line 61 of file PuppiAlgo.h.

Referenced by add(), alphas(), computeMedRMS(), reset(), and ~PuppiAlgo().

std::vector<float> PuppiAlgo::fPupsPV
private

Definition at line 62 of file PuppiAlgo.h.

Referenced by add(), computeMedRMS(), reset(), and ~PuppiAlgo().

std::vector<double> PuppiAlgo::fRMS
private

Definition at line 56 of file PuppiAlgo.h.

Referenced by computeMedRMS(), PuppiAlgo(), and reset().

std::vector<std::vector<double> > PuppiAlgo::fRMS_perEta
private

Definition at line 58 of file PuppiAlgo.h.

Referenced by computeMedRMS(), fixAlgoEtaBin(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fRMSEtaSF
private

Definition at line 46 of file PuppiAlgo.h.

Referenced by computeMedRMS(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fRMSPtMin
private

Definition at line 68 of file PuppiAlgo.h.

Referenced by add(), and PuppiAlgo().

std::vector<double> PuppiAlgo::fRMSScaleFactor
private

Definition at line 69 of file PuppiAlgo.h.

Referenced by computeMedRMS(), and PuppiAlgo().