]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Use of appropriate sensor depending response objects in SPD simulation
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Dec 2005 13:02:25 +0000 (13:02 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Dec 2005 13:02:25 +0000 (13:02 +0000)
ITS/AliITSsimulationSPD.h
ITS/AliITSsimulationSPDdubna.cxx
ITS/AliITSsimulationSPDdubna.h

index b7deb325e11aec8c253a7b04fc417756ec6e38dd..0347f8e0735236b664f24185ee6e8ad49cb53a11 100644 (file)
@@ -122,15 +122,15 @@ class AliITSsimulationSPD : public AliITSsimulation {
     // Getters for data kept in fSegmentation and fResponse.
     // Returns the Threshold in electrons
     Double_t GetThreshold(){Double_t a=0.0,b=0.0;
-    AliITSresponseSPD* res = (AliITSresponseSPD*)GetResponseModel(0);
+    AliITSresponseSPD* res = (AliITSresponseSPD*)GetResponseModel(GetModuleNumber());
     res->Thresholds(a,b); return a;}
     // Returns the threshold and rms noise.
     void GetThresholds(Double_t &t,Double_t &s){
-      AliITSresponseSPD* res = (AliITSresponseSPD*)GetResponseModel(0);
+      AliITSresponseSPD* res = (AliITSresponseSPD*)GetResponseModel(GetModuleNumber());
       res->Thresholds(t,s);}
     // Returns the couplings Columb and Row.
     void GetCouplings(Double_t &cc,Double_t &cr){
-      AliITSresponseSPD* res = (AliITSresponseSPD*)GetResponseModel(0);
+      AliITSresponseSPD* res = (AliITSresponseSPD*)GetResponseModel(GetModuleNumber());
       res->GetCouplingParam(cc,cr);}
     // Returns the number of pixels in x
     Int_t GetNPixelsX(){AliITSsegmentationSPD* seg= (AliITSsegmentationSPD*)GetSegmentationModel(0);return seg->Npx();}
index 1fbad9b1ca1760b67f7bea99f19c70a925e1c0b8..50349e874c194ee16a26dff50b34f3c7d0966c9a 100644 (file)
@@ -469,9 +469,9 @@ void AliITSsimulationSPDdubna::pListToDigits(){
         FillHistograms(ix,iz,sig+electronics);
         if(GetDebug(3)){
             cout<<sig<<"+"<<electronics<<">threshold("<<ix<<","<<iz
-                <<")="<<GetThreshold(ix,iz) <<endl;
+                <<")="<<GetThreshold() <<endl;
         } // end if GetDebug
-        if (sig+electronics <= GetThreshold(ix,iz)) continue;
+        if (sig+electronics <= GetThreshold()) continue;
         dig.SetCoord1(iz);
         dig.SetCoord2(ix);
         dig.SetSignal(1);
@@ -591,7 +591,7 @@ void AliITSsimulationSPDdubna::SetCoupling(Int_t row, Int_t col, Int_t ntrack,
             j1 += isign;
             //   pulse1 *= couplR; 
             xr = gRandom->Rndm();
-            //if ((j1<0)||(j1>GetNPixelsZ()-1)||(pulse1<GetThreshold(j1,col))){
+            //if ((j1<0)||(j1>GetNPixelsZ()-1)||(pulse1<GetThreshold())){
             if ((j1<0) || (j1>GetNPixelsZ()-1) || (xr>couplR)){
                 j1 = row;
                 flag = 1;
@@ -606,7 +606,7 @@ void AliITSsimulationSPDdubna::SetCoupling(Int_t row, Int_t col, Int_t ntrack,
             j2 += isign;
             // pulse2 *= couplC; 
             xr = gRandom->Rndm();
-            //if((j2<0)||j2>(GetNPixelsX()-1)||pulse2<GetThreshold(row,j2)){
+            //if((j2<0)||j2>(GetNPixelsX()-1)||pulse2<GetThreshold()){
             if ((j2<0) || (j2>GetNPixelsX()-1) || (xr>couplC)){
                 j2 = col;
                 flag = 1;
@@ -662,7 +662,7 @@ void AliITSsimulationSPDdubna::SetCouplingOld(Int_t row, Int_t col,
         do{
             j1 += isign;
             pulse1 *= couplR;
-            if ((j1<0)||(j1>GetNPixelsZ()-1)||(pulse1<GetThreshold(j1,col))){
+            if ((j1<0)||(j1>GetNPixelsZ()-1)||(pulse1<GetThreshold())){
                 pulse1 = GetMap()->GetSignalOnly(row,col);
                 j1 = row;
                 flag = 1;
@@ -675,7 +675,7 @@ void AliITSsimulationSPDdubna::SetCouplingOld(Int_t row, Int_t col,
         do{
             j2 += isign;
             pulse2 *= couplC;
-            if((j2<0)||(j2>(GetNPixelsX()-1))||(pulse2<GetThreshold(row,j2))){
+            if((j2<0)||(j2>(GetNPixelsX()-1))||(pulse2<GetThreshold())){
                 pulse2 = GetMap()->GetSignalOnly(row,col);
                 j2 = col;
                 flag = 1;
index cb3e5719206df08ac0b85fbd25edc57fa0bed376..029f1f963f7dec08c7a7e3687c3c81961f4db7c4 100644 (file)
@@ -105,8 +105,8 @@ class AliITSsimulationSPDdubna : public AliITSsimulation {
     void SetCouplingOld(Int_t row, Int_t col,Int_t ntrack,Int_t idhit);
     // Getters for data kept in fSegmentation and fResponse.
     // Returns the Threshold in electrons
-    Double_t GetThreshold(Int_t ix,Int_t iz){
-      Double_t th,sig;AliITSresponseSPD* res=(AliITSresponseSPD*)GetResponseModel(0); 
+    Double_t GetThreshold(){
+      Double_t th,sig;AliITSresponseSPD* res=(AliITSresponseSPD*)GetResponseModel(GetModuleNumber()); 
        res->Thresholds(th,sig);return th;};
     // Returns the couplings Columb and Row.
     void GetCouplings(Double_t &cc,Double_t &cr){