Welcome Page Qweak
Region 3 Drift Chambers
Construction Software DAQ Internal Physics
  Software related Topics  Not logged in Qweak
Entry Klaus Grimm; QweakSimG4 v50 release
   Reply Klaus Grimm; Cerenkov tracking problems
      Reply Klaus Grimm; Cerenkov tracking problem resolved
Message ID: 116     Entry time: 03/25/2005 10:06:37 AM     Reply to this: 117
 Author: Klaus Grimm 
 Type: Simulation 
 Category: Geant4 
 Subject: QweakSimG4 v50 release 
 Record date: 03/25/2005 09:47:30 AM 
Finally: QweakSimG4 v50

Major Changes:

- output root ntuple contains the cross section weight factor. The weight is extracted from the Geant3/PAW ntuple
  (entry: weight_n) for each primary event. The weight factor is needed for the calculation of the cross section weighted
   Q2 of the detectors.
  Weight factor implementation took longer than expected =8-(

- Found a bug in the Q2 extraction. I was assuming that in the Geant3 ntuple the Q2 entry is saved as
  a vector "q__2[numhit]" but there is only one q__2 for all hits belonging to a primary electron.
  When I tried to add "weight_n" in the event input file readout and QweakSimG4 crashed due to format mismatch,
  I got aware of the false Q2 readout.

- QweakSimCerenkovDetector_PMT* classes cleared out. Only the necessary hit information is recorded now

- tracking: primaries can generate secondaries at any location, but
             - secondaries will *not* be tracked/shown with an origin of z<580*cm.
             -> this enables a full tracking *only* for the cerenkov detector 

   see QweakSimTrackingAction::PreUserTrackingAction()

    // store only trajectory of primary, BUT allow full tracking of secondaries with an origin of  z>580*cm
    if( (aTrack->GetParentID()==0) || (aTrack->GetVertexPosition().z() > 580.0*cm) )
    {
	fpTrackingManager->SetStoreTrajectory(true);
    }
    else
    {
	fpTrackingManager->SetStoreTrajectory(false);
    }
       

- valgrind check: some minor stuff from root. However the memory consumption is rampingup to 40% of 512MB,
  a 10k run w/o Cerenkov production/tracking takes ~9min (100% CPU @3GHz)
 
.
Attachment 1: ep_elastic_rootstructure.jpg  126 kB  | Hide | Hide all
ep_elastic_rootstructure.jpg
Attachment 2: valgrind_memcheck_debug.txt.pid27417  7 kB  | Hide | Hide all
==27417== Memcheck, a memory error detector for x86-linux.
==27417== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==27417== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==27417== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==27417== 
==27417== My PID = 27417, parent PID = 5622.  Prog and args are:
==27417==    ./QweakSimG4
==27417==    myRun.mac
==27417== For more details, rerun with: -v
==27417== 
==27417== Source and destination overlap in memcpy(0x1EDF7308, 0x1EDF7308, 4)
==27417==    at 0x1B903A61: memcpy (mac_replace_strmem.c:113)
==27417==    by 0x1DC662F7: (within /usr/X11R6/lib/libXt.so.6.0)
==27417==    by 0x1DC66C42: _XtGetResources (in /usr/X11R6/lib/libXt.so.6.0)
==27417==    by 0x1DC4FFAD: (within /usr/X11R6/lib/libXt.so.6.0)
==27417== 
==27417== Source and destination overlap in memcpy(0x1E496674, 0x1E496674, 4)
==27417==    at 0x1B903A61: memcpy (mac_replace_strmem.c:113)
==27417==    by 0x1DC662F7: (within /usr/X11R6/lib/libXt.so.6.0)
==27417==    by 0x1DC66F77: _XtGetSubresources (in /usr/X11R6/lib/libXt.so.6.0)
==27417==    by 0x1DC670CF: XtGetSubresources (in /usr/X11R6/lib/libXt.so.6.0)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB39B88: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1C6F9C7D: TBasket::WriteBuffer() (in /usr/local/root/lib/libTree.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB39B9F: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1C6F9C7D: TBasket::WriteBuffer() (in /usr/local/root/lib/libTree.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB3B7A5: R__ct_tally (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39CCB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Conditional jump or move depends on uninitialised value(s)
==27417==    at 0x1BB398E6: R__longest_match (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39BBB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Conditional jump or move depends on uninitialised value(s)
==27417==    at 0x1BB398F3: R__longest_match (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39BBB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Conditional jump or move depends on uninitialised value(s)
==27417==    at 0x1BB39907: R__longest_match (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39BBB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Conditional jump or move depends on uninitialised value(s)
==27417==    at 0x1BB39915: R__longest_match (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39BBB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Conditional jump or move depends on uninitialised value(s)
==27417==    at 0x1BB39923: R__longest_match (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39BBB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Conditional jump or move depends on uninitialised value(s)
==27417==    at 0x1BB39931: R__longest_match (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39BBB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Conditional jump or move depends on uninitialised value(s)
==27417==    at 0x1BB3993C: R__longest_match (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39BBB: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB3B957: R__compress_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3B734: R__flush_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39D8E: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB3B95D: R__compress_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3B734: R__flush_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39D8E: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB39B88: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BA221F6: TKey::TKey(TObject const*, char const*, int) (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB39B9F: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3A917: R__zip (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BA221F6: TKey::TKey(TObject const*, char const*, int) (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB3B957: R__compress_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3B734: R__flush_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39D0F: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Use of uninitialised value of size 4
==27417==    at 0x1BB3B95D: R__compress_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB3B734: R__flush_block (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39D0F: R__Deflate_fast (in /usr/local/root/lib/libCore.so)
==27417==    by 0x1BB39DC7: R__Deflate (in /usr/local/root/lib/libCore.so)
==27417== 
==27417== Invalid free() / delete / delete[]
==27417==    at 0x1B904265: free (vg_replace_malloc.c:153)
==27417==    by 0x1E13FE7B: free_mem (in /lib/tls/libc-2.3.2.so)
==27417==    by 0x1E13FA84: __GI___libc_freeres (in /lib/tls/libc-2.3.2.so)
==27417==    by 0x1B8FDBE0: _vgw(float, long double,...)(...)(long double,...)(short) (vg_intercept.c:117)
==27417==  Address 0x1E2BC1A0 is not stack'd, malloc'd or (recently) free'd
==27417== 
==27417== ERROR SUMMARY: 22517 errors from 19 contexts (suppressed: 195 from 1)
==27417== malloc/free: in use at exit: 133069561 bytes in 1685820 blocks.
==27417== malloc/free: 2961982 allocs, 1276163 frees, 331963232 bytes allocated.
==27417== For counts of detected errors, rerun with: -v
==27417== searching for pointers to 1685820 not-freed blocks.
ELOG V2.6.0-beta