]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMD.cxx
Violations fixed
[u/mrichter/AliRoot.git] / FMD / AliFMD.cxx
index 6ad1f1beada301f28821f58cd7d841e476e6267e..0c21558482f0e72aae4fff6c0a54678300213a60 100644 (file)
@@ -20,8 +20,8 @@
 //  Forward Multiplicity Detector based on Silicon plates                    //
 //  This class contains the base procedures for the Forward Multiplicity     //
 //  detector                                                                 //
-//  Detector consists of 6 Si volumes covered pseudorapidity interval         //
-//  from 1.6 to 6.0.                                                         //
+//  Detector consists of 5 Si volumes covered pseudorapidity interval         //
+//  from 1.7 to 5.1.                                                         //
 //                                                                           //
 //Begin_Html
 /*
@@ -47,8 +47,6 @@
 #include <TClonesArray.h>
 #include <TFile.h>
 #include <TGeometry.h>
-#include <TLorentzVector.h>
-#include <TMath.h>
 #include <TNode.h>
 #include <TTUBE.h>
 #include <TTree.h>
 
 #include "AliDetector.h"
 #include "AliFMDReconstParticles.h"
-#include "AliFMDReconstruction.h"
 #include "AliFMDdigit.h"
 #include "AliFMDhit.h"
 #include "AliFMDv1.h"
 #include "AliLoader.h"
-#include "AliMagF.h"
 #include "AliRun.h"
+#include "AliMC.h"
+#include "AliFMDDigitizer.h"
 
 ClassImp (AliFMD)
   //_____________________________________________________________________________
@@ -91,14 +89,9 @@ AliDetector (name, title)
   // Digits for each Si disk
   fDigits = new TClonesArray ("AliFMDdigit", 1000);
   fReconParticles=new TClonesArray("AliFMDReconstParticles",1000); 
-  gAlice->AddHitList (fHits);
+  gAlice->GetMCApp()->AddHitList (fHits);
 
   fIshunt = 0;
-  fIdSens1 = 0;
-  fIdSens2 = 0;
-  fIdSens3 = 0;
-  fIdSens4 = 0;
-  fIdSens5 = 0;
   //  fMerger = 0;
   SetMarkerColor (kRed);
 }
@@ -106,6 +99,7 @@ AliDetector (name, title)
 //-----------------------------------------------------------------------------
 AliFMD::~AliFMD ()
 {
+  //destructor for base class AliFMD
   if (fHits)
     {
       fHits->Delete ();
@@ -163,37 +157,37 @@ void AliFMD::BuildGeometry ()
 
   new TTUBE ("S_FMD0", "FMD  volume 0", "void", 4.2, 17.2, 1.5);
   top->cd ();
-  node = new TNode ("FMD0", "FMD0", "S_FMD0", 0, 0, 62.8, "");
+  node = new TNode ("FMD0", "FMD0", "S_FMD0", 0, 0, -62.8, "");
   node->SetLineColor (kColorFMD);
   fNodes->Add (node);
 
   new TTUBE ("S_FMD1", "FMD  volume 1", "void", 15.4, 28.4, 1.5);
   top->cd ();
-  node = new TNode ("FMD1", "FMD1", "S_FMD1", 0, 0, 75.2, "");
+  node = new TNode ("FMD1", "FMD1", "S_FMD1", 0, 0, -75.2, "");
   node->SetLineColor (kColorFMD);
   fNodes->Add (node);
 
   new TTUBE ("S_FMD2", "FMD  volume 2", "void", 4.2, 17.2, 1.5);
   top->cd ();
-  node = new TNode ("FMD2", "FMD2", "S_FMD2", 0, 0, -83.2, "");
+  node = new TNode ("FMD2", "FMD2", "S_FMD2", 0, 0, 83.2, "");
   node->SetLineColor (kColorFMD);
   fNodes->Add (node);
 
   new TTUBE ("S_FMD3", "FMD  volume 3", "void", 15.4, 28.4, 1.5);
   top->cd ();
-  node = new TNode ("FMD3", "FMD3", "S_FMD3", 0, 0, -75.2, "");
+  node = new TNode ("FMD3", "FMD3", "S_FMD3", 0, 0, 75.2, "");
   node->SetLineColor (kColorFMD);
   fNodes->Add (node);
 
   new TTUBE ("S_FMD4", "FMD  volume 4", "void", 4.2, 17.2, 1.5);
   top->cd ();
-  node = new TNode ("FMD4", "FMD4", "S_FMD4", 0, 0, -340, "");
+  node = new TNode ("FMD4", "FMD4", "S_FMD4", 0, 0, 340, "");
   node->SetLineColor (kColorFMD);
   fNodes->Add (node);
 }
 
 //_____________________________________________________________________________
-Int_t AliFMD::DistanceToPrimitive (Int_t px, Int_t py)
+const Int_t AliFMD::DistanceToPrimitive (Int_t /*px*/, Int_t /*py*/)
 {
   //
   // Calculate the distance from the mouse to the FMD on the screen
@@ -242,12 +236,7 @@ void  AliFMD::Init ()
     }
   //
   //
-    fIdSens1 = gMC->VolId ("GRN1");    //Si sensetive volume
-    fIdSens2 = gMC->VolId ("GRN2");    //Si sensetive volume
-    fIdSens3 = gMC->VolId ("GRN3");    //Si sensetive volume
-    fIdSens4 = gMC->VolId ("GRN4");    //Si sensetive volume
-    fIdSens5 = gMC->VolId ("GRN5");    //Si sensetive volume
-
 }
 //---------------------------------------------------------------------
 void AliFMD::MakeBranch (Option_t * option)
@@ -309,50 +298,8 @@ void AliFMD::SetTreeAddress ()
     }   
 }
 
-//---------------------------------------------------------------------
-
-void AliFMD::SetRingsSi1(Int_t ringsSi1)
-{
-   fRingsSi1=512;
-}
-void AliFMD::SetSectorsSi1(Int_t sectorsSi1)
-{
-  fSectorsSi1=20;
-}
-void AliFMD::SetRingsSi2(Int_t ringsSi2)
-{
-  fRingsSi2=256;
-}
-void AliFMD::SetSectorsSi2(Int_t sectorsSi2)
-{
-  fSectorsSi2=40;
-}
-
 
 
-void
-AliFMD::Eta2Radius (Float_t eta, Float_t zDisk, Float_t * radius)
-{
-  Float_t expEta = TMath::Exp (-eta);
-  Float_t theta = TMath::ATan (expEta);
-  theta = 2. * theta;
-  Float_t rad = zDisk * (TMath::Tan (theta));
-  *radius = rad;
-
-  if (fDebug)
-    printf ("%s: eta %f radius %f\n", ClassName (), eta, rad);
-}
-
-//---------------------------------------------------------------------
-
-
-void AliFMD::Digits2Reco()
-{
-  AliFMDReconstruction * reconstruction =  new AliFMDReconstruction(fLoader->GetRunLoader());
-  cout<<" AliFMD::Digits2Reco >> "<<reconstruction<<endl;
-  reconstruction->Exec("");
-  delete  reconstruction;
-}
 //-----------------------------------------------------------------------
 
 void AliFMD::MakeBranchInTreeD(TTree *treeD, const char *file)
@@ -369,3 +316,8 @@ void AliFMD::MakeBranchInTreeD(TTree *treeD, const char *file)
      }
 }
 
+//____________________________________________________________________________
+AliDigitizer* AliFMD::CreateDigitizer(AliRunDigitizer* manager) const
+{
+  return new AliFMDDigitizer(manager);
+}