Sti diary

Thu Feb 05 2015

Eval is frozen, DEV is going for production
What was made.

Hao#3 fixed (Tests inside StiHit creations)
Hao#4 done
Hao#5 Nudge usage. Fixed Wall (wallx) introdused StiTrackNodeHelper modified. Must be tested again
Hao#6a  kFarFromBeam still == 10, not proposed 2. Now I understand that kFarFromBeam was invented
             to suppress (not fix) the bug related to kEnded with primary. Hao is right, kEnded only calculated when track is more far
            from beam than kFarFromBeam. Otherwice track which tested as primary could be defined as kEnded, which
             means nothing for this track, but it will be  rejected. After adding if (ians && ians !=kEnded) return false,
            which is done, we can remove kFarFromBeam at all.
            So for primary kEnded should be considered as a good answer.
            For crossing of the volume it is considered as a normal fail (but not the end of crossing).

Hao#6c Accounting errors for volume crossing are not used

Hao#7  Done
Hao#9 Active/Inactive loop done. But it coulde be speeduped

Hao#10 Reusing hits done. Decision by detector user.
In the according hit loaded athor of StiXXX code must call hit->setMaxTimes(3) to allow 3 tracks share the same hit

=================================================================================================================

Tue Nov 18 2014

Another graph give start of disaster  Sep 7


Now CVS commits time:

Wed Oct 22 2014

The decline of primaries was 10.08, the same time New average was deployed.
I added test, with random points, to compare Geant volume and converted from it, Sti volume
Errors found and fixed:
Method Diff was added. It checks for random space points, which belons TGeoVolume to be also inside of according StiDetector
Added test for reflection. Reflection is legal in Geant, but was not accounted in Sti Averaging. Fixed

In refitL check for inside() lead to stop tracking
which is wrong. When track after refit missed volume,
it should not lead to stop tracking. Now this is fixed
Probably this is responsable for second decrease of primaries

StiDetector::insideL(const double xl[3],int mode=0) mode is added
0=check only detector plane, 1=check all the boundaries

New method StiDetector::inside(..) added to check global pont

There is a hope that these updates solve the problem of primaries and bad pictures in Dmitri.S appication

Mon Oct 20 2014
=============

 

 We see that Oct 08 something bad happened, primaties decreased   

 

==========================================================================================================

Oct 17, 2014
New version commited

  • Search of detector in two stages is implemented. First stage search only sensetive volumes,second one for others volumes. by default old , one stage mode is working. To switch on two the staged search, user should define evvironment variabe "setenv activeNonActiveLoop 1"
  • New volume averaging implemented. What is the difference?
    • Instead creating TPhysicalVolume structure with the following averaging, directly used TGeoManager
    • All sub volumes are averaging, independently of shape and positions
    • If original top volume is not convenient to Sti, rotated not in Sti style or moved in non sti position, like tube not around Z-axis or has non Sti shape, then box created, which includes the TGeo volume and material reaclculated to keep the same mass as previous. This box is the new Sti object.
    • The averaged volume now is equal or bigger then the original one. But weight exactly the same. Becaus it is bigger some overlaps could be arised.  Another approach is to keep the same volume by decreasing thickness. This should be discussed.
  • Duing the tracking, now if track is crossing volume, it is crossing it, if not, not. Before it was used some tolerance and some times track missing the volume was assigned to it. In the same time, this track could be crossing another volume, but it was ignored. Now such unpredicted behaviour is removed.
  • Dmitry.S found that many track nodes has coordinates outside of the volume. Reason of this is known, but it is not convenient for his application (I do not know the name).  Now, when node coordinates are changed in refit, these coordinates are moved along the track on to detector plane. As a result, some times thay are became outside of object, What to do in this case?
    • For planar shape , even if by Y or Z track is outside the volume, it is still supposed to cross it. The reasons:
      • We are not sure, that our geometry exactly the same as real
      • if track becames outside of this volume we can disconnect it, Then energy loss will be zero. But may be it is crossing another volume. But we do not know which. So it is more safe to use energy loss of old volume, very probably it is similar to real one.

    
===================================================================
 Sep 23 , 2014

Double counting of density in energy loss fixed

Not accurate acount  of energy loss in gas and in parent node fixed

Energy loss calculator created authomatically inside of material. No need to do it by hands now

Saving of energy loss data in node for following analisys

Methods to calculate weight and volume size of detectors implemented. Using this
a lot of discrepances were found btween TGeo weight and Sti weight of detectors

Automatic splitting of average volumes (planar & cylindrical) implemented

Removing not needed detector is added. Used in StiIst. Average volume created and then
more precize volume made, using info of average one. Then average deleted

 Test angle for new hit 33=>55 . In result of HFT alignement, hits are so far from origine
volume, that old test is too strict. When some alignement of volumes will be added,
probably this problem will disappeared

It was found, that track crossing of cylinder is not accurate enough. Rewritten.

 In method setLayerRadius, tolerance  added, to avoid two objects  with slightly different
 layer radius to be in dofferent layers

 Function recov(), which recovers bad error matrix (non positive)   rewritten and simplified.

In new, more complicated geometry, it became possible that track in local coordinate system
has cos(Phi) negative. It leads to negative path in energy loss calculation and as a result wrong
error matriix. Found and fixed

Tonight, Sep 23 I commit a bug 2917
TGeoPhisical volume has different weight then TGeoVolume. Our average  Sti volumes created from
TGeoPhysicalVolume and hence could be wrong