/* $Id$ */
+#include <TClonesArray.h>
+#include <TMinuit.h>
+
#include "AliRun.h"
#include "AliMUON.h"
#include "AliMUONChamber.h"
+#include "AliMUONConstants.h"
#include "AliMUONClusterInput.h"
-#include "AliSegmentation.h"
-#include "AliMUONResponse.h"
+#include "AliMUONMathieson.h"
#include "AliMUONRawCluster.h"
#include "AliMUONDigit.h"
-
-#include <TClonesArray.h>
-#include <TMinuit.h>
+#include "AliLog.h"
ClassImp(AliMUONClusterInput)
AliMUONClusterInput* AliMUONClusterInput::fgClusterInput = 0;
TMinuit* AliMUONClusterInput::fgMinuit = 0;
+AliMUONMathieson* AliMUONClusterInput::fgMathieson = 0;
+
+AliMUONClusterInput::AliMUONClusterInput()
+ : TObject(),
+ fCluster(0),
+ fChargeCorrel(1.) // in case not defined
-AliMUONClusterInput::AliMUONClusterInput(){
- fgClusterInput = 0;
- fgMinuit = 0;
+{
fDigits[0]=0;
fDigits[1]=0;
fSegmentation[0]=0;
fSegmentation[1]=0;
- fResponse=0;
- fCluster=0;
}
AliMUONClusterInput* AliMUONClusterInput::Instance()
{
// Destructor
delete fgMinuit;
+ delete fgMathieson;
}
+
AliMUONClusterInput::AliMUONClusterInput(const AliMUONClusterInput& clusterInput):TObject(clusterInput)
{
-
+// Protected copy constructor
+
+ AliFatal("Not implemented.");
}
void AliMUONClusterInput::SetDigits(Int_t chamber, TClonesArray* dig1, TClonesArray* dig2)
pMUON = (AliMUON*) gAlice->GetModule("MUON");
iChamber = &(pMUON->Chamber(chamber));
+ fgMathieson = new AliMUONMathieson();
fSegmentation[0]=iChamber->SegmentationModel(1);
fSegmentation[1]=iChamber->SegmentationModel(2);
- fResponse=iChamber->ResponseModel();
fNseg = 2;
+ if (chamber < AliMUONConstants::NTrackingCh()) {
+ if (chamber > 1 ) {
+ fgMathieson->SetPitch(AliMUONConstants::Pitch());
+ fgMathieson->SetSqrtKx3AndDeriveKx2Kx4(AliMUONConstants::SqrtKx3());
+ fgMathieson->SetSqrtKy3AndDeriveKy2Ky4(AliMUONConstants::SqrtKy3());
+ fChargeCorrel = AliMUONConstants::ChargeCorrel();
+ } else {
+ fgMathieson->SetPitch(AliMUONConstants::PitchSt1());
+ fgMathieson->SetSqrtKx3AndDeriveKx2Kx4(AliMUONConstants::SqrtKx3St1());
+ fgMathieson->SetSqrtKy3AndDeriveKy2Ky4(AliMUONConstants::SqrtKy3St1());
+ fChargeCorrel = AliMUONConstants::ChargeCorrelSt1();
+ }
+ }
}
void AliMUONClusterInput::SetDigits(Int_t chamber, TClonesArray* dig)
iChamber = &(pMUON->Chamber(chamber));
fSegmentation[0]=iChamber->SegmentationModel(1);
- fResponse=iChamber->ResponseModel();
fNseg=1;
}
fSegmentation[cath]->SetPad(fix[i][cath], fiy[i][cath]);
// First Cluster
fSegmentation[cath]->SetHit(par[0],par[1],fZ);
- Float_t q1=fResponse->IntXY(fSegmentation[cath]);
+ Float_t q1=fgMathieson->IntXY(fSegmentation[cath]);
Float_t value = fQtot[cath]*q1;
return value;
fSegmentation[0]->SetPad(fix[i][0], fiy[i][0]);
// First Cluster
fSegmentation[0]->SetHit(par[0],par[1],fZ);
- Float_t q1=fResponse->IntXY(fSegmentation[0]);
+ Float_t q1=fgMathieson->IntXY(fSegmentation[0]);
// Second Cluster
fSegmentation[0]->SetHit(par[2],par[3],fZ);
- Float_t q2=fResponse->IntXY(fSegmentation[0]);
+ Float_t q2=fgMathieson->IntXY(fSegmentation[0]);
Float_t value = fQtot[0]*(par[4]*q1+(1.-par[4])*q2);
return value;
fSegmentation[cath]->SetPad(fix[i][cath], fiy[i][cath]);
// First Cluster
fSegmentation[cath]->SetHit(par[0],par[1],fZ);
- Float_t q1=fResponse->IntXY(fSegmentation[cath]);
+ Float_t q1=fgMathieson->IntXY(fSegmentation[cath]);
// Second Cluster
fSegmentation[cath]->SetHit(par[2],par[3],fZ);
- Float_t q2=fResponse->IntXY(fSegmentation[cath]);
+ Float_t q2=fgMathieson->IntXY(fSegmentation[cath]);
Float_t value;
if (cath==0) {
value = fQtot[0]*(par[4]*q1+(1.-par[4])*q2);
}
AliMUONClusterInput& AliMUONClusterInput
-::operator = (const AliMUONClusterInput& /*rhs*/)
+::operator = (const AliMUONClusterInput& rhs)
{
-// Dummy assignment operator
- return *this;
+// Protected assignement operator
+
+ if (this == &rhs) return *this;
+
+ AliFatal("Not implemented.");
+
+ return *this;
}