Changeset 0ed696f in git
- Timestamp:
- Jan 20, 2014, 12:23:57 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- fe179a1
- Parents:
- e4caec4
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/PileUpMerger.cc
re4caec4 r0ed696f 63 63 64 64 fMeanPileUp = GetDouble("MeanPileUp", 10); 65 65 66 66 fZVertexSpread = GetDouble("ZVertexSpread", 0.15); 67 67 fTVertexSpread = GetDouble("TVertexSpread", 1.5E-09); 68 68 69 69 // read vertex smearing formula 70 70 71 71 fFunction->Compile(GetString("VertexDistributionFormula", "0.0")); 72 fFunction->SetRange(-fZVertexSpread, -fTVertexSpread,fZVertexSpread,fTVertexSpread);73 72 fFunction->SetRange(-fZVertexSpread, -fTVertexSpread, fZVertexSpread, fTVertexSpread); 73 74 74 fileName = GetString("PileUpFile", "MinBias.pileup"); 75 75 fReader = new DelphesPileUpReader(fileName); … … 105 105 Candidate *candidate, *vertexcandidate; 106 106 DelphesFactory *factory; 107 107 108 108 const Double_t c_light = 2.99792458E8; 109 109 110 110 fItInputArray->Reset(); 111 112 113 114 fFunction->GetRandom2(dz, dt);115 116 dt *= c_light*1.0E3; // necessary in order to make t in mm/c117 dz *= 1.0E3; // necessary in order to make z in mm118 111 112 // --- Deal with Primary vertex first ------ 113 114 fFunction->GetRandom2(dz, dt); 115 116 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 117 dz *= 1.0E3; // necessary in order to make z in mm 118 119 119 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 120 120 { … … 124 124 125 125 factory = GetFactory(); 126 126 127 127 vertexcandidate = factory->NewCandidate(); 128 128 vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt); 129 129 fVertexOutputArray->Add(vertexcandidate); 130 131 130 132 131 // --- Then with pile-up vertices ------ 133 132 134 133 switch(fPileUpDistribution) 135 134 { … … 146 145 147 146 allEntries = fReader->GetEntries(); 148 147 149 148 for(event = 0; event < numberOfEvents; ++event) 150 149 { … … 156 155 157 156 fReader->ReadEntry(entry); 158 159 // --- Pile-up vertex smearing 160 161 fFunction->GetRandom2(dz, dt);162 163 dt *= c_light*1.0E3; // necessary in order to make t in mm/c164 dz *= 1.0E3; // necessary in order to make z in mm165 157 158 // --- Pile-up vertex smearing 159 160 fFunction->GetRandom2(dz, dt); 161 162 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 163 dz *= 1.0E3; // necessary in order to make z in mm 164 166 165 dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi()); 167 166 … … 169 168 vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt); 170 169 vertexcandidate->IsPU = 1; 171 170 172 171 fVertexOutputArray->Add(vertexcandidate); 173 172 … … 185 184 186 185 candidate->IsPU = 1; 187 186 188 187 candidate->Momentum.SetPxPyPzE(px, py, pz, e); 189 188 candidate->Momentum.RotateZ(dphi); … … 191 190 candidate->Position.SetXYZT(x, y, z+dz, t+dt); 192 191 candidate->Position.RotateZ(dphi); 193 192 194 193 fParticleOutputArray->Add(candidate); 195 194 } -
modules/PileUpMerger.h
re4caec4 r0ed696f 36 36 Int_t fPileUpDistribution; 37 37 Double_t fMeanPileUp; 38 38 39 39 Double_t fZVertexSpread; 40 40 Double_t fTVertexSpread; 41 41 42 42 DelphesPileUpReader *fReader; 43 43 44 44 DelphesTF2 *fFunction; //! 45 45 46 46 TIterator *fItInputArray; //! 47 47
Note:
See TracChangeset
for help on using the changeset viewer.