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]);
97 std::vector<int> BunchCrossings2;
98 std::list<int> Interactions_Xing2;
105 if (!index || iterator->eventId() != oldEventId)
107 if(iterator->eventId().bunchCrossing()==0 && iterator->eventId().event()==0){
110 if(iterator->eventId().bunchCrossing() != oldBX) {
111 BunchCrossings2.push_back(iterator->eventId().bunchCrossing());
112 Interactions_Xing2.push_back(iterator->eventId().event());
115 else { Interactions_Xing2.pop_back();
116 Interactions_Xing2.push_back(iterator->eventId().event());
120 oldEventId = iterator->eventId();
126 std::vector<int>::iterator viter;
127 std::list<int>::iterator liter = Interactions_Xing2.begin();
129 for(viter = BunchCrossings2.begin(); viter != BunchCrossings2.end(); ++viter, ++liter){
131 BunchCrossings.push_back((*viter));
132 Interactions_Xing.push_back((*liter));
133 TrueInteractions_Xing.push_back(-1.);
157 bool HaveTrackingParticles =
false;
159 TrackingVertexCollection::const_iterator iVtx;
160 TrackingVertexCollection::const_iterator iVtxTest;
161 TrackingParticleCollection::const_iterator iTrackTest;
166 HaveTrackingParticles =
true;
168 iVtxTest = mergedVH->begin();
169 iTrackTest = mergedPH->begin();
176 std::vector<int>::iterator BXIter;
177 std::vector<int>::iterator InteractionsIter = Interactions_Xing.begin();
178 std::vector<float>::iterator TInteractionsIter = TrueInteractions_Xing.begin();
182 for( BXIter = BunchCrossings.begin(); BXIter != BunchCrossings.end(); ++BXIter, ++InteractionsIter, ++TInteractionsIter) {
186 if(HaveTrackingParticles) {
188 for (iVtx = iVtxTest; iVtx != mergedVH->end(); ++iVtx) {
190 if(iVtx->eventId().bunchCrossing() == (*BXIter) ) {
192 if(iVtx->eventId().event() != lastEvent) {
197 zpos = iVtx->position().z();
204 lastEvent = iVtx->eventId().event();
220 for (TrackingParticleCollection::const_iterator iTrack = iTrackTest; iTrack != mergedPH->end(); ++iTrack)
222 bool FoundTrk =
false;
226 if(iTrack->eventId().bunchCrossing() == (*BXIter) && iTrack->eventId().event() > 0 )
229 int correct_index =
event_index_[iTrack->eventId().event()];
234 if(iTrack->matchedHit()>0) {
235 if(fabs(iTrack->parentVertex()->position().z()-zpos)<0.1) {
237 float Tpx = iTrack->p4().px();
238 float Tpy = iTrack->p4().py();
239 float TpT =
sqrt(Tpx*Tpx + Tpy*Tpy);
254 iTrackTest = --iTrack;
271 if(!HaveTrackingParticles) {
304 PSIVector->push_back(PSI_bunch);
322 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="")