Home » PANDA » PandaRoot » Tracking » Adapter from Genfit to Pnd objects checked in
Adapter from Genfit to Pnd objects checked in [message #8796] |
Thu, 04 June 2009 19:58  |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi,
I checked in the promised code (r5722). There are still two issues to be solved. The first is that I put the files PndAdapters.{cxx,h} which contain the two functions in trackrep. They should not stay there. But it was the only place where the dependencies allowed me to put them. Could a framework expert, please make a suggestion on where to put this.
The other issue is more complicated: In PndTrack I save for the first and last point a FairTrackPar*. I have to use the pointer to be able to also put FairTrackParP (polymorphism). But this means that I can not write a proper copy ctor, because calling FairTrackPar(const FairTrackPar&) is not sufficient, because this will not copy the data in FairTrackParP. There is no solution to this problem unless FairTrackPar becomes purely virtual, and we have a method
virtual FairTrackPar FairTrackPar::clone()=0;
which calls the copy ctor in the derived classes, like
FairTrackPar* FairTrackParP::clone(){return FairTrackParP(*this);}
I have the same problem with the Print method: If we use FairTrackPar* in the PndTrack, a call to FairTrackPar::Print() inside PndTrack::Print() will never reach the implementation in FairTrackParP::Print() like it has to. For this we absolutely need a purely FairTrackPar.
Here is what I propose:
- We make FairTrackPar purely virtual
- We make another derived class like the P/H classes to replace the simple behaviour, which is now in FairTrackPar.
I'm looking forward to your comments.
Oh, and BTW, this 5722 commit contained a lot of changes, I coded since the meeting. So I hopw I didnt skrew up. Please test if all your fitting code still works. I will be out for a long weekend (starting tomorrow noon).
CU, Christian
|
|
|
|
|
Re: Adapter from Genfit to Pnd objects checked in [message #8843 is a reply to message #8796] |
Thu, 11 June 2009 09:57   |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi everybody,
I was wondering why there are no answers to my message from 1 week ago about the problem with PndTrack and FairTrackParX. These are important issues, and they can not be left to me alone to deal with. I neither have the responsibility nor the experience to decide these things on my own.
The track parameters are a very central part of the framework. If you would like to keep them as they are now, please tell me how to implement them in PndTrack.
I still suggest to change the way they are implemented, but as I said: My opinion on this can not be the only one. And there is a lot of code which already depends on these classes, so any changes are a lot of work for a lot of people.
Cheers, Christian
|
|
|
|
Re: Adapter from Genfit to Pnd objects checked in [message #8845 is a reply to message #8844] |
Thu, 11 June 2009 11:27   |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi Ralf,
I want create a PndTrack from a Genfit Track. Do you suggest that I book TClonesArrays in the framework in the process of doing that? It would be better, if the PndTrack directly contains the track parameters.
Ans what is the problem about storing pointers? ROOT understands that.
Cheers, Christian
|
|
|
|
|
|
Re: Adapter from Genfit to Pnd objects checked in [message #8852 is a reply to message #8851] |
Thu, 11 June 2009 20:17  |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi,
I agree with what Sebastian said. But let me try to bring your focus back to the open problems.
If I do not use pointers, I have to make a definite choice whether to use FairTrackPar, FairTrackParP, or FairTrackParH in PndTrack. This seems unfavorable. If I use points, there remains the problem that FairTrackParam (the base class) is not a abstract interface class, which brings problems, like the impossibility of coying PndTrack (please see the first message of this thread).
Mohammad, what is your opinion on this issue?
Cheers, Christian
|
|
|
Goto Forum:
Current Time: Thu Aug 14 05:04:06 CEST 2025
Total time taken to generate the page: 0.00368 seconds
|