* 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),
fTriggerTimer(),
fMappingTimer()
{
- //
- // ctor with AliMUONData as argument
- // for reconstruction
- //
+ /// ctor with AliMUONData as argument
+ /// for reconstruction
AliDebug(1,"");
//__________________________________________________________________________
AliMUONDigitMaker::~AliMUONDigitMaker()
{
- //
- // clean up
- // and time processing measure
- //
+ /// clean up
+ /// and time processing measure
+
delete fRawStreamTracker;
delete fRawStreamTrigger;
//____________________________________________________________________
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);
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
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())
//____________________________________________________________________
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;
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();
AliMUONLocalStruct* localStruct,
TList& digitList)
{
- //
- // make (S)Digit for trigger
+ /// make (S)Digit for trigger
Int_t detElemId;
Int_t nBoard;
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++) {
//____________________________________________________________________
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:
class AliMUONLocalTriggerBoard;
class AliMUONLocalStruct;
-class AliMpSegFactory;
class AliMUONRawStreamTracker;
class AliMUONRawStreamTrigger;
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,
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
#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)
///
{
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,
fNoiseFunction(0x0),
fGenerateNoisyDigits(generateNoisyDigits)
{
- //
- // Ctor.
- //
+ /// Ctor.
+
AliDebug(1,Form("AliRunDigitizer=%p",fManager));
fGenerateNoisyDigitsTimer.Start(kTRUE); fGenerateNoisyDigitsTimer.Stop();
fExecTimer.Start(kTRUE); fExecTimer.Stop();
//_____________________________________________________________________________
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;
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.
AliMUONDigitizerV3::ApplyResponseToTriggerDigit(AliMUONDigit& digit,
AliMUONData* data)
{
+ /// \todo add comment
+
if ( !fTriggerEfficiency ) return;
AliMUONDigit* correspondingDigit = FindCorrespondingDigit(digit,data);
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] =
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 )
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)
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.");
AliMUONDigitizerV3::FindCorrespondingDigit(AliMUONDigit& digit,
AliMUONData* data) const
{
+ /// \todo add comment
+
AliMUONDataIterator it(data,"D",AliMUONDataIterator::kTriggerChambers);
AliMUONDigit* cd;
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);
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 )
{
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();
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)
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 )
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"););
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 )
// Then add or update the digit to the output.
AddOrUpdateDigit(*oDigits,*sdigit);
}
- }
+ }
}
}
/* $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};
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;
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;
//__________________________________________________________________________
AliMUONRawWriter::~AliMUONRawWriter(void)
{
- //
- // Destructor
- //
+ /// Destructor
+
AliDebug(1,"dtor");
delete fBlockHeader;
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,
//____________________________________________________________________
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];
//____________________________________________________________________
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.
//____________________________________________________________________
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;
//____________________________________________________________________
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
//____________________________________________________________________
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();
**************************************************************************/
/* $Id$ */
-///////////////////////////////////////////////////////////////////////////////
-// //
-// class for MUON reconstruction //
-// //
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------
+// Class AliMUONReconstructor //
+//----------------------------- //
+// Class for the
+// MUON track reconstruction
#include "AliMUONReconstructor.h"
#include "AliMUONTriggerTrack.h"
#include "AliMUONTriggerCircuitNew.h"
#include "AliMUONTriggerCrateStore.h"
-#include "AliMpSegFactory.h"
+
+#include "AliMpSegmentation.h"
#include "AliRawReader.h"
#include "AliRun.h"
#include "TTask.h"
#include "TStopwatch.h"
+/// \cond CLASSIMP
ClassImp(AliMUONReconstructor)
+/// \endcond
//_____________________________________________________________________________
AliMUONReconstructor::AliMUONReconstructor()
fCalibrationData(0x0),
fCrateManager(new AliMUONTriggerCrateStore()),
fTriggerCircuit(new TClonesArray("AliMUONTriggerCircuitNew", 234)),
- fSegFactory(new AliMpSegFactory()),
fTransformer(new AliMUONGeometryTransformer(kTRUE))
{
// 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;
delete fDigitMaker;
delete fCrateManager;
delete fTriggerCircuit;
- delete fSegFactory;
delete fTransformer;
}
/* $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
{
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();
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();
{
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
// 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
{
fB(0),
fC(0)
{
-// default constructor
+/// default constructor
Float_t hv=9.2;
SetParameters(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;
}
//------------------------------------------------------------------
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();
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();
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;
// --------------------------
// 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()
{
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);
fMathieson(new AliMUONMathieson),
fChargeThreshold(1e-4)
{
- // Normal constructor
+ /// Normal constructor
AliDebug(1,Form("Default ctor"));
}
//__________________________________________________________________________
AliMUONResponseV0::~AliMUONResponseV0()
{
+/// Destructor
+
AliDebug(1,"");
delete fMathieson;
}
void
AliMUONResponseV0::Print(Option_t*) const
{
-// Printing
+/// Printing
cout << " ChargeSlope=" << fChargeSlope
<< " ChargeSpreadX,Y=" << fChargeSpreadX
//__________________________________________________________________________
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;
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);
}
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;
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();
// 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);
/* $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)
AliMUONTriggerCircuitNew::AliMUONTriggerCircuitNew()
: TObject(),
fILocalBoard(0),
- fSegFactory(0x0),
fTransformer(0x0)
{
/// Constructor
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;
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());
// 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;
// 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
// 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);
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;