]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Scope error corrected
authorbarbera <barbera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Oct 2000 14:34:45 +0000 (14:34 +0000)
committerbarbera <barbera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Oct 2000 14:34:45 +0000 (14:34 +0000)
ITS/AliITSHits2Digits.C
ITS/ITSHitsToDigits.C

index 7b5bfdf6b6c7818ecc2fa5676f2d4da2bfe336db..695de7bce210f9315f1f8a54960074c1de1d4bb3 100644 (file)
@@ -49,6 +49,13 @@ Int_t AliITSHits2Digits()
   Float_t baseline = 10.;
   Float_t noise = 1.75;
 
+  AliITSDetType *iDetType=ITS->DetType(1);
+  AliITSresponseSDD *res1 = (AliITSresponseSDD*)iDetType->GetResponseModel();
+  if (!res1) {
+    res1=new AliITSresponseSDD();
+    ITS->SetResponseModel(1,res1);
+  }
+
   // SDD compression param: 2 fDecrease, 2fTmin, 2fTmax or disable, 2 fTolerance
   //Float_t fCutAmp = baseline + 2.*noise;
 
@@ -61,12 +68,7 @@ Int_t AliITSHits2Digits()
   
   Int_t cp[8]={0,0,fCutAmp,fCutAmp,0,0,0,0};
 
-  AliITSDetType *iDetType=ITS->DetType(1);
-  AliITSresponseSDD *res1 = (AliITSresponseSDD*)iDetType->GetResponseModel();
-  if (!res1) {
-    res1=new AliITSresponseSDD();
-    ITS->SetResponseModel(1,res1);
-  }
+
   //res1->SetZeroSupp("2D");
   res1->SetZeroSupp("1D");
   res1->SetNoiseParam(noise,baseline);
index 936722ed2b423716760fb586a935d4b206ed41f3..7709f78c305e18a682187dd07aa0fd886fc63ea0 100644 (file)
@@ -52,7 +52,15 @@ void ITSHitsToDigits (Int_t evNumber1=0,Int_t evNumber2=0,Int_t nsignal  =25, In
    Float_t baseline = 10.;
    Float_t noise = 1.75;
 
-   //Float_t fCutAmp = baseline + 2.*noise;
+
+   AliITSDetType *iDetType=ITS->DetType(1);
+   AliITSresponseSDD *res1 = (AliITSresponseSDD*)iDetType->GetResponseModel();
+   if (!res1) {
+         res1=new AliITSresponseSDD();
+         ITS->SetResponseModel(1,res1);
+   }
+       
+          //Float_t fCutAmp = baseline + 2.*noise;
                
        Float_t maxadc = res1->MaxAdc();    
    Float_t topValue = res1->MagicValue();
@@ -62,14 +70,7 @@ void ITSHitsToDigits (Int_t evNumber1=0,Int_t evNumber2=0,Int_t nsignal  =25, In
    fCutAmp *= norm;
 
    Int_t cp[8]={0,0,fCutAmp,fCutAmp,0,0,0,0}; //1D
-
-
-   AliITSDetType *iDetType=ITS->DetType(1);
-   AliITSresponseSDD *res1 = (AliITSresponseSDD*)iDetType->GetResponseModel();
-   if (!res1) {
-         res1=new AliITSresponseSDD();
-         ITS->SetResponseModel(1,res1);
-   }
+       
    //res1->SetZeroSupp("2D");
    res1->SetZeroSupp("1D");
    res1->SetNoiseParam(noise,baseline);