Changeset 1268 in svn for trunk/modules/PileUpMerger.cc
- Timestamp:
- Aug 19, 2013, 3:53:30 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/PileUpMerger.cc
r1111 r1268 57 57 const char *fileName; 58 58 59 fPileUpDistribution = GetInt("PileUpDistribution", 0); 60 59 61 fMeanPileUp = GetDouble("MeanPileUp", 10); 60 62 fZVertexSpread = GetDouble("ZVertexSpread", 0.05)*1.0E3; … … 88 90 Float_t px, py, pz, e; 89 91 Double_t dz, dphi; 90 Int_t poisson, event;92 Int_t numberOfEvents, event; 91 93 Long64_t allEntries, entry; 92 94 Candidate *candidate; … … 101 103 factory = GetFactory(); 102 104 103 poisson = gRandom->Poisson(fMeanPileUp); 105 switch(fPileUpDistribution) 106 { 107 case 0: 108 numberOfEvents = gRandom->Poisson(fMeanPileUp); 109 break; 110 case 1: 111 numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1); 112 break; 113 default: 114 numberOfEvents = gRandom->Poisson(fMeanPileUp); 115 break; 116 } 104 117 105 118 allEntries = fReader->GetEntries(); 106 119 107 for(event = 0; event < poisson; ++event)120 for(event = 0; event < numberOfEvents; ++event) 108 121 { 109 122 do
Note:
See TracChangeset
for help on using the changeset viewer.