1 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHWriteSpecificDecay_h
2 #define HeavyFlavorAnalysis_SpecificDecay_BPHWriteSpecificDecay_h
138 std::map<std::string, recoType>
rMap;
139 std::map<std::string, parType>
pMap;
140 std::map<std::string, parType>
fMap;
141 std::map<recoType, std::map<parType, double>>
parMap;
172 std::vector<BPHPlusMinusConstCandPtr>
lFull;
173 std::vector<BPHPlusMinusConstCandPtr>
lJPsi;
174 std::vector<BPHRecoConstCandPtr>
lSd;
175 std::vector<BPHRecoConstCandPtr>
lSs;
176 std::vector<BPHRecoConstCandPtr>
lBu;
177 std::vector<BPHRecoConstCandPtr>
lBd;
178 std::vector<BPHRecoConstCandPtr>
lBs;
179 std::vector<BPHPlusMinusConstCandPtr>
lK0;
180 std::vector<BPHPlusMinusConstCandPtr>
lL0;
181 std::vector<BPHRecoConstCandPtr>
lB0;
182 std::vector<BPHRecoConstCandPtr>
lLb;
183 std::vector<BPHRecoConstCandPtr>
lBc;
186 std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>
jPsiOMap;
187 std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>
daughMap;
189 std::map<const BPHRecoCandidate*, vertex_ref>
pvRefMap;
191 std::map<const BPHRecoCandidate*, compcc_ref>
ccRefMap;
197 const std::vector<T>& list,
202 std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>::const_iterator dauIter;
203 std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>::const_iterator dauIend =
daughMap.end();
204 std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>::const_iterator jpoIter;
205 std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>::const_iterator jpoIend =
jPsiOMap.end();
206 std::map<const BPHRecoCandidate*, vertex_ref>::const_iterator pvrIter;
207 std::map<const BPHRecoCandidate*, vertex_ref>::const_iterator pvrIend =
pvRefMap.end();
208 std::map<const BPHRecoCandidate*, compcc_ref>::const_iterator ccrIter;
209 std::map<const BPHRecoCandidate*, compcc_ref>::const_iterator ccrIend =
ccRefMap.end();
210 for (
i = 0;
i <
n; ++
i) {
211 const T& ptr = list[
i];
212 ccList->push_back(ptr->composite());
214 if ((pvrIter =
pvRefMap.find(ptr.get())) != pvrIend)
215 cc.addUserData(
"primaryVertex", pvrIter->second);
216 const std::vector<std::string>& cNames = ptr->compNames();
218 int m = cNames.size();
222 if ((ccrIter =
ccRefMap.find(cptr)) == ccrIend) {
223 if ((dauIter =
daughMap.find(cptr)) != dauIend)
224 cptr = dauIter->second;
225 if ((jpoIter =
jPsiOMap.find(cptr)) != jpoIend)
226 cptr = jpoIter->second;
228 if ((ccrIter =
ccRefMap.find(cptr)) != ccrIend) {
231 cc.addUserData(
"refTo" + compName, cref);
235 if (pmp !=
nullptr) {
240 cc.addUserData(
"vertex", ptr->vertex());
244 cc.addUserData(
"fitVertex",
reco::Vertex(*ptr->topDecayVertex()));
245 if (ptr->isValidFit()) {
248 cc.addUserFloat(
"fitMass", kinStat.
mass());
253 typedef std::unique_ptr<pat::CompositeCandidateCollection> ccc_pointer;
255 for (
i = 0;
i <
n; ++
i) {