40 edm::LogInfo (MessageCategory_) <<
"Setting up PileupInformation";
42 edm::LogInfo (MessageCategory_) <<
"Volume radius set to " << volumeRadius_ <<
" mm";
43 edm::LogInfo (MessageCategory_) <<
"Volume Z set to " << volumeZ_ <<
" mm";
44 edm::LogInfo (MessageCategory_) <<
"Lower pT Threshold set to " << pTcut_1_ <<
" GeV";
45 edm::LogInfo (MessageCategory_) <<
"Upper pT Threshold set to " << pTcut_2_ <<
" GeV";
48 produces< std::vector<PileupSummaryInfo> >();
56 std::auto_ptr<std::vector<PileupSummaryInfo> > PSIVector(
new std::vector<PileupSummaryInfo>);
61 std::vector<int> BunchCrossings;
62 std::vector<int> Interactions_Xing;
63 std::vector<float> TrueInteractions_Xing;
74 for(
int ib=0; ib<(int)bunchCrossing.size(); ++ib){
76 BunchCrossings.push_back(bunchCrossing[ib]);
77 Interactions_Xing.push_back(interactions[ib]);
78 TrueInteractions_Xing.push_back(TrueInteractions[ib]);
95 unsigned int oldVertexId = 0;
99 std::vector<int> BunchCrossings2;
100 std::list<int> Interactions_Xing2;
107 if (!index || iterator->eventId() != oldEventId)
109 if(iterator->eventId().bunchCrossing()==0 && iterator->eventId().event()==0){
112 if(iterator->eventId().bunchCrossing() != oldBX) {
113 BunchCrossings2.push_back(iterator->eventId().bunchCrossing());
114 Interactions_Xing2.push_back(iterator->eventId().event());
116 oldEvent = iterator->eventId().event();
118 else { Interactions_Xing2.pop_back();
119 Interactions_Xing2.push_back(iterator->eventId().event());
120 oldEvent = iterator->eventId().event();
124 oldEventId = iterator->eventId();
125 oldVertexId = iterator->vertexId();
131 std::vector<int>::iterator viter;
132 std::list<int>::iterator liter = Interactions_Xing2.begin();
134 for(viter = BunchCrossings2.begin(); viter != BunchCrossings2.end(); ++viter, ++liter){
136 BunchCrossings.push_back((*viter));
137 Interactions_Xing.push_back((*liter));
138 TrueInteractions_Xing.push_back(-1.);
157 int lastBunchCrossing = 0;
162 bool HaveTrackingParticles =
false;
164 TrackingVertexCollection::const_iterator iVtx;
165 TrackingVertexCollection::const_iterator iVtxTest;
166 TrackingParticleCollection::const_iterator iTrackTest;
171 HaveTrackingParticles =
true;
173 iVtxTest = mergedVH->begin();
174 iTrackTest = mergedPH->begin();
181 std::vector<int>::iterator BXIter;
182 std::vector<int>::iterator InteractionsIter = Interactions_Xing.begin();
183 std::vector<float>::iterator TInteractionsIter = TrueInteractions_Xing.begin();
187 for( BXIter = BunchCrossings.begin(); BXIter != BunchCrossings.end(); ++BXIter, ++InteractionsIter, ++TInteractionsIter) {
191 if(HaveTrackingParticles) {
193 for (iVtx = iVtxTest; iVtx != mergedVH->end(); ++iVtx) {
195 if(iVtx->eventId().bunchCrossing() == (*BXIter) ) {
197 if(iVtx->eventId().event() != lastEvent) {
202 zpos = iVtx->position().z();
209 lastEvent = iVtx->eventId().event();
225 for (TrackingParticleCollection::const_iterator iTrack = iTrackTest; iTrack != mergedPH->end(); ++iTrack)
227 bool FoundTrk =
false;
231 if(iTrack->eventId().bunchCrossing() == (*BXIter) && iTrack->eventId().event() > 0 )
234 int correct_index =
event_index_[iTrack->eventId().event()];
239 if(iTrack->matchedHit()>0) {
240 if(fabs(iTrack->parentVertex()->position().z()-zpos)<0.1) {
242 float Tpx = iTrack->p4().px();
243 float Tpy = iTrack->p4().py();
244 float TpT =
sqrt(Tpx*Tpx + Tpy*Tpy);
259 iTrackTest = --iTrack;
276 if(!HaveTrackingParticles) {
309 PSIVector->push_back(PSI_bunch);
311 if(HaveTrackingParticles) lastBunchCrossing = iVtx->eventId().bunchCrossing();
327 event.put(PSIVector);
T getParameter(std::string const &) 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
int bunchCrossing() const
get the detector field from this detid
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")