]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONResponseFactory.cxx
- Adding the array of slat segmentation and GetLayerSegmentation(..) method
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseFactory.cxx
index e2c22de468d128c7c53016a3de68c8cdfdad5b4e..9e3651d382718476c6e39f0e5ba9e8f8fc87da3b 100644 (file)
  * 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)
 
@@ -39,7 +41,9 @@ ClassImp(AliMUONResponseFactory)
     : TNamed(name, ""),
       fMUON(0),
       fResponse0(0)
-{  
+{
+/// Standard constructor
+  
   AliDebug(1,Form("ctor this=%p",this));
 }
 
@@ -49,45 +53,23 @@ ClassImp(AliMUONResponseFactory)
       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;
@@ -179,17 +161,23 @@ void AliMUONResponseFactory::BuildStation6()
 {
 /// 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;
 
@@ -211,7 +199,7 @@ void AliMUONResponseFactory::Build(AliMUON* where)
 //__________________________________________________________________________
 void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber) 
 {
-// Construct MUON responses
+/// Construct MUON responses for given station
 
   fMUON = where;
   if (!fResponse0) BuildCommon();