]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONv1.cxx
In Reconstruct(TTree* digitsTree, TTree* clustersTree):
[u/mrichter/AliRoot.git] / MUON / AliMUONv1.cxx
index 819425914490954251a64dca93249fcacc4547e2..c172dcabef61522893b3b8c5a01739807cdc83cf 100644 (file)
@@ -23,9 +23,7 @@
 
 #include "AliMUONv1.h"
 #include "AliMUONConstants.h"
-#include "AliMUONSegFactory.h"
 #include "AliMUONResponseFactory.h"
-#include "AliMUONSegmentation.h"
 #include "AliMUONHit.h"
 #include "AliMUONGeometryBuilder.h"    
 #include "AliMUONGeometry.h"   
@@ -52,6 +50,8 @@
 
 #include <string>
 
+#include "AliMUONVHitStore.h"
+
 /// \cond CLASSIMP
 ClassImp(AliMUONv1)
 /// \endcond
@@ -75,10 +75,8 @@ AliMUONv1::AliMUONv1()
 } 
 
 //___________________________________________
-AliMUONv1::AliMUONv1(const char *name, const char *title,
-                     const char* sDigitizerClassName,
-                     const char* digitizerClassName)
-: AliMUON(name,title,sDigitizerClassName,digitizerClassName), 
+AliMUONv1::AliMUONv1(const char *name, const char* title)
+: AliMUON(name, title), 
     fAngleEffect(kTRUE),
     fStepMaxInActiveGas(0.6),
     fStepSum(0x0),
@@ -172,28 +170,14 @@ void AliMUONv1::Init()
   AliDebug(1,"Finished Init for version 1 - CPC chamber type");   
  
 
-  std::string ftype(GetTitle());
-
   // Build segmentation
   // using geometry parametrisation
   //
-  AliMUONSegFactory segFactory(GetGeometryTransformer());
-  fSegmentation = segFactory.CreateSegmentation(ftype);
-
-  if (!fSegmentation) {
-    AliFatal(Form("Wrong factory type : %s",ftype.c_str()));
-  }        
-
   // Build response
   //
   AliMUONResponseFactory respFactory("default");
   respFactory.Build(this);
   
-
-  // Initialize segmentation
-  //
-  fSegmentation->Init();
-  
 }
 
 //__________________________________________________________________
@@ -418,8 +402,7 @@ void AliMUONv1::StepManager()
     }
     }
     
-    // One hit per chamber
-    GetMUONData()->AddHit(fIshunt, 
+    AliMUONHit hit(fIshunt, 
                          gAlice->GetMCApp()->GetCurrentTrackNumber(), 
                          detElemId, ipart,
                          fTrackPosition.X(), 
@@ -435,9 +418,7 @@ void AliMUONv1::StepManager()
                          fTrackPosition.Y(),
                          fTrackPosition.Z());
 
-    //       AliDebug(1,Form("Exit: Particle exiting from chamber %d",iChamber));
-    //       AliDebug(1,Form("Exit: StepSum %f eloss geant %g ",fStepSum[idvol],fDestepSum[idvol]));
-    //       AliDebug(1,Form("Exit: Track Position %f %f %f",fTrackPosition.X(),fTrackPosition.Y(),fTrackPosition.Z()) ;
+    fHitStore->Add(hit);
 
     fStepSum[idvol]  =0; // Reset for the next event
     fDestepSum[idvol]=0; // Reset for the next event