/* $Id$ */
-// --------------------
+//-----------------------------------------------------------------------------
// Class AliMUONv1
// --------------------
// AliDetector class for MUON subsystem which implements
// functions for simulation
+//-----------------------------------------------------------------------------
#include "AliMUONv1.h"
#include "AliMUONConstants.h"
-#include "AliMUONSegFactory.h"
#include "AliMUONResponseFactory.h"
-#include "AliMUONSegmentation.h"
#include "AliMUONHit.h"
#include "AliMUONGeometryBuilder.h"
#include "AliMUONGeometry.h"
#include "AliMUONStringIntMap.h"
#include "AliMUONGeometryDetElement.h"
+#include "AliMpCDB.h"
#include "AliMpDEManager.h"
#include "AliConst.h"
#include <string>
+#include "AliMUONVHitStore.h"
+
/// \cond CLASSIMP
ClassImp(AliMUONv1)
/// \endcond
}
//___________________________________________
-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),
AliDebug(1,Form("ctor this=%p",this));
+ // Load mapping
+ if ( ! AliMpCDB::LoadMpSegmentation() ) {
+ AliFatal("Could not access mapping from OCDB !");
+ }
+
// By default include all stations
fStepSum = new Float_t [AliMUONConstants::NCh()];
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");
+ AliMUONResponseFactory respFactory("default", fIsTailEffect);
respFactory.Build(this);
-
- // Initialize segmentation
- //
- fSegmentation->Init();
-
}
//__________________________________________________________________
// Filling TrackRefs file for MUON. Our Track references are the active volume of the chambers
if ( (gMC->IsTrackEntering() || gMC->IsTrackExiting() ) ) {
AliTrackReference* trackReference
- = AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber());
+ = AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kMUON);
trackReference->SetUserId(detElemId);
}
}
}
- // One hit per chamber
- GetMUONData()->AddHit(fIshunt,
+ AliMUONHit hit(fIshunt,
gAlice->GetMCApp()->GetCurrentTrackNumber(),
detElemId, ipart,
fTrackPosition.X(),
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