1 #ifndef PFProducer_PFCandConnector_H_ 2 #define PFProducer_PFCandConnector_H_ 21 pfC_ = std::make_unique<reco::PFCandidateCollection>();
42 bCorrect = iCfgCandConnector.
getParameter<
bool>(
"bCorrect");
44 bCalibPrimary = iCfgCandConnector.
getParameter<
bool>(
"bCalibPrimary");
46 if(iCfgCandConnector.
exists(
"dptRel_PrimaryTrack")) dptRel_PrimaryTrack = iCfgCandConnector.
getParameter<
double>(
"dptRel_PrimaryTrack");
47 else {
edm::LogWarning(
"PFCandConnector") <<
"dptRel_PrimaryTrack doesn't exist. Setting a default safe value 0" << std::endl; dptRel_PrimaryTrack = 0;}
49 if(iCfgCandConnector.
exists(
"dptRel_MergedTrack")) dptRel_MergedTrack = iCfgCandConnector.
getParameter<
double>(
"dptRel_MergedTrack");
50 else {
edm::LogWarning(
"PFCandConnector") <<
"dptRel_MergedTrack doesn't exist. Setting a default safe value 0" << std::endl; dptRel_MergedTrack = 0;}
52 if(iCfgCandConnector.
exists(
"ptErrorSecondary")) ptErrorSecondary = iCfgCandConnector.
getParameter<
double>(
"ptErrorSecondary");
53 else {
edm::LogWarning(
"PFCandConnector") <<
"ptErrorSecondary doesn't exist. Setting a default safe value 0" << std::endl; ptErrorSecondary = 0;}
55 if(iCfgCandConnector.
exists(
"nuclCalibFactors")) nuclCalibFactors = iCfgCandConnector.
getParameter<std::vector<double> >(
"nuclCalibFactors");
56 else {
edm::LogWarning(
"PFCandConnector") <<
"nuclear calib factors doesn't exist the factor would not be applyed" << std::endl; }
58 setParameters(bCorrect, bCalibPrimary, dptRel_PrimaryTrack, dptRel_MergedTrack, ptErrorSecondary, nuclCalibFactors);
68 std::unique_ptr<reco::PFCandidateCollection>
connect(std::unique_ptr<reco::PFCandidateCollection>& pfCand);
88 std::unique_ptr<reco::PFCandidateCollection>
pfC_;
std::vector< double > fConst_
T getParameter(std::string const &) const
std::unique_ptr< reco::PFCandidateCollection > pfC_
Collection of primary PFCandidates to be transmitted to the Event.
void analyseNuclearWSec(std::unique_ptr< reco::PFCandidateCollection > &, unsigned int)
Analyse nuclear interactions where a secondary track is present.
bool isPrimaryNucl(const reco::PFCandidate &pf) const
std::vector< bool > bMask_
A mask to define the candidates which shall not be transmitted.
std::unique_ptr< reco::PFCandidateCollection > connect(std::unique_ptr< reco::PFCandidateCollection > &pfCand)
bool isSecondaryNucl(const reco::PFCandidate &pf) const
double rescaleFactor(const double pt, const double cFrac) const
Return a calibration factor for a reconstructed nuclear interaction.
bool exists(std::string const ¶meterName) const
checks if a parameter exists
static const reco::PFCandidate::Flags fT_FROM_DISP_
std::vector< double > fNorm_
static const reco::PFCandidate::Flags fT_TO_DISP_
std::vector< double > fExp_
Based on a class from : V. Roberfroid, February 2008.
void analyseNuclearWPrim(std::unique_ptr< reco::PFCandidateCollection > &, unsigned int)
Analyse nuclear interactions where a primary or merged track is present.
static const double pion_mass2
Useful constants.
double dptRel_PrimaryTrack_
bool bCalibPrimary_
Calibration parameters for the reconstructed nuclear interactions.
Particle reconstructed by the particle flow algorithm.
void setParameters(const edm::ParameterSet &iCfgCandConnector)
void setDebug(bool debug)
double dptRel_MergedTrack_