50 produces< std::vector<PileupSummaryInfo> >();
58 std::auto_ptr<std::vector<PileupSummaryInfo> > PSIVector(
new std::vector<PileupSummaryInfo>);
63 std::vector<int> BunchCrossings;
64 std::vector<int> Interactions_Xing;
65 std::vector<float> TrueInteractions_Xing;
76 for(
int ib=0;
ib<(int)bunchCrossing.size(); ++
ib){
78 BunchCrossings.push_back(bunchCrossing[
ib]);
79 Interactions_Xing.push_back(interactions[ib]);
80 TrueInteractions_Xing.push_back(TrueInteractions[ib]);
85 throw cms::Exception(
"PileupInformation") <<
" PileupMixingContent is missing from the event.\n"
86 "There must be some breakdown in the Simulation Chain.\n"
87 "You must run the MixingModule before calling this routine.";
163 bool HaveTrackingParticles =
false;
168 TrackingVertexCollection::const_iterator iVtx;
169 TrackingVertexCollection::const_iterator iVtxTest;
170 TrackingParticleCollection::const_iterator iTrackTest;
176 HaveTrackingParticles =
true;
178 iVtxTest = mergedVH->begin();
179 iTrackTest = mergedPH->begin();
188 std::vector<int>::iterator BXIter;
189 std::vector<int>::iterator InteractionsIter = Interactions_Xing.begin();
190 std::vector<float>::iterator TInteractionsIter = TrueInteractions_Xing.begin();
194 for( BXIter = BunchCrossings.begin(); BXIter != BunchCrossings.end(); ++BXIter, ++InteractionsIter, ++TInteractionsIter) {
198 if(HaveTrackingParticles) {
200 for (iVtx = iVtxTest; iVtx != mergedVH->end(); ++iVtx) {
202 if(iVtx->eventId().bunchCrossing() == (*BXIter) ) {
204 if(iVtx->eventId().event() != lastEvent) {
209 zpos = iVtx->position().z();
216 lastEvent = iVtx->eventId().event();
232 for (TrackingParticleCollection::const_iterator iTrack = iTrackTest; iTrack != mergedPH->end(); ++iTrack)
234 bool FoundTrk =
false;
238 if(iTrack->eventId().bunchCrossing() == (*BXIter) && iTrack->eventId().event() > 0 )
241 int correct_index =
event_index_[iTrack->eventId().event()];
246 if(iTrack->matchedHit()>0) {
247 if(fabs(iTrack->parentVertex()->position().z()-zpos)<0.1) {
249 float Tpx = iTrack->p4().px();
250 float Tpy = iTrack->p4().py();
251 float TpT =
sqrt(Tpx*Tpx + Tpy*Tpy);
266 iTrackTest = --iTrack;
283 if(!HaveTrackingParticles) {
316 PSIVector->push_back(PSI_bunch);
334 event.put(PSIVector);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::vector< float > & getMix_TrueInteractions() const
#define DEFINE_FWK_MODULE(type)
const std::vector< int > & getMix_bunchCrossing() const
const std::vector< int > & getMix_Ninteractions() const
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 but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
Container::value_type value_type
T const * product() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")