/*
$Log$
+Revision 1.10 2001/03/20 13:33:23 egangler
+Small cleanup
+
+Revision 1.9 2001/01/26 21:38:49 morsch
+Use access functions to AliMUONDigit member data.
+
+Revision 1.8 2001/01/23 18:58:19 hristov
+Initialisation of some pointers
+
+Revision 1.7 2000/12/21 22:14:38 morsch
+Clean-up of coding rule violations.
+
+Revision 1.6 2000/10/06 09:04:50 morsch
+
+- Dummy z-arguments in GetPadI, SetHit, FirstPad replaced by real z-coordinate
+ to make code work with slat chambers.
+
Revision 1.5 2000/10/02 16:58:29 egangler
Cleaning of the code :
-> coding conventions
AliMUONClusterInput* AliMUONClusterInput::fgClusterInput = 0;
TMinuit* AliMUONClusterInput::fgMinuit = 0;
+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()
{
// return pointer to the singleton instance
return fgClusterInput;
}
+AliMUONClusterInput::~AliMUONClusterInput()
+{
+// Destructor
+ delete fgMinuit;
+}
+
+
void AliMUONClusterInput::SetDigits(Int_t chamber, TClonesArray* dig1, TClonesArray* dig2)
{
// Set pointer to digits with corresponding segmentations and responses (two cathode planes)
digit =(AliMUONDigit*)
(fDigits[cath]->UncheckedAt(cluster->fIndexMap[i][cath]));
// pad coordinates
- ix = digit->fPadX;
- iy = digit->fPadY;
+ ix = digit->PadX();
+ iy = digit->PadY();
// pad charge
- fCharge[i][cath] = digit->fSignal;
+ fCharge[i][cath] = digit->Signal();
// pad centre coordinates
// fSegmentation[cath]->GetPadCxy(ix, iy, x, y);
// globals kUsed in fitting functions
Float_t AliMUONClusterInput::DiscrChargeS1(Int_t i,Double_t *par)
{
-// par[0] x-position of cluster
-// par[1] y-position of cluster
-
- 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 value = fQtot[0]*q1;
- return value;
+// Compute the charge on first cathod only.
+return DiscrChargeCombiS1(i,par,0);
}
Float_t AliMUONClusterInput::DiscrChargeCombiS1(Int_t i,Double_t *par, Int_t cath)
// par[1] y-position of first cluster
// par[2] x-position of second cluster
// par[3] y-position of second cluster
-// par[4] charge fraction of first cluster
-// 1-par[4] charge fraction of second cluster
+// par[4] charge fraction of first cluster - first cathode
+// 1-par[4] charge fraction of second cluster
+// par[5] charge fraction of first cluster - second cathode
fSegmentation[cath]->SetPad(fix[i][cath], fiy[i][cath]);
// First Cluster
return value;
}
-
-
+AliMUONClusterInput& AliMUONClusterInput
+::operator = (const AliMUONClusterInput& rhs)
+{
+// Dummy assignment operator
+ return *this;
+}