Changeset 1108 in svn for trunk/classes
- Timestamp:
- May 7, 2013, 3:27:32 PM (11 years ago)
- Location:
- trunk/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/classes/DelphesHepMCReader.cc
r1105 r1108 74 74 fWeightSize = 0; 75 75 fWeight.clear(); 76 fMomentumCoefficient = 1.0; 77 fPositionCoefficient = 1.0; 76 78 fVertexCounter = -1; 77 79 fInCounter = -1; … … 98 100 map< int, pair< int, int > >::iterator itMotherMap; 99 101 map< int, pair< int, int > >::iterator itDaughterMap; 100 char key ;102 char key, momentumUnit[4], positionUnit[3]; 101 103 int i, rc, state; 102 104 double weight; … … 156 158 } 157 159 } 160 else if(key == 'U') 161 { 162 rc = sscanf(fBuffer + 1, "%3s %2s", momentumUnit, positionUnit); 163 164 if(rc != 2) 165 { 166 cerr << "** ERROR: " << "invalid units format" << endl; 167 return kFALSE; 168 } 169 170 if(strncmp(momentumUnit, "GEV", 3) == 0) 171 { 172 fMomentumCoefficient = 1.0; 173 } 174 else if(strncmp(momentumUnit, "MEV", 3) == 0) 175 { 176 fMomentumCoefficient = 0.001; 177 } 178 179 if(strncmp(positionUnit, "MM", 3) == 0) 180 { 181 fPositionCoefficient = 1.0; 182 } 183 else if(strncmp(positionUnit, "CM", 3) == 0) 184 { 185 fPositionCoefficient = 10.0; 186 } 187 } 158 188 else if(key == 'F') 159 189 { … … 311 341 312 342 candidate->Momentum.SetPxPyPzE(fPx, fPy, fPz, fE); 343 if(fMomentumCoefficient != 1.0) 344 { 345 candidate->Momentum *= fMomentumCoefficient; 346 } 313 347 314 348 candidate->M2 = 1; … … 323 357 candidate->M1 = fOutVertexCode; 324 358 candidate->Position.SetXYZT(fX, fY, fZ, fT); 359 if(fPositionCoefficient != 1.0) 360 { 361 candidate->Position *= fPositionCoefficient; 362 } 325 363 } 326 364 if(fInVertexCode < 0) -
trunk/classes/DelphesHepMCReader.h
r1105 r1108 64 64 double fScale, fAlphaQCD, fAlphaQED; 65 65 66 double fMomentumCoefficient, fPositionCoefficient; 67 66 68 int fStateSize; 67 69 std::vector< int > fState;
Note:
See TracChangeset
for help on using the changeset viewer.