]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added cross-talk from the wires beyond the first and the last rows
authorkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 Jun 2002 15:37:31 +0000 (15:37 +0000)
committerkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 Jun 2002 15:37:31 +0000 (15:37 +0000)
TPC/AliTPC.cxx
TPC/AliTPCParam.h
TPC/AliTPCParamSR.cxx

index a71d5c712ba4957a5caf85a77245d217ca44fbe9..992cc5e94ccaf0f37f5eed9c972669c5eed372da 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.58  2002/05/27 14:33:14  hristov
+The new class AliTrackReference used (M.Ivanov)
+
 Revision 1.57  2002/05/07 17:23:11  kowal2
 Linear gain inefficiency instead of the step one at the wire edges.
 
@@ -1857,7 +1860,7 @@ void AliTPC::Hits2DigitsSector(Int_t isec)
 
       Int_t nrows =fTPCParam->GetNRow(isec);
 
-      row= new TObjArray* [nrows];
+      row= new TObjArray* [nrows+2]; // 2 extra rows for cross talk
     
       MakeSector(isec,nrows,tH,ntracks,row);
 
@@ -1915,7 +1918,7 @@ void AliTPC::DigitizeRow(Int_t irow,Int_t isec,TObjArray **rows)
  
 
   Float_t zerosup = fTPCParam->GetZeroSup();
-  Int_t nrows =fTPCParam->GetNRow(isec);
+  //  Int_t nrows =fTPCParam->GetNRow(isec);
   fCurrentIndex[1]= isec;
   
 
@@ -1943,14 +1946,16 @@ void AliTPC::DigitizeRow(Int_t irow,Int_t isec,TObjArray **rows)
   //
   //calculate signal 
   //
-  Int_t row1 = TMath::Max(irow-fTPCParam->GetNCrossRows(),0);
-  Int_t row2 = TMath::Min(irow+fTPCParam->GetNCrossRows(),nrows-1);
+  //Int_t row1 = TMath::Max(irow-fTPCParam->GetNCrossRows(),0);
+  //Int_t row2 = TMath::Min(irow+fTPCParam->GetNCrossRows(),nrows-1);
+  Int_t row1=irow;
+  Int_t row2=irow+2; 
   for (Int_t row= row1;row<=row2;row++){
     Int_t nTracks= rows[row]->GetEntries();
     for (i1=0;i1<nTracks;i1++){
       fCurrentIndex[2]= row;
-      fCurrentIndex[3]=irow;
-      if (row==irow){
+      fCurrentIndex[3]=irow+1;
+      if (row==irow+1){
        m2->Zero();  // clear single track signal matrix
        Float_t trackLabel = GetSignal(rows[row],i1,m2,m1,indexRange); 
        GetList(trackLabel,nofPads,m2,indexRange,pList);
@@ -2050,7 +2055,7 @@ Float_t AliTPC::GetSignal(TObjArray *p1, Int_t ntr,
   AliTPCFastVector &v = *tv;
   
   Float_t label = v(0);
-  Int_t centralPad = (fTPCParam->GetNPads(fCurrentIndex[1],fCurrentIndex[3])-1)/2;
+  Int_t centralPad = (fTPCParam->GetNPads(fCurrentIndex[1],fCurrentIndex[3]-1)-1)/2;
 
   Int_t nElectrons = (tv->GetNrows()-1)/4;
   indexRange[0]=9999; // min pad
@@ -2221,10 +2226,10 @@ void AliTPC::MakeSector(Int_t isec,Int_t nrows,TTree *TH,
   // of electrons, one AliTPCFastVectors per each track.
   //---------------------------------------------- 
     
-  Int_t *nofElectrons = new Int_t [nrows]; // electron counter for each row
-  AliTPCFastVector **tracks = new AliTPCFastVector* [nrows]; //pointers to the track vectors
+  Int_t *nofElectrons = new Int_t [nrows+2]; // electron counter for each row
+  AliTPCFastVector **tracks = new AliTPCFastVector* [nrows+2]; //pointers to the track vectors
 
-  for(i=0; i<nrows; i++){
+  for(i=0; i<nrows+2; i++){
     row[i] = new TObjArray;
     nofElectrons[i]=0;
     tracks[i]=0;
@@ -2271,7 +2276,7 @@ void AliTPC::MakeSector(Int_t isec,Int_t nrows,TTree *TH,
                           
            // store already filled fTrack
               
-          for(i=0;i<nrows;i++){
+          for(i=0;i<nrows+2;i++){
              if(previousTrack != -1){
               if(nofElectrons[i]>0){
                  AliTPCFastVector &v = *tracks[i];
@@ -2324,14 +2329,16 @@ void AliTPC::MakeSector(Int_t isec,Int_t nrows,TTree *TH,
          xyz[3]= (Float_t) (-gasgain*TMath::Log(rn)); 
          index[0]=1;
          
-         TransportElectron(xyz,index); //MI change -august       
+         TransportElectron(xyz,index);    
          Int_t rowNumber;
-         fTPCParam->GetPadRow(xyz,index); //MI change august
-         rowNumber = index[2];
+         fTPCParam->GetPadRow(xyz,index); 
+         // row 0 - cross talk from the innermost row
+         // row fNRow+1 cross talk from the outermost row
+         rowNumber = index[2]+1; 
          //transform position to local digit coordinates
          //relative to nearest pad row 
-         if ((rowNumber<0)||rowNumber>=fTPCParam->GetNRow(isec)) continue;
-  Float_t x1,y1;
+         if ((rowNumber<0)||rowNumber>fTPCParam->GetNRow(isec)+1) continue;
+          Float_t x1,y1;
          if (isec <fTPCParam->GetNInnerSector()) {
            x1 = xyz[1]*fTPCParam->GetInnerPadPitchWidth();
            y1 = fTPCParam->GetYInner(rowNumber);
@@ -2340,9 +2347,7 @@ void AliTPC::MakeSector(Int_t isec,Int_t nrows,TTree *TH,
            x1=xyz[1]*fTPCParam->GetOuterPadPitchWidth();
            y1 = fTPCParam->GetYOuter(rowNumber);
          }
-
          // gain inefficiency at the wires edges - linear
-
          x1=TMath::Abs(x1);
          y1-=1.;
           if(x1>y1) xyz[3]*=TMath::Max(1.e-6,(y1-x1+1.));      
@@ -2375,7 +2380,7 @@ void AliTPC::MakeSector(Int_t isec,Int_t nrows,TTree *TH,
     //   store remaining track (the last one) if not empty
     //
 
-     for(i=0;i<nrows;i++){
+     for(i=0;i<nrows+2;i++){
        if(nofElectrons[i]>0){
           AliTPCFastVector &v = *tracks[i];
          v(0) = previousTrack;
@@ -2592,13 +2597,10 @@ void AliTPC::TransportElectron(Float_t *xyz, Int_t *index)
   // ExB
   
   if (fTPCParam->GetMWPCReadout()==kTRUE){
-    Float_t x1=xyz[0];
-    fTPCParam->Transform2to2NearestWire(xyz,index);
-    Float_t dx=xyz[0]-x1;
+    Float_t dx = fTPCParam->Transform2to2NearestWire(xyz,index);
     xyz[1]+=dx*(fTPCParam->GetOmegaTau());
   }
-  //add nonisochronity (not implemented yet)
-  
+  //add nonisochronity (not implemented yet)  
 }
   
 ClassImp(AliTPCdigit)
index f037a7b12c89523ba247f7ada7884b70cc2aa379..86c9ee74b0e1fced2d1fa5d00ff7500b91e9360f 100644 (file)
@@ -509,10 +509,12 @@ inline Float_t  AliTPCParam::Transform2to2NearestWire(Float_t *xyz, Int_t *index
   Float_t xnew,dx;
   if (index[1]<fNInnerSector) {
      xnew = fRInnerFirstWire+TMath::Nint((xyz[0]-fRInnerFirstWire)/fInnerWWPitch)*fInnerWWPitch;
-    }
+       }
     else {
      xnew = fROuterFirstWire+TMath::Nint((xyz[0]-fROuterFirstWire)/fOuterWWPitch)*fOuterWWPitch;
     }
+    
   dx = xnew-xyz[0];
   xyz[0]=xnew;
   return  dx;
index 11b1f58ed133f7e53187adc7a7a5f00733ee3fa6..6c80a7a27ae68e868b5b030347b72a50dba167e8 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.7  2002/03/18 17:59:13  kowal2
+Chnges in the pad geometry - 3 pad lengths introduced.
+
 Revision 1.6  2002/02/25 11:02:56  kowal2
 Changes towards speeding up the code. Thanks to Marian Ivanov.
 
@@ -378,9 +381,13 @@ Bool_t AliTPCParamSR::Update()
      // number of pads per row
      Float_t y = (x-0.5*fInnerPadPitchLength)*tan(fInnerAngle/2.)-fInnerWireMount-
        fInnerPadPitchWidth/2.;
-     fYInner[i]  = x*tan(fInnerAngle/2.)-fInnerWireMount;
+     // 0 and fNRowLow+1 reserved for cross talk rows
+     fYInner[i+1]  = x*tan(fInnerAngle/2.)-fInnerWireMount;
      fNPadsLow[i] = 1+2*(Int_t)(y/fInnerPadPitchWidth) ;
    }
+ // cross talk rows
+ fYInner[0]=(fPadRowLow[0]-fInnerPadPitchLength)*tan(fInnerAngle/2.)-fInnerWireMount;
+ fYInner[fNRowLow+1]=(fPadRowLow[fNRowLow-1]+fInnerPadPitchLength)*tan(fInnerAngle/2.)-fInnerWireMount; 
  firstrow = fOuterRadiusLow + 1.6;
  for(i=0;i<fNRowUp;i++)
    {
@@ -389,7 +396,7 @@ Bool_t AliTPCParamSR::Update()
        fPadRowUp[i]=x;
     Float_t y =(x-0.5*fOuter1PadPitchLength)*tan(fOuterAngle/2.)-fOuterWireMount-
          fOuterPadPitchWidth/2.;
-     fYOuter[i]= x*tan(fOuterAngle/2.)-fOuterWireMount;
+     fYOuter[i+1]= x*tan(fOuterAngle/2.)-fOuterWireMount;
      fNPadsUp[i] = 1+2*(Int_t)(y/fOuterPadPitchWidth) ;
      if(i==fNRowUp1-1) {
        fLastWireUp1=fPadRowUp[i] +0.375;
@@ -404,8 +411,11 @@ Float_t y =(x-0.5*fOuter2PadPitchLength)*tan(fOuterAngle/2.)-fOuterWireMount-
           fOuterPadPitchWidth/2.;
          fNPadsUp[i] = 1+2*(Int_t)(y/fOuterPadPitchWidth) ; 
        }
-     fYOuter[i]  = fPadRowUp[i]*tan(fOuterAngle/2.)-fOuterWireMount;
+     fYOuter[i+1]  = fPadRowUp[i]*tan(fOuterAngle/2.)-fOuterWireMount;
    }
+ // cross talk rows
+ fYOuter[0]=(fPadRowUp[0]-fOuter1PadPitchLength)*tan(fOuterAngle/2.)-fOuterWireMount;
+ fYOuter[fNRowUp+1]=(fPadRowUp[fNRowUp-1]+fOuter2PadPitchLength)*tan(fOuterAngle/2.)-fOuterWireMount;
  fNtRows = fNInnerSector*fNRowLow+fNOuterSector*fNRowUp;
  fbStatus = kTRUE;
  return kTRUE;
@@ -443,7 +453,8 @@ Int_t  AliTPCParamSR::CalcResponseFast(Float_t* xyz, Int_t * index, Int_t row)
   //
   //we suppose that coordinate is expressed in float digits 
   // it's mean coordinate system 8
-  //xyz[0] - float padrow xyz[1] is float pad  (center pad is number 0) and xyz[2] is float time bin
+  //xyz[0] - electron position w.r.t. pad center, normalized to pad length,
+  //xyz[1] is float pad  (center pad is number 0) and xyz[2] is float time bin
   if ( (fInnerPRF==0)||(fOuter1PRF==0)||(fOuter2PRF==0) ||(fTimeRF==0) ){ 
     Error("AliTPCParamSR", "response function was not adjusted");
     return -1;
@@ -501,7 +512,7 @@ Int_t  AliTPCParamSR::CalcResponseFast(Float_t* xyz, Int_t * index, Int_t row)
   } // the above is calculated only once
 
   // calculate central padrow, pad, time
-  Int_t npads = GetNPads(index[1],index[3]);
+  Int_t npads = GetNPads(index[1],index[3]-1);
   Int_t cpadrow = index[2]; // electrons are here
   Int_t cpad    = TMath::Nint(xyz[1]);
   Int_t ctime   = TMath::Nint(xyz[2]+zoffset2);
@@ -529,15 +540,15 @@ Int_t  AliTPCParamSR::CalcResponseFast(Float_t* xyz, Int_t * index, Int_t row)
   Int_t ltime =  (ctime<maxt-2) ? 2: maxt-ctime-1;
 
   // cross talk from long pad to short one
-  if(row==fNRowUp1-1 && fpadrow==-1) {
+  if(row==fNRowUp1 && fpadrow==-1) {
     dpadrow *= fOuter2PadPitchLength;
     dpadrow += fOuterWWPitch;
     dpadrow /= fOuter1PadPitchLength;
   }    
   // cross talk from short pad to long one
-  if(row==fNRowUp1 && fpadrow==1){ 
+  if(row==fNRowUp1+1 && fpadrow==1){ 
     dpadrow *= fOuter1PadPitchLength;
-    if(dpadrow < -0.) dpadrow = -1.; //protection against 3rd wire
+    if(dpadrow < 0.) dpadrow = -1.; //protection against 3rd wire
     dpadrow += fOuterWWPitch;
     dpadrow /= fOuter2PadPitchLength;