* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.7 2000/12/20 13:00:22 egangler
-
-Added charge correlation between cathods.
-In Config_slat.C, use
- MUON->Chamber(chamber-1).SetChargeCorrel(0.11); to set the RMS of
- q1/q2 to 11 % (number from Alberto)
- This is stored in AliMUONChamber fChargeCorrel member.
- At generation time, when a tracks enters the volume,
- AliMUONv1::StepManager calls
- AliMUONChamber::ChargeCorrelationInit() to set the current value of
- fCurrentCorrel which is then used at Disintegration level to scale
- appropriately the PadHit charges.
-
-Revision 1.6 2000/10/09 14:01:12 morsch
-Double inclusion of AliResponse removed.
-
-Revision 1.5 2000/07/03 11:54:57 morsch
-AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
-The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
-
-Revision 1.4 2000/06/29 12:34:09 morsch
-AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
-it usable with any other geometry class. The link to the object to which it belongs is
-established via an index. This assumes that there exists a global geometry manager
-from which the pointer to the parent object can be obtained (in our case gAlice).
-
-Revision 1.3 2000/06/28 15:16:35 morsch
-(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
-to allow development of slat-muon chamber simulation and reconstruction code in the MUON
-framework. The changes should have no side effects (mostly dummy arguments).
-(2) Hit disintegration uses 3-dim hit coordinates to allow simulation
-of chambers with overlapping modules (MakePadHits, Disintegration).
-
-Revision 1.2 2000/06/15 07:58:48 morsch
-Code from MUON-dev joined
-
-Revision 1.1.2.5 2000/06/09 21:27:01 morsch
-Most coding rule violations corrected.
-
-Revision 1.1.2.4 2000/05/05 11:34:12 morsch
-Log inside comments.
-
-Revision 1.1.2.3 2000/05/05 10:09:52 morsch
-Log messages included
-*/
+
+/* $Id$ */
// --- MUON includes ---
#include "AliMUONChamber.h"
AliMUONChamber::AliMUONChamber()
{
// Default constructor
- fSegmentation = new TObjArray(2);
- (*fSegmentation)[0] = 0;
- (*fSegmentation)[1] = 0;
+ fSegmentation = 0;
fResponse=0;
fnsec=1;
fReconstruction=0;
fId=0;
// to avoid mistakes if ChargeCorrelInit is not called
- fChargeCorrel = 0;
fCurrentCorrel =1;
}
{
// Construtor with chamber id
fSegmentation = new TObjArray(2);
- (*fSegmentation)[0] = 0;
- (*fSegmentation)[1] = 0;
+ fSegmentation->AddAt(0,0);
+ fSegmentation->AddAt(0,1);
fResponse=0;
fnsec=1;
fReconstruction=0;
fId=id;
// to avoid mistakes if ChargeCorrelInit is not called
- fChargeCorrel = 0;
fCurrentCorrel =1;
}
}
}
-AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber)
+AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber):TObject(rChamber)
{
-// Dummy copy constructor
- ;
+ // Dummy copy constructor
+ ;
}
// Initalisation ..
//
// ... for chamber segmentation
- if ((*fSegmentation)[0])
- ((AliSegmentation *) (*fSegmentation)[0])->Init(fId);
+ //PH if ((*fSegmentation)[0])
+ //PH ((AliSegmentation *) (*fSegmentation)[0])->Init(fId);
+ if (fSegmentation->At(0))
+ ((AliSegmentation *) fSegmentation->At(0))->Init(fId);
if (fnsec==2) {
- if ((*fSegmentation)[1])
- ((AliSegmentation *) (*fSegmentation)[1])->Init(fId);
+ //PH if ((*fSegmentation)[1])
+ //PH ((AliSegmentation *) (*fSegmentation)[1])->Init(fId);
+ if (fSegmentation->At(1))
+ ((AliSegmentation *) fSegmentation->At(1))->Init(fId);
}
}
{
// Ask segmentation if signal should be generated
if (fnsec==1) {
- return ((AliSegmentation*) (*fSegmentation)[0])
+ //PH return ((AliSegmentation*) (*fSegmentation)[0])
+ return ((AliSegmentation*) fSegmentation->At(0))
->SigGenCond(x, y, z) ;
} else {
- return (((AliSegmentation*) (*fSegmentation)[0])
+ //PH return (((AliSegmentation*) (*fSegmentation)[0])
+ return (((AliSegmentation*) fSegmentation->At(0))
->SigGenCond(x, y, z)) ||
- (((AliSegmentation*) (*fSegmentation)[1])
+ //PH (((AliSegmentation*) (*fSegmentation)[1])
+ (((AliSegmentation*) fSegmentation->At(1))
->SigGenCond(x, y, z)) ;
}
}
// Initialisation of segmentation for hit
//
if (fnsec==1) {
- ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
+ //PH ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
+ ((AliSegmentation*) fSegmentation->At(0))->SigGenInit(x, y, z) ;
} else {
- ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
- ((AliSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
+ //PH ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
+ //PH ((AliSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
+ ((AliSegmentation*) fSegmentation->At(0))->SigGenInit(x, y, z) ;
+ ((AliSegmentation*) fSegmentation->At(1))->SigGenInit(x, y, z) ;
}
}
fCurrentCorrel =1;
else
// exponential is here to avoid eventual problems in 0
- fCurrentCorrel = TMath::Exp(gRandom->Gaus(0,fChargeCorrel/2));
+ // factor 2 because chargecorrel is q1/q2 and not q1/qtrue
+ fCurrentCorrel = TMath::Exp(gRandom->Gaus(0,fResponse->ChargeCorrel()/2));
}
-void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof,
+void AliMUONChamber::DisIntegration(Float_t eloss, Float_t /*tof*/,
Float_t xhit, Float_t yhit, Float_t zhit,
Int_t& nnew,Float_t newclust[6][500])
{
qcheck=0;
Float_t qcath = qtot * (i==1? fCurrentCorrel : 1/fCurrentCorrel);
AliSegmentation * segmentation=
- (AliSegmentation *) (*fSegmentation)[i-1];
+ //PH (AliSegmentation *) (*fSegmentation)[i-1];
+ (AliSegmentation *) fSegmentation->At(i-1);
for (segmentation->FirstPad(xhit, yhit, zhit, dx, dy);
segmentation->MorePads();
segmentation->NextPad())
-void AliMUONChamber::InitGeo(Float_t zpos)
+void AliMUONChamber::InitGeo(Float_t /*zpos*/)
{
// sensitive gas gap
fdGas= 0.5;
}
-AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs)
+AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& /*rhs*/)
{
// Dummy assignment operator
return *this;