]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONResponseFactory.cxx
libTPCsim depends on libTPCrec since ALiTPCDigitizer uses AliTPCReconstructor::Stream...
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseFactory.cxx
index bf09e31206c4cc3eb58c64fd711e8311b9b24883..0e79a7a06bd4d0b7fb444dbf17521a0166e33c96 100644 (file)
 #include "AliMUONResponseTrigger.h"
 #include "AliMUONResponseTriggerV1.h"
 
+using std::endl;
 /// \cond CLASSIMP
 ClassImp(AliMUONResponseFactory)
 /// \endcond
 
 //__________________________________________________________________________
-  AliMUONResponseFactory::AliMUONResponseFactory(const char* name)
+  AliMUONResponseFactory::AliMUONResponseFactory(const char* name,
+                                                 Bool_t isTailEffect)
     : TNamed(name, ""),
       fMUON(0),
-      fResponse0(0)
+      fResponse0(0),
+      fIsTailEffect(isTailEffect)
 {
 /// Standard constructor
   
@@ -54,7 +57,8 @@ ClassImp(AliMUONResponseFactory)
   AliMUONResponseFactory::AliMUONResponseFactory()
     : TNamed(),
       fMUON(0),
-      fResponse0(0)
+      fResponse0(0),
+      fIsTailEffect(kTRUE)
 {
 /// Default constructor
 
@@ -86,6 +90,7 @@ void AliMUONResponseFactory::BuildCommon()
   fResponse0->SetMaxAdc(4096);
   fResponse0->SetSaturation(3000);
   fResponse0->SetZeroSuppression(6);
+  fResponse0->SetTailEffect(fIsTailEffect);
 }       
         
 //__________________________________________________________________________
@@ -103,12 +108,13 @@ void AliMUONResponseFactory::BuildStation1()
   responseSt1.SetSigmaIntegration(10.);
   // ChargeSlope larger to compensate for the smaller anode-cathode distance
   // and keep the same most probable ADC channel for mip's
-  responseSt1.SetChargeSlope(62.5); 
+  responseSt1.SetChargeSlope(25); // SP & JC ajusted to match 2010 real data was 62.5
   // assumed proportionality to anode-cathode distance for ChargeSpread
   responseSt1.SetChargeSpread(0.144, 0.144);
   responseSt1.SetMaxAdc(4096);
   responseSt1.SetSaturation(3000);
   responseSt1.SetZeroSuppression(6);
+  responseSt1.SetTailEffect(fIsTailEffect);
 
    for (Int_t chamber = 0; chamber < 2; chamber++) {
     fMUON->SetResponseModel(chamber, responseSt1); // special response      
@@ -165,20 +171,22 @@ void AliMUONResponseFactory::BuildStation6()
 {
 /// Configuration for Trigger Chambers   (Station 6,7) ---------           
 
-    Bool_t resTrigV1 = fMUON->GetTriggerResponseV1();    
+    Int_t resTrigV1 = fMUON->GetTriggerResponseV1();    
 
     for (Int_t chamber = 10; chamber < 14; chamber++) 
     {
       AliMUONResponse* response;
-      if (!resTrigV1) 
+      if(resTrigV1==1 || resTrigV1==2) //cluster size ON
       {
-        response = new AliMUONResponseTrigger;
+       response = new AliMUONResponseTriggerV1(resTrigV1); //1=STREAMER - 2=AVALANCHE
       }
-      else
+      
+      else // default: clustrer size OFF
       {
-        response = new AliMUONResponseTriggerV1;
+       response = new AliMUONResponseTrigger;
       }
-           fMUON->SetResponseModel(chamber,*response); 
+      
+      fMUON->SetResponseModel(chamber,*response);      
       fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes
       delete response;
     }
@@ -189,6 +197,8 @@ void AliMUONResponseFactory::Build(AliMUON* where)
 {
 /// Construct MUON responses
 
+  AliDebugStream(1) << "Tail effect: " << fIsTailEffect << endl;
+
   fMUON = where;
 
   // Set default parameters