#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 131 of file PuppiContainer.cc.
References funct::abs(), and alignCSCRings::e.
136 double lProbLV = ROOT::Math::normal_cdf_c(
std::abs(iDZ),1.)*2.;
137 double lProbPU = 1-lProbLV;
138 if(lProbPU <= 0) lProbPU = 1
e-16;
139 if(lProbPU >= 0) lProbPU = 1-1
e-16;
140 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 95 of file PuppiContainer.cc.
References eta(), edm::isFinite(), LogDebug, and EnergyCorrector::pt.
96 for(
unsigned int i0 = 0; i0 < iConstits.size(); i0++ ) {
100 if(
fPuppiAlgo[pPupId].numAlgos() <= iOpt) pPupId = -1;
101 if(pPupId == -1) {
fVals.push_back(-1);
continue;}
104 bool pCharged =
fPuppiAlgo[pPupId].isCharged(iOpt);
105 double pCone =
fPuppiAlgo[pPupId].coneSize (iOpt);
107 if(!pCharged) pVal =
goodVar(iConstits[i0],iParticles ,pAlgo,pCone);
108 if( pCharged) pVal =
goodVar(iConstits[i0],iChargedParticles,pAlgo,pCone);
109 fVals.push_back(pVal);
112 LogDebug(
"NotFound" ) <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt() <<
" -- " << iConstits[i0].eta() << endl;
115 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 62 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 144 of file PuppiContainer.cc.
References funct::abs(), alignCSCRings::e, eta(), edm::isFinite(), LogDebug, bookConverter::max, EnergyCorrector::pt, and reset().
154 for(
int i0 = 0; i0 < lNMaxAlgo; i0++) {
157 std::vector<double> pVals;
158 for(
int i0 = 0; i0 < lNParticles; i0++) {
178 for(
int i1 = 0; i1 < lNAlgos; i1++) pVals.push_back(
fVals[lNParticles*i1+i0]);
179 pWeight =
fPuppiAlgo[pPupId].compute(pVals,pChi2);
193 if(
std::abs(pWeight) < std::numeric_limits<double>::denorm_min() )
continue;
196 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 67 of file PuppiContainer.cc.
References funct::abs(), i, fff_deleter::log, M_PI, phi, EgammaValidation_Wenu_cff::sel, and MetTreeProducer::var().
68 if(iId == -1)
return 1;
69 fastjet::Selector
sel = fastjet::SelectorCircle(
R);
70 sel.set_reference(centre);
71 vector<PseudoJet> near_particles =
sel(particles);
75 for(
unsigned int i=0;
i<near_particles.size();
i++){
76 double pDEta = near_particles[
i].eta()-centre.eta();
77 double pDPhi =
std::abs(near_particles[
i].
phi()-centre.phi());
78 if(pDPhi > 2.*
M_PI-pDPhi) pDPhi = 2.*
M_PI-pDPhi;
79 double pDR2 = pDEta*pDEta+pDPhi*pDPhi;
80 if(
std::abs(pDR2) < 0.0001)
continue;
81 if(iId == 0) var += (near_particles[
i].pt()/pDR2);
82 if(iId == 1) var += near_particles[
i].pt();
83 if(iId == 2) var += (1./pDR2);
84 if(iId == 3) var += (1./pDR2);
85 if(iId == 4) var += near_particles[
i].pt();
86 if(iId == 5) var += (near_particles[
i].pt() * near_particles[
i].pt()/pDR2);
88 if(iId == 1) var += centre.pt();
89 if(iId == 0 && var != 0) var =
log(var);
90 if(iId == 3 && var != 0) var =
log(var);
91 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 |