50 produces< std::vector<PileupSummaryInfo> >();
51 produces<int>(
"bunchSpacing");
59 std::auto_ptr<std::vector<PileupSummaryInfo> > PSIVector(
new std::vector<PileupSummaryInfo>);
64 std::vector<int> BunchCrossings;
65 std::vector<int> Interactions_Xing;
66 std::vector<float> TrueInteractions_Xing;
80 for(
int ib=0;
ib<(int)bunchCrossing.size(); ++
ib){
82 BunchCrossings.push_back(bunchCrossing[
ib]);
83 Interactions_Xing.push_back(interactions[ib]);
84 TrueInteractions_Xing.push_back(TrueInteractions[ib]);
89 throw cms::Exception(
"PileupInformation") <<
" PileupMixingContent is missing from the event.\n"
90 "There must be some breakdown in the Simulation Chain.\n"
91 "You must run the MixingModule before calling this routine.";
167 bool HaveTrackingParticles =
false;
172 TrackingVertexCollection::const_iterator iVtx;
173 TrackingVertexCollection::const_iterator iVtxTest;
174 TrackingParticleCollection::const_iterator iTrackTest;
180 HaveTrackingParticles =
true;
182 iVtxTest = mergedVH->begin();
183 iTrackTest = mergedPH->begin();
192 std::vector<int>::iterator BXIter;
193 std::vector<int>::iterator InteractionsIter = Interactions_Xing.begin();
194 std::vector<float>::iterator TInteractionsIter = TrueInteractions_Xing.begin();
198 for( BXIter = BunchCrossings.begin(); BXIter != BunchCrossings.end(); ++BXIter, ++InteractionsIter, ++TInteractionsIter) {
202 if(HaveTrackingParticles) {
204 for (iVtx = iVtxTest; iVtx != mergedVH->end(); ++iVtx) {
206 if(iVtx->eventId().bunchCrossing() == (*BXIter) ) {
208 if(iVtx->eventId().event() != lastEvent) {
213 zpos = iVtx->position().z();
220 lastEvent = iVtx->eventId().event();
236 for (TrackingParticleCollection::const_iterator iTrack = iTrackTest; iTrack != mergedPH->end(); ++iTrack)
238 bool FoundTrk =
false;
242 if(iTrack->eventId().bunchCrossing() == (*BXIter) && iTrack->eventId().event() > 0 )
245 int correct_index =
event_index_[iTrack->eventId().event()];
250 if(iTrack->matchedHit()>0) {
251 if(fabs(iTrack->parentVertex()->position().z()-zpos)<0.1) {
253 float Tpx = iTrack->p4().px();
254 float Tpy = iTrack->p4().py();
255 float TpT =
sqrt(Tpx*Tpx + Tpy*Tpy);
270 iTrackTest = --iTrack;
287 if(!HaveTrackingParticles) {
305 (*TInteractionsIter),
321 PSIVector->push_back(PSI_bunch);
339 event.put(PSIVector);
342 std::auto_ptr<int> bunchSpacingP(
new int(bunchSpacing));
343 event.put(bunchSpacingP,
"bunchSpacing");
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
const int & getMix_bunchSpacing() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")