10 : m_kMatchingDeltaR(iConfig.getParameter<double>(
"RecoAnalysisMatchingDeltaR")),
11 m_kMatchingPt(iConfig.getParameter<double>(
"RecoAnalysisMatchingPt")),
12 m_kTauMassCut(iConfig.getParameter<double>(
"RecoAnalysisTauMassCut")),
13 m_kTauMass(iConfig.getParameter<double>(
"RecoAnalysisTauMass")),
14 m_kMuonMass(iConfig.getParameter<double>(
"RecoAnalysisMuonMass")),
30 reco::MuonCollection::const_iterator
muon;
43 LogDebug(
"Tau3MuReco") <<
"Could not find correct combination!" << std::endl;
62 LogDebug(
"Tau3MuReco") <<
"A 3rd Track can not be assigned!" << std::endl;
77 reco::TrackCollection::const_iterator iter;
85 <<
" Pt: " <<
track.pt() <<
" Muons Pt is: " << (*iter).pt() << std::endl;
103 double SumDeltaR = 0;
109 LogDebug(
"Tau3MuReco") <<
"Number of tracks found: " <<
Tracks.size() << std::endl;
111 std::multimap<double, const reco::Track> TrackMultiMap;
113 unsigned short muonCounter = 0;
115 reco::TrackCollection::const_iterator
track;
123 SumDeltaR = MuonDeltaR;
128 std::pair<double, const reco::Track> actTrack(SumDeltaR, *
track);
130 TrackMultiMap.insert(actTrack);
135 if (muonCounter < 2) {
136 LogDebug(
"Tau3MuReco") <<
"Not enough muons (" << muonCounter <<
") assigned to a track! Event skipped!"
141 std::multimap<double, const reco::Track>::iterator it = TrackMultiMap.begin();
143 if (it == TrackMultiMap.end()) {
144 LogDebug(
"Tau3MuReco") <<
"Not enough tracks (0) left! Event skipped!" << std::endl;
157 unsigned int count = 0;
164 LogDebug(
"Tau3MuReco") <<
"Track canidate: " <<
count << std::endl;
167 LogDebug(
"Tau3MuReco") <<
"\tWrong charge!" << std::endl;
170 LogDebug(
"Tau3MuReco") <<
"\tTrack Pt: " << (*it).second.pt() << std::endl;
171 LogDebug(
"Tau3MuReco") <<
"\tDelta R: " << (*it).first << std::endl;
179 if (it == TrackMultiMap.end())
186 LogDebug(
"Tau3MuReco") <<
"Found corresponding 3rd track: " << std::endl;
187 LogDebug(
"Tau3MuReco") <<
"Track canidate: " <<
count << std::endl;
190 LogDebug(
"Tau3MuReco") <<
"\tDelta R: " << (*it).first << std::endl;
200 std::vector<std::vector<UInt_t> > CombinationVec = myCombinatorics.
GetCombinations();
202 std::vector<std::vector<UInt_t> >::iterator it = CombinationVec.begin();
210 if (it == CombinationVec.end())
215 tempMuonCollection.clear();
216 tempTrackCollection.clear();
218 for (UInt_t
i = 0;
i < (*it).size();
i++) {
224 LogDebug(
"Tau3MuReco") <<
"Charge is: " << (
int)
Charge <<
" Have to be -1 or 1!!!" << std::endl;
226 <<
" Have to be smaller than " <<
m_kTauMassCut << std::endl;
249 deltaR12 < deltaR23 ?
temp = 3 :
temp = 1;
250 deltaR12 < deltaR23 ? junk = deltaR12 : junk = deltaR23;
261 unsigned int numOfParticles =
tracks->size();
269 for (
unsigned int i = 0;
i < numOfParticles;
i++) {
277 double invmass =
sqrt(
pow(SumE, 2) -
pow(SumPx, 2) -
pow(SumPy, 2) -
pow(SumPz, 2));