+
+
+
+void AliEMCALQADataMakerRec::GetTruChannelPosition( Int_t &globRow, Int_t &globColumn, Int_t module, Int_t ddl, Int_t branch, Int_t column )
+{
+ Int_t mrow;
+ Int_t mcol;
+ Int_t trow;
+ Int_t tcol;
+ Int_t drow;
+ Int_t rcu;
+ // RCU 0 or 1
+ rcu = ddl % 2;
+
+ // 12 rows of 2x2s in a module (3 TRUs by 4 rows)
+ mrow = (module/2) * 12;
+ // 24 columns per module, odd module numbers increased by 24
+ mcol = (module%2) * 24;
+
+ // position within TRU coordinates
+ tcol = column / 4;
+ trow = column % 4;
+
+ //.combine
+ if( module%2 == 0 ){ // A side
+ // mirror rows
+ trow = 3 - trow;
+
+ // TRU in module row addition
+ drow = (rcu*branch+rcu) * 4;
+
+ }
+ else{ // C side
+ // mirror columns
+ tcol = 23 - tcol;
+
+ // TRU in module row addition
+ drow = (2 - (rcu*branch+rcu)) * 4;
+ }
+
+ // output global row/collumn position (0,0 = SMA0, phi = 0, |eta| = max)
+ globRow = mrow + drow + trow;
+ globColumn = mcol + tcol;
+ return;
+
+}
+