Hello Mike, Thank you very much for your kind notice and suggestions! I fixed the bugs in EventShape and JetFinder classes. (We had the same bug in JetFinder) The Axis() functions are also changed. In the modified program, the TVector3's are created in the initial constructor, EventShape(), then can be removed by ~EventShape(), if you like. The modified sources are in the same place (we replaced them): ftp://ftp.slac.stanford.edu/groups/lcd/Physics_tools/ Jet_EventShape_Finders.tar.gz or via Root page: http://root.cern.ch/root/ExApplications.html We may need a Sphericity finder, but I'm sorry I don't have a plan to make it now... Cheers, -Masako ============================================== Masako Iwasaki U. of Oregon masako@slac.stanford.edu SLAC M/S 96, 2575 Sandhill Road Menlo Park, CA 94025, USA ============================================== From: "M. Sievers" <sieversm@mail.desy.de> Subject: JetFinders Date: Thu, 23 Sep 1999 10:51:16 +0200 (MEST) Message-ID: <Pine.LNX.4.10.9909231038240.2077-100000@Terrok-Nor.desy.de> sieversm> Hello, sieversm> sieversm> I started using your JetFinders/EventShape classes for root. I am mainly sieversm> using it for Thrust; do you plan to make sphericity as well? sieversm> sieversm> There is a memory leak, though: the nam string in EventShape.cxx is sieversm> created per event, but never deleted. I modified the code in this way: sieversm> sieversm> *** EventShape.cxx.orig Thu Sep 23 10:35:41 1999 sieversm> --- EventShape.cxx Thu Sep 23 10:36:17 1999 sieversm> *************** sieversm> *** 70,75 **** sieversm> --- 70,76 ---- sieversm> printf("EventShape::setEvent input is not a TVector3 or a sieversm> TLorentzVector\n"); sieversm> continue; sieversm> } sieversm> + delete nam; sieversm> mom(np,1) = v->X(); sieversm> mom(np,2) = v->Y(); sieversm> mom(np,3) = v->Z(); sieversm> sieversm> sieversm> sieversm> Also, I believe you should mention that the Axis() methods create a new sieversm> TVector3 that must later be deleted. I'd prefer seeing a funtion that sieversm> returns something like 'return TVector3(...)' so it's on the stack (I sieversm> think) or something that returns the values of the elements. sieversm> sieversm> I think this is a very useful routine, thanks for sharing it! sieversm> sieversm> Bye, sieversm> Mike sieversm> sieversm> -------------------------------------------------------------------------- sieversm> Michael Sievers sieversm> Michael.Sievers@desy.de sieversm> -------------------------------------------------------------------------- sieversm> esa$ gcc -Wall -o ariane5 ariane5.c sieversm> ariane5.c: 666: warning: long float implicitly truncated to unsigned type sieversm> esa$ ariane5 sieversm>
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:39 MET