35 if ( iConfig.
exists(
"pathToSelect") )
55 std::vector<int> me_ids;
60 std::vector<int> ps_ids;
150 produces<unsigned int>();
187 std::auto_ptr<unsigned int>
selection (
new unsigned int() );
190 unsigned int nb = bFlavorHistoryEvent->nb();
192 unsigned int nc = cFlavorHistoryEvent->nc();
199 unsigned int highestFlavor = 0;
208 if ( bFlavorSource >= cFlavorSource ) {
209 flavorSource = bFlavorHistoryEvent->flavorSource();
210 highestFlavor = bFlavorHistoryEvent->highestFlavor();
211 dr = bFlavorHistoryEvent->deltaR();
214 flavorSource = cFlavorHistoryEvent->flavorSource();
215 highestFlavor = cFlavorHistoryEvent->highestFlavor();
216 dr = cFlavorHistoryEvent->deltaR();
222 if (
bb_me_ ->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 1;
223 else if (
b_me_ ->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 2;
224 else if (
cc_me_ ->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 3;
225 else if (
c_me_ ->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 4;
226 else if (
b_ps_ ->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 5;
227 else if (
c_ps_ ->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 6;
228 else if (
bb_me_comp_->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 7;
229 else if (
cc_me_comp_->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 8;
230 else if (
b_ps_comp_->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 9;
231 else if (
c_ps_comp_->
select( nb, nc, highestFlavor, flavorSource, dr ) ) *selection = 10;
232 else *selection = 11;
236 pass = (*selection > 0 && *selection ==
static_cast<unsigned int>(
pathToSelect_ ) );
241 iEvent.
put( selection );
reco::FlavorHistorySelectorUtil * c_me_
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
reco::FlavorHistorySelectorUtil * bb_me_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual bool filter(edm::Event &, const edm::EventSetup &) override
bool select(unsigned int nb, unsigned int nc, unsigned int highestFlavor, FlavorHistory::FLAVOR_T flavorSource, double dr) const
reco::FlavorHistorySelectorUtil * b_ps_comp_
reco::FlavorHistorySelectorUtil * cc_me_
edm::EDGetTokenT< reco::FlavorHistoryEvent > bsrcToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
reco::FlavorHistorySelectorUtil * c_ps_comp_
reco::FlavorHistorySelectorUtil * bb_me_comp_
reco::FlavorHistorySelectorUtil * cc_me_comp_
FlavorHistoryFilter(const edm::ParameterSet &)
reco::FlavorHistorySelectorUtil * b_me_
reco::FlavorHistorySelectorUtil * b_ps_
edm::EDGetTokenT< reco::FlavorHistoryEvent > csrcToken_
reco::FlavorHistorySelectorUtil * c_ps_