]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- Fixing a problem in the tail effect, due to which
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Feb 2008 15:34:24 +0000 (15:34 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Feb 2008 15:34:24 +0000 (15:34 +0000)
  simulation got suck on some platforms, by adding a check
  for pad validity. (Indra, thanks to Javier)
- Put the default for tail effect back to kTRUE
- Apply the setting also for the response of St1

MUON/AliMUON.cxx
MUON/AliMUONResponseFactory.cxx
MUON/AliMUONResponseV0.cxx
MUON/Config.C

index 2c02ca493e6122addea0d098d69e34d3389519fb..395e1cbdccaf25ccf4830e51119cc48cfd13d54e 100644 (file)
@@ -117,7 +117,7 @@ AliMUON::AliMUON()
     fTriggerCoinc44(0),
     fTriggerEffCells(0),
     fDigitizerWithNoise(1),
-    fIsTailEffect(kFALSE),
+    fIsTailEffect(kTRUE),
     fRawWriter(0x0),
     fDigitMaker(0x0),
     fHitStore(0x0),
@@ -151,7 +151,7 @@ AliMUON::AliMUON(const char *name, const char* title)
     fTriggerCoinc44(0),
     fTriggerEffCells(0),
     fDigitizerWithNoise(1),
-    fIsTailEffect(kFALSE),
+    fIsTailEffect(kTRUE),
     fRawWriter(0x0),
     fDigitMaker(new AliMUONDigitMaker),
     fHitStore(0x0),
index 971fe24125876aa631fd31f3e42f9e947f14f06a..0b7bed9dc50b1328b5fc2c94416cade6d7267ca5 100644 (file)
@@ -113,6 +113,7 @@ void AliMUONResponseFactory::BuildStation1()
   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      
index f607ceb25a1bd638874eb433c9a5ac3bf928209c..78b04a1f7b4e26e905adab459e2ac042a0a76922 100644 (file)
@@ -222,7 +222,7 @@ AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits)
   //Modify to take the tailing effect.
   if(fIsTailEffect){
     Double_t locX,locY,locZ,globXCenter,globYCenter,globZ;
-    Int_t para = 5; // This parameter is a natural number(excluding zero and four), higher the value less is the tailing effect 
+    Int_t para = 5; // This parameter is a natural number(excluding zero), higher the value less is the tailing effect 
     Double_t termA = 1.0;
     Double_t termB = 1.0;
     if(para>0){
@@ -238,18 +238,19 @@ AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits)
            Global2Local(detElemId,hitX,hitY,hitZ,locX,locY,locZ);
            TVector2 hitPoint(locX,locY);
            AliMpPad pad = seg->PadByPosition(hitPoint,kFALSE);
-           Double_t locYCenter = pad.Position().Y();
-           Double_t locXCenter = pad.Position().X();
-           const AliMUONGeometryTransformer* transformer = muon()->GetGeometryTransformer();
-           transformer->Local2Global(detElemId,locXCenter,locYCenter,locZ,globXCenter,globYCenter,globZ);
-           for(Int_t itime = 0; itime<para; itime++)
-             termA *= 10.0;
-           
-           for(Int_t itime = 0; itime<Int_t((2*para) + 1); itime++)
-             termB *= (hitY - globYCenter) ; 
-
-           hitY = hitY + termA*termB;
-           
+            if(pad.IsValid()){
+              Double_t locYCenter = pad.Position().Y();
+              Double_t locXCenter = pad.Position().X();
+              const AliMUONGeometryTransformer* transformer = muon()->GetGeometryTransformer();
+              transformer->Local2Global(detElemId,locXCenter,locYCenter,locZ,globXCenter,globYCenter,globZ);
+              for(Int_t itime = 0; itime<para; itime++)
+                termA *= 10.0;
+            
+              for(Int_t itime = 0; itime<Int_t((2*para) + 1); itime++)
+                termB *= (hitY - globYCenter) ; 
+            
+              hitY = hitY + termA*termB;
+            }// if the pad is a valid one
          }// if bending plane
        }// cathode loop
     }// if para > 0 condn
index 435bfd4f00332b834a94ff6038adb4a26b8cba10..0552ab5c73d5388ab7b53ef7a8f0db2767728788 100644 (file)
@@ -214,8 +214,8 @@ void Config(char directory[100]="", char option[6]="param", const char* digitsto
   // To generate and read scaler trigger events in rawdata
   // MUON->SetTriggerScalerEvent();
   
-  // To switch on the tail effect
-  // MUON->SetTailEffect(kTRUE);
+  // To switch off the tail effect
+  // MUON->SetTailEffect(kFALSE);
 
   // If you want to play with builders, first reset the geometry builder,
   // and then add yours.