New version from Y.Kharlov
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Sep 1999 20:45:16 +0000 (20:45 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Sep 1999 20:45:16 +0000 (20:45 +0000)
PHOS/AliPHOS.cxx
PHOS/AliPHOS.h
PHOS/AliPHOSv0.cxx
PHOS/AliPHOSv1.cxx
PHOS/AliPHOSv3.cxx [deleted file]
PHOS/AliPHOSv3.h [deleted file]
PHOS/Makefile
PHOS/PHOSLinkDef.h

index 0cebecb..1705999 100644 (file)
@@ -110,15 +110,6 @@ void AliPHOS::DefPars()
       PHOSsize[1]=88;
       PHOSsize[2]=4;
       PHOScradlesA=0.;
-      PHOSCPV[0]=1.;
-      PHOSCPV[1]=2.;
-      PHOSCPV[2]=0.;
-      PHOSCPV[3]=0.;
-      PHOSCPV[4]=0.;
-      PHOSCPV[5]=0.;
-      PHOSCPV[6]=0.;
-      PHOSCPV[7]=0.;
-      PHOSCPV[8]=0.;
       PHOSextra[0]=0.001;
       PHOSextra[1]=6.95;
       PHOSextra[2]=4.;
@@ -247,7 +238,6 @@ void AliPHOS::CreateMaterials()
     AliMaterial(99, "Air$",             14.61, 7.3, .001205, 30420., 67500);
 
     AliMedium(0, "PHOS Xtal    $", 0, 1, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
-    AliMedium(1, "CPV scint.   $", 1, 1, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
     AliMedium(2, "Al parts     $", 2, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
     AliMedium(3, "Tyvek wrapper$", 3, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
     AliMedium(4, "Polyst. foam $", 4, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
@@ -281,8 +271,6 @@ void AliPHOS::AddPHOSCradles()
                                     GetPIN_SideSize       (),
                                     GetPIN_Length         (),
                                     GetRadius             (),
-                                    GetCPV_Thickness      (),
-                                    GetCPV_PHOS_Distance  (),
                                     GetNz                 (),
                                     GetNphi               (),
                                     GetCradleAngle        (i)));
@@ -387,7 +375,7 @@ void AliPHOS::SetTreeAddress(void)
 
   if( NULL==(fTreePHOS=(TTree*)gDirectory->Get((char*)(fTreeName.Data()))  ) )
   {
-    Error("Can not find Tree \"%s\"\n",fTreeName.Data());
+    Error("SetTreeAddress","Can not find Tree \"%s\"\n",fTreeName.Data());
     exit(1);
   }
 
@@ -414,7 +402,7 @@ AliPHOSCradle *AliPHOS::GetCradleOfTheParticle(const TVector3 &p,const TVector3
     AliPHOSCradle *cradle = (AliPHOSCradle *)PHOS->fCradles->operator[](m);
 
     float x,y,l;
-    const float d = cradle->GetRadius()-cradle->GetCPV_PHOS_Distance()-cradle->GetCPV_Thikness();
+    const float d = cradle->GetRadius();
     cradle->GetXY(p,v,d,x,y,l);
 
     if( l>0 && TMath::Abs(x)<cradle->GetNz  ()*cradle->GetCellSideSize()/2 
@@ -530,21 +518,6 @@ void AliPHOS::SetCradleA(Float_t angle)
 }
 
 //______________________________________________________________________________
-void AliPHOS::SetCPV(Float_t p1,Float_t p2,Float_t p3,Float_t p4,
-                     Float_t p5,Float_t p6,Float_t p7,Float_t p8,Float_t p9)
-{
-   PHOSCPV[0] = p1;
-   PHOSCPV[1] = p2;
-   PHOSCPV[2] = p3;
-   PHOSCPV[3] = p4;
-   PHOSCPV[4] = p5;
-   PHOSCPV[5] = p6;
-   PHOSCPV[6] = p7;
-   PHOSCPV[7] = p8;
-   PHOSCPV[8] = p9;
-}
-
-//______________________________________________________________________________
 void AliPHOS::SetExtra(Float_t p1,Float_t p2,Float_t p3,Float_t p4,
                        Float_t p5,Float_t p6,Float_t p7,Float_t p8,Float_t p9)
 {
@@ -600,16 +573,12 @@ AliPHOSCradle::AliPHOSCradle( int   Geometry           ,
                               float PIN_SideSize       ,
                               float PIN_Length         ,
                               float Radius             ,
-                              float CPV_Thickness      ,
-                              float CPV_PHOS_Distance  ,
                               int   Nz                 ,
                               int   Nphi               ,
                               float Angle              ) :
     fGeometry                   (Geometry),
 //  fCellEnergy                 (),
 //  fChargedTracksInPIN         (),
-//  fCPV_hitsX                  (),
-//  fCPV_hitsY                  (),
     fCrystalSideSize            (CrystalSideSize),
     fCrystalLength              (CrystalLength),
     fWrapThickness              (WrapThickness),
@@ -617,8 +586,6 @@ AliPHOSCradle::AliPHOSCradle( int   Geometry           ,
     fPIN_SideSize               (PIN_SideSize),
     fPIN_Length                 (PIN_Length),
     fRadius                     (Radius),
-    fCPV_PHOS_Distance          (CPV_PHOS_Distance),
-    fCPV_Thickness              (CPV_Thickness),
     fNz                         (Nz),
     fNphi                       (Nphi),
     fPhi                        (Angle)
@@ -650,27 +617,6 @@ void AliPHOSCradle::Clear(Option_t *)
   GetGammasReconstructed() .Delete();
   GetGammasReconstructed() .Compress();
 
-  fCPV_hitsX.Set(0);
-  fCPV_hitsY.Set(0);
-}
-
-//______________________________________________________________________________
-
-void AliPHOSCradle::AddCPVHit(float x,float y)
-{
-// Add this hit to the hits list in CPV detector.
-
-  TArrayF a(fCPV_hitsX.GetSize()+1);
-  
-  memcpy(a.GetArray(),fCPV_hitsX.GetArray(),sizeof(Float_t)*fCPV_hitsX.GetSize());
-  a[fCPV_hitsX.GetSize()] = x;
-  fCPV_hitsX = a;
-
-  // It must be:   fCPV_hitsX.GetSize() == fCPV_hitsY.GetSize()
-
-  memcpy(a.GetArray(),fCPV_hitsY.GetArray(),sizeof(Float_t)*fCPV_hitsY.GetSize());
-  a[fCPV_hitsY.GetSize()] = y;
-  fCPV_hitsY = a;
 }
 
 //______________________________________________________________________________
@@ -749,8 +695,8 @@ void AliPHOSCradle::Print(Option_t *opt)
 
   AliPHOSCradle *cr = (AliPHOSCradle *)this;     // Removing 'const'...
 
-  printf("AliPHOSCradle:  Nz=%d  Nphi=%d, fPhi=%f, E=%g, CPV hits amount = %d\n",fNz,fNphi,fPhi,
-       cr->fCellEnergy.GetSumOfWeights(),fCPV_hitsX.GetSize());
+  printf("AliPHOSCradle:  Nz=%d  Nphi=%d, fPhi=%f, E=%g\n",fNz,fNphi,fPhi,
+       cr->fCellEnergy.GetSumOfWeights());
 
   if( NULL!=strchr(opt,'d') )
   {
index 67c1abd..1a8736a 100644 (file)
@@ -81,14 +81,9 @@ class AliPHOSCradle : public TObject {
                                       float PIN_SideSize       ,
                                       float PIN_Length         ,
                                       float Radius             ,
-                                      float CPV_Thickness      ,
-                                      float CPV_PHOS_Distance  ,
                                       int   Nz                 ,
                                       int   Nphi               ,
                                       float Angle );
-
-    void                AddCPVHit(float x, float y);
-
     Float_t             GetCrystalSideSize     (void) const {return fCrystalSideSize;}
     Float_t             GetCellSideSize        (void) const {return fCrystalSideSize+2*fWrapThickness+2*fAirThickness;}
     Float_t             GetCrystalLength       (void) const {return fCrystalLength;}
@@ -97,8 +92,6 @@ class AliPHOSCradle : public TObject {
     Float_t             GetPIN_SideSize        (void) const {return fPIN_SideSize;}
     Float_t             GetPIN_Length          (void) const {return fPIN_Length;}
     Float_t             GetRadius              (void) const {return fRadius;}
-    Float_t             GetCPV_PHOS_Distance   (void) const {return fCPV_PHOS_Distance;}
-    Float_t             GetCPV_Thikness        (void) const {return fCPV_Thickness;}
     Int_t               GetNz                  (void) const {return fNz;}
     Int_t               GetNphi                (void) const {return fNphi;}
     Float_t             GetPhi                 (void) const {return fPhi;}
@@ -120,8 +113,6 @@ class AliPHOSCradle : public TObject {
     TH2F                fCellEnergy;                            // GeV. Energy in cells
     TH2S                fChargedTracksInPIN;                    // amount. hits in PIN
 
-    TArrayF             fCPV_hitsX;                             // cm. X-hits in CPV detector. (0 - cradle center)
-    TArrayF             fCPV_hitsY;                             // cm. Y-hits in CPV detector. (0 - cradle center)
 
   private:
 
@@ -135,8 +126,6 @@ class AliPHOSCradle : public TObject {
 
     Float_t             fRadius;                                // cm. Distance to PHOS
 
-    Float_t             fCPV_PHOS_Distance;                     // cm. Distance from CPV to PHOS.
-    Float_t             fCPV_Thickness;                         // cm. CPV thikness.
 
     Int_t               fNz;                                    // Cells amount in beam direction
     Int_t               fNphi;                                  // Cells amount around beam
@@ -187,8 +176,6 @@ class AliPHOS : public AliDetector {
   virtual void          SetRadius(Float_t radius);
   virtual void          SetCradleSize(Int_t nz, Int_t nphi, Int_t ncradles);
   virtual void          SetCradleA(Float_t angle);
-  virtual void          SetCPV(Float_t p1,Float_t p2=0,Float_t p3=0,Float_t p4=0,
-                               Float_t p5=0,Float_t p6=0,Float_t p7=0,Float_t p8=0,Float_t p9=0);
   virtual void          SetExtra(Float_t p1,Float_t p2=0,Float_t p3=0,Float_t p4=0,
                                Float_t p5=0,Float_t p6=0,Float_t p7=0,Float_t p8=0,Float_t p9=0);
   virtual void          SetTextolitWall(Float_t dx, Float_t dy, Float_t dz);
@@ -198,19 +185,8 @@ class AliPHOS : public AliDetector {
   virtual void          DefPars();
   virtual void          AddPHOSCradles();
 
-  /*
-
-  virtual Int_t GetPHOS_IDTMED_PbWO4         (void){return gAlice->Idtmed()[700-1];}
-  virtual Int_t GetPHOS_IDTMED_CPV           (void){return gAlice->Idtmed()[701-1];}
-  virtual Int_t GetPHOS_IDTMED_Al            (void){return gAlice->Idtmed()[702-1];}
-  virtual Int_t GetPHOS_IDTMED_Tyvek         (void){return gAlice->Idtmed()[703-1];}
-  virtual Int_t GetPHOS_IDTMED_PIN           (void){return gAlice->Idtmed()[706-1];}
-  virtual Int_t GetPHOS_IDTMED_AIR           (void){return gAlice->Idtmed()[799-1];}
-  
-  */
   
   virtual Int_t GetPHOS_IDTMED_PbWO4         (void){return (*fIdtmed)[0];}
-  virtual Int_t GetPHOS_IDTMED_CPV           (void){return (*fIdtmed)[1];}
   virtual Int_t GetPHOS_IDTMED_Al            (void){return (*fIdtmed)[2];}
   virtual Int_t GetPHOS_IDTMED_Tyvek         (void){return (*fIdtmed)[3];}
   virtual Int_t GetPHOS_IDTMED_PIN           (void){return (*fIdtmed)[4];}
@@ -224,8 +200,6 @@ class AliPHOS : public AliDetector {
   virtual Float_t  GetPIN_SideSize       (void) const {return PHOScell[4]; }
   virtual Float_t  GetPIN_Length         (void) const {return PHOScell[5]; }
   virtual Float_t  GetRadius             (void) const {return PHOSradius;  }
-  virtual Float_t  GetCPV_Thickness      (void) const {return PHOSCPV[0];  }
-  virtual Float_t  GetCPV_PHOS_Distance  (void) const {return PHOSCPV[1];  }
   virtual Int_t    GetNz                 (void) const {return PHOSsize[0]; }
   virtual Int_t    GetNphi               (void) const {return PHOSsize[1]; }
   virtual Int_t    GetCradlesAmount      (void) const {return PHOSsize[2]; }
@@ -250,7 +224,7 @@ private:
 
 #define MAXCRAD 100
 
-  Float_t PHOSflags[9], PHOScell[9], PHOSradius, PHOSCPV[9];
+  Float_t PHOSflags[9], PHOScell[9], PHOSradius;
   Int_t   PHOSsize[3];
   Float_t PHOScradlesA,PHOSTXW[3],PHOSAIR[3],PHOSFTI[4],PHOSextra[9],
         PHOSangle[MAXCRAD];
index 2954981..b5d45ab 100644 (file)
@@ -46,7 +46,7 @@ void AliPHOSv0::CreateGeometry()
 // ORIGIN    : NICK VAN EIJNDHOVEN 
 
     Float_t pphi;
-    Float_t r, dptcb[3], dpair[3], dphos[3], dpucp[3], dpasp[3], dpcpv[3];
+    Float_t r, dptcb[3], dpair[3], dphos[3], dpucp[3], dpasp[3];
     Float_t dpxtl[3];
     Float_t yo;
     Int_t idrotm[99];
@@ -60,8 +60,6 @@ void AliPHOSv0::CreateGeometry()
       const Float_t XTL_Z=2.2;
 // --- Tyvek wrapper thickness 
       const Float_t PAP_THICK=0.01;
-// --- CPV thickness --- 
-      const Float_t CPV_Y=0.5;
 // --- Polystyrene Foam Outer Cover dimensions --- 
       const Float_t FOC_X=214.6;
       const Float_t FOC_Y=80.;
@@ -138,13 +136,7 @@ void AliPHOSv0::CreateGeometry()
     yo = (FOC_Y-ASP_Y)/2. - (CBS_R-FOC_R+TCB_Y);
     gMC->Gspos("PASP", 1, "PAIR", 0., yo, 0., 0, "ONLY");
 
-// --- Define CPV volume, DON'T PLACE IT YET --- 
-    dpcpv[0] = TCB_X/2.;
-    dpcpv[1] = CPV_Y/2.;
-    dpcpv[2] = TCB_Z/2.;
-    gMC->Gsvolu("PCPV", "BOX ", idtmed[700], dpcpv, 3);
 // --- Divide in X and Z direction (same way as PTCB) --- 
-    gMC->Gsdvn("PCSE", "PCPV", 11, 1);
     gMC->Gsdvn("PCMO", "PCSE", 13, 3);
     gMC->Gsdvn("PCST", "PCMO", 8, 1);
     gMC->Gsdvn("PCCE", "PCST", 8, 3);
@@ -167,19 +159,6 @@ void AliPHOSv0::CreateGeometry()
     gMC->Gspos("PHOS", 3, "ALIC",-xp2, yp2, 0., idrotm[2], "ONLY");
     gMC->Gspos("PHOS", 4, "ALIC",-xp1, yp1, 0., idrotm[3], "ONLY");
 
-// --- Now position PCPV so that its plates are right on top of --- 
-// --- corresponding PHOS supermodules (previously called cradles) --- 
-    r    = FOC_R-CPV_Y/2.;
-    pphi = TMath::ATan(FOC_X/(2.*FOC_R));
-    xp1  = -r * TMath::Sin(pphi * 3.);
-    yp1  = -r * TMath::Cos(pphi * 3.);
-    xp2  = -r * TMath::Sin(pphi);
-    yp2  = -r * TMath::Cos(pphi);
-    gMC->Gspos("PCPV", 1, "ALIC", xp1, yp1, 0., idrotm[0], "ONLY");
-    gMC->Gspos("PCPV", 2, "ALIC", xp2, yp2, 0., idrotm[1], "ONLY");
-    gMC->Gspos("PCPV", 3, "ALIC",-xp2, yp2, 0., idrotm[2], "ONLY");
-    gMC->Gspos("PCPV", 4, "ALIC",-xp1, yp1, 0., idrotm[3], "ONLY");
-
 // --- Set modules seen without tree for drawings --- 
     gMC->Gsatt("PMOD", "SEEN", -2);
     gMC->Gsatt("PCMO", "SEEN", -2);
@@ -226,7 +205,6 @@ void AliPHOSv0::CreateMaterials()
     AliMaterial(9, "Air$", 14.61, 7.3, .001205, 30420., 67500);
 
     AliMedium(0, "PHOS Xtal    $", 0, 1, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
-    AliMedium(1, "CPV scint.   $", 1, 1, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
     AliMedium(2, "Al parts     $", 2, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
     AliMedium(3, "Tyvek wrapper$", 3, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
     AliMedium(4, "Polyst. foam $", 4, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
index 092536b..2b54f85 100644 (file)
@@ -49,9 +49,7 @@ void AliPHOSv1::CreateGeometry()
 
   const float           cell_length             = GetCrystalLength()+GetAirThickness()+GetWrapThickness()+GetPIN_Length(),
                         cell_side_size          = GetCrystalSideSize()+2*GetAirThickness()+2*GetWrapThickness(),
-//                        cell_angle              = 180/kPI * 2 * atan(cell_side_size/2 / GetRadius()),        // radians
-                        cradle_thikness         = cell_length + GetCPV_Thickness() + GetCPV_PHOS_Distance(),
-                        distance_to_CPV         = GetRadius() - GetCPV_Thickness() - GetCPV_PHOS_Distance();
+                        cradle_thikness         = cell_length;
 
   //////////////////////////////////////////////////////////////////////////////
   // CELL volume and subvolumes creation
@@ -74,7 +72,7 @@ void AliPHOSv1::CreateGeometry()
   gMC->Gsvolu("PIN ","BOX ",GetPHOS_IDTMED_PIN(),par,3);
 
   //////////////////////////////////////////////////////////////////////////////
-  // CRADLE,CPV creation.
+  // CRADLE creation.
   //////////////////////////////////////////////////////////////////////////////
 
   par[0] = cell_side_size/2 * GetNz();
@@ -82,15 +80,6 @@ void AliPHOSv1::CreateGeometry()
   par[2] = cradle_thikness/2;
   gMC->Gsvolu("PHOS","BOX ",GetPHOS_IDTMED_AIR(),par,3);
 
-//par[0] : the same as above
-//par[1] : the same as above
-  par[2] = GetCPV_Thickness()/2;
-  gMC->Gsvolu("CPV ","BOX ",GetPHOS_IDTMED_CPV(),par,3);
-
-  x = 0;
-  y = 0;
-  z = (cell_length+GetCPV_PHOS_Distance())/2;
-  gMC->Gspos("CPV ",1,"PHOS",x,y,z,0,"ONLY");
 
   par[0] = cell_side_size/2 * GetNz();
   par[1] = cell_side_size/2 * GetNphi();
@@ -128,18 +117,6 @@ void AliPHOSv1::CreateGeometry()
   // CELL has been created.
   //////////////////////////////////////////////////////////////////////////////
 
-//   int n=0;
-//   z = -(GetCPV_Thickness()+GetCPV_PHOS_Distance())/2;
-//
-//   for( int iy=0; iy<GetNphi(); iy++ )
-//   {
-//     y = (iy-(GetNphi()-1)/2.)*cell_side_size;
-//     for( int ix=0; ix<GetNz(); ix++ )
-//     {
-//       x = (ix-(GetNz()-1)/2.)*cell_side_size;
-//       gMC->Gspos("CELL",++n,"PHOS",x,y,z,0,"ONLY");
-//     }
-//   }
 
   //////////////////////////////////////////////////////////////////////////////
   // End of CRADLE creation.
@@ -152,13 +129,12 @@ void AliPHOSv1::CreateGeometry()
 
   for( int i=0; i<GetCradlesAmount(); i++ )
   {
-    float c                = distance_to_CPV,           // Distance to CPV
-          l                = cell_side_size*GetNphi()/2,      // Cradle half size around beam (for rect. geom.)
-          cradle_angle     = 360/kPI*atan(l/c),
-          cradle_angle_pos = -90+(i-(GetCradlesAmount()-1)/2.) * (cradle_angle+GetAngleBetweenCradles());
+    Float_t cradle_angle     = 27.,
+            cradle_angle_pos = -90+(i-(GetCradlesAmount()-1)/2.) *
+                               (cradle_angle+GetAngleBetweenCradles());
     // Cradles are numerated in clock reversed order. (general way of angle increment)
 
-    float   r       = GetRadius() + cradle_thikness/2;
+    Float_t r = GetRadius() + cradle_thikness/2;
     x = r*cos(cradle_angle_pos*kPI/180);
     y = r*sin(cradle_angle_pos*kPI/180);
     z = 0;
@@ -166,28 +142,6 @@ void AliPHOSv1::CreateGeometry()
     gMC->Gspos("PHOS",i+1,"ALIC",x,y,z,rotation_matrix_number,"ONLY");
 
     GetCradleAngle(i) = cradle_angle_pos;
-//
-//    int n = PHOS.fCradles->GetEntries();
-//    PHOS.fCradles->Add(new AliPHOSCradle( 1,            // geometry.
-//                                          GetCrystalSideSize    (),
-//                                          GetCrystalLength      (),
-//                                          GetWrapThickness      (),
-//                                          GetAirThickness       (),
-//                                          GetPIN_SideSize       (),
-//                                          GetPIN_Length         (),
-//                                          GetRadius             (),
-//                                          GetCPV_Thickness      (),
-//                                          GetCPV_PHOS_Distance  (),
-//                                          GetNz                 (),
-//                                          GetNphi               (),
-//                                          cradle_angle_pos      ));
-//
-//    if( n+1 != PHOS.fCradles->GetEntries() ||
-//        NULL == PHOS.fCradles->At(n) )
-//    {
-//      cout << "  Can not create or add AliPHOSCradle.\n";
-//      exit(1);
-//    }
   }
   AddPHOSCradles();
 
@@ -251,46 +205,6 @@ void AliPHOSv1::StepManager()
 
   //////////////////////////////////////////////////////////////////////////////
 
-  if( gMC->GetMedium()==GetPHOS_IDTMED_CPV() && (gMC->IsTrackInside() || gMC->IsTrackExiting()) && inwold )
-  {
-    // GEANT particle just have entered into CPV detector.
-
-    AliPHOS &PHOS = *(AliPHOS*)gAlice->GetModule("PHOS");
-
-    gMC->CurrentVolOffID(1,cradle_number);
-    cradle_number--;
-//        cradle_number  = cvolu->number[cvolu->nlevel-2]-1;
-
-    // Save CPV x,y hits position of charged particles.
-
-    AliPHOSCradle  &cradle = PHOS.GetCradle(cradle_number);
-
-    TLorentzVector xyz;
-    TVector3 v;
-    gMC->TrackPosition(xyz);
-
-    float x,y,l;
-    float R = cradle.GetRadius() - cradle.GetCPV_PHOS_Distance() - cradle.GetCPV_Thikness();
-    cradle.GetXY(xyz.Vect(),v,R,x,y,l);
-    if( PHOS.fDebugLevel>0 )
-      if( l<0 )
-        printf("PHOS_STEP:  warning: negative distance to CPV!! %f\n", l);
-
-    // Store current particle in the list of Cradle particles.
-    TLorentzVector  pmom;
-    gMC->TrackMomentum(pmom);
-    float     Px      =       pmom[0],
-              Py      =       pmom[1],
-              Pz      =       pmom[2];
-    Int_t     Ipart   =       gMC->TrackPid();
-
-//     TClonesArray &P=cradle.GetParticles();
-//     new( P[P.GetEntries()] ) AliPHOSgamma(x,0,y,0,ctrak->getot,0,Px,Py,Pz);
-    cradle.GetParticles().Add(new AliPHOSgamma(x,y,gMC->Etot(),Px,Py,Pz,Ipart));
-
-    if( gMC->TrackCharge()!=0 )
-      cradle.AddCPVHit(x,y);
-  }
 
   inwold=gMC->IsTrackEntering();         // Save current status of GEANT variable.
 }
diff --git a/PHOS/AliPHOSv3.cxx b/PHOS/AliPHOSv3.cxx
deleted file mode 100644 (file)
index 8fabc2c..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/////////////////////////////////////////////////////////
-//  Manager and hits classes for set:PHOS version 3    //
-/////////////////////////////////////////////////////////
-// --- ROOT system ---
-#include "TH1.h"
-#include "TRandom.h"
-#include "TFile.h"
-#include "TTree.h"
-#include "TBRIK.h"
-#include "TNode.h"
-
-// --- galice header files ---
-#include "AliPHOSv3.h"
-#include "AliRun.h"
-#include "AliMC.h" 
-
-ClassImp(AliPHOSv3)
-
-//______________________________________________________________________________
-
-
-AliPHOSv3::AliPHOSv3()
-{
-}
-//______________________________________________________________________________
-
-AliPHOSv3::AliPHOSv3(const char *name, const char *title)
-          : AliPHOS(name, title)
-{
-}
-//___________________________________________
-void AliPHOSv3::CreateGeometry()
-{
-
-  cout << "AliPHOSv3::CreateGeometry() PHOS creation\n";
-
-  AliPHOS *PHOS_tmp = (AliPHOS*)gAlice->GetModule("PHOS");
-  if( NULL==PHOS_tmp )
-  {
-    printf("There isn't PHOS detector!\n");
-    return;
-  }
-//  AliPHOS &PHOS = *PHOS_tmp;
-
-  //////////////////////////////////////////////////////////////////////////////
-
-  Int_t                 rotation_matrix_number=0;
-  Float_t               par[11],
-                        x,y,z;
-
-  const float           cell_length             = GetCrystalLength()+GetAirThickness()+GetWrapThickness()+GetPIN_Length(),
-                        cell_side_size          = GetCrystalSideSize()+2*GetAirThickness()+2*GetWrapThickness(),
-//                        cell_angle              = 180/kPI * 2 * atan(cell_side_size/2 / GetRadius()),        // radians
-                        cradle_thikness         = cell_length + GetCPV_Thickness() + GetCPV_PHOS_Distance(),
-                        distance_to_CPV         = GetRadius() - GetCPV_Thickness() - GetCPV_PHOS_Distance();
-
-  //////////////////////////////////////////////////////////////////////////////
-  // CELL volume and subvolumes creation
-  //////////////////////////////////////////////////////////////////////////////
-
-  par[0] = GetCrystalSideSize()/2 + GetWrapThickness();
-  par[1] = GetCrystalSideSize()/2 + GetWrapThickness();
-  par[2] = GetCrystalLength()  /2 + GetWrapThickness()/2;
-  gMC->Gsvolu("WRAP","BOX ",GetPHOS_IDTMED_Tyvek(),par,3);
-
-  par[0] = GetCrystalSideSize()/2;
-  par[1] = GetCrystalSideSize()/2;
-  par[2] = GetCrystalLength()/2;
-  gMC->Gsvolu("CRST","BOX ",GetPHOS_IDTMED_PbWO4(),par,3);
-
-  // PIN
-  par[0] = GetPIN_SideSize()/2;
-  par[1] = GetPIN_SideSize()/2;
-  par[2] = GetPIN_Length()/2;
-  gMC->Gsvolu("PIN ","BOX ",GetPHOS_IDTMED_PIN(),par,3);
-
-  //////////////////////////////////////////////////////////////////////////////
-  // CRADLE,CPV creation.
-  //////////////////////////////////////////////////////////////////////////////
-
-  par[0] = cell_side_size/2 * GetNz();
-  par[1] = cell_side_size/2 * GetNphi();
-  par[2] = cradle_thikness/2;
-  gMC->Gsvolu("PHOS","BOX ",GetPHOS_IDTMED_AIR(),par,3);
-
-//par[0] : the same as above
-//par[1] : the same as above
-  par[2] = GetCPV_Thickness()/2;
-  gMC->Gsvolu("CPV ","BOX ",GetPHOS_IDTMED_CPV(),par,3);
-
-  x = 0;
-  y = 0;
-  z = (cell_length+GetCPV_PHOS_Distance())/2;
-  gMC->Gspos("CPV ",1,"PHOS",x,y,z,0,"ONLY");
-
-  par[0] = cell_side_size/2 * GetNz();
-  par[1] = cell_side_size/2 * GetNphi();
-  par[2] = cell_length/2;
-  gMC->Gsvolu("CRS0","BOX ",GetPHOS_IDTMED_AIR(),par,3);
-
-  x = 0;
-  y = 0;
-  z = -(cradle_thikness-cell_length)/2;
-  gMC->Gspos("CRS0",1,"PHOS",x,y,z,0,"ONLY");
-
-  gMC->Gsdvn("CRS1","CRS0",GetNphi(),2);
-  gMC->Gsdvn("CELL","CRS1",GetNz()  ,1);
-
-  //////////////////////////////////////////////////////////////////////////////
-  // CELL creation
-  //////////////////////////////////////////////////////////////////////////////
-
-  x = 0;
-  y = 0;
-  z = -GetWrapThickness()/2;
-  gMC->Gspos("CRST",1,"WRAP",x,y,z,0,"ONLY");
-
-  x = 0;
-  y = 0;
-  z = GetPIN_Length()/2;
-  gMC->Gspos("WRAP",1,"CELL",x,y,z,0,"ONLY");
-
-  x = 0;
-  y = 0;
-  z = -GetCrystalLength()/2-GetWrapThickness()/2;
-  gMC->Gspos("PIN ",1,"CELL",x,y,z,0,"ONLY");
-
-  //////////////////////////////////////////////////////////////////////////////
-  // CELL has been created.
-  //////////////////////////////////////////////////////////////////////////////
-
-//   int n=0;
-//   z = -(GetCPV_Thickness()+GetCPV_PHOS_Distance())/2;
-//
-//   for( int iy=0; iy<GetNphi(); iy++ )
-//   {
-//     y = (iy-(GetNphi()-1)/2.)*cell_side_size;
-//     for( int ix=0; ix<GetNz(); ix++ )
-//     {
-//       x = (ix-(GetNz()-1)/2.)*cell_side_size;
-//       gMC->Gspos("CELL",++n,"PHOS",x,y,z,0,"ONLY");
-//     }
-//   }
-
-  //////////////////////////////////////////////////////////////////////////////
-  // End of CRADLE creation.
-  //////////////////////////////////////////////////////////////////////////////
-
-
-  //////////////////////////////////////////////////////////////////////////////
-  // PHOS creation
-  //////////////////////////////////////////////////////////////////////////////
-
-  for( int i=0; i<GetCradlesAmount(); i++ )
-  {
-    float c                = distance_to_CPV,           // Distance to CPV
-          l                = cell_side_size*GetNphi()/2,      // Cradle half size around beam (for rect. geom.)
-          cradle_angle     = 360/kPI*atan(l/c),
-          cradle_angle_pos = -90+(i-(GetCradlesAmount()-1)/2.) * (cradle_angle+GetAngleBetweenCradles());
-    // Cradles are numerated in clock reversed order. (general way of angle increment)
-
-    float   r       = GetRadius() + cradle_thikness/2;
-    x = r*cos(cradle_angle_pos*kPI/180);
-    y = r*sin(cradle_angle_pos*kPI/180);
-    z = 0;
-    AliMatrix(rotation_matrix_number, 0,0 , 90,90+cradle_angle_pos , 90,180+cradle_angle_pos);
-    gMC->Gspos("PHOS",i+1,"ALIC",x,y,z,rotation_matrix_number,"ONLY");
-
-    GetCradleAngle(i) = cradle_angle_pos;
-//
-//    int n = PHOS.fCradles->GetEntries();
-//    PHOS.fCradles->Add(new AliPHOSCradle( 1,            // geometry.
-//                                          GetCrystalSideSize    (),
-//                                          GetCrystalLength      (),
-//                                          GetWrapThickness      (),
-//                                          GetAirThickness       (),
-//                                          GetPIN_SideSize       (),
-//                                          GetPIN_Length         (),
-//                                          GetRadius             (),
-//                                          GetCPV_Thickness      (),
-//                                          GetCPV_PHOS_Distance  (),
-//                                          GetNz                 (),
-//                                          GetNphi               (),
-//                                          cradle_angle_pos      ));
-//
-//    if( n+1 != PHOS.fCradles->GetEntries() ||
-//        NULL == PHOS.fCradles->At(n) )
-//    {
-//      cout << "  Can not create or add AliPHOSCradle.\n";
-//      exit(1);
-//    }
-  }
-  AddPHOSCradles();
-
-  //////////////////////////////////////////////////////////////////////////////
-  // All is done.
-  // Print some information.
-  //////////////////////////////////////////////////////////////////////////////
-}
-
-void AliPHOSv3::StepManager()
-{
-  static Bool_t inwold=0;   // Status of previous ctrak->inwvol
-  Int_t copy;
-
-//   if( gMC->TrackEntering() ) {
-//     Int_t Volume_ID = gMC->CurrentVol(Volume_name, copy);
-//     cout << "AliPHOSv3::StepManager() entered to PHOS to the volume " << Volume_name << "!\n";
-//   }
-
-  int cradle_number, cell_Z, cell_Phi;  // Variables that describe cell position.
-
-  if( gMC->GetMedium()==GetPHOS_IDTMED_PIN() && gMC->IsTrackEntering() && gMC->TrackCharge()!=0 )
-  {
-    // GEANT particle just have entered into PIN diode.
-
-    AliPHOS &PHOS = *(AliPHOS*)gAlice->GetModule("PHOS");
-
-    gMC->CurrentVolOffID(4,copy);
-    cradle_number  = copy-1;
-    gMC->CurrentVolOffID(1,copy);
-    cell_Z         = copy-1;
-    gMC->CurrentVolOffID(2,copy);
-    cell_Phi       = copy-1;
-
-    TH2S &h = PHOS.GetCradle(cradle_number).fChargedTracksInPIN;
-    h.AddBinContent(h.GetBin(cell_Z,cell_Phi));
-
-//     cout << "AliPHOSv3::StepManager() entered to PHOS pin diode\n";
-//     cout << "   cradle_nimber = " << cradle_number << endl;
-//     cout << "   cell_z        = " << cell_Z << endl;
-//     cout << "   cell_Phi      = " << cell_Phi << endl;
-  }
-
-  //////////////////////////////////////////////////////////////////////////////
-
-  if( gMC->GetMedium() == GetPHOS_IDTMED_PbWO4() )
-  {
-    // GEANT particle into crystal.
-
-    AliPHOS &PHOS = *(AliPHOS*)gAlice->GetModule("PHOS");
-
-    gMC->CurrentVolOffID(5,copy);
-    cradle_number  = copy-1;
-    gMC->CurrentVolOffID(2,copy);
-    cell_Z         = copy-1;
-    gMC->CurrentVolOffID(3,copy);
-    cell_Phi       = copy-1;
-
-    TH2F &h = PHOS.GetCradle(cradle_number).fCellEnergy;
-    h.AddBinContent(h.GetBin(cell_Z,cell_Phi),gMC->Edep());
-  }
-
-  //////////////////////////////////////////////////////////////////////////////
-
-  if( gMC->GetMedium()==GetPHOS_IDTMED_CPV() && gMC->IsTrackEntering() )
-  {
-    // GEANT particle just have entered into CPV detector.
-
-    AliPHOS &PHOS = *(AliPHOS*)gAlice->GetModule("PHOS");
-
-    gMC->CurrentVolOffID(1,cradle_number);
-    cradle_number--;
-
-    // Save CPV x,y hits position of charged particles.
-
-    AliPHOSCradle  &cradle = PHOS.GetCradle(cradle_number);
-
-    TLorentzVector p;
-    gMC->TrackPosition(p);
-    TVector3          v;
-
-    float x,y,l;
-    float R = cradle.GetRadius() - cradle.GetCPV_PHOS_Distance() - cradle.GetCPV_Thikness();
-    cradle.GetXY(p.Vect(),v,R,x,y,l);
-    if( PHOS.fDebugLevel>0 )
-      if( l<0 )
-        printf("PHOS_STEP:  warning: negative distance to CPV!! %f\n", l);
-
-    // Store current particle in the list of Cradle particles.
-    TLorentzVector  pmom;
-    gMC->TrackMomentum(pmom);
-    Float_t Px    = pmom[0],
-            Py    = pmom[1],
-            Pz    = pmom[2];
-    Float_t Getot = pmom[3];
-    Int_t   Ipart = gMC->TrackPid();
-
-    cradle.GetParticles().Add(new AliPHOSgamma(x,y,Getot,Px,Py,Pz,Ipart));
-
-    //    printf ("Cradle %i, x,y = %8.3f, %8.3f cm, E,Px,Py,Pz = %8.3f, %8.3f, %8.3f GeV, %8.3f, Ipart = %i\n",
-    //       cradle_number,x,y,Getot,Px,Py,Pz,Ipart);
-
-  }
-
-  inwold=gMC->IsTrackEntering();         // Save current status of GEANT variable.
-}
diff --git a/PHOS/AliPHOSv3.h b/PHOS/AliPHOSv3.h
deleted file mode 100644 (file)
index 9f0b9f7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef PHOSv3_H
-#define PHOSv3_H
-////////////////////////////////////////////////////////
-//  Manager and hits classes for set:PHOS version 1   //
-////////////////////////////////////////////////////////
-
-// --- galice header files ---
-#include "AliPHOS.h"
-class AliPHOSv3 : public AliPHOS {
-
- public:
-                        AliPHOSv3();
-                        AliPHOSv3(const char *name, const char *title);
-  virtual              ~AliPHOSv3(){}
-  virtual void          CreateGeometry();
-  virtual Int_t         IsVersion() const {return 3;}
-  virtual void          StepManager();
-
- ClassDef(AliPHOSv3,1)  //Hits manager for set:PHOS version 3
-};
-#endif
-
index 79ed10d..089ff32 100644 (file)
@@ -9,7 +9,7 @@ PACKAGE = PHOS
 
 # C++ sources
 
-SRCS          =    AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx AliPHOSv2.cxx AliPHOSv3.cxx
+SRCS          =    AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx AliPHOSv2.cxx
 
 # C++ Headers
 
index d9fb957..7cecb58 100644 (file)
@@ -8,7 +8,6 @@
 #pragma link C++ class  AliPHOSv0;
 #pragma link C++ class  AliPHOSv1;
 #pragma link C++ class  AliPHOSv2;
-#pragma link C++ class  AliPHOSv3;
 #pragma link C++ class  AliPHOShitv2;
 #pragma link C++ class  AliPHOSCradle;
 #pragma link C++ class  AliPHOSgamma;