* provided "as is" without express or implied warranty. *
**************************************************************************/
-////////////////////////////////////////////////////////////
-// Factory for muon response //
-////////////////////////////////////////////////////////////
+// -----------------------------
+// Class AliMUONResponseFactory
+// -----------------------------
+// Factory for muon response
+// Class separated from AliMUONFactoryV4
/* $Id$ */
#include "AliMUON.h"
#include "AliMUONConstants.h"
-#include "AliMUONTriggerConstants.h"
#include "AliMUONChamber.h"
#include "AliMUONResponseV0.h"
#include "AliMUONResponseTrigger.h"
+#include "AliMUONResponseTriggerV1.h"
ClassImp(AliMUONResponseFactory)
: TNamed(name, ""),
fMUON(0),
fResponse0(0)
-{
+{
+/// Standard constructor
+
AliDebug(1,Form("ctor this=%p",this));
}
fMUON(0),
fResponse0(0)
{
- AliDebug(1,Form("default (empty) ctor this=%p",this));
-// Default constructor
-}
+/// Default constructor
-//__________________________________________________________________________
-AliMUONResponseFactory::AliMUONResponseFactory(const AliMUONResponseFactory& rhs)
- : TNamed(rhs)
-{
- // Protected copy constructor
-
- AliFatal("Not implemented.");
+ AliDebug(1,Form("default (empty) ctor this=%p",this));
}
//__________________________________________________________________________
AliMUONResponseFactory::~AliMUONResponseFactory()
{
-// Destructor
+/// Destructor
AliDebug(1,Form("dtor this=%p",this));
}
-
-//__________________________________________________________________________
-AliMUONResponseFactory& AliMUONResponseFactory::operator=(const AliMUONResponseFactory& rhs)
-{
- // Protected assignement operator
-
- if (this == &rhs) return *this;
-
- AliFatal("Not implemented.");
-
- return *this;
-}
//__________________________________________________________________________
void AliMUONResponseFactory::BuildCommon()
{
- //
- // Construct the default response.
- //
+/// Construct the default response.
// Default response: 5 mm of gas
fResponse0 = new AliMUONResponseV0;
{
/// Configuration for Trigger Chambers (Station 6,7) ---------
- for (Int_t chamber = 10; chamber < 14; chamber++) {
-
- fMUON->SetResponseModel(chamber, new AliMUONResponseTrigger);
- fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes
+ Bool_t resTrigV1 = fMUON->GetTriggerResponseV1();
+
+ for (Int_t chamber = 10; chamber < 14; chamber++) {
+
+ if (!resTrigV1)
+ fMUON->SetResponseModel(chamber, new AliMUONResponseTrigger);
+ else
+ fMUON->SetResponseModel(chamber, new AliMUONResponseTriggerV1);
+
+ fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes
}
}
//__________________________________________________________________________
void AliMUONResponseFactory::Build(AliMUON* where)
{
-// Construct MUON responses
+/// Construct MUON responses
fMUON = where;
//__________________________________________________________________________
void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber)
{
-// Construct MUON responses
+/// Construct MUON responses for given station
fMUON = where;
if (!fResponse0) BuildCommon();