Commit c9edd456 authored by Scott Snyder's avatar Scott Snyder Committed by Graeme Stewart
Browse files

Fix coverity warnings. (PanTauEvent-00-05-07)

	* Tagging PanTauEvent-00-05-07.
	* Fix coverity warnings.

2014 October 29 Christian Limbach <limbach -at- physik.uni-bonn.de>
    * Fix calculation of core (aka proto) momentum
    * Update DecayMode enumeration in PanTauSeed
    * tag as 00-05-06
parent 02626150
......@@ -41,13 +41,14 @@ namespace PanTau {
};
enum DecayMode {
t_Mode_1p0n,
t_Mode_1p1n,
t_Mode_1pXn,
t_Mode_3p0n,
t_Mode_3pXn,
t_Mode_Other,
t_Mode_NotSet
Mode_1p0n,
Mode_1p1n,
Mode_1pXn,
Mode_3p0n,
Mode_3pXn,
Mode_Other, // for 2p, 4p, 5p taus
Mode_NotSet, // for 0p, >= 6p
Mode_Error // use this as initialisation
};
static int getDecayMode(int nCharged, int nNeutral);
......
......@@ -43,7 +43,7 @@ public:
/** Default constructor */
TauFeature();
/** Copy Constructor */
TauFeature(const TauFeature& feature);
//TauFeature(const TauFeature& feature);
// /** Assignment operator */
// TauFeature& operator=(const TauFeature& seed);
......
......@@ -77,6 +77,4 @@ std::string PanTau::CorrectedEflowMomentum::typeName(CorrectedEflowMomentumType
default: return "BadType";
}
return "";
}
......@@ -62,7 +62,9 @@ PanTau::PanTauDetails::PanTauDetails()
PanTau::PanTauDetails::PanTauDetails(PanTau::PanTauSeed* inputSeed)
:
Analysis::TauDetails(),
m_PanTauSeed(inputSeed)
m_PanTauSeed(inputSeed),
m_features(nullptr),
m_seed(nullptr)
{
if(inputSeed->getIsValidSeed() == true) {
bool isValid = false;
......@@ -104,7 +106,42 @@ PanTau::PanTauDetails::PanTauDetails(
Analysis::TauDetails(),
m_PanTauSeed(0),
m_features(features),
m_seed(seed)
m_seed(seed),
m_RecoMode_SubAlg(-5),
m_RecoMode_PanTau(-5),
m_BDTValue_1p0n_vs_1p1n(-5),
m_BDTValue_1p1n_vs_1pXn(-5),
m_BDTValue_3p0n_vs_3pXn(-5),
m_pantau_proto_pt(-1111),
m_pantau_proto_eta(-11),
m_pantau_proto_phi(-11),
m_pantau_proto_m(-1111),
m_pantau_final_pt(-1111),
m_pantau_final_eta(-11),
m_pantau_final_phi(-11),
m_pantau_final_m(-1111),
m_eflowRec_Basic_NPi0NeutConsts(-5),
m_eflowRec_Basic_NNeutralConsts(-5),
m_eflowRec_Charged_HLV_SumPt(-1111),
m_eflowRec_Charged_Ratio_EtOverEtAllConsts(-5),
m_eflowRec_Neutral_HLV_SumM(-1111),
m_eflowRec_Neutral_PID_BDTValues_EtSort_1(-5),
m_eflowRec_Neutral_PID_BDTValues_BDTSort_2(-5),
m_eflowRec_Neutral_Ratio_EtOverEtAllConsts(-5),
m_eflowRec_Neutral_Mean_DRToLeading_WrtEtAllConsts(-5),
m_eflowRec_Combined_DeltaR1stNeutralTo1stCharged(-5),
m_CellBased_Basic_NNeutralConsts(-5),
m_CellBased_Charged_JetMoment_EtDRxTotalEt(-1111),
m_CellBased_Charged_StdDev_Et_WrtEtAllConsts(-1111),
m_CellBased_Neutral_HLV_SumM(-1111),
m_CellBased_Neutral_PID_BDTValues_BDTSort_1(-5),
m_CellBased_Neutral_PID_BDTValues_BDTSort_2(-5),
m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts(-5),
m_CellBased_Neutral_Ratio_EtOverEtAllConsts(-5),
m_CellBased_Neutral_Shots_NPhotonsInSeed(-5),
m_CellBased_Combined_DeltaR1stNeutralTo1stCharged(-5)
{
}
......@@ -115,7 +152,42 @@ PanTau::PanTauDetails::PanTauDetails(
Analysis::TauDetails(),
m_PanTauSeed(rhs.m_PanTauSeed),
m_features(rhs.m_features ? new PanTau::TauFeature(*rhs.m_features) : 0),
m_seed(rhs.m_seed)
m_seed(rhs.m_seed),
m_RecoMode_SubAlg(rhs.m_RecoMode_SubAlg),
m_RecoMode_PanTau(rhs.m_RecoMode_PanTau),
m_BDTValue_1p0n_vs_1p1n(rhs.m_BDTValue_1p0n_vs_1p1n),
m_BDTValue_1p1n_vs_1pXn(rhs.m_BDTValue_1p1n_vs_1pXn),
m_BDTValue_3p0n_vs_3pXn(rhs.m_BDTValue_3p0n_vs_3pXn),
m_pantau_proto_pt(rhs.m_pantau_proto_pt),
m_pantau_proto_eta(rhs.m_pantau_proto_eta),
m_pantau_proto_phi(rhs.m_pantau_proto_phi),
m_pantau_proto_m(rhs.m_pantau_proto_m),
m_pantau_final_pt(rhs.m_pantau_final_pt),
m_pantau_final_eta(rhs.m_pantau_final_eta),
m_pantau_final_phi(rhs.m_pantau_final_phi),
m_pantau_final_m(rhs.m_pantau_final_m),
m_eflowRec_Basic_NPi0NeutConsts(rhs.m_eflowRec_Basic_NPi0NeutConsts),
m_eflowRec_Basic_NNeutralConsts(rhs.m_eflowRec_Basic_NNeutralConsts),
m_eflowRec_Charged_HLV_SumPt(rhs.m_eflowRec_Charged_HLV_SumPt),
m_eflowRec_Charged_Ratio_EtOverEtAllConsts(rhs.m_eflowRec_Charged_Ratio_EtOverEtAllConsts),
m_eflowRec_Neutral_HLV_SumM(rhs.m_eflowRec_Neutral_HLV_SumM),
m_eflowRec_Neutral_PID_BDTValues_EtSort_1(rhs.m_eflowRec_Neutral_PID_BDTValues_EtSort_1),
m_eflowRec_Neutral_PID_BDTValues_BDTSort_2(rhs.m_eflowRec_Neutral_PID_BDTValues_BDTSort_2),
m_eflowRec_Neutral_Ratio_EtOverEtAllConsts(rhs.m_eflowRec_Neutral_Ratio_EtOverEtAllConsts),
m_eflowRec_Neutral_Mean_DRToLeading_WrtEtAllConsts(rhs.m_eflowRec_Neutral_Mean_DRToLeading_WrtEtAllConsts),
m_eflowRec_Combined_DeltaR1stNeutralTo1stCharged(rhs.m_eflowRec_Combined_DeltaR1stNeutralTo1stCharged),
m_CellBased_Basic_NNeutralConsts(rhs.m_CellBased_Basic_NNeutralConsts),
m_CellBased_Charged_JetMoment_EtDRxTotalEt(rhs.m_CellBased_Charged_JetMoment_EtDRxTotalEt),
m_CellBased_Charged_StdDev_Et_WrtEtAllConsts(rhs.m_CellBased_Charged_StdDev_Et_WrtEtAllConsts),
m_CellBased_Neutral_HLV_SumM(rhs.m_CellBased_Neutral_HLV_SumM),
m_CellBased_Neutral_PID_BDTValues_BDTSort_1(rhs.m_CellBased_Neutral_PID_BDTValues_BDTSort_1),
m_CellBased_Neutral_PID_BDTValues_BDTSort_2(rhs.m_CellBased_Neutral_PID_BDTValues_BDTSort_2),
m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts(rhs.m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts),
m_CellBased_Neutral_Ratio_EtOverEtAllConsts(rhs.m_CellBased_Neutral_Ratio_EtOverEtAllConsts),
m_CellBased_Neutral_Shots_NPhotonsInSeed(rhs.m_CellBased_Neutral_Shots_NPhotonsInSeed),
m_CellBased_Combined_DeltaR1stNeutralTo1stCharged(rhs.m_CellBased_Combined_DeltaR1stNeutralTo1stCharged)
{
}
......@@ -132,6 +204,42 @@ PanTau::PanTauDetails& PanTau::PanTauDetails::operator=(const PanTau::PanTauDeta
m_features = (rhs.m_features ? new PanTau::TauFeature(*rhs.m_features) : 0);
m_seed = rhs.m_seed;
m_PanTauSeed = rhs.m_PanTauSeed;
m_RecoMode_SubAlg = rhs.m_RecoMode_SubAlg;
m_RecoMode_PanTau = rhs.m_RecoMode_PanTau;
m_BDTValue_1p0n_vs_1p1n = rhs.m_BDTValue_1p0n_vs_1p1n;
m_BDTValue_1p1n_vs_1pXn = rhs.m_BDTValue_1p1n_vs_1pXn;
m_BDTValue_3p0n_vs_3pXn = rhs.m_BDTValue_3p0n_vs_3pXn;
m_pantau_proto_pt = rhs.m_pantau_proto_pt;
m_pantau_proto_eta = rhs.m_pantau_proto_eta;
m_pantau_proto_phi = rhs.m_pantau_proto_phi;
m_pantau_proto_m = rhs.m_pantau_proto_m;
m_pantau_final_pt = rhs.m_pantau_final_pt;
m_pantau_final_eta = rhs.m_pantau_final_eta;
m_pantau_final_phi = rhs.m_pantau_final_phi;
m_pantau_final_m = rhs.m_pantau_final_m;
m_eflowRec_Basic_NPi0NeutConsts = rhs.m_eflowRec_Basic_NPi0NeutConsts;
m_eflowRec_Basic_NNeutralConsts = rhs.m_eflowRec_Basic_NNeutralConsts;
m_eflowRec_Charged_HLV_SumPt = rhs.m_eflowRec_Charged_HLV_SumPt;
m_eflowRec_Charged_Ratio_EtOverEtAllConsts = rhs.m_eflowRec_Charged_Ratio_EtOverEtAllConsts;
m_eflowRec_Neutral_HLV_SumM = rhs.m_eflowRec_Neutral_HLV_SumM;
m_eflowRec_Neutral_PID_BDTValues_EtSort_1 = rhs.m_eflowRec_Neutral_PID_BDTValues_EtSort_1;
m_eflowRec_Neutral_PID_BDTValues_BDTSort_2 = rhs.m_eflowRec_Neutral_PID_BDTValues_BDTSort_2;
m_eflowRec_Neutral_Ratio_EtOverEtAllConsts = rhs.m_eflowRec_Neutral_Ratio_EtOverEtAllConsts;
m_eflowRec_Neutral_Mean_DRToLeading_WrtEtAllConsts = rhs.m_eflowRec_Neutral_Mean_DRToLeading_WrtEtAllConsts;
m_eflowRec_Combined_DeltaR1stNeutralTo1stCharged = rhs.m_eflowRec_Combined_DeltaR1stNeutralTo1stCharged;
m_CellBased_Basic_NNeutralConsts = rhs.m_CellBased_Basic_NNeutralConsts;
m_CellBased_Charged_JetMoment_EtDRxTotalEt = rhs.m_CellBased_Charged_JetMoment_EtDRxTotalEt;
m_CellBased_Charged_StdDev_Et_WrtEtAllConsts = rhs.m_CellBased_Charged_StdDev_Et_WrtEtAllConsts;
m_CellBased_Neutral_HLV_SumM = rhs.m_CellBased_Neutral_HLV_SumM;
m_CellBased_Neutral_PID_BDTValues_BDTSort_1 = rhs.m_CellBased_Neutral_PID_BDTValues_BDTSort_1;
m_CellBased_Neutral_PID_BDTValues_BDTSort_2 = rhs.m_CellBased_Neutral_PID_BDTValues_BDTSort_2;
m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts = rhs.m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts;
m_CellBased_Neutral_Ratio_EtOverEtAllConsts = rhs.m_CellBased_Neutral_Ratio_EtOverEtAllConsts;
m_CellBased_Neutral_Shots_NPhotonsInSeed = rhs.m_CellBased_Neutral_Shots_NPhotonsInSeed;
m_CellBased_Combined_DeltaR1stNeutralTo1stCharged = rhs.m_CellBased_Combined_DeltaR1stNeutralTo1stCharged;
}
return *this;
}
......
......@@ -50,6 +50,18 @@ PanTau::PanTauDetails_CellBased::PanTauDetails_CellBased(PanTau::PanTauSeed* inp
m_CellBased_Combined_DeltaR1stNeutralTo1stCharged = curFeatures->value(m_Name_InputAlg + "Combined_DeltaR1stNeutralTo1stCharged", isValid);
}
else {
m_CellBased_Basic_NNeutralConsts = -5;
m_CellBased_Charged_JetMoment_EtDRxTotalEt = -1111;
m_CellBased_Charged_StdDev_Et_WrtEtAllConsts = -1111;
m_CellBased_Neutral_HLV_SumM = -1111;
m_CellBased_Neutral_PID_BDTValues_BDTSort_1 = -5;
m_CellBased_Neutral_PID_BDTValues_BDTSort_2 = -5;
m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts = -5;
m_CellBased_Neutral_Ratio_EtOverEtAllConsts = -5;
m_CellBased_Neutral_Shots_NPhotonsInSeed = -5;
m_CellBased_Combined_DeltaR1stNeutralTo1stCharged = -5;
}
}
......@@ -84,16 +96,16 @@ PanTau::PanTauDetails_CellBased::~PanTauDetails_CellBased()
PanTau::PanTauDetails_CellBased& PanTau::PanTauDetails_CellBased::operator=(const PanTau::PanTauDetails_CellBased& rhs)
{
if (this!=&rhs){
m_CellBased_Basic_NNeutralConsts = m_CellBased_Basic_NNeutralConsts;
m_CellBased_Charged_JetMoment_EtDRxTotalEt = m_CellBased_Charged_JetMoment_EtDRxTotalEt;
m_CellBased_Charged_StdDev_Et_WrtEtAllConsts = m_CellBased_Charged_StdDev_Et_WrtEtAllConsts;
m_CellBased_Neutral_HLV_SumM = m_CellBased_Neutral_HLV_SumM;
m_CellBased_Neutral_PID_BDTValues_BDTSort_1 = m_CellBased_Neutral_PID_BDTValues_BDTSort_1;
m_CellBased_Neutral_PID_BDTValues_BDTSort_2 = m_CellBased_Neutral_PID_BDTValues_BDTSort_2;
m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts = m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts;
m_CellBased_Neutral_Ratio_EtOverEtAllConsts = m_CellBased_Neutral_Ratio_EtOverEtAllConsts;
m_CellBased_Neutral_Shots_NPhotonsInSeed = m_CellBased_Neutral_Shots_NPhotonsInSeed;
m_CellBased_Combined_DeltaR1stNeutralTo1stCharged = m_CellBased_Combined_DeltaR1stNeutralTo1stCharged;
m_CellBased_Basic_NNeutralConsts = rhs.m_CellBased_Basic_NNeutralConsts;
m_CellBased_Charged_JetMoment_EtDRxTotalEt = rhs.m_CellBased_Charged_JetMoment_EtDRxTotalEt;
m_CellBased_Charged_StdDev_Et_WrtEtAllConsts = rhs.m_CellBased_Charged_StdDev_Et_WrtEtAllConsts;
m_CellBased_Neutral_HLV_SumM = rhs.m_CellBased_Neutral_HLV_SumM;
m_CellBased_Neutral_PID_BDTValues_BDTSort_1 = rhs.m_CellBased_Neutral_PID_BDTValues_BDTSort_1;
m_CellBased_Neutral_PID_BDTValues_BDTSort_2 = rhs.m_CellBased_Neutral_PID_BDTValues_BDTSort_2;
m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts = rhs.m_CellBased_Neutral_Ratio_1stBDTEtOverEtAllConsts;
m_CellBased_Neutral_Ratio_EtOverEtAllConsts = rhs.m_CellBased_Neutral_Ratio_EtOverEtAllConsts;
m_CellBased_Neutral_Shots_NPhotonsInSeed = rhs.m_CellBased_Neutral_Shots_NPhotonsInSeed;
m_CellBased_Combined_DeltaR1stNeutralTo1stCharged = rhs.m_CellBased_Combined_DeltaR1stNeutralTo1stCharged;
}
return *this;
}
......
......@@ -50,6 +50,18 @@ PanTau::PanTauDetails_eflowRec::PanTauDetails_eflowRec(PanTau::PanTauSeed* input
m_eflowRec_Combined_DeltaR1stNeutralTo1stCharged = curFeatures->value(m_Name_InputAlg + "_Combined_DeltaR1stNeutralTo1stCharged", isValid);
}
else {
m_eflowRec_Basic_NPi0NeutConsts = -5;
m_eflowRec_Basic_NNeutralConsts = -5;
m_eflowRec_Charged_HLV_SumPt = -1111;
m_eflowRec_Charged_Ratio_EtOverEtAllConsts = -5;
m_eflowRec_Neutral_HLV_SumM = -1111;
m_eflowRec_Neutral_PID_BDTValues_EtSort_1 = -5;
m_eflowRec_Neutral_PID_BDTValues_BDTSort_2 = -5;
m_eflowRec_Neutral_Ratio_EtOverEtAllConsts = -5;
m_eflowRec_Neutral_Mean_DRToLeading_WrtEtAllConsts = -5;
m_eflowRec_Combined_DeltaR1stNeutralTo1stCharged = -5;
}
}
......
......@@ -25,6 +25,8 @@ PanTau::PanTauSeed::PanTauSeed()
m_ConstituentsList_Wide(),
m_ConstituentsList_AllSelected(),
m_ConstituentsList_All(),
m_DecayMode_BySubAlg(0),
m_DecayMode_ByPanTau(0),
m_decayModeHack_CellBasedShots(false),
m_Features(0)
{
......@@ -75,6 +77,8 @@ PanTau::PanTauSeed::PanTauSeed(const PanTau::PanTauSeed& rhs)
m_ConstituentsList_Wide(rhs.m_ConstituentsList_Wide),
m_ConstituentsList_AllSelected(rhs.m_ConstituentsList_AllSelected),
m_ConstituentsList_All(rhs.m_ConstituentsList_All),
m_DecayMode_BySubAlg(rhs.m_DecayMode_BySubAlg),
m_DecayMode_ByPanTau(rhs.m_DecayMode_ByPanTau),
m_decayModeHack_CellBasedShots(rhs.m_decayModeHack_CellBasedShots),
m_Features( (rhs.m_Features ? new PanTau::TauFeature(*rhs.m_Features) : 0) )
{
......@@ -181,7 +185,7 @@ PanTau::PanTauSeed::PanTauSeed( std::string nameInpu
//add all charged and neutral constituents (i.e. from core region) to core proto momentum
if(curConst->isOfType(PanTau::TauConstituent::t_Charged)) {hlv_SumConstituents_Core += curConst->hlv(); continue;}
if(curConst->isOfType(PanTau::TauConstituent::t_Neutral)) {hlv_SumConstituents_Core += curConst->hlv(); continue;}
if(curConst->isOfType(PanTau::TauConstituent::t_Pi0Neut)) {hlv_SumConstituents_Core += curConst->hlv(); continue;}
}//end loop over constituents
......@@ -190,7 +194,11 @@ PanTau::PanTauSeed::PanTauSeed( std::string nameInpu
//set mode as obtained from subalg
m_DecayMode_BySubAlg = PanTau::PanTauSeed::getDecayMode(nCharged, nPi0Neut);
m_DecayMode_ByPanTau = PanTau::PanTauSeed::t_Mode_NotSet;
m_DecayMode_ByPanTau = PanTau::PanTauSeed::Mode_Error;
if(isOfTechnicalQuality(PanTau::PanTauSeed::t_NoValidInputTau) == true) {
m_DecayMode_ByPanTau = PanTau::PanTauSeed::Mode_NotSet;
}
// std::cout << "PanTau::PanTauSeed\tWARNING\tProtoMomentumCore: " << m_ProtoMomentum_Core.perp() << ", " << m_ProtoMomentum_Core.eta() << ", " << m_ProtoMomentum_Core.phi() << ", " << m_ProtoMomentum_Core.m() << std::endl;
}
......@@ -208,6 +216,8 @@ PanTau::PanTauSeed::PanTauSeed( std::string nameInputAl
m_TypeHLVs(),
m_ConstituentsList_AllSelected(),
m_ConstituentsList_All(),
m_DecayMode_BySubAlg(0),
m_DecayMode_ByPanTau(0),
m_decayModeHack_CellBasedShots(false)
{
m_IsValidSeed = false;
......@@ -223,16 +233,23 @@ int PanTau::PanTauSeed::getDecayMode(int nCharged, int nNeutral) {
int decayMode;
// 1 Prong modes
if(nCharged == 1 && nNeutral == 0) decayMode = (int)PanTau::PanTauSeed::t_Mode_1p0n;
else if(nCharged == 1 && nNeutral == 1) decayMode = (int)PanTau::PanTauSeed::t_Mode_1p1n;
else if(nCharged == 1 && nNeutral > 1) decayMode = (int)PanTau::PanTauSeed::t_Mode_1pXn;
if(nCharged == 1 && nNeutral == 0) decayMode = (int)PanTau::PanTauSeed::Mode_1p0n;
else if(nCharged == 1 && nNeutral == 1) decayMode = (int)PanTau::PanTauSeed::Mode_1p1n;
else if(nCharged == 1 && nNeutral > 1) decayMode = (int)PanTau::PanTauSeed::Mode_1pXn;
// 3 prong modes
else if(nCharged == 3 && nNeutral == 0) decayMode = (int)PanTau::PanTauSeed::t_Mode_3p0n;
else if(nCharged == 3 && nNeutral > 0) decayMode = (int)PanTau::PanTauSeed::t_Mode_3pXn;
else if(nCharged == 3 && nNeutral == 0) decayMode = (int)PanTau::PanTauSeed::Mode_3p0n;
else if(nCharged == 3 && nNeutral > 0) decayMode = (int)PanTau::PanTauSeed::Mode_3pXn;
// other mode
else decayMode = (int)PanTau::PanTauSeed::t_Mode_Other;
else if(nCharged == 2) decayMode = (int)PanTau::PanTauSeed::Mode_Other;
else if(nCharged == 4) decayMode = (int)PanTau::PanTauSeed::Mode_Other;
else if(nCharged == 5) decayMode = (int)PanTau::PanTauSeed::Mode_Other;
else if(nCharged == 0) decayMode = (int)PanTau::PanTauSeed::Mode_NotSet;
else if(nCharged >= 6) decayMode = (int)PanTau::PanTauSeed::Mode_NotSet;
else decayMode = (int)PanTau::PanTauSeed::Mode_Error;
return decayMode;
}
......@@ -242,12 +259,15 @@ std::string PanTau::PanTauSeed::getDecayModeName(int decayMode) {
PanTau::PanTauSeed::DecayMode mode = (PanTau::PanTauSeed::DecayMode)decayMode;
if(mode == PanTau::PanTauSeed::t_Mode_1p0n) return "1p0n";
if(mode == PanTau::PanTauSeed::t_Mode_1p1n) return "1p1n";
if(mode == PanTau::PanTauSeed::t_Mode_1pXn) return "1pXn";
if(mode == PanTau::PanTauSeed::t_Mode_3p0n) return "3p0n";
if(mode == PanTau::PanTauSeed::t_Mode_3pXn) return "3pXn";
return "Other";
if(mode == PanTau::PanTauSeed::Mode_1p0n) return "1p0n";
if(mode == PanTau::PanTauSeed::Mode_1p1n) return "1p1n";
if(mode == PanTau::PanTauSeed::Mode_1pXn) return "1pXn";
if(mode == PanTau::PanTauSeed::Mode_3p0n) return "3p0n";
if(mode == PanTau::PanTauSeed::Mode_3pXn) return "3pXn";
if(mode == PanTau::PanTauSeed::Mode_Other) return "Other";
if(mode == PanTau::PanTauSeed::Mode_Error) return "Error";
if(mode == PanTau::PanTauSeed::Mode_NotSet) return "NotSet";
return "InvalidMode!!!";
}
......
......@@ -102,7 +102,6 @@ std::string PanTau::TauConstituent::getTypeName(PanTau::TauConstituent::Typ
case PanTau::TauConstituent::t_NoType: return "All";
default: return "UnkownType";
}
return "UnkownType";
}
......
......@@ -23,16 +23,6 @@ PanTau::TauFeature::TauFeature()
PanTau::TauFeature::TauFeature(
const PanTau::TauFeature& feature
)
:
m_log(0),
m_featureMap(feature.m_featureMap),
m_vecFeatureMap(feature.m_vecFeatureMap)
{
}
PanTau::TauFeature::~TauFeature()
{
}
......
......@@ -24,8 +24,13 @@ PanTau::TauSeed::TauSeed()
P4EEtaPhiM(0., 0., 0., 0.),
m_jet(0),
m_TauJet(0),
m_RecoModeLoose(),
m_RecoModeMedium(),
m_RecoModeTight(),
m_features(0),
m_correctedEflowMomenta(0)
m_correctedEflowMomenta(0),
m_chargedEflowMomenta(nullptr),
m_emNeutralEflowMomenta(nullptr)
{
}
......@@ -45,8 +50,13 @@ PanTau::TauSeed::TauSeed(
P4EEtaPhiM(fourMom_core),
m_jet(tauJet_Jet),
m_TauJet(tauJet),
m_RecoModeLoose(),
m_RecoModeMedium(),
m_RecoModeTight(),
m_features(features),
m_correctedEflowMomenta(corEfoMomenta)
m_correctedEflowMomenta(corEfoMomenta),
m_chargedEflowMomenta(nullptr),
m_emNeutralEflowMomenta(nullptr)
{
}
......@@ -65,8 +75,13 @@ PanTau::TauSeed::TauSeed(
P4EEtaPhiM(fourMom_core),
m_jet(eflowJet),
m_TauJet(0),
m_RecoModeLoose(),
m_RecoModeMedium(),
m_RecoModeTight(),
m_features(features),
m_correctedEflowMomenta(corEfoMomenta)
m_correctedEflowMomenta(corEfoMomenta),
m_chargedEflowMomenta(nullptr),
m_emNeutralEflowMomenta(nullptr)
{
}
......@@ -83,11 +98,16 @@ PanTau::TauSeed::TauSeed(
P4EEtaPhiM(rhs),
m_jet(rhs.m_jet),
m_TauJet(rhs.m_TauJet),
m_RecoModeLoose(rhs.m_RecoModeLoose),
m_RecoModeMedium(rhs.m_RecoModeMedium),
m_RecoModeTight(rhs.m_RecoModeTight),
m_features(rhs.m_features ? new PanTau::TauFeature(*rhs.m_features) : 0),
m_correctedEflowMomenta(rhs.m_correctedEflowMomenta ? new DataVector<CorrectedEflowMomentum>(*rhs.m_correctedEflowMomenta) : 0)
m_correctedEflowMomenta(rhs.m_correctedEflowMomenta ? new DataVector<CorrectedEflowMomentum>(*rhs.m_correctedEflowMomenta) : 0),
// FIXME: Check again that this works: The copy constructor of DataVector is a `shallow' copy; the new container
// does not own its elements. Do we get problems here, if the copied TauSeed is deleted? Maybe! We have to clone
// all the CorrectedEflowMomentum for those DataVectors which own their elements
m_chargedEflowMomenta(rhs.m_chargedEflowMomenta ? new ConstDataVector<DataVector<CorrectedEflowMomentum> >(*rhs.m_chargedEflowMomenta) : 0),
m_emNeutralEflowMomenta(rhs.m_emNeutralEflowMomenta ? new ConstDataVector<DataVector<CorrectedEflowMomentum> >(*rhs.m_emNeutralEflowMomenta) : 0)
{
}
......@@ -101,7 +121,8 @@ PanTau::TauSeed::~TauSeed()
delete m_jet;
delete m_features;
delete m_correctedEflowMomenta;
delete m_chargedEflowMomenta;
delete m_emNeutralEflowMomenta;
}
......@@ -121,6 +142,8 @@ PanTau::TauSeed& PanTau::TauSeed::operator=(const PanTau::TauSeed& seed)
m_correctedEflowMomenta = (seed.m_correctedEflowMomenta ? new DataVector<CorrectedEflowMomentum>(*seed.m_correctedEflowMomenta) : 0);
// FIXME: Check again that this works: The copy constructor of DataVector is a `shallow' copy; the new container
// does not own its elements. Do we get problems here, if the assigned TauSeed is deleted?
m_chargedEflowMomenta = (seed.m_chargedEflowMomenta ? new ConstDataVector<DataVector<CorrectedEflowMomentum> >(*seed.m_chargedEflowMomenta) : 0);
m_emNeutralEflowMomenta = (seed.m_emNeutralEflowMomenta ? new ConstDataVector<DataVector<CorrectedEflowMomentum> >(*seed.m_emNeutralEflowMomenta) : 0);
}
return *this;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment