#include <PuppiContainer.h>
|
double | getChi2FromdZ (double iDZ) |
|
int | getPuppiId (float iPt, float iEta) |
|
void | getRMSAvg (int iOpt, std::vector< fastjet::PseudoJet > const &iConstits, std::vector< fastjet::PseudoJet > const &iParticles, std::vector< fastjet::PseudoJet > const &iChargeParticles) |
|
double | goodVar (fastjet::PseudoJet const &iPart, std::vector< fastjet::PseudoJet > const &iParts, int iOpt, double iRCone) |
|
double | var_within_R (int iId, const std::vector< fastjet::PseudoJet > &particles, const fastjet::PseudoJet ¢re, double R) |
|
Definition at line 13 of file PuppiContainer.h.
Definition at line 14 of file PuppiContainer.cc.
References edm::ParameterSet::getParameter().
18 std::vector<edm::ParameterSet> lAlgos = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"algos");
20 for(
unsigned int i0 = 0; i0 < lAlgos.size(); i0++) {
T getParameter(std::string const &) const
std::vector< PuppiAlgo > fPuppiAlgo
PuppiContainer::~PuppiContainer |
( |
| ) |
|
double PuppiContainer::getChi2FromdZ |
( |
double |
iDZ | ) |
|
|
protected |
Definition at line 134 of file PuppiContainer.cc.
References funct::abs(), and alignCSCRings::e.
139 double lProbLV = ROOT::Math::normal_cdf_c(
std::abs(iDZ),1.)*2.;
140 double lProbPU = 1-lProbLV;
141 if(lProbPU <= 0) lProbPU = 1
e-16;
142 if(lProbPU >= 0) lProbPU = 1-1
e-16;
143 double lChi2PU = TMath::ChisquareQuantile(lProbPU,1);
Abs< T >::type abs(const T &t)
int PuppiContainer::getPuppiId |
( |
float |
iPt, |
|
|
float |
iEta |
|
) |
| |
|
protected |
void PuppiContainer::getRMSAvg |
( |
int |
iOpt, |
|
|
std::vector< fastjet::PseudoJet > const & |
iConstits, |
|
|
std::vector< fastjet::PseudoJet > const & |
iParticles, |
|
|
std::vector< fastjet::PseudoJet > const & |
iChargeParticles |
|
) |
| |
|
protected |
Definition at line 96 of file PuppiContainer.cc.
References eta(), edm::isFinite(), LogDebug, and EnergyCorrector::pt.
97 for(
unsigned int i0 = 0; i0 < iConstits.size(); i0++ ) {
101 if(pPupId == -1 ||
fPuppiAlgo[pPupId].numAlgos() <= iOpt){
107 bool pCharged =
fPuppiAlgo[pPupId].isCharged(iOpt);
108 double pCone =
fPuppiAlgo[pPupId].coneSize (iOpt);
110 if(!pCharged) pVal =
goodVar(iConstits[i0],iParticles ,pAlgo,pCone);
111 if( pCharged) pVal =
goodVar(iConstits[i0],iChargedParticles,pAlgo,pCone);
112 fVals.push_back(pVal);
115 LogDebug(
"NotFound" ) <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt() <<
" -- " << iConstits[i0].eta() << endl;
118 fPuppiAlgo[pPupId].add(iConstits[i0],pVal,iOpt);
std::vector< double > fVals
double goodVar(fastjet::PseudoJet const &iPart, std::vector< fastjet::PseudoJet > const &iParts, int iOpt, double iRCone)
int getPuppiId(float iPt, float iEta)
std::vector< PuppiAlgo > fPuppiAlgo
double PuppiContainer::goodVar |
( |
fastjet::PseudoJet const & |
iPart, |
|
|
std::vector< fastjet::PseudoJet > const & |
iParts, |
|
|
int |
iOpt, |
|
|
double |
iRCone |
|
) |
| |
|
protected |
Definition at line 63 of file PuppiContainer.cc.
double var_within_R(int iId, const std::vector< fastjet::PseudoJet > &particles, const fastjet::PseudoJet ¢re, double R)
void PuppiContainer::initialize |
( |
const std::vector< RecoObj > & |
iRecoObjects | ) |
|
Definition at line 26 of file PuppiContainer.cc.
References funct::abs(), i, and or.
40 fastjet::PseudoJet curPseudoJet;
42 curPseudoJet.reset_PtYPhiM(fRecoParticle.pt,fRecoParticle.eta,fRecoParticle.phi,fRecoParticle.m);
43 int puppi_register = 0;
44 if(fRecoParticle.id == 0
or fRecoParticle.charge == 0) puppi_register = 0;
45 if(fRecoParticle.id == 1 and fRecoParticle.charge != 0) puppi_register = fRecoParticle.charge;
46 if(fRecoParticle.id == 2 and fRecoParticle.charge != 0) puppi_register = fRecoParticle.charge+5;
47 curPseudoJet.set_user_info(
new PuppiUserInfo( puppi_register ) );
56 if(
fNPV < fRecoParticle.vtxId)
fNPV = fRecoParticle.vtxId;
std::vector< fastjet::PseudoJet > fPupParticles
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< fastjet::PseudoJet > fChargedPV
std::vector< double > fVals
std::vector< fastjet::PseudoJet > fPFParticles
Abs< T >::type abs(const T &t)
std::vector< double > fWeights
std::vector< RecoObj > fRecoParticles
std::vector<fastjet::PseudoJet> const& PuppiContainer::pfParticles |
( |
| ) |
const |
|
inline |
std::vector<fastjet::PseudoJet> const& PuppiContainer::puppiParticles |
( |
| ) |
const |
|
inline |
std::vector< double > const & PuppiContainer::puppiWeights |
( |
| ) |
|
Definition at line 147 of file PuppiContainer.cc.
References funct::abs(), alignCSCRings::e, eta(), edm::isFinite(), LogDebug, bookConverter::max, EnergyCorrector::pt, and reset().
157 for(
int i0 = 0; i0 < lNMaxAlgo; i0++) {
160 std::vector<double> pVals;
161 for(
int i0 = 0; i0 < lNParticles; i0++) {
181 for(
int i1 = 0; i1 < lNAlgos; i1++) pVals.push_back(
fVals[lNParticles*i1+i0]);
182 pWeight =
fPuppiAlgo[pPupId].compute(pVals,pChi2);
196 if(
std::abs(pWeight) < std::numeric_limits<double>::denorm_min() )
continue;
199 curjet.set_user_index(i0);
std::vector< fastjet::PseudoJet > fPupParticles
double getChi2FromdZ(double iDZ)
std::vector< fastjet::PseudoJet > fChargedPV
std::vector< double > fVals
std::vector< fastjet::PseudoJet > fPFParticles
void getRMSAvg(int iOpt, std::vector< fastjet::PseudoJet > const &iConstits, std::vector< fastjet::PseudoJet > const &iParticles, std::vector< fastjet::PseudoJet > const &iChargeParticles)
Abs< T >::type abs(const T &t)
int getPuppiId(float iPt, float iEta)
std::vector< double > fWeights
std::vector< RecoObj > fRecoParticles
std::vector< PuppiAlgo > fPuppiAlgo
void reset(double vett[256])
std::vector<fastjet::PseudoJet> const& PuppiContainer::pvParticles |
( |
| ) |
const |
|
inline |
double PuppiContainer::var_within_R |
( |
int |
iId, |
|
|
const std::vector< fastjet::PseudoJet > & |
particles, |
|
|
const fastjet::PseudoJet & |
centre, |
|
|
double |
R |
|
) |
| |
|
protected |
Definition at line 68 of file PuppiContainer.cc.
References funct::abs(), i, cmsBatch::log, M_PI, phi, EgammaValidation_Wenu_cff::sel, and MetTreeProducer::var().
69 if(iId == -1)
return 1;
70 fastjet::Selector
sel = fastjet::SelectorCircle(
R);
71 sel.set_reference(centre);
72 vector<PseudoJet> near_particles =
sel(particles);
76 for(
unsigned int i=0;
i<near_particles.size();
i++){
77 double pDEta = near_particles[
i].eta()-centre.eta();
78 double pDPhi =
std::abs(near_particles[
i].
phi()-centre.phi());
79 if(pDPhi > 2.*
M_PI-pDPhi) pDPhi = 2.*
M_PI-pDPhi;
80 double pDR2 = pDEta*pDEta+pDPhi*pDPhi;
81 if(
std::abs(pDR2) < 0.0001)
continue;
82 if(iId == 0) var += (near_particles[
i].pt()/pDR2);
83 if(iId == 1) var += near_particles[
i].pt();
84 if(iId == 2) var += (1./pDR2);
85 if(iId == 3) var += (1./pDR2);
86 if(iId == 4) var += near_particles[
i].pt();
87 if(iId == 5) var += (near_particles[
i].pt() * near_particles[
i].pt()/pDR2);
89 if(iId == 1) var += centre.pt();
90 if(iId == 0 && var != 0) var =
log(var);
91 if(iId == 3 && var != 0) var =
log(var);
92 if(iId == 5 && var != 0) var =
log(var);
Abs< T >::type abs(const T &t)
bool PuppiContainer::fApplyCHS |
|
protected |
std::vector<fastjet::PseudoJet> PuppiContainer::fChargedPV |
|
protected |
int PuppiContainer::fNAlgos |
|
protected |
double PuppiContainer::fNeutralMinPt |
|
protected |
double PuppiContainer::fNeutralSlope |
|
protected |
std::vector<fastjet::PseudoJet> PuppiContainer::fPFParticles |
|
protected |
std::vector<fastjet::PseudoJet> PuppiContainer::fPupParticles |
|
protected |
std::vector<PuppiAlgo> PuppiContainer::fPuppiAlgo |
|
protected |
double PuppiContainer::fPuppiWeightCut |
|
protected |
double PuppiContainer::fPVFrac |
|
protected |
std::vector<RecoObj> PuppiContainer::fRecoParticles |
|
protected |
bool PuppiContainer::fUseExp |
|
protected |
std::vector<double> PuppiContainer::fVals |
|
protected |
std::vector<double> PuppiContainer::fWeights |
|
protected |