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)
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) {
235 if (pmp !=
nullptr) {
245 if (ptr->isValidFit()) {
253 typedef std::unique_ptr<pat::CompositeCandidateCollection> ccc_pointer;
255 for (i = 0; i <
n; ++
i) {
BPHTokenWrapper< std::vector< reco::VertexCompositeCandidate > > l0CandsToken
Analysis-level particle class.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
BPHTokenWrapper< std::vector< reco::Vertex > > pVertexToken
std::vector< BPHPlusMinusConstCandPtr > lJPsi
BPHTokenWrapper< std::vector< reco::VertexCompositePtrCandidate > > kSCandsToken
std::vector< BPHPlusMinusConstCandPtr > lK0
edm::Ref< std::vector< reco::Vertex > > vertex_ref
std::map< const BPHRecoCandidate *, compcc_ref > ccRefMap
std::vector< BPHPlusMinusConstCandPtr > lFull
std::map< std::string, recoType > rMap
edm::Ref< pat::CompositeCandidateCollection > compcc_ref
std::vector< BPHRecoConstCandPtr > lBs
BPHTokenWrapper< std::vector< BPHTrackReference::candidate > > pcCandsToken
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void fill(edm::Event &ev, const edm::EventSetup &es)
~BPHWriteSpecificDecay() override
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > daughMap
ParticleMass mass() const
std::map< std::string, parType > pMap
std::vector< BPHRecoConstCandPtr > lSs
BPHTokenWrapper< std::vector< reco::VertexCompositeCandidate > > k0CandsToken
BPHWriteSpecificDecay(const edm::ParameterSet &ps)
BPHTokenWrapper< pat::MuonCollection > patMuonToken
BPHTokenWrapper< std::vector< reco::PFCandidate > > pfCandsToken
bool isCowboy() const
get cowboy/sailor classification
BPHTokenWrapper< std::vector< reco::VertexCompositePtrCandidate > > lSCandsToken
BPHTokenWrapper< std::vector< pat::CompositeCandidate > > ccCandsToken
std::vector< BPHRecoConstCandPtr > lSd
KinematicParameters const & kinematicParameters() const
BPHTokenWrapper< std::vector< pat::GenericParticle > > gpCandsToken
std::vector< CompositeCandidate > CompositeCandidateCollection
edm::OrphanHandle< pat::CompositeCandidateCollection > write(edm::Event &ev, const std::vector< T > &list, const std::string &name)
std::map< const BPHRecoCandidate *, vertex_ref > pvRefMap
std::vector< BPHPlusMinusConstCandPtr > lL0
std::vector< BPHRecoConstCandPtr > lBu
std::vector< BPHRecoConstCandPtr > lLb
virtual BPHRecoConstCandPtr getComp(const std::string &name) const
std::map< recoType, std::map< parType, double > > parMap
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > jPsiOMap
std::vector< BPHRecoConstCandPtr > lB0
std::vector< BPHRecoConstCandPtr > lBc
std::vector< BPHRecoConstCandPtr > lX3872
void produce(edm::Event &ev, const edm::EventSetup &es) override
std::vector< BPHRecoConstCandPtr > lBd
void setRecoParameters(const edm::ParameterSet &ps)
std::map< std::string, parType > fMap
void addUserData(const std::string &label, const T &data, bool transientOnly=false, bool overwrite=false)
GlobalVector momentum() const