]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0v1.cxx
bug fix by Cvetan
[u/mrichter/AliRoot.git] / T0 / AliT0v1.cxx
index 7b1025fb6ff94b53f20f90279414539f3b19419c..bf3a542432836283c4720d9db4849ef383c7287d 100644 (file)
@@ -38,6 +38,7 @@
 #include <TTUBE.h>
 #include <TVirtualMC.h>
 #include "TGeoManager.h"
+#include "TGeoMatrix.h"
 #include "TGeoPgon.h"
 #include "TGeoTube.h"
 #include "TGeoCompositeShape.h"
 
 ClassImp(AliT0v1)
 
+
+//--------------------------------------------------------------------
+AliT0v1::AliT0v1():  AliT0(),
+                    fIdSens1(0),
+                    fEffPMT(0x0)
+
+{
+  //
+  // Standart constructor for T0 Detector version 0
+}
 //--------------------------------------------------------------------
 AliT0v1::AliT0v1(const char *name, const char *title):
   AliT0(name,title),
-  fIdSens1(0)
+  fIdSens1(0),
+  fEffPMT(0x0)
+
 {
   //
   // Standart constructor for T0 Detector version 0
@@ -244,12 +257,12 @@ void AliT0v1::CreateGeometry()
     TGeoVolumeAssembly * stlin = new TGeoVolumeAssembly("0STL");//empty segment
     TGeoVolume *ins = gGeoManager->GetVolume("0INS");
 
-    Double_t phimin = TMath::ACos((16-4.8)/16.) * (180 / TMath::Pi()) ;
+    //   Double_t phimin = TMath::ACos((16-4.8)/16.) * (180 / TMath::Pi()) ;
     //  TGeoTubeSeg *hole = new TGeoTubeSeg("hole", 0, 1.6, 0, -phimin+90, phimin+90);
-    TGeoTube*hole = new TGeoTube("hole", 0, 1.61, 6.5);
+    new TGeoTube("hole", 0, 1.61, 6.5);
     TGeoTranslation *tr [12];
     Float_t angle  = 2 * TMath::Pi() / 12;
-    Char_t nameTr[4];
+    Char_t nameTr[40];
     for (Int_t itr=0; itr<12; itr++) {
       sprintf (nameTr,"tr%i",itr+1);
       x = 6.5 * TMath::Sin(itr * angle);
@@ -567,13 +580,9 @@ void AliT0v1::DrawDetector()
 }
 
 //-------------------------------------------------------------------
-void AliT0v1::Init()
+void AliT0v1::DefineOpticalProperties()
 {
-// Initialises version 0 of the Forward Multiplicity Detector
-//
-//Int_t *idtmed  = gAlice->Idtmed();
-  AliT0::Init();
-  fIdSens1=gMC->VolId("0REG");
+// Optical properties definition.
    Int_t *idtmed = fIdtmed->GetArray();
 // Definition Cherenkov parameters
    int i;
@@ -624,9 +633,17 @@ void AliT0v1::Init()
    gMC->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2,efficAll , rindexSiO2 );
   gMC->SetCerenkov (idtmed[kOpAir], kNbins, aPckov,absorAir , efficAll,rindexAir );
    gMC->SetCerenkov (idtmed[kOpAirNext], kNbins, aPckov,absorbCathodeNext , efficAll, rindexCathodeNext);
+}
 
-   AliDebug(1,Form("%s: *** T0 version 1 initialized ***\n",ClassName()));
+//-------------------------------------------------------------------
+void AliT0v1::Init()
+{
+// Initialises version 0 of the Forward Multiplicity Detector
+//
+  AliT0::Init();
+  fIdSens1=gMC->VolId("0REG");
 
+   AliDebug(1,Form("%s: *** T0 version 1 initialized ***\n",ClassName()));
 }
 
 //-------------------------------------------------------------------