]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
new SSD cluster finder (Fragiacomo). SDD+SSD overall calibration included (one parame...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 May 2007 08:53:42 +0000 (08:53 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 May 2007 08:53:42 +0000 (08:53 +0000)
ITS/AliITSClusterFinderV2SDD.cxx
ITS/AliITSClusterFinderV2SSD.cxx
ITS/AliITSClusterFinderV2SSD.h
ITS/AliITSsimulationSSD.cxx

index b5ab56bea9e433e9852b105424b003a0df60398e..6e96cdb6bfb7bfc9b29b9c7d408dc8045b9d62e9 100644 (file)
@@ -237,8 +237,7 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
         y=-(-xdet+fYshift[fModule]);
         z=  -zdet+fZshift[fModule];
          
-        q/=5.039;  //to have MPV 1 MIP = 86.4 KeV
-         q/=16.49;  //to be consistent with SSD - provisional 06-APR-2007
+         q/=5.243;  //to have MPV 1 MIP = 86.4 KeV --> this must go to calibr.
          Float_t hit[5] = {y, z, 0.0030*0.0030, 0.0020*0.0020, q};
          Int_t  info[3] = {maxj-minj+1, maxi-mini+1, fNlayer[fModule]};
 
index 329f8f898730baac792dd3ad9d0eab3def73af35..c77835b1f766136ba6826183a2fce0a5a807f3dd 100644 (file)
@@ -28,6 +28,7 @@
 #include "AliITSRawStreamSSD.h"
 #include <TClonesArray.h>
 #include "AliITSdigitSSD.h"
+#include "AliITSCalibrationSSD.h"
 
 ClassImp(AliITSClusterFinderV2SSD)
 
@@ -57,13 +58,23 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(TClonesArray *alldigits) {
   //------------------------------------------------------------
   // Actual SSD cluster finder
   //------------------------------------------------------------
+  AliITSCalibrationSSD* cal = (AliITSCalibrationSSD*)GetResp(fModule);
+  Float_t gain=0;
+
   Int_t smaxall=alldigits->GetEntriesFast();
   if (smaxall==0) return;
   TObjArray *digits = new TObjArray;
   for (Int_t i=0;i<smaxall; i++){
     AliITSdigitSSD *d=(AliITSdigitSSD*)alldigits->UncheckedAt(i);
-    Float_t q=d->GetSignal()/4.29;// temp. fix (for PID purposed - normalis. to be checked)
+
+    if(d->IsSideP()) gain = cal->GetGainP(d->GetStripNumber());  
+    else gain = cal->GetGainN(d->GetStripNumber());
+
+    Float_t q=gain*d->GetSignal(); // calibration brings mip peaks around 120 (in ADC units)
+    q=cal->ADCToKeV(q); // converts the charge in KeV from ADC units
+    //Float_t q=d->GetSignal()/4.29;// temp. fix (for PID purposed - normalis. to be checked)
     d->SetSignal(Int_t(q));
+
     if (d->GetSignal()<3) continue;
     digits->AddLast(d);
   }
@@ -207,7 +218,7 @@ void AliITSClusterFinderV2SSD::RawdataToClusters(AliRawReader* rawReader,TClones
   
 }
 
-void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStream* input, 
+void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStreamSSD* input, 
                                        TClonesArray** clusters) 
 {
   //------------------------------------------------------------
@@ -224,12 +235,15 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStream* input,
   Int_t prevStrip = -1;
   Int_t prevFlag = -1;
   Int_t prevModule = -1;
+  Float_t gain=0;
+  AliITSCalibrationSSD* cal;
+  
 
   // read raw data input stream
   while (kTRUE) {
     Bool_t next = input->Next();
 
-    if(input->GetSignal()<(3*4.29) && next) continue;
+    if(input->GetSignal()<(3*4.) && next) continue;
     // check if a new cluster starts
     Int_t strip = input->GetCoord2();
     Int_t flag = input->GetCoord1();
@@ -281,11 +295,17 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStream* input,
       nClusters[0] = nClusters[1] = 0;
       y = q = 0.;
       nDigits = 0;
+
+      cal = (AliITSCalibrationSSD*)GetResp(input->GetModuleID());
+
     }
 
+    if(input->GetSideFlag()==0) gain = cal->GetGainP(input->GetStrip());  
+    else gain = cal->GetGainN(input->GetStrip());
+    
     // add digit to current cluster
-    q += input->GetSignal()/4.29;
-    y += strip * input->GetSignal()/4.29;
+    q += cal->ADCToKeV( gain * input->GetSignal() );  // signal is corrected for gain and converted in KeV 
+    y += strip * cal->ADCToKeV( gain * input->GetSignal() );
     nDigits++;
     prevStrip = strip;
     prevFlag = flag;
index fcfc6676b63972652067cd9bd4bc7c78958f2e2c..b3f823f3b9f547b4a642d6d7d32d42b4b95f9a75 100644 (file)
 //   Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
 //--------------------------------------------------------------
 #include "AliITSClusterFinderV2.h"
+#include "AliITSDetTypeRec.h"
 
 class TClonesArray;
 class AliRawReader;
 class AliITSRawStream;
+class AliITSRawStreamSSD;
+class AliITSCalibrationSSD;
 
 class AliITSClusterFinderV2SSD : public AliITSClusterFinderV2 {
 public:
@@ -28,7 +31,9 @@ public:
                       Ali1Dcluster* pos, Int_t np,
                       TClonesArray *clusters=0x0);
 
-  void FindClustersSSD(AliITSRawStream* input,TClonesArray** clusters);
+  void FindClustersSSD(AliITSRawStreamSSD* input,TClonesArray** clusters);
+  virtual AliITSCalibrationSSD* GetResp(Int_t mod)const{
+    return (AliITSCalibrationSSD*) fDetTypeRec->GetCalibrationModel(mod);}
 
   Int_t fLastSSD1;        //index of the last SSD1 detector   
   Float_t fYpitchSSD;     //strip pitch (cm)
index a53c121828f899da617753da3d6bdd752e9ec3b6..8904fc0a3a43d318502860d92a7c71cb82bee395 100644 (file)
@@ -592,6 +592,7 @@ void AliITSsimulationSSD::ChargeToSignal(Int_t module,AliITSpList *pList) {
        // if strip is dead -> gain=0
        if( ((k==0)&&(res->GetGainP(ix)==0)) || ((k==1)&&(res->GetGainN(ix)==0))) continue;
        
+       signal = fMapA2->GetSignal(k,ix);
        // signal has to be uncalibrated
        // In real life, gains are supposed to be calculated from calibration runs,
        // stored in the calibration DB and used in the reconstruction
@@ -600,7 +601,7 @@ void AliITSsimulationSSD::ChargeToSignal(Int_t module,AliITSpList *pList) {
        else signal /= res->GetGainN(ix);
 
        // signal is converted in unit of ADC
-       signal = res->GetDEvToADC(fMapA2->GetSignal(k,ix));
+       signal = res->GetDEvToADC(signal);
        if(signal>4096.) signal = 4096.;//if exceeding, accumulate last one
 
        // threshold for zero suppression is set on the basis of the noise