From 3a4139a2eacd64923563dbf6b6c7579ad6c81a82 Mon Sep 17 00:00:00 2001 From: masera Date: Thu, 3 May 2007 08:53:42 +0000 Subject: [PATCH] new SSD cluster finder (Fragiacomo). SDD+SSD overall calibration included (one parameter has to be added to the OCDB) --- ITS/AliITSClusterFinderV2SDD.cxx | 3 +-- ITS/AliITSClusterFinderV2SSD.cxx | 30 +++++++++++++++++++++++++----- ITS/AliITSClusterFinderV2SSD.h | 7 ++++++- ITS/AliITSsimulationSSD.cxx | 3 ++- 4 files changed, 34 insertions(+), 9 deletions(-) diff --git a/ITS/AliITSClusterFinderV2SDD.cxx b/ITS/AliITSClusterFinderV2SDD.cxx index b5ab56bea9e..6e96cdb6bfb 100644 --- a/ITS/AliITSClusterFinderV2SDD.cxx +++ b/ITS/AliITSClusterFinderV2SDD.cxx @@ -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]}; diff --git a/ITS/AliITSClusterFinderV2SSD.cxx b/ITS/AliITSClusterFinderV2SSD.cxx index 329f8f89873..c77835b1f76 100644 --- a/ITS/AliITSClusterFinderV2SSD.cxx +++ b/ITS/AliITSClusterFinderV2SSD.cxx @@ -28,6 +28,7 @@ #include "AliITSRawStreamSSD.h" #include #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;iUncheckedAt(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; diff --git a/ITS/AliITSClusterFinderV2SSD.h b/ITS/AliITSClusterFinderV2SSD.h index fcfc6676b63..b3f823f3b9f 100644 --- a/ITS/AliITSClusterFinderV2SSD.h +++ b/ITS/AliITSClusterFinderV2SSD.h @@ -10,10 +10,13 @@ // 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) diff --git a/ITS/AliITSsimulationSSD.cxx b/ITS/AliITSsimulationSSD.cxx index a53c121828f..8904fc0a3a4 100644 --- a/ITS/AliITSsimulationSSD.cxx +++ b/ITS/AliITSsimulationSSD.cxx @@ -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 -- 2.43.0