120 constexpr
char bitmap_label[] =
"Bitmap";
125 const Collection& physicsobjects = *physicsObjectsHandle;
127 for (
const auto&
id :
ids_) {
128 auto outPass = std::make_unique<edm::ValueMap<bool>>();
129 auto outPassf = std::make_unique<edm::ValueMap<float>>();
130 auto outHowFar = std::make_unique<edm::ValueMap<unsigned>>();
131 auto outBitmap = std::make_unique<edm::ValueMap<unsigned>>();
132 auto out_cfrs = std::make_unique<edm::ValueMap<vid::CutFlowResult>>();
133 auto out_usrd = std::make_unique<pat::UserDataCollection>();
135 std::vector<bool> passfail;
136 std::vector<float> passfailf;
137 std::vector<unsigned> howfar;
138 std::vector<unsigned> bitmap;
139 std::vector<vid::CutFlowResult> cfrs;
141 for (
size_t i = 0;
i < physicsobjects.size(); ++
i) {
142 auto po = physicsobjects.ptrAt(
i);
143 passfail.push_back((*
id)(po, iEvent));
144 passfailf.push_back(passfail.back());
145 howfar.push_back(
id->howFarInCutFlow());
146 bitmap.push_back(
id->bitMap());
147 cfrs.push_back(
id->cutFlowResult());
152 fillerpassfail.insert(physicsObjectsHandle, passfail.begin(), passfail.end());
153 fillerpassfail.fill();
156 fillerpassfailf.insert(physicsObjectsHandle, passfailf.begin(), passfailf.end());
157 fillerpassfailf.fill();
160 fillerhowfar.insert(physicsObjectsHandle, howfar.begin(), howfar.end());
164 fillerbitmap.insert(physicsObjectsHandle, bitmap.begin(), bitmap.end());
168 fillercfr.insert(physicsObjectsHandle, cfrs.begin(), cfrs.end());
176 iEvent.
put(std::make_unique<std::string>(
id->md5String()),
id->name());
179 auto out_usrdptrs = std::make_unique<edm::ValueMap<edm::Ptr<pat::UserData>>>();
180 std::vector<edm::Ptr<pat::UserData>> usrdptrs;
181 for (
unsigned i = 0;
i < usrd_handle->size(); ++
i) {
186 fillerusrdptrs.insert(physicsObjectsHandle, usrdptrs.begin(), usrdptrs.end());
187 fillerusrdptrs.fill();
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< std::unique_ptr< SelectorType > > ids_
uint16_t *__restrict__ id
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::View< PhysicsObjectType > Collection
static std::unique_ptr< UserData > make(const T &value, bool transientOnly=false)
TokenType physicsObjectSrc_