]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- Removing AliMpSegFactory -> using AliMpSegmentation instead
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Oct 2006 11:44:49 +0000 (11:44 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Oct 2006 11:44:49 +0000 (11:44 +0000)
- Modifying comments for Doxygen
- Reordering includes

MUON/AliMUONDigitMaker.cxx
MUON/AliMUONDigitMaker.h
MUON/AliMUONDigitizerV3.cxx
MUON/AliMUONRawWriter.cxx
MUON/AliMUONReconstructor.cxx
MUON/AliMUONResponseTrigger.cxx
MUON/AliMUONResponseTrigger.h
MUON/AliMUONResponseTriggerV1.cxx
MUON/AliMUONResponseV0.cxx
MUON/AliMUONTriggerCircuitNew.cxx

index 6dab242c598a6110f645607bdcbc55f54f749163..d54b73be427da115a347b41c22b915086de07f12 100644 (file)
@@ -13,8 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-////////////////////////////////////
-///
+/// \class AliMUONDigitMaker
 /// MUON Digit maker from rawdata.
 ///
 /// Raw2Digits:
 /// Add (S)Digit maker tracker (for free)
 /// and for trigger. Create trigger inverse mapping.
 /// (Ch. Finck, oct 06) 
-////////////////////////////////////
-
-#include <fstream>
-#include <string>
 
-#include <TClonesArray.h>
-#include <TList.h>
-
-#include "AliRawReader.h"
-#include "AliRawDataHeader.h"
-#include "AliLog.h"
-#include "AliRun.h"
-
-#include "AliMpBusPatch.h"
 #include "AliMUON.h"
 #include "AliMUONDigitMaker.h"
 #include "AliMUONDigit.h"
 #include "AliMUONLocalTrigger.h"
 #include "AliMUONGlobalTrigger.h"
 #include "AliMUONTriggerCircuitNew.h"
-#include "AliMpSegFactory.h"
+
+#include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
 #include "AliMpPad.h"
 #include "AliMpDEManager.h"
+#include "AliMpBusPatch.h"
 
+#include "AliRawReader.h"
+#include "AliRawDataHeader.h"
+#include "AliLog.h"
+#include "AliRun.h"
+
+#include <TClonesArray.h>
+#include <TList.h>
+
+#include <fstream>
+#include <string>
+
+/// \cond CLASSIMP
 ClassImp(AliMUONDigitMaker) // Class implementation in ROOT context
+/// \endcond
+
 //__________________________________________________________________________
 AliMUONDigitMaker::AliMUONDigitMaker(Bool_t flag)
   : TObject(),
     fMUONData(0x0),
-    fSegFactory(0x0),
     fBusPatchManager(new AliMpBusPatch()),
     fScalerEvent(kFALSE),
     fDigitFlag(flag),
@@ -100,10 +101,8 @@ AliMUONDigitMaker::AliMUONDigitMaker(Bool_t flag)
     fTriggerTimer(),
     fMappingTimer()
 {
-  //
-  // ctor with AliMUONData as argument
-  // for reconstruction
-  //
+  /// ctor with AliMUONData as argument
+  /// for reconstruction
 
   AliDebug(1,"");
 
@@ -122,10 +121,9 @@ AliMUONDigitMaker::AliMUONDigitMaker(Bool_t flag)
 //__________________________________________________________________________
 AliMUONDigitMaker::~AliMUONDigitMaker()
 {
-  //
-  // clean up
-  // and time processing measure
-  //
+  /// clean up
+  /// and time processing measure
+
   delete fRawStreamTracker;
   delete fRawStreamTrigger;
 
@@ -149,9 +147,9 @@ AliMUONDigitMaker::~AliMUONDigitMaker()
 //____________________________________________________________________
 Int_t AliMUONDigitMaker::Raw2Digits(AliRawReader* rawReader)
 {
-  // Main method to creates digit
-  // for tracker 
-  // and trigger
+  /// Main method to creates digit
+  /// for tracker 
+  /// and trigger
 
   // generate digits
   ReadTrackerDDL(rawReader);
@@ -167,9 +165,9 @@ Int_t AliMUONDigitMaker::Raw2Digits(AliRawReader* rawReader)
 Int_t AliMUONDigitMaker::ReadTrackerDDL(AliRawReader* rawReader)
 {
 
-  // reading tracker DDL
-  // filling the TClonesArray in MUONData
-  //
+  /// reading tracker DDL
+  /// filling the TClonesArray in MUONData
+
   fTrackerTimer.Start(kFALSE);
 
   // elex info
@@ -269,16 +267,16 @@ Int_t AliMUONDigitMaker::ReadTrackerDDL(AliRawReader* rawReader)
 Int_t AliMUONDigitMaker::GetMapping(Int_t busPatchId, UShort_t manuId, 
                                         UChar_t channelId, AliMUONDigit* digit )
 {
-  //
-  // mapping  for tracker
-  //
+  /// mapping  for tracker
+
   fMappingTimer.Start(kFALSE);
   
   // getting DE from buspatch
   Int_t detElemId = fBusPatchManager->GetDEfromBus(busPatchId);
   AliDebug(3,Form("detElemId: %d busPatchId %d\n", detElemId, busPatchId));
 
-  AliMpVSegmentation* seg = fSegFactory->CreateMpSegmentationByElectronics(detElemId, manuId);  
+  const AliMpVSegmentation* seg 
+    = AliMpSegmentation::Instance()->GetMpSegmentationByElectronics(detElemId, manuId);  
   AliMpPad pad = seg->PadByLocation(AliMpIntPair(manuId,channelId),kTRUE);
 
   if (!pad.IsValid())
@@ -312,9 +310,8 @@ Int_t AliMUONDigitMaker::GetMapping(Int_t busPatchId, UShort_t manuId,
 //____________________________________________________________________
 Int_t AliMUONDigitMaker::ReadTriggerDDL(AliRawReader* rawReader)
 {
-  // reading tracker DDL
-  // filling the TClonesArray in MUONData
-  //
+  /// reading tracker DDL
+  /// filling the TClonesArray in MUONData
 
   AliMUONDDLTrigger*       ddlTrigger      = 0x0;
   AliMUONDarcHeader*       darcHeader      = 0x0;
@@ -412,8 +409,8 @@ Int_t AliMUONDigitMaker::ReadTriggerDDL(AliRawReader* rawReader)
 void AliMUONDigitMaker::GetTriggerChamber(AliMUONLocalStruct* localStruct, Int_t& xyPattern, 
                                          Int_t& iChamber, Int_t& iCath, Int_t icase)
 {
+  /// get chamber & cathode number, (chamber starts at 0 !)
 
-  // get chamber & cathode number, (chamber starts at 0 !)
     switch(icase) {
     case 0: 
       xyPattern =  localStruct->GetX1();
@@ -462,8 +459,7 @@ Int_t AliMUONDigitMaker::TriggerDigits(AliMUONLocalTriggerBoard* localBoard,
                                       AliMUONLocalStruct* localStruct,
                                       TList& digitList)
 {
-  //
-  // make (S)Digit for trigger
+  /// make (S)Digit for trigger
 
   Int_t detElemId;
   Int_t nBoard;
@@ -484,7 +480,8 @@ Int_t AliMUONDigitMaker::TriggerDigits(AliMUONLocalTriggerBoard* localBoard,
     detElemId = triggerCircuit.DetElemId(iChamber, localBoard->GetName());
     nBoard    = localBoard->GetNumber();
 
-    AliMpVSegmentation* seg = fSegFactory->CreateMpSegmentation(detElemId, iCath);  
+    const AliMpVSegmentation* seg 
+      = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, iCath);  
 
     // loop over the 16 bits of pattern
     for (Int_t ibitxy = 0; ibitxy < 16; ibitxy++) {
@@ -524,9 +521,9 @@ Int_t AliMUONDigitMaker::TriggerDigits(AliMUONLocalTriggerBoard* localBoard,
 //____________________________________________________________________
 void  AliMUONDigitMaker::GetCrateName(Char_t* name, Int_t iDDL, Int_t iReg)
 {
-  // set crate name from DDL & reg number
-  // method same as in RawWriter, not so nice
-  // should be put in AliMUONTriggerCrateStore
+  /// set crate name from DDL & reg number
+  /// method same as in RawWriter, not so nice
+  /// should be put in AliMUONTriggerCrateStore
 
       switch(iReg) {
       case 0:
index 9aa4abe128ed3cca56e0c666b06dc4a1a8c54b9e..a50494e2aa59d14859152b5d7f47e6afe3b1d9d7 100644 (file)
@@ -23,7 +23,6 @@ class AliMUONTriggerCrateStore;
 class AliMUONLocalTriggerBoard;
 class AliMUONLocalStruct;
 
-class AliMpSegFactory;
 class AliMUONRawStreamTracker;
 class AliMUONRawStreamTrigger;
 
@@ -38,8 +37,10 @@ class AliMUONDigitMaker : public TObject
 
   Int_t  ReadTrackerDDL(AliRawReader* rawReader);
   Int_t  ReadTriggerDDL(AliRawReader* rawReader);
-
+         /// Return MUON data
   AliMUONData*   GetMUONData() const {return fMUONData;}
+        /// Set MUON data
   void SetMUONData(AliMUONData* data) {fMUONData = data;}
  
   Int_t GetMapping(Int_t buspatchId, UShort_t manuId, 
@@ -51,18 +52,16 @@ class AliMUONDigitMaker : public TObject
   void GetTriggerChamber(AliMUONLocalStruct* localStruct, 
                         Int_t& xyPattern, Int_t& iChamber, Int_t& iCath, Int_t iCase );
 
+        /// Set flag to generates scaler event
   void  SetScalerEvent() {fScalerEvent = kTRUE;}
 
+        /// Set Crate array
   void  SetCrateManager(AliMUONTriggerCrateStore* crateManager) {fCrateManager =  crateManager;}
 
-  void  SetSegFactory(AliMpSegFactory* segFactory) {fSegFactory = segFactory;}
-
  private:
 
   AliMUONData*     fMUONData;          //!< Data container for MUON subsystem 
   
-  AliMpSegFactory* fSegFactory;        //!< Mapping segmentation factory
-
   AliMpBusPatch*   fBusPatchManager;   //!< buspatch versus DE's & DDL
 
   Bool_t           fScalerEvent;       //!< flag to generates scaler event
index 8cad62755c3ffc96ccfec8e6159ece7d9d8cd806..41352170c76af206a73245b0f952c2e1974fbcc0 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "AliMUONDigitizerV3.h"
 
-#include "AliLog.h"
 #include "AliMUON.h"
 #include "AliMUONCalibrationData.h"
 #include "AliMUONConstants.h"
 #include "AliMUONTriggerEfficiencyCells.h"
 #include "AliMUONTriggerElectronics.h"
 #include "AliMUONVCalibParam.h"
+
 #include "AliMpDEIterator.h"
 #include "AliMpDEManager.h"
 #include "AliMpIntPair.h"
 #include "AliMpPad.h"
 #include "AliMpStationType.h"
+#include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
 #include "AliMpDEManager.h"
+
 #include "AliRun.h"
 #include "AliRunDigitizer.h"
 #include "AliRunLoader.h"
+#include "AliLog.h"
+
 #include "Riostream.h"
 #include "TF1.h"
 #include "TRandom.h"
 #include "TString.h"
 
 ///
+/// \class AliMUONDigitizerV3
 /// The digitizer is performing the transformation to go from SDigits (digits
 /// w/o any electronic noise) to Digits (w/ electronic noise, and decalibration)
 /// 
@@ -63,17 +68,13 @@ namespace
   {
     return static_cast<AliMUON*>(gAlice->GetModule("MUON"));
   }
-
-  AliMUONSegmentation* Segmentation()
-  {
-    static AliMUONSegmentation* segmentation = muon()->GetSegmentation();
-    return segmentation;
-  }
 }
 
 const Double_t AliMUONDigitizerV3::fgkNSigmas=3;
 
+/// \cond CLASSIMP
 ClassImp(AliMUONDigitizerV3)
+/// \endcond
 
 //_____________________________________________________________________________
 AliMUONDigitizerV3::AliMUONDigitizerV3(AliRunDigitizer* manager, 
@@ -90,9 +91,8 @@ fExecTimer(),
 fNoiseFunction(0x0),
 fGenerateNoisyDigits(generateNoisyDigits)
 {
-  //
-  // Ctor.
-  //
+  /// Ctor.
+
   AliDebug(1,Form("AliRunDigitizer=%p",fManager));
   fGenerateNoisyDigitsTimer.Start(kTRUE); fGenerateNoisyDigitsTimer.Stop();
   fExecTimer.Start(kTRUE); fExecTimer.Stop();
@@ -102,9 +102,8 @@ fGenerateNoisyDigits(generateNoisyDigits)
 //_____________________________________________________________________________
 AliMUONDigitizerV3::~AliMUONDigitizerV3()
 {
-  //
-  // Dtor. Note we're the owner of some pointers.
-  // 
+  /// Dtor. Note we're the owner of some pointers.
+
   AliDebug(1,"dtor");
 
   delete fOutputData;
@@ -129,13 +128,12 @@ AliMUONDigitizerV3::~AliMUONDigitizerV3()
 void 
 AliMUONDigitizerV3::ApplyResponseToTrackerDigit(AliMUONDigit& digit, Bool_t addNoise)
 {
-  // For tracking digits, starting from an ideal digit's charge, we :
-  //
-  // - add some noise (thus leading to a realistic charge), if requested to do so
-  // - divide by a gain (thus decalibrating the digit)
-  // - add a pedestal (thus decalibrating the digit)
-  // - sets the signal to zero if below 3*sigma of the noise
-  //
+  /// For tracking digits, starting from an ideal digit's charge, we :
+  ///
+  /// - add some noise (thus leading to a realistic charge), if requested to do so
+  /// - divide by a gain (thus decalibrating the digit)
+  /// - add a pedestal (thus decalibrating the digit)
+  /// - sets the signal to zero if below 3*sigma of the noise
 
   static const Int_t kMaxADC = (1<<12)-1; // We code the charge on a 12 bits ADC.
 
@@ -206,6 +204,8 @@ void
 AliMUONDigitizerV3::ApplyResponseToTriggerDigit(AliMUONDigit& digit,
                                                 AliMUONData* data)
 {
+  /// \todo add comment
+
   if ( !fTriggerEfficiency ) return;
 
   AliMUONDigit* correspondingDigit = FindCorrespondingDigit(digit,data);
@@ -213,11 +213,12 @@ AliMUONDigitizerV3::ApplyResponseToTriggerDigit(AliMUONDigit& digit,
   if(!correspondingDigit)return;//reject bad correspondences
 
   Int_t detElemId = digit.DetElemId();
-  
+
+  AliMpSegmentation* segmentation = AliMpSegmentation::Instance();
   const AliMpVSegmentation* segment[2] = 
   {
-    Segmentation()->GetMpSegmentation(detElemId,digit.Cathode()), 
-    Segmentation()->GetMpSegmentation(detElemId,correspondingDigit->Cathode())
+    segmentation->GetMpSegmentation(detElemId,digit.Cathode()), 
+    segmentation->GetMpSegmentation(detElemId,correspondingDigit->Cathode())
   };
 
   AliMpPad pad[2] = 
@@ -270,10 +271,9 @@ AliMUONDigitizerV3::ApplyResponseToTriggerDigit(AliMUONDigit& digit,
 void
 AliMUONDigitizerV3::ApplyResponse()
 {
-  //
-  // Loop over all chamber digits, and apply the response to them
-  // Note that this method may remove digits.
-  //
+  /// Loop over all chamber digits, and apply the response to them
+  /// Note that this method may remove digits.
+
   const Bool_t kAddNoise = kTRUE;
   
   for ( Int_t ich = 0; ich < AliMUONConstants::NCh(); ++ich )
@@ -337,10 +337,9 @@ void
 AliMUONDigitizerV3::AddOrUpdateDigit(TClonesArray& array, 
                                      const AliMUONDigit& digit)
 {
-  //
-  // Add or update a digit, depending on whether there's already a digit
-  // for the corresponding channel.
-  //
+  /// Add or update a digit, depending on whether there's already a digit
+  /// for the corresponding channel.
+
   Int_t ix = FindDigitIndex(array,digit);
   
   if (ix>=0)
@@ -364,13 +363,11 @@ AliMUONDigitizerV3::AddOrUpdateDigit(TClonesArray& array,
 void
 AliMUONDigitizerV3::Exec(Option_t*)
 {
-  //
-  // Main method.
-  // We first loop over input files, and merge the sdigits we found there.
-  // Second, we digitize all the resulting sdigits
-  // Then we generate noise-only digits (for tracker only)
-  // And we finally generate the trigger outputs.
-  //
+  /// Main method.
+  /// We first loop over input files, and merge the sdigits we found there.
+  /// Second, we digitize all the resulting sdigits
+  /// Then we generate noise-only digits (for tracker only)
+  /// And we finally generate the trigger outputs.
     
   AliDebug(1, "Running digitizer.");
   
@@ -457,6 +454,8 @@ AliMUONDigit*
 AliMUONDigitizerV3::FindCorrespondingDigit(AliMUONDigit& digit,
                                            AliMUONData* data) const
 {                                                
+  /// \todo add comment
+
   AliMUONDataIterator it(data,"D",AliMUONDataIterator::kTriggerChambers);
   AliMUONDigit* cd;
 
@@ -493,13 +492,11 @@ Int_t
 AliMUONDigitizerV3::FindDigitIndex(TClonesArray& array, 
                                    const AliMUONDigit& digit) const
 {
-  // 
-  // Return the index of digit within array, if that digit is there, 
-  // otherwise returns -1
-  //
-  // FIXME: this is of course not the best implementation you can think of.
-  // Reconsider the use of hit/digit map... ? (but be sure it's needed!)
-  //
+  /// Return the index of digit within array, if that digit is there, 
+  /// otherwise returns -1
+  ///
+  /// \todo FIXME: this is of course not the best implementation you can think of.
+  /// Reconsider the use of hit/digit map... ? (but be sure it's needed!)
   
   fFindDigitIndexTimer.Start(kFALSE);
   
@@ -524,11 +521,9 @@ AliMUONDigitizerV3::FindDigitIndex(TClonesArray& array,
 void
 AliMUONDigitizerV3::GenerateNoisyDigits()
 {
-  //
-  // According to a given probability, generate digits that
-  // have a signal above the noise cut (ped+n*sigma_ped), i.e. digits
-  // that are "only noise".
-  //
+  /// According to a given probability, generate digits that
+  /// have a signal above the noise cut (ped+n*sigma_ped), i.e. digits
+  /// that are "only noise".
   
   if ( !fNoiseFunction )
   {
@@ -563,15 +558,14 @@ AliMUONDigitizerV3::GenerateNoisyDigits()
 void
 AliMUONDigitizerV3::GenerateNoisyDigitsForOneCathode(Int_t detElemId, Int_t cathode)
 {
-  //
-  // Generate noise-only digits for one cathode of one detection element.
-  // Called by GenerateNoisyDigits()
-  //
+  /// Generate noise-only digits for one cathode of one detection element.
+  /// Called by GenerateNoisyDigits()
   
   Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
   TClonesArray* digits = fOutputData->Digits(chamberId);
   
-  const AliMpVSegmentation* seg = Segmentation()->GetMpSegmentation(detElemId,cathode);
+  const AliMpVSegmentation* seg 
+    = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cathode);
   Int_t nofPads = seg->NofPads();
   
   Int_t maxIx = seg->MaxPadIndexX();
@@ -644,9 +638,8 @@ AliMUONDigitizerV3::GenerateNoisyDigitsForOneCathode(Int_t detElemId, Int_t cath
 AliMUONData* 
 AliMUONDigitizerV3::GetDataAccess(const TString& folderName)
 {
-  //
-  // Create an AliMUONData to deal with data found in folderName.
-  //
+  /// Create an AliMUONData to deal with data found in folderName.
+
   AliDebug(1,Form("Getting access to folder %s",folderName.Data()));
   AliRunLoader* runLoader = AliRunLoader::GetRunLoader(folderName);
   if (!runLoader)
@@ -669,12 +662,11 @@ AliMUONDigitizerV3::GetDataAccess(const TString& folderName)
 Bool_t
 AliMUONDigitizerV3::Init()
 {
-  //
-  // Initialization of the TTask :
-  // a) set the outputData pointer
-  // b) create the calibrationData, according to run number
-  // c) create the trigger processing task
-  //
+  /// Initialization of the TTask :
+  /// a) set the outputData pointer
+  /// b) create the calibrationData, according to run number
+  /// c) create the trigger processing task
+
   AliDebug(1,"");
   
   if ( fIsInitialized )
@@ -733,9 +725,8 @@ Bool_t
 AliMUONDigitizerV3::MergeDigits(const AliMUONDigit& src, 
                                 AliMUONDigit& srcAndDest)
 {
-  //
-  // Merge 2 digits (src and srcAndDest) into srcAndDest.
-  //
+  /// Merge 2 digits (src and srcAndDest) into srcAndDest.
+
   AliDebug(1,"Merging the following digits:");
   StdoutToAliDebug(1,src.Print("tracks"););
   StdoutToAliDebug(1,srcAndDest.Print("tracks"););
@@ -764,9 +755,8 @@ void
 AliMUONDigitizerV3::MergeWithSDigits(AliMUONData& outputData, 
                                      const AliMUONData& inputData, Int_t mask)
 {
-  //
-  // Merge the sdigits in inputData with the digits already present in outputData
-  //
+  /// Merge the sdigits in inputData with the digits already present in outputData
+
   AliDebug(1,"");
   
        for ( Int_t ich = 0; ich < AliMUONConstants::NCh(); ++ich )
@@ -795,6 +785,6 @@ AliMUONDigitizerV3::MergeWithSDigits(AliMUONData& outputData,
         // Then add or update the digit to the output.
         AddOrUpdateDigit(*oDigits,*sdigit);
       }
-               }   
+    }   
   }
 }
index 98d1d681274f2cce537b3ac2e02a669aa828ad6c..89a68dd797eee0366ca6bb62d639f3e0115becf6 100644 (file)
 
 /* $Id$ */
 
-////////////////////////////////////
-//
-// MUON Raw Data generaton in ALICE-MUON
-// This class version 3 (further details could be found in Alice-note)
-//
-// Implemented non-constant buspatch numbers for tracking
-// with correct DDL id (first guess)
-// (Ch. Finck, dec 2005)
-//
-// Digits2Raw:
-// Generates raw data for MUON tracker and finally for trigger
-// Using real mapping (inverse) for tracker
-// For trigger there is no mapping (mapping could be found in AliMUONTriggerCircuit)
-// Ch. Finck, July 04
-// Use memcpy instead of assignment elt by elt
-// Introducing variable DSP numbers, real manu numbers per buspatch for st12
-// Implemented scaler event for Trigger
-// Ch. Finck, Jan. 06
-// Using bus itr in DDL instead of simple incrementation
-// treat correctly the DDL & buspatch for station 3.
-// Using informations from AliMUONTriggerCrateStore for 
-// empty slots and non-notified cards in trigger crates.
-// Ch. Finck, August 06.
-// 
-////////////////////////////////////
+/// \class AliMUONRawWriter
+/// MUON Raw Data generaton in ALICE-MUON
+/// This class version 3 (further details could be found in Alice-note)
+///
+/// Implemented non-constant buspatch numbers for tracking
+/// with correct DDL id (first guess)
+/// (Ch. Finck, dec 2005)
+///
+/// Digits2Raw:
+/// Generates raw data for MUON tracker and finally for trigger
+/// Using real mapping (inverse) for tracker
+/// For trigger there is no mapping (mapping could be found in AliMUONTriggerCircuit)
+/// Ch. Finck, July 04
+/// Use memcpy instead of assignment elt by elt
+/// Introducing variable DSP numbers, real manu numbers per buspatch for st12
+/// Implemented scaler event for Trigger
+/// Ch. Finck, Jan. 06
+/// Using bus itr in DDL instead of simple incrementation
+/// treat correctly the DDL & buspatch for station 3.
+/// Using informations from AliMUONTriggerCrateStore for 
+/// empty slots and non-notified cards in trigger crates.
+/// Ch. Finck, August 06.
 
 #include "AliMUONRawWriter.h"
 
-#include "AliBitPacking.h" 
-#include "AliDAQ.h"
-#include "AliLog.h"
 #include "AliMUON.h"
 #include "AliMUONBlockHeader.h"
 #include "AliMUONBusStruct.h"
 #include "AliMUONRegHeader.h"
 #include "AliMUONTriggerCrate.h"
 #include "AliMUONTriggerCrateStore.h"
+
 #include "AliMpBusPatch.h"
 #include "AliMpDEManager.h"
 #include "AliMpExMap.h"
 #include "AliMpIntPair.h"
 #include "AliMpConstants.h"
-#include "TList.h"
 #include "AliMpPad.h"
 #include "AliMpPlaneType.h"
-#include "AliMpSegFactory.h"
+#include "AliMpSegmentation.h"
 #include "AliMpStationType.h"
 #include "AliMpVSegmentation.h"
+
 #include "AliRawReader.h"
+#include "AliBitPacking.h" 
+#include "AliDAQ.h"
+#include "AliLog.h"
+
+#include "TList.h"
 #include "TObjArray.h"
 #include "TStopwatch.h"
 
+/// \cond CLASSIMP
 ClassImp(AliMUONRawWriter) // Class implementation in ROOT context
+/// \endcond
 
 Int_t AliMUONRawWriter::fgManuPerBusSwp1B[12]  = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 224, 232};
 Int_t AliMUONRawWriter::fgManuPerBusSwp1NB[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 225, 233};
@@ -102,13 +104,11 @@ AliMUONRawWriter::AliMUONRawWriter(AliMUONData* data)
     fCrateManager(new AliMUONTriggerCrateStore()),
     fScalerEvent(kFALSE),
     fHeader(),
-    fTimers(new TStopwatch[kLast]),
-    fSegFactory(new AliMpSegFactory())
+    fTimers(new TStopwatch[kLast])
 
 {
-  //
-  // Standard Constructor
-  //
+  /// Standard Constructor
+
   AliDebug(1,"Standard ctor");
   fFile[0] = fFile[1] = 0x0;  
   fFile[2] = fFile[3] = 0x0;  
@@ -145,12 +145,10 @@ AliMUONRawWriter::AliMUONRawWriter()
     fCrateManager(0x0),
     fScalerEvent(kFALSE),
     fHeader(),
-    fTimers(0),
-    fSegFactory(0x0)
+    fTimers(0)
 {
-  //
-  // Default Constructor
-  //
+  /// Default Constructor
+
   AliDebug(1,"Default ctor");   
   fFile[0] = fFile[1] = 0x0;  
   fFile[2] = fFile[3] = 0x0;  
@@ -160,9 +158,8 @@ AliMUONRawWriter::AliMUONRawWriter()
 //__________________________________________________________________________
 AliMUONRawWriter::~AliMUONRawWriter(void)
 {
-  //
-  // Destructor
-  //
+  /// Destructor
+
   AliDebug(1,"dtor");
   
   delete fBlockHeader;
@@ -174,8 +171,6 @@ AliMUONRawWriter::~AliMUONRawWriter(void)
   delete fBusPatchManager;
   delete fCrateManager;
 
-  delete fSegFactory;
-  
   for ( Int_t i = 0; i < kLast; ++i )
   {
     AliDebug(1, Form("Execution time (timer %d) : R:%7.2fs C:%7.2fs",i,
@@ -225,9 +220,8 @@ AliMUONRawWriter::~AliMUONRawWriter(void)
 //____________________________________________________________________
 Int_t AliMUONRawWriter::Digits2Raw()
 {
-  //
-  // convert digits of the current event to raw data
-  //
+  /// convert digits of the current event to raw data
+
   Int_t idDDL;
   Char_t name[255];
 
@@ -308,9 +302,9 @@ Int_t AliMUONRawWriter::Digits2Raw()
 //____________________________________________________________________
 Int_t AliMUONRawWriter::WriteTrackerDDL(Int_t iSt)
 {
-  // writing DDL for tracker
-  // used inverse mapping
-  //
+  /// writing DDL for tracker
+  /// used inverse mapping
+
   fTimers[kWriteTracker].Start(kFALSE);
   
   static const Int_t kMAXADC = (1<<12)-1; // We code the charge on a 12 bits ADC.
@@ -559,9 +553,7 @@ Int_t AliMUONRawWriter::WriteTrackerDDL(Int_t iSt)
 //____________________________________________________________________
 Int_t AliMUONRawWriter::GetBusPatch(Int_t detElemId, Int_t manuId) const
 {
-  //
-  // Determine the BusPatch this digit belongs to.
-  //
+  /// Determine the BusPatch this digit belongs to.
   
   Int_t* ptr = 0;
     
@@ -643,18 +635,16 @@ Int_t AliMUONRawWriter::GetBusPatch(Int_t detElemId, Int_t manuId) const
 //____________________________________________________________________
 Int_t AliMUONRawWriter::GetBusPatch(const AliMUONDigit& digit) const
 {
-  //
-  // Determine the BusPatch this digit belongs to.
-  //
+  /// Determine the BusPatch this digit belongs to.
+
   return GetBusPatch(digit.DetElemId(),digit.ManuId());
 }
 
 //____________________________________________________________________
 Int_t AliMUONRawWriter::WriteTriggerDDL()
 {
-  //
-  // Write trigger DDL
-  //
+  /// Write trigger DDL
+
   fTimers[kWriteTrigger].Start(kFALSE);
   
  // DDL event one per half chamber
@@ -944,9 +934,9 @@ Int_t AliMUONRawWriter::WriteTriggerDDL()
 //____________________________________________________________________
 void AliMUONRawWriter::SetScalersNumbers()
 {
-  // set numbers for scaler events for trigger headers
-  // since this is provided by the experiment
-  // put dummy numbers to check the monitoring
+  /// set numbers for scaler events for trigger headers
+  /// since this is provided by the experiment
+  /// put dummy numbers to check the monitoring
 
   fDarcHeader->SetScalersNumbers();
   fRegHeader->SetScalersNumbers();
index b876eb7589be6d6e7aad927cf11750a1ce4e00ae..772fd5076a1c16e57d708b8076ad6f4e93d819b9 100644 (file)
  **************************************************************************/
 /* $Id$ */
 
-///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-// class for MUON reconstruction                                             //
-//                                                                           //
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------    
+// Class AliMUONReconstructor                                                                      //
+//-----------------------------                                                                           //
+// Class for the 
+// MUON track reconstruction
 
 #include "AliMUONReconstructor.h"
 
@@ -40,7 +40,8 @@
 #include "AliMUONTriggerTrack.h"
 #include "AliMUONTriggerCircuitNew.h"
 #include "AliMUONTriggerCrateStore.h"
-#include "AliMpSegFactory.h"
+
+#include "AliMpSegmentation.h"
 
 #include "AliRawReader.h"
 #include "AliRun.h"
@@ -48,7 +49,9 @@
 #include "TTask.h"
 #include "TStopwatch.h"
 
+/// \cond CLASSIMP
 ClassImp(AliMUONReconstructor)
+/// \endcond
 
 //_____________________________________________________________________________
 AliMUONReconstructor::AliMUONReconstructor()
@@ -58,7 +61,6 @@ AliMUONReconstructor::AliMUONReconstructor()
     fCalibrationData(0x0),
     fCrateManager(new AliMUONTriggerCrateStore()),
     fTriggerCircuit(new TClonesArray("AliMUONTriggerCircuitNew", 234)),
-    fSegFactory(new AliMpSegFactory()),
     fTransformer(new AliMUONGeometryTransformer(kTRUE))
 
 {
@@ -71,16 +73,12 @@ AliMUONReconstructor::AliMUONReconstructor()
     // set to digit maker
     fDigitMaker->SetCrateManager(fCrateManager);
 
-    // set segmentation
-    fDigitMaker->SetSegFactory(fSegFactory);
-
     // transformater
     fTransformer->ReadGeometryData("volpath.dat", "geometry.root");
 
     // trigger circuit
     for (Int_t i = 0; i < AliMUONConstants::NTriggerCircuit(); i++)  {
       AliMUONTriggerCircuitNew* c = new AliMUONTriggerCircuitNew();
-      c->SetSegFactory(fSegFactory);
       c->SetTransformer(fTransformer);
       c->Init(i,*fCrateManager);
       TClonesArray& circuit = *fTriggerCircuit;
@@ -101,7 +99,6 @@ AliMUONReconstructor::~AliMUONReconstructor()
   delete fDigitMaker;
   delete fCrateManager;
   delete fTriggerCircuit;
-  delete fSegFactory;
   delete fTransformer;
 }
 
index 5e1001ebbf8020a780ee0365b0ce07c5ab121718..0ac31d82107000e3a99b65c65e0e116337e33404 100644 (file)
 
 /* $Id$ */
 
+// -------------------------------
+// Class AliMUONResponseTrigger
+// -------------------------------
+// Implementation 
+// of RPC response
 
-#include "AliMUONResponseTrigger.h"
 
-#include "AliLog.h"
+#include "AliMUONResponseTrigger.h"
 #include "AliMUON.h"
 #include "AliMUONDigit.h"
 #include "AliMUONGeometryTransformer.h"
 #include "AliMUONHit.h"
 #include "AliMUONSegmentation.h"
+#include "AliMUONTriggerSegmentationV2.h"
+#include "AliMUONConstants.h"
+
 #include "AliMpPad.h"
 #include "AliMpPlaneType.h"
+#include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
+
 #include "AliRun.h"
+#include "AliLog.h"
 #include "TList.h"
-#include "AliMUONTriggerSegmentationV2.h"
-#include "AliMUONConstants.h"
 
+/// \cond CLASSIMP
 ClassImp(AliMUONResponseTrigger)
+/// \endcond
 
 namespace
 {
@@ -65,17 +75,21 @@ namespace
 AliMUONResponseTrigger::AliMUONResponseTrigger()
   : AliMUONResponse()
 {
-// Default constructor
+/// Default constructor
+}
+
+//------------------------------------------------------------------   
+AliMUONResponseTrigger::~AliMUONResponseTrigger()
+{
+/// Destructor
 }
 
 //_____________________________________________________________________________
 void 
 AliMUONResponseTrigger::DisIntegrate(const AliMUONHit& hit, TList& digits)
 {
-  //
-  // Generate 2 digits (one on each cathode) from 1 hit, i.e. no cluster-size
-  // generation (simplest response case).
-  //
+  /// Generate 2 digits (one on each cathode) from 1 hit, i.e. no cluster-size
+  /// generation (simplest response case).
   
   digits.Clear();
   
@@ -96,7 +110,8 @@ AliMUONResponseTrigger::DisIntegrate(const AliMUONHit& hit, TList& digits)
   
   for ( Int_t cath = 0; cath < 2; ++cath )
   {
-    const AliMpVSegmentation* seg = Segmentation()->GetMpSegmentation(detElemId,cath);
+    const AliMpVSegmentation* seg 
+      = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cath);
     
     AliMpPad pad = seg->PadByPosition(TVector2(x,y),kFALSE);
     Int_t ix = pad.GetIndices().GetFirst();
index 9fb938544e4d07598c3571681f18a76d5c6df5db..6a582800d62208657cb200e46849a3f8333666d9 100644 (file)
@@ -16,16 +16,16 @@ class AliMUONResponseTrigger : public AliMUONResponse
 {
  public:
   AliMUONResponseTrigger();
-  virtual ~AliMUONResponseTrigger(){} 
+  virtual ~AliMUONResponseTrigger(); 
 
-  // Set the GenerCluster parameter       
+  /// Set the GenerCluster parameter       
   virtual Int_t SetGenerCluster(){return 0;}
 
   virtual void DisIntegrate(const AliMUONHit& hit, TList& digits);
   
  private:
 
-  ClassDef(AliMUONResponseTrigger,1) ///< Implementation of RPC response
+  ClassDef(AliMUONResponseTrigger,1) // Implementation of RPC response
     
 };
 #endif
index aa9e2181d27e5e6807c5bc25d119ad79d5d54402..b4d9836220b66f9d12170c086280950814a93d66 100644 (file)
 // Trigger chamber response 
 // with cluster size activated
 
-#include <TMath.h>
-#include <TRandom.h>
-
 #include "AliMUONResponseTriggerV1.h"
 #include "AliMUONGeometrySegmentation.h"
-#include "AliMpPad.h"
 #include "AliMUON.h"
 #include "AliMUONDigit.h"
 #include "AliMUONGeometryTransformer.h"
-#include "AliMpVSegmentation.h"
-#include "AliRun.h"
 #include "AliMUONSegmentation.h"
 #include "AliMUONConstants.h"
 
+#include "AliMpPad.h"
+#include "AliMpSegmentation.h"
+#include "AliMpVSegmentation.h"
+
+#include "AliRun.h"
+
+#include <TMath.h>
+#include <TRandom.h>
+
+/// \cond CLASSIMP
 ClassImp(AliMUONResponseTriggerV1)
+/// \endcond
 
 namespace
 {
@@ -72,7 +77,7 @@ AliMUONResponseTriggerV1::AliMUONResponseTriggerV1()
       fB(0),       
       fC(0)
 {
-// default constructor 
+/// default constructor 
   Float_t hv=9.2;
   SetParameters(hv);
 }
@@ -85,22 +90,30 @@ AliMUONResponseTriggerV1::AliMUONResponseTriggerV1(Float_t hv)
       fB(0),       
       fC(0)
 {
-// Constructor 
+/// Constructor 
   SetParameters(hv);
 }
 
 //------------------------------------------------------------------   
-void AliMUONResponseTriggerV1::SetParameters(Float_t hv){
-// initialize parameters accoring to HV
-// (see V.Barret B.Espagnon and P.Rosnet Alice/note xxx)
+AliMUONResponseTriggerV1::~AliMUONResponseTriggerV1()
+{
+/// destructor 
+}
+
+//------------------------------------------------------------------   
+void AliMUONResponseTriggerV1::SetParameters(Float_t hv)
+{
+/// initialize parameters accoring to HV
+/// (see V.Barret B.Espagnon and P.Rosnet Alice/note xxx)
   fA = 6.089 * hv - 52.70;
   fB = 2.966;
   fC = 4.3e-4 * hv - 3.5e-3;
 }
 
 //------------------------------------------------------------------   
-Int_t AliMUONResponseTriggerV1::SetGenerCluster(){
-// Set the GenerCluster parameter and return 1
+Int_t AliMUONResponseTriggerV1::SetGenerCluster()
+{
+/// Set the GenerCluster parameter and return 1
   fGenerCluster = gRandom->Rndm();
   return 1;
 }
@@ -121,10 +134,8 @@ const
 //------------------------------------------------------------------  
 void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits)
 {
-  //
-  // Generate digits (on each cathode) from 1 hit, with cluster-size
-  // generation.
-  //
+  /// Generate digits (on each cathode) from 1 hit, with cluster-size
+  /// generation.
   
   digits.Clear();
   
@@ -145,7 +156,8 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
 
   for ( Int_t cath = 0; cath < 2; ++cath )
   {
-    const AliMpVSegmentation* seg = Segmentation()->GetMpSegmentation(detElemId,cath);
+    const AliMpVSegmentation* seg 
+      = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cath);
 
     AliMpPad pad = seg->PadByPosition(TVector2(x,y),kFALSE);
     Int_t ix = pad.GetIndices().GetFirst();
@@ -222,26 +234,25 @@ void AliMUONResponseTriggerV1::Neighbours(const Int_t cath,
                                          const Int_t ix, const Int_t iy, 
                                          Int_t Xlist[10], Int_t Ylist[10]) 
 {
-
-    //-----------------BENDING-----------------------------------------
-    // Returns list of 10 next neighbours for given X strip (ix, iy)  
-    // neighbour number 4 in the list -                     
-    // neighbour number 3 in the list  |                    
-    // neighbour number 2 in the list  |_ Upper part             
-    // neighbour number 1 in the list  |            
-    // neighbour number 0 in the list -           
-    //      X strip (ix, iy) 
-    // neighbour number 5 in the list -       
-    // neighbour number 6 in the list  | _ Lower part
-    // neighbour number 7 in the list  |
-    // neighbour number 8 in the list  | 
-    // neighbour number 9 in the list -
-    
-    //-----------------NON-BENDING-------------------------------------
-    // Returns list of 10 next neighbours for given Y strip (ix, iy)  
-    // neighbour number 9 8 7 6 5 (Y strip (ix, iy)) 0 1 2 3 4 in the list
-    //                  \_______/                    \_______/
-    //                    left                         right
+    ///-----------------BENDING-----------------------------------------      /n
+    /// Returns list of 10 next neighbours for given X strip (ix, iy)         /n
+    /// neighbour number 4 in the list -                                      /n    
+    /// neighbour number 3 in the list  |                                     /n   
+    /// neighbour number 2 in the list  |_ Upper part                         /n         
+    /// neighbour number 1 in the list  |                                     /n    
+    /// neighbour number 0 in the list -                                      /n   
+    ///      X strip (ix, iy)                                                 /n
+    /// neighbour number 5 in the list -                                      /n
+    /// neighbour number 6 in the list  | _ Lower part                        /n
+    /// neighbour number 7 in the list  |                                     /n
+    /// neighbour number 8 in the list  |                                     /n
+    /// neighbour number 9 in the list -                                      /n
+    ///                                                                       /n
+    ///-----------------NON-BENDING-------------------------------------      /n
+    /// Returns list of 10 next neighbours for given Y strip (ix, iy)         /n 
+    /// neighbour number 9 8 7 6 5 (Y strip (ix, iy)) 0 1 2 3 4 in the list   /n 
+    ///                  \_______/                    \_______/               /n 
+    ///                    left                         right                 /n
     
     for (Int_t i=0; i<10; i++) {
        Xlist[i]=-1;
index 1ac1f77cd5651b0670614b3bd97dfff84bfed442..81747d63e50a2ea4ca2f0c35ab375792228de70a 100644 (file)
 // --------------------------
 // Class AliMUONResponseV0
 // --------------------------
-// Implementation of Mathieson response
-// ...
+// Implementation of 
+// Mathieson response
 
 #include "AliMUONResponseV0.h"
-
-#include "AliLog.h"
 #include "AliMUON.h"
 #include "AliMUONConstants.h"
 #include "AliMUONDigit.h"
 #include "AliMUONGeometryTransformer.h"
 #include "AliMUONHit.h"
 #include "AliMUONSegmentation.h"
+
 #include "AliMpArea.h"
 #include "AliMpDEManager.h"
 #include "AliMpVPadIterator.h"
+#include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
+
 #include "AliRun.h"
+#include "AliLog.h"
+
 #include "Riostream.h"
 #include "TVector2.h"
 #include <TMath.h>
 #include <TRandom.h>
 
+/// \cond CLASSIMP
 ClassImp(AliMUONResponseV0)
+/// \endcond
        
 AliMUON* muon()
 {
@@ -51,11 +56,11 @@ AliMUON* muon()
 void Global2Local(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg,
                   Double_t& xl, Double_t& yl, Double_t& zl)
 {  
-  // ideally should be : 
-  // Double_t x,y,z;
-  // AliMUONGeometry::Global2Local(detElemId,xg,yg,zg,x,y,z);
-  // but while waiting for this geometry singleton, let's go through
-  // AliMUON still.
+  /// ideally should be : 
+  /// Double_t x,y,z;
+  /// AliMUONGeometry::Global2Local(detElemId,xg,yg,zg,x,y,z);
+  /// but while waiting for this geometry singleton, let's go through
+  /// AliMUON still.
   
   const AliMUONGeometryTransformer* transformer = muon()->GetGeometryTransformer();
   transformer->Global2Local(detElemId,xg,yg,zg,xl,yl,zl);
@@ -81,13 +86,15 @@ AliMUONResponseV0::AliMUONResponseV0()
   fMathieson(new AliMUONMathieson),
   fChargeThreshold(1e-4)
 {
-    // Normal constructor
+    /// Normal constructor
     AliDebug(1,Form("Default ctor"));
 }
 
 //__________________________________________________________________________
 AliMUONResponseV0::~AliMUONResponseV0()
 {
+/// Destructor
+
   AliDebug(1,"");
   delete fMathieson;
 }
@@ -96,7 +103,7 @@ AliMUONResponseV0::~AliMUONResponseV0()
 void
 AliMUONResponseV0::Print(Option_t*) const
 {
-// Printing
+/// Printing
 
   cout << " ChargeSlope=" << fChargeSlope
     << " ChargeSpreadX,Y=" << fChargeSpreadX
@@ -108,26 +115,26 @@ AliMUONResponseV0::Print(Option_t*) const
   //__________________________________________________________________________
 void AliMUONResponseV0::SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3)
 {
-  // Set to "SqrtKx3" the Mathieson parameter K3 ("fSqrtKx3")
-  // in the X direction, perpendicular to the wires,
-  // and derive the Mathieson parameters K2 ("fKx2") and K4 ("fKx4")
-  // in the same direction
+  /// Set to "SqrtKx3" the Mathieson parameter K3 ("fSqrtKx3")
+  /// in the X direction, perpendicular to the wires,
+  /// and derive the Mathieson parameters K2 ("fKx2") and K4 ("fKx4")
+  /// in the same direction
   fMathieson->SetSqrtKx3AndDeriveKx2Kx4(SqrtKx3);
 }
        
   //__________________________________________________________________________
 void AliMUONResponseV0::SetSqrtKy3AndDeriveKy2Ky4(Float_t SqrtKy3)
 {
-  // Set to "SqrtKy3" the Mathieson parameter K3 ("fSqrtKy3")
-  // in the Y direction, along the wires,
-  // and derive the Mathieson parameters K2 ("fKy2") and K4 ("fKy4")
-  // in the same direction
+  /// Set to "SqrtKy3" the Mathieson parameter K3 ("fSqrtKy3")
+  /// in the Y direction, along the wires,
+  /// and derive the Mathieson parameters K2 ("fKy2") and K4 ("fKy4")
+  /// in the same direction
   fMathieson->SetSqrtKy3AndDeriveKy2Ky4(SqrtKy3);
 }
   //__________________________________________________________________________
 Float_t AliMUONResponseV0::IntPH(Float_t eloss) const
 {
-  // Calculate charge from given ionization energy loss
+  /// Calculate charge from given ionization energy loss
   Int_t nel;
   nel= Int_t(eloss*1.e9/27.4);
   Float_t charge=0;
@@ -145,7 +152,7 @@ Float_t AliMUONResponseV0::IntXY(Int_t idDE,
                                 AliMUONGeometrySegmentation* segmentation) 
 const
 {
- // Calculate charge on current pad according to Mathieson distribution
+ /// Calculate charge on current pad according to Mathieson distribution
 
   return fMathieson->IntXY(idDE, segmentation);
 }
@@ -155,9 +162,8 @@ const
 Float_t
 AliMUONResponseV0::GetAnod(Float_t x) const
 {
-  //
-  // Return wire coordinate closest to x.
-  //
+  /// Return wire coordinate closest to x.
+
   Int_t n = Int_t(x/Pitch());
   Float_t wire = (x>0) ? n+0.5 : n-0.5;
   return Pitch()*wire;
@@ -167,12 +173,10 @@ AliMUONResponseV0::GetAnod(Float_t x) const
 void 
 AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits)
 {
-  //
-  // Go from 1 hit to a list of digits.
-  // The energy deposition of that hit is first converted into charge
-  // (in IntPH() method), and then this charge is dispatched on several
-  // pads, according to the Mathieson distribution.
-  //
+  /// Go from 1 hit to a list of digits.
+  /// The energy deposition of that hit is first converted into charge
+  /// (in IntPH() method), and then this charge is dispatched on several
+  /// pads, according to the Mathieson distribution.
   
   digits.Clear();
   
@@ -202,7 +206,7 @@ AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits)
     
     // Get an iterator to loop over pads, within the given area.
     const AliMpVSegmentation* seg = 
-        Segmentation()->GetMpSegmentation(detElemId,cath);
+        AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cath);
       
     AliMpVPadIterator* it = seg->CreateIterator(area);
       
index 476b91fb3c9a2ff191ab2094de58dc51cf51bff9..315a9f0489fdb8f6c7288de4e634fe6f248cc479 100644 (file)
 
 /* $Id$ */
 
-// --------------------
-// Class AliMUONTriggerCircuitNew
-// --------------------
-// Contains as data members the Y positions of the X declusturized strips and 
-// the X positions of the (doubled or not) Y strips.
-// This is used to associate the global positions to the fired strips of the 
-// local trigger output (see AliMUONTrackReconstructor::MakeTriggerTrack)
+/// \class AliMUONTriggerCircuitNew
+/// Contains as data members the Y positions of the X declusturized strips and 
+/// the X positions of the (doubled or not) Y strips.
+/// This is used to associate the global positions to the fired strips of the 
+/// local trigger output (see AliMUONTrackReconstructor::MakeTriggerTrack)
 
-#include <TMath.h>
 #include "AliMUONTriggerCircuitNew.h"
-#include "AliRun.h"
 #include "AliMUON.h"
 #include "AliMUONConstants.h"
-#include "AliLog.h"
 #include "AliMUONLocalTriggerBoard.h"
 #include "AliMUONTriggerCrateStore.h"
 #include "AliMUONTriggerCrate.h"
+#include "AliMUONGeometryTransformer.h"
+
 #include "AliMpTriggerSegmentation.h"
 #include "AliMpTrigger.h"
 #include "AliMpSlat.h"
 #include "AliMpPCB.h"
+#include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
-#include "AliMUONGeometryTransformer.h"
-#include "AliMpSegFactory.h"
+
+#include "AliRun.h"
+#include "AliLog.h"
+
+#include <TMath.h>
 
 /// \cond CLASSIMP
 ClassImp(AliMUONTriggerCircuitNew)
@@ -48,7 +49,6 @@ ClassImp(AliMUONTriggerCircuitNew)
 AliMUONTriggerCircuitNew::AliMUONTriggerCircuitNew()
 : TObject(),
   fILocalBoard(0),
-  fSegFactory(0x0),
   fTransformer(0x0)
 {
 /// Constructor
@@ -144,7 +144,7 @@ void AliMUONTriggerCircuitNew::LoadYPos(const AliMUONTriggerCrateStore& crates)
   DecodeBoardName(localBoard->GetName(),side,iline,icol);
   
   Int_t detElemId = DetElemId(ichamber,side,iline);
-  seg = fSegFactory->CreateMpSegmentation(detElemId, icathode);  
+  seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode);  
 
   Int_t iFirstStrip = FirstStrip(localBoard->GetName());
   Int_t iLastStrip = iFirstStrip + 16;    
@@ -156,7 +156,7 @@ void AliMUONTriggerCircuitNew::LoadYPos(const AliMUONTriggerCrateStore& crates)
   ichamber = 12;
   
   detElemId = DetElemId(ichamber,side,iline);
-  seg = fSegFactory->CreateMpSegmentation(detElemId, icathode);  
+  seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode);  
 
   // second plane middle part
   Int_t iFirstStripMiddle = FirstStrip(localBoard->GetName());
@@ -178,7 +178,7 @@ void AliMUONTriggerCircuitNew::LoadYPos(const AliMUONTriggerCrateStore& crates)
       //           icolUp = icol;
     } else {             // upper strips in another detElemId
       detElemId = DetElemId(ichamber,side,iline+1); // get detElemId
-      seg = fSegFactory->CreateMpSegmentation(detElemId, icathode);  
+      seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode);  
 
       iFirstStripUp = 0;
       iLastStripUp = iFirstStripUp + 8;
@@ -196,7 +196,7 @@ void AliMUONTriggerCircuitNew::LoadYPos(const AliMUONTriggerCrateStore& crates)
   
   // restore current detElemId & segmentation
   detElemId = DetElemId(ichamber,side,iline); 
-  seg = fSegFactory->CreateMpSegmentation(detElemId, icathode);  
+  seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode);  
 
   // second plane lower part
   if (zeroDown == 0) { // something down
@@ -212,7 +212,7 @@ void AliMUONTriggerCircuitNew::LoadYPos(const AliMUONTriggerCrateStore& crates)
       //           icolDo = icol;
     } else {             // lower strips in another detElemId 
       detElemId = DetElemId(ichamber,side,iline-1); // get detElemId
-      seg = fSegFactory->CreateMpSegmentation(detElemId, icathode);  
+      seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode);  
 
       // get iFirstStrip in this module 
       const AliMpTriggerSegmentation* trig = (AliMpTriggerSegmentation*)(seg);
@@ -272,7 +272,7 @@ void AliMUONTriggerCircuitNew::LoadXPos(const AliMUONTriggerCrateStore& crates)
   DecodeBoardName(localBoard->GetName(),side,iline,icol);
   
   Int_t detElemId=DetElemId(ichamber,side,iline); // get detElemId
-  seg = fSegFactory->CreateMpSegmentation(detElemId, icathode);  
+  seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode);  
 
   // check if one needs a strip doubling or not
   if ( (x2u == 1 || x2m == 1 || x2d == 1) && x2m == 1) doubling = kTRUE;