Message: Re: Proposed G4PhysicsOrderedFreeVector reverse or order methods Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Proposed G4PhysicsOrderedFreeVector reverse or order methods 

Forum: Geometry
Re: Question Proposed G4PhysicsOrderedFreeVector reverse or order methods (Phil Jones)
Re: News Re: Proposed G4PhysicsOrderedFreeVector reverse or order methods (Michael H. Kelsey)
Re: None Re: Proposed G4PhysicsOrderedFreeVector reverse or order methods (Phil Jones)
Re: Warning Re: Proposed G4PhysicsOrderedFreeVector reverse or order methods (Gumplinger Peter)
Date: 15 Jun, 2012
From: Gumplinger Peter <Gumplinger Peter>

Hi Vladimir,
> You likely need to send .hh file as well.
Actually, I don't think so. The header file for 
G4PhysicsOrderedFreeVector class didn't need to be changed and was not 
changed at all from the 9.5 release for me to include ordering on 
construction or InsertValues.

Peter

Vladimir IVANTCHENKO wrote:
>
> Hi Peter,
>
> You likely need to send .hh file as well.
>
> VI
>
> On Thu, 14 Jun 2012, Gumplinger Peter wrote:
>
>>
>> *** Discussion title: Geometry
>>
>> You'll find attached the modified G4PhysicsOrderedFreeVector.cc. (I
>> don't know exactly when the next patch to 9.5 will be released - but
>> soon I guess).
>>
>> Please, try it out and let us know if it isn't working to your
>> satisfaction. That'll help us make sure it definitely is doing now what
>> it is supposed to be doing. This issue also came up in this thread:
>>
>> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/opticalphotons/433/1/2/1/1.html 
>>
>>
>> The relevant code is in the constructor:
>>
>> G4PhysicsOrderedFreeVector::G4PhysicsOrderedFreeVector(G4double 
>> *Energies,
>>                                                       G4double *Values,
>>                                                       size_t 
>> VectorLength)
>>  : G4PhysicsVector()
>> {
>>  type = T_G4PhysicsOrderedFreeVector;
>>
>>  for (size_t i = 0 ; i < VectorLength ; i++)
>>    {
>>      InsertValues(Energies[i], Values[i]);
>>    }
>> }
>>
>> and in InsertValues:
>>
>> void G4PhysicsOrderedFreeVector::InsertValues(G4double energy, 
>> G4double value)
>> {
>>        std::vector<G4double>::iterator binLoc =
>>                 std::lower_bound(binVector.begin(), binVector.end(), 
>> energy);
>>
>>        size_t binIdx = binLoc - binVector.begin();     // Iterator 
>> difference!
>>
>>        std::vector<G4double>::iterator dataLoc = dataVector.begin() + 
>> binIdx;
>>
>>        binVector.insert(binLoc, energy);
>>        dataVector.insert(dataLoc, value);
>>
>>        numberOfNodes++;
>>        edgeMin = binVector.front();
>>        edgeMax = binVector.back();
>> }
>>
>>   Attachment:
>>      
>> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2012/06/14/12.44-45749-ysicsOrderedFreeVector.cc 
>>
>>
>> -------------------------------------------------------------
>> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or 
>> unsubscribe) at:
>> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1191/1/1/1.html 
>>
>>
>

 Add Message Add Message
to: "Re: Proposed G4PhysicsOrderedFreeVector reverse or order methods"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]