]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/AliRICH.cxx
Removal of useless dependecies via forward declarations
[u/mrichter/AliRoot.git] / RICH / AliRICH.cxx
index 939c007059793d162aff85653ea1da33fe7d2473..f126e4e2d822d5cb8fc46b6105a51105e7ad9537 100644 (file)
 
 /*
   $Log$
+  Revision 1.24  2000/10/02 15:43:17  jbarbosa
+  Fixed forward declarations.
+  Fixed honeycomb density.
+  Fixed cerenkov storing.
+  New electronics.
+
+  Revision 1.23  2000/09/13 10:42:14  hristov
+  Minor corrections for HP, DEC and Sun; strings.h included
+
+  Revision 1.22  2000/09/12 18:11:13  fca
+  zero hits area before using
+
+  Revision 1.21  2000/07/21 10:21:07  morsch
+  fNrawch   = 0; and  fNrechits = 0; in the default constructor.
+
   Revision 1.20  2000/07/10 15:28:39  fca
   Correction of the inheritance scheme
 
 #include <TArrayF.h>
 #include <TFile.h>
 #include <TParticle.h>
+#include <TGeometry.h>
+#include <TTree.h>
+
 #include <iostream.h>
+#include <strings.h>
 
 #include "AliRICH.h"
 #include "AliRICHSegmentation.h"
@@ -62,6 +81,7 @@
 #include "AliRICHClusterFinder.h"
 #include "AliRun.h"
 #include "AliMC.h"
+#include "AliMagF.h"
 #include "AliConst.h"
 #include "AliPDG.h"
 #include "AliPoints.h"
@@ -90,9 +110,12 @@ AliRICH::AliRICH()
     fNcerenkovs = 0;
     fDchambers  = 0;
     fCerenkovs  = 0;
-    fNdch       = 0;
-    fNrawch   = 0;
-    fNrechits = 0;
+    for (Int_t i=0; i<7; i++)
+      {
+       fNdch[i]       = 0;
+       fNrawch[i]   = 0;
+       fNrechits[i] = 0;
+      }
 }
 
 //___________________________________________
@@ -115,7 +138,7 @@ AliRICH::AliRICH(const char *name, const char *title)
     fNcerenkovs = 0;
     fIshunt     = 0;
     
-    fNdch      = new Int_t[kNCH];
+    //fNdch      = new Int_t[kNCH];
     
     fDchambers = new TObjArray(kNCH);
 
@@ -128,7 +151,7 @@ AliRICH::AliRICH(const char *name, const char *title)
        fNdch[i]=0;
     }
 
-    fNrawch      = new Int_t[kNCH];
+    //fNrawch      = new Int_t[kNCH];
     
     fRawClusters = new TObjArray(kNCH);
     //printf("Created fRwClusters with adress:%p",fRawClusters);
@@ -138,7 +161,7 @@ AliRICH::AliRICH(const char *name, const char *title)
       fNrawch[i]=0;
     }
 
-    fNrechits      = new Int_t[kNCH];
+    //fNrechits      = new Int_t[kNCH];
     
     for (i=0; i<kNCH ;i++) {
        (*fRecHits)[i] = new TClonesArray("AliRICHRecHit",1000); 
@@ -801,7 +824,7 @@ void AliRICH::CreateMaterials()
     
     ahon    = 12.01;
     zhon    = 6.;
-    denshon = 2.265;
+    denshon = 0.1;
     radlhon = 18.8;
     
     // --- Parameters to include in GSMIXT, relative to Quarz (SiO2) 
@@ -1378,6 +1401,7 @@ void AliRICH::StepManager()
     pos[0]=position(0);
     pos[1]=position(1);
     pos[2]=position(2);
+    bzero((char *)ckovData,sizeof(ckovData)*19);
     ckovData[1] = pos[0];                 // X-position for hit
     ckovData[2] = pos[1];                 // Y-position for hit
     ckovData[3] = pos[2];                 // Z-position for hit
@@ -1492,7 +1516,7 @@ void AliRICH::StepManager()
                      if (gMC->CurrentVolID(copy) == gMC->VolId("QUAR")) 
                        ckovData[13]=2;
                      //geant3->StopTrack();
-                     AddCerenkov(gAlice->CurrentTrack(),vol,ckovData);
+                     //AddCerenkov(gAlice->CurrentTrack(),vol,ckovData);
                    } //reflection question
                    
                    
@@ -1876,9 +1900,9 @@ void AliRICH::Streamer(TBuffer &R__b)
        R__b >> fRawClusters;
        R__b >> fRecHits;  //diff
        R__b >> fDebugLevel;  //diff
-       R__b.ReadArray(fNdch);
-       R__b.ReadArray(fNrawch);
-       R__b.ReadArray(fNrechits);
+       R__b.ReadStaticArray(fNdch);
+       R__b.ReadStaticArray(fNrawch);
+       R__b.ReadStaticArray(fNrechits);
 //
        R__b >> fChambers;
 // Stream chamber related information
@@ -2327,9 +2351,9 @@ void AliRICH::Digitise(Int_t nev, Int_t flag, Option_t *option,Text_t *filename)
 
       //printf("Pedestal:%d\n",pedestal);
       //Int_t pedestal=0;
-      Float_t treshold = (pedestal + 4*1.7);
+      Float_t treshold = (pedestal + 4*2.2);
       
-      Float_t meanNoise = gRandom->Gaus(1.7, 0.25);
+      Float_t meanNoise = gRandom->Gaus(2.2, 0.3);
       Float_t noise     = gRandom->Gaus(0, meanNoise);
       q+=(Int_t)(noise + pedestal);
       //q+=(Int_t)(noise);