fTDList(0),
fTDCounter(0),
fMask(0),
- fSignal(0),
- fDebug(0)
+ fSignal(0)
{
// Default constructor.
// Initializes all pointers to NULL.
fTDList(0),
fTDCounter(0),
fMask(0),
- fSignal(0),
- fDebug(0)
+ fSignal(0)
{
// Constructor which should be used rather than the default constructor.
// Initializes all pointers to NULL.
return *this;
}
-
-//------------------------------------------------------------------------
-void AliMUONDigitizer::CheckSegmentation()
-{
- if (fMUON->WhichSegmentation()==1) {
- AliFatal("Old Segmentation no more supported.");
- return;
- }
-
-}
//------------------------------------------------------------------------
Bool_t AliMUONDigitizer::Init()
}
//------------------------------------------------------------------------
-void AliMUONDigitizer::Exec(Option_t* option)
+void AliMUONDigitizer::Exec(Option_t* /*option*/)
{
// The main work loop starts here.
// The digitization process is broken up into two steps:
// stream. Done in CreateDigits()
AliDebug(1, "Running digitiser.");
- ParseOptions(option);
if (fManager->GetNinputs() == 0)
{
Int_t iNchCpl= fNDetElemId[detElemId] + (mTD->Cathode()-1) * AliMUONConstants::NDetElem();
fTDList->AddAtAndExpand(mTD, fTDCounter);
- fHitMap[iNchCpl]->SetHit( mTD->PadX(), mTD->PadY(), fTDCounter);
- fTDCounter++;
+ if (iNchCpl>-1 && iNchCpl<2*AliMUONConstants::NDetElem()) {
+ fHitMap[iNchCpl]->SetHit( mTD->PadX(), mTD->PadY(), fTDCounter);
+ fTDCounter++;
+ }
}
//------------------------------------------------------------------------
Int_t iNchCpl= fNDetElemId[detElemId] + (mTD->Cathode()-1) *AliMUONConstants::NDetElem() ;
// Int_t iNchCpl= mTD->Chamber() + (mTD->Cathode()-1) * AliMUONConstants::NCh();
- return( fHitMap[iNchCpl]->TestHit(mTD->PadX(), mTD->PadY()) );
+ if (iNchCpl>-1 && iNchCpl<2*AliMUONConstants::NDetElem())
+ return( fHitMap[iNchCpl]->TestHit(mTD->PadX(), mTD->PadY()) );
+ else return kFALSE;
}
//-----------------------------------------------------------------------
return kTRUE;
}
-//------------------------------------------------------------------------
-void AliMUONDigitizer::ParseOptions(Option_t* options)
-{
-// Called by the Exec method. ParseOptions should parse the option string given to the Exec method.
-//
-// The following options are defined:
-// "debug" - Sets the debug level to 99, which will show all debug messages.
-// "deb" - Same as "debug", implemented for backward comparability.
-//
-// If an invalid option is specified it is simply ignored.
-
- TString optionString = options;
- if (optionString.Data() == "debug" ||
- optionString.Data() == "deb" // maintained for compatability.
- )
- {
- AliInfo("Called with option \"debug\".");
- SetDebug(99);
- }
-}
//------------------------------------------------------------------------
void AliMUONDigitizer::InitArrays()
//
// Note: the fTDList and fHitMap arrays must be NULL before calling this method.
- AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
- if (!muon) {
- AliFatal("MUON detector not defined.");
- return;
- }
-
AliDebug(2, "Initialising internal arrays.");
AliDebug(4, "Creating transient digits list.");
fTDList = new TObjArray;
// Array of pointer of the AliMUONHitMapA1:
// two HitMaps per chamber, or one HitMap per cahtode plane
fHitMap = new AliMUONHitMapA1* [2*AliMUONConstants::NDetElem()];
- CheckSegmentation(); // check it one for all
+ for (Int_t i=0; i<2*AliMUONConstants::NDetElem(); i++) fHitMap[i] = 0x0;
Int_t k = 0;
Int_t idDE;
AliDebug(4,Form( "Creating hit map for chamber %d, cathode 2.", i+1));
AliMUONGeometrySegmentation* c2Segmentation = chamber->SegmentationModel2(2); // Cathode plane 2
- AliMUONGeometryModule* geometry = muon->Chamber(i).GetGeometry();
+ AliMUONGeometryModule* geometry = fMUON->Chamber(i).GetGeometry();
AliMUONGeometryStore* detElements = geometry->GetDetElementStore();