14 m_Tool_InformationStore(
"PanTau::Tool_InformationStore/Tool_InformationStore"),
15 m_Tool_ModeDiscriminator_1p0n_vs_1p1n(
"PanTau::Tool_ModeDiscriminator/Tool_ModeDiscriminator"),
16 m_Tool_ModeDiscriminator_1p1n_vs_1pXn(
"PanTau::Tool_ModeDiscriminator/Tool_ModeDiscriminator"),
17 m_Tool_ModeDiscriminator_3p0n_vs_3pXn(
"PanTau::Tool_ModeDiscriminator/Tool_ModeDiscriminator")
44 ATH_CHECK(m_Tool_ModeDiscriminator_1p0n_vs_1p1n.retrieve());
45 ATH_CHECK(m_Tool_ModeDiscriminator_1p1n_vs_1pXn.retrieve());
46 ATH_CHECK(m_Tool_ModeDiscriminator_3p0n_vs_3pXn.retrieve());
49 ATH_CHECK( m_Tool_InformationStore->getInfo_String(
"FeatureExtractor_VarTypeName_varTypeName_Basic", m_varTypeName_Prefix_Basic) );
52 ATH_CHECK( m_Tool_InformationStore->getInfo_Double(
"DecayModeDeterminator_BDTCutValue_R10X_CellBased", m_BDTCutValue_R10X_CellBased) );
53 ATH_CHECK( m_Tool_InformationStore->getInfo_Double(
"DecayModeDeterminator_BDTCutValue_R11X_CellBased", m_BDTCutValue_R11X_CellBased) );
54 ATH_CHECK( m_Tool_InformationStore->getInfo_Double(
"DecayModeDeterminator_BDTCutValue_R110_CellBased", m_BDTCutValue_R110_CellBased) );
55 ATH_CHECK( m_Tool_InformationStore->getInfo_Double(
"DecayModeDeterminator_BDTCutValue_R1XX_CellBased", m_BDTCutValue_R1XX_CellBased) );
56 ATH_CHECK( m_Tool_InformationStore->getInfo_Double(
"DecayModeDeterminator_BDTCutValue_R30X_CellBased", m_BDTCutValue_R30X_CellBased) );
57 ATH_CHECK( m_Tool_InformationStore->getInfo_Double(
"DecayModeDeterminator_BDTCutValue_R3XX_CellBased", m_BDTCutValue_R3XX_CellBased) );
59 return StatusCode::SUCCESS;
73 bool invalidForDecayMode = (noValidInput || noAnyConstituents || noSelConstituents || badPt);
78 if(invalidForDecayMode) {
79 ATH_MSG_DEBUG(
"Seed has no constituents assigned and/or input seed has no substructure info - use NotSet mode for this");
83 return StatusCode::SUCCESS;
93 int AdditionalNeutrals = nNeutrals_SubAlg - nPi0Neut_SubAlg;
96 double bdtResponse = -5;
102 if(AdditionalNeutrals == 0) {
111 bdtResponse = m_Tool_ModeDiscriminator_1p0n_vs_1p1n->getResponse(inSeed, isOK);
112 bdtTest = t_1p0n_vs_1p1n;
115 ATH_MSG_WARNING(
"WARNING: problems getting bdt response for 1p0n + X-neutrals. use subAlg mode");
116 decayMode_PanTau = decayMode_SubAlg;
127 if(AdditionalNeutrals == 0) {
129 bdtResponse = m_Tool_ModeDiscriminator_1p0n_vs_1p1n->getResponse(inSeed, isOK);
130 bdtTest = t_1p0n_vs_1p1n;
133 ATH_MSG_WARNING(
"WARNING problems getting bdt response for 1p1n + 0-neutrals. use subAlg mode");
134 decayMode_PanTau = decayMode_SubAlg;
144 bdtResponse = m_Tool_ModeDiscriminator_1p1n_vs_1pXn->getResponse(inSeed, isOK);
145 bdtTest = t_1p1n_vs_1pXn;
148 ATH_MSG_WARNING(
"WARNING problems getting bdt response for 1p1n + X-neutrals. use subAlg mode");
149 decayMode_PanTau = decayMode_SubAlg;
161 bdtResponse = m_Tool_ModeDiscriminator_1p1n_vs_1pXn->getResponse(inSeed, isOK);
162 bdtTest = t_1p1n_vs_1pXn;
165 ATH_MSG_WARNING(
"WARNING problems getting bdt response for 1p1n + X-neutrals. use subAlg mode");
166 decayMode_PanTau = decayMode_SubAlg;
175 if(AdditionalNeutrals == 0) {
183 bdtResponse = m_Tool_ModeDiscriminator_3p0n_vs_3pXn->getResponse(inSeed, isOK);
184 bdtTest = t_3p0n_vs_3pXn;
187 ATH_MSG_WARNING(
"WARNING problems getting bdt response for 3p0n + X-neutrals. use subAlg mode");
188 decayMode_PanTau = decayMode_SubAlg;
200 bdtResponse = m_Tool_ModeDiscriminator_3p0n_vs_3pXn->getResponse(inSeed, isOK);
201 bdtTest = t_3p0n_vs_3pXn;
204 ATH_MSG_WARNING(
"WARNING problems getting bdt response for 3p0n + X-neutrals. use subAlg mode");
205 decayMode_PanTau = decayMode_SubAlg;
217 bdtTest = t_UnknownTest;
220 if(inAlgName !=
"CellBased") {
221 ATH_MSG_WARNING(
"Name of input algorithm not known - use mode from sub alg!");
222 decayMode_PanTau = decayMode_SubAlg;
224 bdtTest = t_UnknownTest;
234 double nPhotons = 0.;
235 std::vector<PanTau::TauConstituent*> shots = pi0Neut->
getShots();
237 for(
unsigned int iShot=0; iShot<shots.size(); iShot++) {
238 nPhotons = nPhotons + (
double)(shots.at(iShot)->getNPhotonsInShot());
251 ATH_MSG_WARNING(
"Could not find expected CellBased neutral -> don't check for photons in cluster");
257 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_RecoMode", (
double)decayMode_SubAlg);
258 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_RecoMode_PanTau", (
double)decayMode_PanTau);
259 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_RecoMode_PanTauExtended", (
double)decayMode_PanTauExtended);
263 if(bdtTest == t_1p0n_vs_1p1n) {
264 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p0n_vs_1p1n", bdtResponse);
265 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p1n_vs_1pXn", -5.);
266 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_3p0n_vs_3pXn", -5.);
268 if(bdtTest == t_1p1n_vs_1pXn) {
269 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p0n_vs_1p1n", -5.);
270 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p1n_vs_1pXn", bdtResponse);
271 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_3p0n_vs_3pXn", -5.);
273 if(bdtTest == t_3p0n_vs_3pXn) {
274 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p0n_vs_1p1n", -5.);
275 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p1n_vs_1pXn", -5.);
276 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_3p0n_vs_3pXn", bdtResponse);
278 if(bdtTest == t_UnknownTest) {
279 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p0n_vs_1p1n", -5.);
280 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_1p1n_vs_1pXn", -5.);
281 features->
addFeature(inAlgName +
"_" + m_varTypeName_Prefix_Basic +
"_BDTValue_3p0n_vs_3pXn", -5.);
284 return StatusCode::SUCCESS;