@@ -111,9 +111,9 @@ class TriggerObjectTableProducer : public edm::stream::EDProducer<> {
111111 if (qualityBitsConfig[i].existsAs <unsigned int >(" bit" ))
112112 bit = qualityBitsConfig[i].getParameter <unsigned int >(" bit" );
113113 assert (!bits[bit] && " a quality bit was inserted twice" ); // the bit should not have been set already
114- assert (bit < 31 && " quality bits are store on 32 bit " );
114+ assert (bit < 64 && " quality bits are store on 64 bits " );
115115 bits[bit] = true ;
116- qualityBitsFunc << std::to_string (int ( pow ( 2 , bit)) ) << " *("
116+ qualityBitsFunc << std::to_string (1UL << bit) << " *("
117117 << qualityBitsConfig[i].getParameter <std::string>(" selection" ) << " )" ;
118118 qualityBitsDoc += std::to_string (bit) + " => " + qualityBitsConfig[i].getParameter <std::string>(" doc" );
119119 }
@@ -147,12 +147,12 @@ void TriggerObjectTableProducer::produce(edm::Event &iEvent, const edm::EventSet
147147 const auto &trigObjs = iEvent.get (src_);
148148
149149 std::vector<std::pair<const pat::TriggerObjectStandAlone *, const SelectedObject *>> selected;
150- std::map<int , std::map<const pat::TriggerObjectStandAlone *, int >> selected_bits;
150+ std::map<int , std::map<const pat::TriggerObjectStandAlone *, uint64_t >> selected_bits;
151151 for (const auto &obj : trigObjs) {
152152 for (const auto &sel : sels_) {
153153 if (sel.match (obj)) {
154- selected_bits[sel.id ][&obj] = int ( sel.qualityBits (obj) );
155- if (sel.skipObjectsNotPassingQualityBits ? (selected_bits[sel.id ][&obj] > 0 ) : true ) {
154+ selected_bits[sel.id ][&obj] = sel.qualityBits (obj);
155+ if (sel.skipObjectsNotPassingQualityBits ? (selected_bits[sel.id ][&obj] != 0 ) : true ) {
156156 selected.emplace_back (&obj, &sel);
157157 }
158158 }
@@ -269,7 +269,8 @@ void TriggerObjectTableProducer::produce(edm::Event &iEvent, const edm::EventSet
269269 std::vector<float > pt (nobj, 0 ), eta (nobj, 0 ), phi (nobj, 0 ), l1pt (nobj, 0 ), l1pt_2 (nobj, 0 ), l2pt (nobj, 0 );
270270 std::vector<int16_t > l1charge (nobj, 0 );
271271 std::vector<uint16_t > id (nobj, 0 );
272- std::vector<int > bits (nobj, 0 ), l1iso (nobj, 0 );
272+ std::vector<uint64_t > bits (nobj, 0 );
273+ std::vector<int > l1iso (nobj, 0 );
273274 for (unsigned int i = 0 ; i < nobj; ++i) {
274275 const auto &obj = *selected[i].first ;
275276 const auto &sel = *selected[i].second ;
@@ -324,7 +325,7 @@ void TriggerObjectTableProducer::produce(edm::Event &iEvent, const edm::EventSet
324325 tab->addColumn <int16_t >(" l1charge" , l1charge, " charge of associated L1 seed" );
325326 tab->addColumn <float >(" l1pt_2" , l1pt_2, " pt of associated secondary L1 seed" , 8 );
326327 tab->addColumn <float >(" l2pt" , l2pt, " pt of associated 'L2' seed (i.e. HLT before tracking/PF)" , 10 );
327- tab->addColumn <int >(" filterBits" , bits, " extra bits of associated information: " + bitsDoc_);
328+ tab->addColumn <uint64_t >(" filterBits" , bits, " extra bits of associated information: " + bitsDoc_);
328329 iEvent.put (std::move (tab));
329330}
330331
0 commit comments