Message: Re: Parameterisation and CopyNo Not Logged In (login)

## Re: Parameterisation and CopyNo

Forum: Geometry
Re: Parameterisation and CopyNo (Hanwook Bae)
Re: Re: Parameterisation and CopyNo (John Apostolakis)
Date: 14 Sep, 2017
From: Hanwook Bae <Hanwook Bae>

 Thank you very much for your reply. There is another question about my problem and your reply. In fact, there is something I forgot to mention: the logical volume what I want to parameterize is not simple volume. What I am saying is, the volume has many daughter volumes. So, one of the daughters is slightly different from a lower layer to an upper layer. As I know about parameterization, I can't manipulate anything about the daughter in the target volume, but I can only transform the grand-mother volume in the parameterization situation. In this case, I can't utilize the first solution because what I can in my parameterization class is to compute transformation of my detector cell. Therefore, I think it is plausible to implement the second solution of your reply. However, unfortunately, I don't know anything to dispatch the parameterization to another parameterization class. So, could you tell me the way to send a parameterization to another one or which is example source code about the second method? I am really appreciated for your answer and looking for your kind understanding of my immatureness. Thank you. On Tue, 12 Sep 2017 13:03:22 GMT, John Apostolakis wrote: ```> Dear Hanwook, > > Your question and setup are clear. > > The answer is simple: you can NOT decide what the first copy number in a > parameterisation is. They must be numbered from the lowest permitted > value (0 or 1) to the copy number ( or max copy number -1 if 0 is first. ) > > But what you could do is use one parameterisation which describes both > the upper and lower layer. I can see two ways of doing this > > 1) By hand in code for a single parameterisation that handles both > cases. It would be less elegant in some ways - it would need to have > something like "if" statements for all methods which depended on the layer. > > 2) A different solution would be to create a 'hierarchy' of > parameterisations - one for the upper and one for the lower layer, and > then create a composite parameterisation that only knows the number of > copies in each one, and dispatches to the correct dependent > parameterisation. ( The composite would own the other two, and simply > act as a switch between them. ) This would make the code more elegant, > but I am not sure whether there would be a performance penalty. Likely > some work would be needed (with templates) to avoid virtual function > calls, in order to ensure that persformance is not lost. > > I think and hope that this clarifies how you should be able to create a > working program for your setup. > > Best regards, > John Apostolakis > > On 11.09.17 17:37, Hanwook Bae wrote: > > *** Discussion title: Geometry > > > > Hello, I am trying to use the parameterization class to make my detector > > in the Geant4 framework. > > > > In detail, The detector is consisted of with a number of the same > > geometry and has a multi-layered structure. > > > > However, the bottom layer has different structure slightly, so I divided > > the detector into two parts is that the bottom part and upper one. > > > > The problem is that a sensitive detector that I am using can distinguish > > the geometries only by their copy number and I can't modify the SD. > > > > So, I would like to modify a copy number of the upper parameterization > > volume so that a copy number of the first volume in the upper part leads > > to the last number of the lower one. > > > > Then I googled a way to modify a copy number of each volume in > > parameterization but I can't find anything. > > > > Can I modify the copy number as I said? If it is possible, please tell > > me the way to modify the copy number. > > > > Sorry for my poor English. If you can't understand the meaning of my > > words, please ask me about it. > > > > Thank you. > > > > ------------------------------------------------------------- > > Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at: > > http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1547.html > ```

 to: "Re: Parameterisation and CopyNo"
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 ]