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, const double &iPVFrac)
 
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 10 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().

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

References fPups, and fPupsPV.

66  {
67  fPups .clear();
68  fPupsPV.clear();
69 }
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 89 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().

89  {
90  if(iParticle.pt() < fRMSPtMin[iAlgo]) return;
91  // Change from SRR : Previously used fastjet::PseudoJet::user_index to decide the particle type.
92  // In CMSSW we use the user_index to specify the index in the input collection, so I invented
93  // a new mechanism using the fastjet UserInfo functionality. Of course, it's still just an integer
94  // but that interface could be changed (or augmented) if desired / needed.
95  int puppi_register = iParticle.puppi_register();
96  if ( puppi_register == std::numeric_limits<int>::lowest() ) {
97  throw cms::Exception("PuppiRegisterNotSet") << "The puppi register is not set. This must be set before use.\n";
98  }
99 
101  // if(fCharged[iAlgo] && std::abs(puppi_register) < 1) return;
102  // if(fCharged[iAlgo] && (std::abs(puppi_register) >=1 && std::abs(puppi_register) <=2)) fPupsPV.push_back(iVal);
103  //if(fCharged[iAlgo] && std::abs(puppi_register) < 3) return;
105  // fPups.push_back(iVal); //original
106  // fNCount[iAlgo]++;
107 
108  // added by Nhan -- for all eta regions, compute mean/RMS from the central charged PU
109  //std::cout << "std::abs(puppi_register) = " << std::abs(puppi_register) << std::endl;
110  if ((std::abs(iParticle.eta()) < fEtaMaxExtrap) && (std::abs(puppi_register) >= 3)){
111  fPups.push_back(iVal);
112  // fPupsPV.push_back(iVal);
113  fNCount[iAlgo]++;
114  }
115  // for the low PU case, correction. for checking that the PU-only median will be below the PV particles
116  if(std::abs(iParticle.eta()) < fEtaMaxExtrap && (std::abs(puppi_register) >=1 && std::abs(puppi_register) <=2)) fPupsPV.push_back(iVal);
117 
118 }
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 187 of file PuppiAlgo.cc.

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

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

Definition at line 123 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().

123  {
124 
125  //std::cout << "fNCount[iAlgo] = " << fNCount[iAlgo] << std::endl;
126  if(iAlgo >= fNAlgos ) return;
127  if(fNCount[iAlgo] == 0) return;
128 
129  // sort alphas
130  int lNBefore = 0;
131  for(unsigned int i0 = 0; i0 < iAlgo; i0++) lNBefore += fNCount[i0];
132  std::sort(fPups.begin()+lNBefore,fPups.begin()+lNBefore+fNCount[iAlgo]);
133 
134  // in case you have alphas == 0
135  int lNum0 = 0;
136  for(int i0 = lNBefore; i0 < lNBefore+fNCount[iAlgo]; i0++) {
137  if(fPups[i0] == 0) lNum0 = i0-lNBefore;
138  }
139 
140  // comput median, removed lCorr for now
141  int lNHalfway = lNBefore + lNum0 + int( double( fNCount[iAlgo]-lNum0 )*0.50);
142  fMedian[iAlgo] = fPups[lNHalfway];
143  double lMed = fMedian[iAlgo]; //Just to make the readability easier
144 
145  int lNRMS = 0;
146  for(int i0 = lNBefore; i0 < lNBefore+fNCount[iAlgo]; i0++) {
147  fMean[iAlgo] += fPups[i0];
148  if(fPups[i0] == 0) continue;
149  // if(!fCharged[iAlgo] && fAdjust[iAlgo] && fPups[i0] > lMed) continue;
150  if(fAdjust[iAlgo] && fPups[i0] > lMed) continue;
151  lNRMS++;
152  fRMS [iAlgo] += (fPups[i0]-lMed)*(fPups[i0]-lMed);
153  }
154  fMean[iAlgo]/=fNCount[iAlgo];
155  if(lNRMS > 0) fRMS [iAlgo]/=lNRMS;
156  if(fRMS[iAlgo] == 0) fRMS[iAlgo] = 1e-5;
157  // here is the raw RMS
158  fRMS [iAlgo] = sqrt(fRMS[iAlgo]);
159 
160  // some ways to do corrections to fRMS and fMedian
161  fRMS [iAlgo] *= fRMSScaleFactor[iAlgo];
162 
163  if(fAdjust[iAlgo]){
164  //Adjust the p-value to correspond to the median
165  std::sort(fPupsPV.begin(),fPupsPV.end());
166  int lNPV = 0;
167  for(unsigned int i0 = 0; i0 < fPupsPV.size(); i0++) if(fPupsPV[i0] <= lMed ) lNPV++;
168  double lAdjust = double(lNPV)/double(lNPV+0.5*fNCount[iAlgo]);
169  if(lAdjust > 0) {
170  fMedian[iAlgo] -= sqrt(ROOT::Math::chisquared_quantile(lAdjust,1.)*fRMS[iAlgo]);
171  fRMS[iAlgo] -= sqrt(ROOT::Math::chisquared_quantile(lAdjust,1.)*fRMS[iAlgo]);
172  }
173  }
174 
175  // fRMS_perEta[iAlgo] *= cur_RMSEtaSF;
176  // fMedian_perEta[iAlgo] *= cur_MedEtaSF;
177 
178  for (unsigned int j0 = 0; j0 < fEtaMin.size(); j0++){
179  fRMS_perEta[iAlgo][j0] = fRMS[iAlgo]*fRMSEtaSF[j0];
180  fMedian_perEta[iAlgo][j0] = fMedian[iAlgo]*fMedEtaSF[j0];
181  }
182 
183 }
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
std::vector< std::vector< double > > fRMS_perEta
Definition: PuppiAlgo.h:58
T sqrt(T t)
Definition: SSEVec.h:18
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
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 217 of file PuppiAlgo.cc.

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

Referenced by PuppiProducer::fillDescriptions().

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

Definition at line 81 of file PuppiAlgo.cc.

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

81  {
82  cur_PtMin = fPtMin[i_eta];
85  cur_RMS = fRMS_perEta[0][i_eta]; // 0 is number of algos within this eta bin
86  cur_Med = fMedian_perEta[0][i_eta]; // 0 is number of algos within this eta bin
87 }
double cur_PtMin
Definition: PuppiAlgo.h:50
std::vector< std::vector< double > > fMedian_perEta
Definition: PuppiAlgo.h:59
double cur_NeutralPtSlope
Definition: PuppiAlgo.h:52
std::vector< std::vector< double > > fRMS_perEta
Definition: PuppiAlgo.h:58
double cur_Med
Definition: PuppiAlgo.h:54
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
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 70 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().

70  {
71  fPups .clear();
72  fPupsPV.clear();
73  for(unsigned int i0 = 0; i0 < fNAlgos; i0++) {
74  fMedian[i0] = 0;
75  fRMS [i0] = 0;
76  fMean [i0] = 0;
77  fNCount[i0] = 0;
78  }
79 }
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().