diff -uNr v01-06.ORIG/analysis/src/RootFileProcessor.cc v01-06/analysis/src/RootFileProcessor.cc --- v01-06.ORIG/analysis/src/RootFileProcessor.cc 2020-03-28 10:29:20.000000000 +0900 +++ v01-06/analysis/src/RootFileProcessor.cc 2021-02-01 12:38:30.000000000 +0900 @@ -284,6 +284,25 @@ const TrackerHit* hp = static_cast(static_cast(sitep->GetHit()).GetHitPtr() ) ; double fi0loc = sitep->GetCurState()(1, 0); +#if 1 + int modID = getModuleID( const_cast< EVENT::TrackerHit* >( hp ) ) ; + int rowID = getRowID( const_cast< EVENT::TrackerHit* >( hp ) , + static_cast< const gear::TPCModule* >( moduleVec[ modID ]) ) ; + const double* hpos = hp->getPosition() ; + TVector3 xv( hpos[0], hpos[1], hpos[2] ) ; + float rc = xv.Perp() ; + float phic = TMath::ATan2( xv.X() , xv.Y() ) ; + + THelicalTrack helix = static_cast(sitep->GetCurState()).GetHelix(); + TMatrixD tm = helix.CalcDxDphi(0.); + TVector2 tv(tm(0,0),tm(1,0)); + if (cpa > 0) tv *= -1.; + tv.Unit(); + TVector2 xvunit = (xv.XYvector()).Unit(); + // FIXME + // Should do this in the local frame. + double fiinc = tv.DeltaPhi(xvunit); +#endif int index = sitep->GetHit().GetMeasLayer().GetIndex(); double dxin = sitep->GetResVec()(0,0); double dzin = sitep->GetResVec()(1,0); @@ -307,16 +326,9 @@ _hits->fill( 11, nhits[index] ) ; _hits->fill( 12, nTrks ) ; _hits->fill( 13, fi0loc) ; + _hits->fill( 14, fiinc ) ; _hits->addRow() ; - - int modID = getModuleID( const_cast< EVENT::TrackerHit* >( hp ) ) ; - int rowID = getRowID( const_cast< EVENT::TrackerHit* >( hp ) , - static_cast< const gear::TPCModule* >( moduleVec[ modID ]) ) ; - const double* hpos = hp->getPosition() ; - TVector3 xv( hpos[0], hpos[1], hpos[2] ) ; - float rc = xv.Perp() ; - float phic = TMath::ATan2( xv.X() , xv.Y() ) ; const EVENT::LCObjectVec& pulseVec = hp->getRawHits() ; for ( std::vector< EVENT::LCObject* >::const_iterator i_pls = pulseVec.begin() ; i_pls != pulseVec.end() ; @@ -348,6 +360,7 @@ _clrs->fill(10 , tnl ) ; _clrs->fill(11 , nTrks ) ; _clrs->fill(12 , fi0loc ) ; + _clrs->fill(13 , fiinc ) ; _clrs->addRow() ; @@ -434,6 +447,9 @@ _clrsItemNames.push_back("fi0loc"); _clrsItemType.push_back("double"); + _clrsItemNames.push_back("fiinc"); + _clrsItemType.push_back("double"); + _hitsItemNames.push_back("serialrow"); _hitsItemType.push_back("int"); @@ -476,6 +492,9 @@ _hitsItemNames.push_back("fi0loc"); _hitsItemType.push_back("double"); + _hitsItemNames.push_back("fiinc"); + _hitsItemType.push_back("double"); + _trksItemNames.push_back("ndf"); _trksItemType.push_back("int");