7 #include "CLHEP/Units/SystemOfUnits.h"
20 #include "CaloEvent/CaloClusterContainer.h"
35 declareInterface<IDataRetriever>(
this);
57 if ( tauCont->
size() > 0){
69 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Unable to retrieve iterator for Jet collection" <<
endmsg;
76 std::string::size_type position =
iterator.key().find(
"HLT",0);
78 std::string::size_type positionFast =
iterator.key().find(
"Atlfast",0);
79 if ( positionFast == 0){
89 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Collection " <<
iterator.key() <<
" not found in SG " <<
endmsg;
97 return StatusCode::SUCCESS;
120 DataVect isTauString; isTauString.reserve(taucont->
size());
129 DataVect stripWidth; stripWidth.reserve(taucont->
size());
130 DataVect logLhRatio; logLhRatio.reserve(taucont->
size());
135 DataVect clusterKeyVec; clusterKeyVec.reserve(taucont->
size());
136 DataVect clusterIndexVec; clusterIndexVec.reserve(taucont->
size());
137 DataVect trackKeyVec; trackKeyVec.reserve(taucont->
size());
138 DataVect trackIndexVec; trackIndexVec.reserve(taucont->
size());
139 DataVect trackLinkCountVec; trackLinkCountVec.reserve(taucont->
size());
147 bool checkDataType=
true;
149 if ( taujetItr != taujetItrE) {
150 dataType = (*taujetItr)->dataType();
162 unsigned int countTrackLinks = 0;
163 unsigned int numTauJets = 0;
164 std::string numTracksPerTaujet =
"";
165 std::string trackKeyString =
"trackKey";
166 std::string trackIndexString =
"trackIndex";
170 for (; taujetItr != taujetItrE; ++taujetItr) {
172 countTrackLinks += myTrackLinkVector.
size();
175 if ( numTauJets == 0 ){
176 numTracksPerTaujet =
"0";
178 numTracksPerTaujet =
DataType( countTrackLinks/((
double) numTauJets )).toString();
180 trackKeyString =
"trackKey multiple=\""+numTracksPerTaujet+
"\"";
181 trackIndexString =
"trackIndex multiple=\""+numTracksPerTaujet+
"\"";
185 " trackIndexString: " << trackIndexString <<
endmsg;
187 std::string labelStr =
"none";
188 std::string isTauStr =
"none";
190 taujetItr = taucont->
begin();
191 for (; taujetItr != taujetItrE; ++taujetItr) {
204 std::string taujetAuthor =
"none";
205 if (( (*taujetItr)->author()) == 0){ taujetAuthor =
"default"; }
206 if (( (*taujetItr)->author()) == 1){ taujetAuthor =
"tauRec"; }
207 if (( (*taujetItr)->author()) == 2){ taujetAuthor =
"tau1P3P"; }
210 labelStr = taujetAuthor;
220 isTauStr =
"TauLlhLoose"; labelStr +=
"_TauLlhLoose";}
222 isTauStr =
"TauLlhMedium"; labelStr +=
"_TauLlhMedium";}
224 isTauStr =
"TauLlhTight"; labelStr +=
"_TauLlhTight";}
226 isTauStr =
"TauCutLoose"; labelStr +=
"_TauCutLoose";}
228 isTauStr =
"TauCutMedium"; labelStr +=
"_TauCutMedium";}
230 isTauStr =
"TauCutTight"; labelStr +=
"_TauCutTight"; }
232 <<
", label:" << labelStr <<
endmsg;
233 isTauString.push_back (isTauStr);
234 label.push_back( labelStr );
254 std::string clusterKey = clusterLink.
dataID();
255 int clusterIndex = clusterLink.
index();
256 clusterKeyVec.push_back(
DataType( clusterKey ));
257 clusterIndexVec.push_back(
DataType( clusterIndex));
259 clusterKeyVec.push_back(
DataType(
"none" ));
260 clusterIndexVec.push_back(
DataType( -1 ));
266 unsigned int trackLinkCount = myTrackLinkVector.
size();
267 trackLinkCountVec.push_back(
DataType( trackLinkCount ));
269 if (trackLinkCount > 0){
270 for (
unsigned int i=0;
i<trackLinkCount; ++
i){
273 std::string trackKey = trackParticleLink.
dataID();
274 int trackIndex = trackParticleLink.
index();
275 if ( trackParticleLink.
isValid()){
279 trackKeyVec.push_back(
DataType( trackKey ));
280 trackIndexVec.push_back(
DataType( trackIndex));
282 trackKeyVec.push_back(
DataType(
"none" ));
283 trackIndexVec.push_back(
DataType( -1 ));
289 std::string numTracksEmpty =
"0";
302 clusterKeyVec.push_back(
DataType(
"none" ));
303 clusterIndexVec.push_back(
DataType( -1 ));
304 trackKeyVec.push_back(
DataType(
"none" ));
305 trackIndexVec.push_back(
DataType( -1 ));
306 trackLinkCountVec.push_back(
DataType( -1 ));
321 DataMap[
"isTauString"] = isTauString;
323 DataMap[
"numTracks"] = numTracks;
330 DataMap[
"stripWidth"] = stripWidth;
331 DataMap[
"logLhRatio"] = logLhRatio;
334 DataMap[
"clusterKey"] = clusterKeyVec;
335 DataMap[
"clusterIndex"] = clusterIndexVec;
336 DataMap[trackKeyString] = trackKeyVec;
337 DataMap[trackIndexString] = trackIndexVec;
338 DataMap[
"trackLinkCount"] = trackLinkCountVec;