1 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHWriteSpecificDecay_h 2 #define HeavyFlavorAnalysis_SpecificDecay_BPHWriteSpecificDecay_h 85 std::map<std::string,recoType>
rMap;
86 std::map<std::string, parType>
pMap;
87 std::map<std::string, parType>
fMap;
88 std::map< recoType, std::map<parType,double> >
parMap;
107 std::vector<BPHPlusMinusConstCandPtr>
lFull;
108 std::vector<BPHPlusMinusConstCandPtr>
lJPsi;
109 std::vector<BPHRecoConstCandPtr>
lSd;
110 std::vector<BPHRecoConstCandPtr>
lSs;
111 std::vector<BPHRecoConstCandPtr>
lBu;
112 std::vector<BPHRecoConstCandPtr>
lBd;
113 std::vector<BPHRecoConstCandPtr>
lBs;
115 std::map<const BPHRecoCandidate*,const BPHRecoCandidate*>
jPsiOMap;
117 std::map<const BPHRecoCandidate*,vertex_ref>
pvRefMap;
119 std::map<const BPHRecoCandidate*,compcc_ref>
ccRefMap;
131 const BPHRecoCandidate*>::const_iterator jpoIter;
133 const BPHRecoCandidate*>::const_iterator jpoIend = jPsiOMap.end();
134 std::map<const BPHRecoCandidate*,vertex_ref>::const_iterator pvrIter;
135 std::map<const BPHRecoCandidate*,vertex_ref>::const_iterator pvrIend =
137 std::map<const BPHRecoCandidate*,compcc_ref>::const_iterator ccrIter;
138 std::map<const BPHRecoCandidate*,compcc_ref>::const_iterator ccrIend =
140 for ( i = 0; i <
n; ++
i ) {
141 const T& ptr = list[
i];
142 ccList->push_back( ptr->composite() );
144 if ( ( pvrIter = pvRefMap.find( ptr.get() ) ) != pvrIend )
145 cc.
addUserData (
"primaryVertex", pvrIter->second );
146 const std::vector<std::string>& cNames = ptr->compNames();
148 int m = cNames.size();
151 const BPHRecoCandidate* cptr = ptr->getComp( compName ).get();
152 if ( ( ccrIter = ccRefMap.find( cptr ) ) == ccrIend ) {
153 if ( ( jpoIter = jPsiOMap.find( cptr ) ) != jpoIend )
154 cptr = jpoIter->second;
157 if ( ( ccrIter = ccRefMap.find( cptr ) ) != ccrIend ) {
158 compcc_ref cref = ccrIter->second;
165 if ( ptr->isEmpty() ) {
166 if ( writeVertex ) cc.
addUserData(
"vertex" , ptr->vertex() );
171 if ( ptr->isValidFit() ) {
175 if ( writeMomentum ) cc.
addUserData (
"fitMomentum",
180 typedef std::unique_ptr<pat::CompositeCandidateCollection> ccc_pointer;
182 ev.
put( ccc_pointer( ccList ), name );
183 for ( i = 0; i <
n; ++
i ) {
184 const BPHRecoCandidate* ptr = list[
i].get();
186 ccRefMap[ptr] = ccRef;
virtual void produce(edm::Event &ev, const edm::EventSetup &es)
Analysis-level particle class.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
std::vector< BPHPlusMinusConstCandPtr > lJPsi
BPHTokenWrapper< std::vector< reco::PFCandidate > > pfCandsToken
std::vector< BPHPlusMinusConstCandPtr > lFull
std::vector< BPHRecoConstCandPtr > lBs
virtual ~BPHWriteSpecificDecay()
std::map< const BPHRecoCandidate *, compcc_ref > ccRefMap
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
BPHTokenWrapper< std::vector< pat::CompositeCandidate > > ccCandsToken
std::map< std::string, recoType > rMap
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void fill(edm::Event &ev, const edm::EventSetup &es)
ParticleMass mass() const
std::map< std::string, parType > pMap
std::vector< BPHRecoConstCandPtr > lSs
BPHWriteSpecificDecay(const edm::ParameterSet &ps)
BPHTokenWrapper< pat::MuonCollection > patMuonToken
edm::Ref< pat::CompositeCandidateCollection > compcc_ref
BPHTokenWrapper< std::vector< reco::Vertex > > pVertexToken
bool isCowboy() const
get cowboy/sailor classification
BPHTokenWrapper< std::vector< pat::GenericParticle > > gpCandsToken
edm::Ref< std::vector< reco::Vertex > > vertex_ref
std::vector< BPHRecoConstCandPtr > lSd
KinematicParameters const & kinematicParameters() const
std::vector< CompositeCandidate > CompositeCandidateCollection
std::map< recoType, std::map< parType, double > > parMap
edm::OrphanHandle< pat::CompositeCandidateCollection > write(edm::Event &ev, const std::vector< T > &list, const std::string &name)
std::vector< BPHRecoConstCandPtr > lBu
BPHTokenWrapper< std::vector< BPHTrackReference::candidate > > pcCandsToken
std::map< const BPHRecoCandidate *, vertex_ref > pvRefMap
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)
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > jPsiOMap
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
GlobalVector momentum() const