#include "AliHMPIDCalib.h" //class header
#include "AliHMPIDParam.h" //class header
#include "AliHMPIDRawStream.h" //class header
+#include "AliHMPIDDigit.h" //class header
#include <fstream>
#include <TTree.h>
{
//
//Called from the HMPIDda and fills the pedestal values
- //Arguments: absulote pad number as from AliHMPIDParam and q-charge
+ //Arguments: absolute pad number as from AliHMPIDParam and q-charge
//Returns: none
//
if(q<0) AliFatal("Negative charge is read!!!!!!");
+ UInt_t w32;
Int_t nDDL=0, row=0, dil=0, adr=0;
//The decoding (abs. pad -> ddl,dil,...) is the same as in AliHMPIDDigit::Raw
- Int_t y2a[6]={5,3,1,0,2,4};
-
- nDDL= 2*AliHMPIDParam::A2C(abspad)+AliHMPIDParam::A2P(abspad)%2; //DDL# 0..13
- Int_t tmp= 1+AliHMPIDParam::A2P(abspad)/2*8+AliHMPIDParam::A2Y(abspad)/6; //temp variable
- row= (AliHMPIDParam::A2P(abspad)%2)? tmp:25-tmp; //row r=1..24
- dil= 1+AliHMPIDParam::A2X(abspad)/8; //DILOGIC
- adr=y2a[AliHMPIDParam::A2Y(abspad)%6]+6*(AliHMPIDParam::A2X(abspad)%8); //ADDRESS 0..47
+
+ AliHMPIDDigit dig(abspad,q);
+ dig.Raw(w32,nDDL,row,dil,adr);
+
//........... decoding done
-// if(row<1 || row > 24 || nDDL < 0 || nDDL > 13 || dil < 1 || dil > 10 || adr < 0 || adr >47) AliFatal(Form("ddl %d row %d dil %d adr %d",nDDL,row,dil,adr));
-
-
-
if(q>0) {
fsq[nDDL][row][dil][adr]+=q;
fsq2[nDDL][row][dil][adr]+=q*q;
Int_t y2a[6]={5,3,1,0,2,4};
ddl=2*Ch()+Pc()%2; //DDL# 0..13
- // Int_t tmp=1+Pc()/2*8+PadPcY()/6; r=(Pc()%2)? 25-tmp:tmp; //row r=1..24
Int_t tmp=1+Pc()/2*8+PadPcY()/6; r=(Pc()%2)? tmp:25-tmp; //row r=1..24
d=1+PadPcX()/8; //DILOGIC# 1..10
- a=y2a[PadPcY()%6]+6*(PadPcX()%8); //ADDRESS 0..47
+ a=y2a[PadPcY()%6]+6*(7-PadPcX()%8); //ADDRESS 0..47
- /*
- Int_t a2y[6]={3,2,4,1,5,0}; //pady for a given padress (for single DILOGIC chip)
- Int_t ch=ddl/2;
- Int_t tmp=(24-row)/8;
- Int_t pc=(ddl%2)?5-2*tmp:2*tmp;
- Int_t px=(dil-1)*8+pad/6;
-
- tmp=(ddl%2)?row-1:(24-row);
- Int_t py=6*(tmp%8)+a2y[pad%6];
-
- */
-
-
w32=0;
//Printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
//
assert(0<=pad&&pad<=47);
Int_t a2y[6]={3,2,4,1,5,0}; //pady for a given padress (for single DILOGIC chip)
- Int_t ch=ddl/2;
+ Int_t ch=ddl/2;
Int_t tmp=(24-row)/8;
Int_t pc=(ddl%2)?5-2*tmp:2*tmp;
- Int_t px=(dil-1)*8+pad/6;
+// Int_t px=(dil-1)*8+pad/6;
+ Int_t px=dil*8-pad/6-1; //flip according to Paolo (26-3-2008)
tmp=(ddl%2)?row-1:(24-row);
Int_t py=6*(tmp%8)+a2y[pad%6];
CodeRules := $(patsubst %.cxx,$(DirOut)/%.viol,$(SrcBase) $(SrcSim) $(SrcRec))
-export IRST_INSTALLDIR=$(ALICE)/local/IRST
+export IRST_INSTALLDIR=$(HOME)/IRST
export IRST_CONFIG_DIR=$(IRST_INSTALLDIR)/userConfig/ALICE
export CLASSPATH=$(IRST_INSTALLDIR)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void Convert(Int_t ddl,Int_t r,Int_t d,Int_t a,Int_t &ch, Int_t &pc, Int_t &px, Int_t &py)
{
-
-
Int_t a2y[6]={3,2,4,1,5,0};//pady for a given address (for single DILOGIC chip)
Int_t ch=ddl/2;
Int_t tmp=(24-r)/8; Int_t pc=(ddl%2)? 5-2*tmp:2*tmp;
- Int_t px=(d-1)*8+a/6;
+ Int_t px=dil*8-pad/6-1; //flip according to Paolo (26-3-2008)
tmp=(ddl%2)?r-1:(24-r); Int_t py=6*(tmp%8)+a2y[a%6];
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++