@@ -82,7 +82,7 @@ void generateTPCCorrectionNTuple(const char* path = "InputSCDensityHistograms.ro
8282 const o2 ::gpu ::TPCFastTransformGeo & geo = fastTransform -> getGeometry ();
8383
8484 TFile * f = new TFile ("tpcCorrection.root" , "RECREATE" );
85- TNtuple * nt = new TNtuple ("dist" , "dist" , "sector:row:su:sv: dx:du:dv " );
85+ TNtuple * nt = new TNtuple ("dist" , "dist" , "sector:row:x:y:z: dx:dy:dz " );
8686
8787 int32_t nSectors = 1 ; // fastTransform->getNumberOfSectors();
8888 // for( int32_t sector=0; sector<nSectors; sector++){
@@ -91,13 +91,11 @@ void generateTPCCorrectionNTuple(const char* path = "InputSCDensityHistograms.ro
9191
9292 for (int32_t row = 0 ; row < geo .getNumberOfRows (); row ++ ) {
9393
94- float x = geo .getRowInfo (row ).x ;
94+ const auto& rowInfo = geo .getRowInfo (row );
95+ float x = rowInfo .x ;
9596
96- for (float su = 0. ; su <= 1. ; su += 0.01 ) {
97- for (float sv = 0. ; sv <= 1. ; sv += 0.01 ) {
98- float u , v , y = 0 , z = 0 ;
99- geo .convScaledUVtoUV (sector , row , su , sv , u , v );
100- geo .convUVtoLocal (sector , u , v , y , z );
97+ for (float y = rowInfo .getYmin (); y <= rowInfo .getYmax (); y += rowInfo .getYwidth () / 100. ) {
98+ for (float z = geo .getZmin (sector ); z <= geo .getZmax (sector ); z += geo .getTPCzLength () / 100. ) {
10199
102100 // local 2 global
103101 float gx , gy , gz ;
@@ -112,14 +110,11 @@ void generateTPCCorrectionNTuple(const char* path = "InputSCDensityHistograms.ro
112110 // global to local
113111 float x1 , y1 , z1 ;
114112 geo .convGlobalToLocal (sector , gx , gy , gz , x1 , y1 , z1 );
115- float u1 = 0 , v1 = 0 ;
116- geo .convLocalToUV (sector , y1 , z1 , u1 , v1 );
117113
118114 float dx = x1 - x ;
119- float du = u1 - u ;
120- float dv = v1 - v ;
121- std ::cout << sector << " " << row << " " << su << " " << sv << " " << dx << " " << du << " " << dv << std ::endl ;
122- nt -> Fill (sector , row , su , sv , dx , du , dv );
115+ float dy = y1 - y ;
116+ float dz = z1 - z ;
117+ nt -> Fill (sector , row , x , y , z , dx , dy , dz );
123118 }
124119 }
125120 }
0 commit comments