Honeycomb material changed to Aluminum - which is what want.
New split of reconstruction classes. We have one `manager' class:
`AliFMDReconstructor' that contains a list of algorithms derived
from AliFMDMultAlgorithm. Currently implemented are `AliFMDMultNaiive'
and `AliFMDMultPoisson'.
New data structure `AliFMDMult' encodes common multiplicity information.
`AliFMDMultRegion' hold multiplicity information gather from sevaral strips,
like when using the Poisson method. This class should be extended to
give information on the average eta, phi value.
`AliFMDMultStrip' hold information on multiplicity from a single strip,
as is the case when using the naiive approach to reconstruction.
Some old and obsolete files are removed.
AliFMDMap is moved into libFMDbase as per request of Thomas Kuhr.
New subdirectory `scripts' will hold various scripts for testing, and so
on.
// Many modifications by Christian Holm Christensen <cholm@nbi.dk>
//
-#include "TClonesArray.h" // ROOT_TClonesArray
-#include "TGeometry.h" // ROOT_TGeomtry
-#include "TNode.h" // ROOT_TNode
-#include "TTUBE.h" // ROOT_TTUBE
-#include "TTree.h" // ROOT_TTree
-#include "TVirtualMC.h" // ROOT_TVirtualMC
-#include "TBrowser.h" // ROOT_TBrowser
-#include "TMath.h" // ROOT_TMath
-
-#include "AliRunDigitizer.h" // ALIRUNDIGITIZER_H
-#include "AliLoader.h" // ALILOADER_H
-#include "AliRun.h" // ALIRUN_H
-#include "AliMC.h" // ALIMC_H
-#include "AliLog.h" // ALILOG_H
-#include "AliMagF.h" // ALIMAGF_H
+// These files are not in the same directory, so there's no reason to
+// ask the preprocessor to search in the current directory for these
+// files by including them with `#include "..."'
+#include <TClonesArray.h> // ROOT_TClonesArray
+#include <TGeometry.h> // ROOT_TGeomtry
+#include <TNode.h> // ROOT_TNode
+#include <TTUBE.h> // ROOT_TTUBE
+#include <TTree.h> // ROOT_TTree
+#include <TVirtualMC.h> // ROOT_TVirtualMC
+#include <TBrowser.h> // ROOT_TBrowser
+#include <TMath.h> // ROOT_TMath
+
+#include <AliRunDigitizer.h> // ALIRUNDIGITIZER_H
+#include <AliLoader.h> // ALILOADER_H
+#include <AliRun.h> // ALIRUN_H
+#include <AliMC.h> // ALIMC_H
+#include <AliLog.h> // ALILOG_H
+#include <AliMagF.h> // ALIMAGF_H
#include "AliFMD.h" // ALIFMD_H
#include "AliFMDDigit.h" // ALIFMDDIGIG_H
#include "AliFMDHit.h" // ALIFMDHIT_H
fFMD3(0),
fSDigits(0),
fNsdigits(0),
- fSiDensity(0),
fPrintboardRotationId(0),
fIdentityRotationId(0),
fShortLegId(0),
fLongLegId(0),
fLegLength(0),
fLegRadius(0),
- fModuleSpacing(0)
+ fModuleSpacing(0),
+ fSiDensity(0),
+ fSiThickness(0),
+ fSiDeDxMip(1.664),
+ fVA1MipRange(0),
+ fAltroChannelSize(0),
+ fSampleRate(0)
{
//
// Default constructor for class AliFMD
fIshunt = 0;
}
+//____________________________________________________________________
+AliFMD::AliFMD(const AliFMD& other)
+ : AliDetector(other),
+ fInner(other.fInner),
+ fOuter(other.fOuter),
+ fFMD1(other.fFMD1),
+ fFMD2(other.fFMD2),
+ fFMD3(other.fFMD3),
+ fSDigits(other.fSDigits),
+ fNsdigits(other.fNsdigits),
+ fPrintboardRotationId(other.fPrintboardRotationId),
+ fIdentityRotationId(other.fIdentityRotationId),
+ fShortLegId(other.fShortLegId),
+ fLongLegId(other.fLongLegId),
+ fLegLength(other.fLegLength),
+ fLegRadius(other.fLegRadius),
+ fModuleSpacing(other.fModuleSpacing),
+ fSiDensity(other.fSiDensity),
+ fSiThickness(other.fSiThickness),
+ fSiDeDxMip(other.fSiDeDxMip),
+ fVA1MipRange(other.fVA1MipRange),
+ fAltroChannelSize(other.fAltroChannelSize),
+ fSampleRate(other.fSampleRate)
+{
+ // Copy constructor
+}
+
//____________________________________________________________________
AliFMD::AliFMD(const char *name, const char *title, bool detailed)
: AliDetector (name, title),
fFMD3(0),
fSDigits(0),
fNsdigits(0),
- fSiDensity(0),
fPrintboardRotationId(0),
fIdentityRotationId(0),
fShortLegId(0),
fLongLegId(0),
fLegLength(0),
fLegRadius(0),
- fModuleSpacing(0)
+ fModuleSpacing(0),
+ fSiDensity(0),
+ fSiThickness(0),
+ fSiDeDxMip(1.664),
+ fVA1MipRange(0),
+ fAltroChannelSize(0),
+ fSampleRate(0)
{
//
// Standard constructor for Forward Multiplicity Detector
SetLegRadius();
SetLegOffset();
SetModuleSpacing();
+ SetSiThickness();
+ SetSiDensity();
+ SetVA1MipRange();
+ SetAltroChannelSize();
+ SetSampleRate();
fInner->SetLowR(4.3);
fInner->SetHighR(17.2);
fInner->SetWaferRadius(13.4/2);
fInner->SetTheta(36/2);
fInner->SetNStrips(512);
- fInner->SetSiThickness(.03);
+ fInner->SetSiThickness(fSiThickness);
fInner->SetPrintboardThickness(.11);
fInner->SetBondingWidth(.5);
fOuter->SetHighR(28.0);
fOuter->SetWaferRadius(13.4/2);
fOuter->SetTheta(18/2);
- fOuter->SetNStrips( 256);
- fOuter->SetSiThickness(.03);
+ fOuter->SetNStrips(256);
+ fOuter->SetSiThickness(fSiThickness);
fOuter->SetPrintboardThickness(.1);
fOuter->SetBondingWidth(.5);
}
}
+//____________________________________________________________________
+AliFMD&
+AliFMD::operator=(const AliFMD& other)
+{
+ AliDetector::operator=(other);
+ fInner = other.fInner;
+ fOuter = other.fOuter;
+ fFMD1 = other.fFMD1;
+ fFMD2 = other.fFMD2;
+ fFMD3 = other.fFMD3;
+ fSDigits = other.fSDigits;
+ fNsdigits = other.fNsdigits;
+ fSiDensity = other.fSiDensity;
+ fPrintboardRotationId = other.fPrintboardRotationId;
+ fIdentityRotationId = other.fIdentityRotationId;
+ fShortLegId = other.fShortLegId;
+ fLongLegId = other.fLongLegId;
+ fLegLength = other.fLegLength;
+ fLegRadius = other.fLegRadius;
+ fModuleSpacing = other.fModuleSpacing;
+ fSiDensity = other.fSiDensity;
+ fSiThickness = other.fSiThickness;
+ fVA1MipRange = other.fVA1MipRange;
+ fAltroChannelSize = other.fAltroChannelSize;
+ fSampleRate = other.fSampleRate;
+
+ return *this;
+}
+
//====================================================================
//
// GEometry ANd Traking
fPrintboardRotationId,
fIdentityRotationId);
- fFMD1->SetupGeometry((*fIdtmed)[kAirId], (*fIdtmed)[kKaptionId]);
- fFMD2->SetupGeometry((*fIdtmed)[kAirId], (*fIdtmed)[kKaptionId]);
- fFMD3->SetupGeometry((*fIdtmed)[kAirId], (*fIdtmed)[kKaptionId]);
+ fFMD1->SetupGeometry((*fIdtmed)[kAirId], (*fIdtmed)[kAlId]);
+ fFMD2->SetupGeometry((*fIdtmed)[kAirId], (*fIdtmed)[kAlId]);
+ fFMD3->SetupGeometry((*fIdtmed)[kAirId], (*fIdtmed)[kAlId]);
fFMD1->Geometry("ALIC", fPrintboardRotationId, fIdentityRotationId);
fFMD2->Geometry("ALIC", fPrintboardRotationId, fIdentityRotationId);
AliMedium(kCarbonId, "FMD Carbon$",id,0,fieldType,maxField,maxBending,
maxStepSize,maxEnergyLoss,precision,minStepSize);
+ // Aluminum
+ a = 26.981539;
+ z = 13.;
+ density = 2.7;
+ radiationLength = 8.9;
+ id = kAlId;
+ AliMaterial(id, "FMD Aluminum$", a, z, density, radiationLength,
+ absorbtionLength);
+ AliMedium(kAlId, "FMD Aluminum$", id, 0, fieldType, maxField, maxBending,
+ maxStepSize, maxEnergyLoss, precision, minStepSize);
+
+
// Silicon chip
{
Float_t as[] = { 12.0107, 14.0067, 15.9994,
maxBending, maxStepSize, maxEnergyLoss, precision, minStepSize);
}
-
- // Kaption
+#if 0
+ // Kaption
{
Float_t as[] = { 1.00794, 12.0107, 14.010, 15.9994};
Float_t zs[] = { 1., 6., 7., 8.};
maxStepSize = .001;
precision = .001;
minStepSize = .001;
- id = kKaptionId;
+ id = KaptionId;
AliMixture(id, "FMD Kaption$", as, zs, density, 4, ws);
- AliMedium(kKaptionId, "FMD Kaption$",id,0,fieldType,maxField,maxBending,
+ AliMedium(kAlId, "FMD Kaption$",id,0,fieldType,maxField,maxBending,
maxStepSize,maxEnergyLoss,precision,minStepSize);
}
-
+#endif
+
// Air
{
Float_t as[] = { 12.0107, 14.0067, 15.9994, 39.948 };
// Create AliFMDSDigit's from AliFMDHit's. This is done by creating
// an AliFMDSDigitizer object, and executing it.
//
- AliDigitizer* sdig = new AliFMDSDigitizer("galice.root");
- sdig->Exec("");
+ AliFMDSDigitizer* digitizer = new AliFMDSDigitizer("galice.root");
+ digitizer->SetSampleRate(fSampleRate);
+ digitizer->SetVA1MipRange(fVA1MipRange);
+ digitizer->SetAltroChannelSize(fAltroChannelSize);
+ digitizer->Exec("");
}
AliFMD::CreateDigitizer(AliRunDigitizer* manager) const
{
// Create a digitizer object
- return new AliFMDDigitizer(manager);
+ AliFMDDigitizer* digitizer = new AliFMDDigitizer(manager);
+ digitizer->SetSampleRate(fSampleRate);
+ digitizer->SetVA1MipRange(fVA1MipRange);
+ digitizer->SetAltroChannelSize(fAltroChannelSize);
+ return digitizer;
}
//====================================================================
// This uses the class AliFMDRawWriter to do the job. Please refer
// to that class for more information.
AliFMDRawWriter writer(this);
+ writer.SetSampleRate(fSampleRate);
writer.Exec();
-
-#if 0
- // Digits are read from the Digit branch, and processed to make
- // three DDL files, one for each of the sub-detectors FMD1, FMD2,
- // and FMD3.
- //
- // The raw data files consists of a header, followed by ALTRO
- // formatted blocks.
- //
- // +-------------+
- // | Header |
- // +-------------+
- // | ALTRO Block |
- // | ... |
- // +-------------+
- // DDL file
- //
- // An ALTRO formatted block, in the FMD context, consists of a
- // number of counts followed by a trailer.
- //
- // +------------------+
- // | Count |
- // | ... |
- // | possible fillers |
- // +------------------+
- // | Trailer |
- // +------------------+
- // ALTRO block
- //
- // The counts are listed backwards, that is, starting with the
- // latest count, and ending in the first.
- //
- // Each count consist of 1 or more ADC samples of the VA1_ALICE
- // pre-amp. signal. Just how many samples are used depends on
- // whether the ALTRO over samples the pre-amp. Each sample is a
- // 10-bit word, and the samples are grouped into 40-bit blocks
- //
- // +------------------------------------+
- // | S(n) | S(n-1) | S(n-2) | S(n-3) |
- // | ... | ... | ... | ... |
- // | S(2) | S(1) | AA | AA |
- // +------------------------------------+
- // Counts + possible filler
- //
- // The trailer of the number of words of signales, the starting
- // strip number, the sector number, and the ring ID; each 10-bit
- // words, packed into 40-bits.
- //
- // +------------------------------------+
- // | # words | start | sector | ring |
- // +------------------------------------+
- // Trailer
- //
- // Note, that this method assumes that the digits are ordered.
- //
- AliFMD* fmd = static_cast<AliFMD*>(gAlice->GetDetector(GetName()));
- fLoader->LoadDigits();
- TTree* digitTree = fLoader->TreeD();
- if (!digitTree) {
- Error("Digits2Raw", "no digit tree");
- return;
- }
-
- TClonesArray* digits = new TClonesArray("AliFMDDigit", 1000);
- fmd->SetTreeAddress();
- TBranch* digitBranch = digitTree->GetBranch(GetName());
- if (!digitBranch) {
- Error("Digits2Raw", "no branch for %s", GetName());
- return;
- }
- digitBranch->SetAddress(&digits);
-
- Int_t nEvents = Int_t(digitTree->GetEntries());
- for (Int_t event = 0; event < nEvents; event++) {
- fmd->ResetDigits();
- digitTree->GetEvent(event);
-
- Int_t nDigits = digits->GetEntries();
- if (nDigits < 1) continue;
-
-
- UShort_t prevDetector = 0;
- Char_t prevRing = '\0';
- UShort_t prevSector = 0;
- // UShort_t prevStrip = 0;
-
- // The first seen strip number for a channel
- UShort_t startStrip = 0;
-
- // Which channel number in the ALTRO channel we're at
- UShort_t offset = 0;
-
- // How many times the ALTRO Samples one VA1_ALICE channel
- Int_t sampleRate = 1;
-
- // A buffer to hold 1 ALTRO channel - Normally, one ALTRO channel
- // holds 128 VA1_ALICE channels, sampled at a rate of `sampleRate'
- TArrayI channel(128 * sampleRate);
-
- // The Altro buffer
- AliAltroBuffer* altro = 0;
-
- // Loop over the digits in the event. Note, that we assume the
- // the digits are in order in the branch. If they were not, we'd
- // have to cache all channels before we could write the data to
- // the ALTRO buffer, or we'd have to set up a map of the digits.
- for (Int_t i = 0; i < nDigits; i++) {
- // Get the digit
- AliFMDDigit* digit = static_cast<AliFMDDigit*>(digits->At(i));
-
- UShort_t det = digit->Detector();
- Char_t ring = digit->Ring();
- UShort_t sector = digit->Sector();
- UShort_t strip = digit->Strip();
- if (det != prevDetector) {
- AliDebug(10, Form("FMD: New DDL, was %d, now %d",
- kBaseDDL + prevDetector - 1,
- kBaseDDL + det - 1));
- // If an altro exists, delete the object, flushing the data to
- // disk, and closing the file.
- if (altro) {
- // When the first argument is false, we write the real
- // header.
- AliDebug(10, Form("New altro: Write channel at %d Strip: %d "
- "Sector: %d Ring: %d",
- i, startStrip, prevSector, prevRing));
- // TPC to FMD translations
- //
- // TPC FMD
- // ----------+-----------
- // pad | strip
- // row | sector
- // sector | ring
- //
- altro->WriteChannel(Int_t(startStrip),
- Int_t(prevSector),
- Int_t((prevRing == 'I' ? 0 : 1)),
- channel.fN, channel.fArray, 0);
- altro->Flush();
- altro->WriteDataHeader(kFALSE, kFALSE);
- delete altro;
- altro = 0;
- }
-
- prevDetector = det;
- // Need to open a new DDL!
- Int_t ddlId = kBaseDDL + det - 1;
- TString filename(Form("%s_%d.ddl", GetName(), ddlId));
-
- AliDebug(10, Form("New altro buffer with DDL file %s",
- filename.Data()));
- AliDebug(10, Form("New altro at %d", i));
- // Create a new altro buffer - a `1' as the second argument
- // means `write mode'
- altro = new AliAltroBuffer(filename.Data(), 1);
-
- // Write a dummy (first argument is true) header to the DDL
- // file - later on, when we close the file, we write the real
- // header
- altro->WriteDataHeader(kTRUE, kFALSE);
-
- // Figure out the sample rate
- if (digit->Count2() > 0) sampleRate = 2;
- if (digit->Count3() > 0) sampleRate = 3;
-
- channel.Set(128 * sampleRate);
- offset = 0;
- prevRing = ring;
- prevSector = sector;
- startStrip = strip;
- }
- else if (offset == 128
- || digit->Ring() != prevRing
- || digit->Sector() != prevSector) {
- // Force a new Altro channel
- AliDebug(10, Form("Flushing channel to disk because %s",
- (offset == 128 ? "channel is full" :
- (ring != prevRing ? "new ring up" :
- "new sector up"))));
- AliDebug(10, Form("New Channel: Write channel at %d Strip: %d "
- "Sector: %d Ring: %d",
- i, startStrip, prevSector, prevRing));
- altro->WriteChannel(Int_t(startStrip),
- Int_t(prevSector),
- Int_t((prevRing == 'I' ? 0 : 1)),
- channel.fN, channel.fArray, 0);
- // Reset and update channel variables
- channel.Reset(0);
- offset = 0;
- startStrip = strip;
- prevRing = ring;
- prevSector = sector;
- }
-
- // Store the counts of the ADC in the channel buffer
- channel[offset * sampleRate] = digit->Count1();
- if (sampleRate > 1)
- channel[offset * sampleRate + 1] = digit->Count2();
- if (sampleRate > 2)
- channel[offset * sampleRate + 2] = digit->Count3();
- offset++;
- }
- // Finally, we need to close the final ALTRO buffer if it wasn't
- // already
- if (altro) {
- altro->Flush();
- altro->WriteDataHeader(kFALSE, kFALSE);
- delete altro;
- }
- }
- fLoader->UnloadDigits();
-#endif
}
//==================================================================
public:
AliFMD();
AliFMD(const char *name, const char *title, bool detailed);
- AliFMD(const AliFMD& FMD) : AliDetector(FMD) {} //copy ctor
+ AliFMD(const AliFMD& other);
virtual ~AliFMD();
- AliFMD& operator=(const AliFMD&) {return *this;}
+ AliFMD& operator=(const AliFMD& other);
// GEometry ANd Tracking (GEANT :-)
virtual void CreateGeometry();
void SetLegRadius(Double_t radius=.5);
void SetLegOffset(Double_t offset=.5);
void SetModuleSpacing(Double_t spacing=1);
+ void SetSiDensity(Float_t r=2.33) { fSiDensity = r; }
+ void SetSiThickness(Float_t r=0.03) { fSiThickness = r; }
+ void SetVA1MipRange(UShort_t r=20) { fVA1MipRange = r; }
+ void SetAltroChannelSize(UShort_t s=1024) { fAltroChannelSize = s;}
+ void SetSampleRate(UShort_t r=1) { fSampleRate = (r>2 ? 2 : r);}
// Get various parameters
- Int_t GetSiId() const { return (*fIdtmed)[kSiId]; }
- Int_t GetAirId() const { return (*fIdtmed)[kAirId]; }
- Int_t GetPlasticId() const { return (*fIdtmed)[kPlasticId]; }
- Int_t GetPcbId() const { return (*fIdtmed)[kPcbId]; }
- Int_t GetKaptionId() const { return (*fIdtmed)[kKaptionId]; }
- Int_t GetCarbonId() const { return (*fIdtmed)[kCarbonId]; }
+ Int_t GetSiId() const { return (*fIdtmed)[kSiId]; }
+ Int_t GetAirId() const { return (*fIdtmed)[kAirId]; }
+ Int_t GetPlasticId() const { return (*fIdtmed)[kPlasticId]; }
+ Int_t GetPcbId() const { return (*fIdtmed)[kPcbId]; }
+ Int_t GetAlId() const { return (*fIdtmed)[kAlId]; }
+ Int_t GetCarbonId() const { return (*fIdtmed)[kCarbonId]; }
Int_t GetPrintboardRotationId() const { return fPrintboardRotationId; }
- Int_t GetShortLegId() const { return fShortLegId; }
- Int_t GetLongLegId() const { return fLongLegId; }
- Double_t GetLegLength() const { return fLegLength; }
- Double_t GetLegRadius() const { return fLegRadius; }
- Double_t GetModuleSpacing() const { return fModuleSpacing; }
-
+ Int_t GetShortLegId() const { return fShortLegId; }
+ Int_t GetLongLegId() const { return fLongLegId; }
+ Double_t GetLegLength() const { return fLegLength; }
+ Double_t GetLegRadius() const { return fLegRadius; }
+ Double_t GetModuleSpacing() const { return fModuleSpacing; }
+ Float_t GetSiDensity() const { return fSiDensity; }
+ Float_t GetSiThickness() const { return fSiThickness; }
+ UShort_t GetVA1MipRange() const { return fVA1MipRange; }
+ UShort_t GetAltroChannelSize() const { return fAltroChannelSize; }
+ UShort_t GetSampleRate() const { return fSampleRate; }
+ Float_t GetEdepMip() const {
+ return fSiDeDxMip * fSiDensity * fSiThickness;
+ }
+
// Utility
void Browse(TBrowser* b);
- Float_t GetSiDensity() const { return fSiDensity; }
enum {
kBaseDDL = 0x1000 // DDL offset for the FMD
};
protected:
+ TClonesArray* HitsArray();
+ TClonesArray* DigitsArray();
+ TClonesArray* SDigitsArray();
+
enum {
kSiId, // ID of Si medium
kAirId, // ID of Air medium
kPlasticId, // ID of Plastic medium
kPcbId, // ID of PCB medium
kSiChipId, // ID of Si Chip medium
- kKaptionId, // ID of Kaption medium
+ kAlId, // ID of Al medium
kCarbonId // ID of Carbon medium
};
-
- void SetSiDensity(Float_t r=2.33) { fSiDensity = r; }
- TClonesArray* HitsArray();
- TClonesArray* DigitsArray();
- TClonesArray* SDigitsArray();
-
- AliFMDRing* fInner; // Inner ring structure
- AliFMDRing* fOuter; // Outer ring structure
- AliFMDSubDetector* fFMD1; // FMD1 structure
- AliFMDSubDetector* fFMD2; // FMD2 structure
- AliFMDSubDetector* fFMD3; // FMD3 structure
-
- TClonesArray* fSDigits;
- Int_t fNsdigits;
- Float_t fSiDensity; // Density of Silicon
- Int_t fPrintboardRotationId; // ID of Rotation of print bard
- Int_t fIdentityRotationId; // ID of identity matrix
- Int_t fShortLegId; // ID short leg volume
- Int_t fLongLegId; // ID long leg volume
- Double_t fLegLength; // Leg length
- Double_t fLegRadius; // Leg radius
- Double_t fModuleSpacing; // Staggering offset
+ AliFMDRing* fInner; // Inner ring structure
+ AliFMDRing* fOuter; // Outer ring structure
+ AliFMDSubDetector* fFMD1; // FMD1 structure
+ AliFMDSubDetector* fFMD2; // FMD2 structure
+ AliFMDSubDetector* fFMD3; // FMD3 structure
+ TClonesArray* fSDigits; // Summable digits
+ Int_t fNsdigits; // Number of digits
+ Int_t fPrintboardRotationId; // ID of Rotation of print bard
+ Int_t fIdentityRotationId; // ID of identity matrix
+ Int_t fShortLegId; // ID short leg volume
+ Int_t fLongLegId; // ID long leg volume
+ Double_t fLegLength; // Leg length
+ Double_t fLegRadius; // Leg radius
+ Double_t fModuleSpacing; // Staggering offset
+ Float_t fSiDensity; // Density of Silicon
+ Float_t fSiThickness; // Thickness of silicon wafers
+ const Float_t fSiDeDxMip; // MIP dE/dx in Silicon
+ UShort_t fVA1MipRange; // # MIPs the pre-amp can do
+ UShort_t fAltroChannelSize; // Largest # to store in 1 ADC ch.
+ UShort_t fSampleRate; // Times the ALTRO samples pre-amp.
- ClassDef(AliFMD,8) // Base class FMD entry point
+ ClassDef(AliFMD,9) // Base class FMD entry point
};
#endif
virtual void Geometry(const char* mother, Int_t pbRotId,
Int_t idRotId, Double_t z=0);
protected:
- Int_t fVolumeId;
- Double_t fDz;
- ClassDef(AliFMD1,1); // Geometry of FMD1
+ Int_t fVolumeId; // Volume ID
+ Double_t fDz; // Half-length in Z
+ ClassDef(AliFMD1,1); // Geometry of FMD1
};
#endif
// This implements the geometry for FMD2
//
#include "AliFMD2.h" // ALIFMD2_H
-#include "TVirtualMC.h" // ROOT_TVirtualMC
-#include "AliLog.h" // ALILOG_H
#include "AliFMDRing.h" // ALIFMDRING_H
+#include <AliLog.h> // ALILOG_H
+#include <TVirtualMC.h> // ROOT_TVirtualMC
//____________________________________________________________________
ClassImp(AliFMD2);
virtual void Geometry(const char* mother, Int_t pbRotId,
Int_t idRotId, Double_t z=0);
protected:
- Int_t fVolumeId;
- Double_t fDz;
+ Int_t fVolumeId; // Volume ID
+ Double_t fDz; // Half-length in Z
ClassDef(AliFMD2,1); // Geometry of FMD2
};
Int_t colour, Double_t zMother);
protected:
void CalculateDz();
- Int_t fVolumeId;
- Double_t fDz;
+ Int_t fVolumeId; // Volume ID
+ Double_t fDz; // Half-length in Z
ClassDef(AliFMD3,1); // Geometry of FMD3
};
--- /dev/null
+/**************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN. *
+ * All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this *
+ * software and its documentation strictly for non-commercial *
+ * purposes is hereby granted without fee, provided that the *
+ * above copyright notice appears in all copies and that both *
+ * the copyright notice and this permission notice appear in *
+ * the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It *
+ * is provided "as is" without express or implied warranty. *
+ **************************************************************/
+/* $Id$ */
+//__________________________________________________________
+//
+// Map of per strip Bool_t information
+//
+// Created Mon Nov 8 12:51:51 2004 by Christian Holm Christensen
+//
+#include "AliFMDBoolMap.h" //ALIFMDBOOLMAP_H
+//__________________________________________________________
+ClassImp(AliFMDBoolMap);
+//__________________________________________________________
+AliFMDBoolMap::AliFMDBoolMap(const AliFMDBoolMap& other)
+ : AliFMDMap(other.fMaxDetectors,
+ other.fMaxRings,
+ other.fMaxSectors,
+ other.fMaxStrips),
+ fData(0)
+{
+ // Copy constructor
+ fData = new Bool_t[fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips];
+ for (size_t i = 0; i < fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips; i++)
+ fData[i] = other.fData[i];
+}
+
+//__________________________________________________________
+AliFMDBoolMap::AliFMDBoolMap(size_t maxDet,
+ size_t maxRing,
+ size_t maxSec,
+ size_t maxStr)
+ : AliFMDMap(maxDet, maxRing, maxSec, maxStr),
+ fData(0)
+{
+ // Constructor.
+ // Parameters:
+ // maxDet Maximum number of detectors
+ // maxRing Maximum number of rings per detector
+ // maxSec Maximum number of sectors per ring
+ // maxStr Maximum number of strips per sector
+ fData = new Bool_t[fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips];
+ Clear();
+}
+
+//__________________________________________________________
+AliFMDBoolMap&
+AliFMDBoolMap::operator=(const AliFMDBoolMap& other)
+{
+ // Assignment operator
+ fMaxDetectors = other.fMaxDetectors;
+ fMaxRings = other.fMaxRings;
+ fMaxSectors = other.fMaxSectors;
+ fMaxStrips = other.fMaxStrips;
+ if (fData) delete [] fData;
+ fData = new Bool_t[fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips];
+ for (size_t i = 0; i < fMaxDetectors * fMaxRings
+ * fMaxSectors * fMaxStrips; i++)
+ fData[i] = other.fData[i];
+ return *this;
+}
+
+//__________________________________________________________
+void
+AliFMDBoolMap::Clear(const Bool_t& val)
+{
+ // Reset map to val
+ for (size_t i = 0; i < fMaxDetectors * fMaxRings
+ * fMaxSectors * fMaxStrips; i++)
+ fData[i] = val;
+}
+
+//__________________________________________________________
+Bool_t&
+AliFMDBoolMap::operator()(UShort_t det,
+ Char_t ring,
+ UShort_t sec,
+ UShort_t str)
+{
+ // Get data
+ // Parameters:
+ // det Detector #
+ // ring Ring ID
+ // sec Sector #
+ // str Strip #
+ // Returns appropriate data
+ return fData[CalcIndex(det, ring, sec, str)];
+}
+
+//__________________________________________________________
+const Bool_t&
+AliFMDBoolMap::operator()(UShort_t det,
+ Char_t ring,
+ UShort_t sec,
+ UShort_t str) const
+{
+ // Get data
+ // Parameters:
+ // det Detector #
+ // ring Ring ID
+ // sec Sector #
+ // str Strip #
+ // Returns appropriate data
+ return fData[CalcIndex(det, ring, sec, str)];
+}
+
+//__________________________________________________________
+//
+// EOF
+//
+
--- /dev/null
+#ifndef ALIFMDBOOLMAP_H
+#define ALIFMDBOOLMAP_H
+/* Copyright (c) 2004, ALICE Experiment @ CERN.
+ * All rights reserved
+ * See AliFMDBoolMap.cxx for full copyright notice
+ *
+ * Created Mon Nov 8 12:51:51 2004 by Christian Holm Christensen
+ */
+/* $Id$ */
+//__________________________________________________________
+//
+// Map of Bool_t for each FMD strip
+//
+#ifndef ALIFMDMAP_H
+# include <AliFMDMap.h>
+#endif
+
+class AliFMDBoolMap : public AliFMDMap
+{
+public:
+ AliFMDBoolMap(const AliFMDBoolMap& other);
+ AliFMDBoolMap(size_t maxDet = kMaxDetectors,
+ size_t maxRing = kMaxRings,
+ size_t maxSec = kMaxSectors,
+ size_t maxStr = kMaxStrips);
+ virtual ~AliFMDBoolMap() { delete [] fData; }
+ AliFMDBoolMap& operator=(const AliFMDBoolMap& other);
+ virtual void Clear(const Bool_t& v=Bool_t());
+ virtual Bool_t& operator()(UShort_t det,
+ Char_t ring,
+ UShort_t sec,
+ UShort_t str);
+ virtual const Bool_t& operator()(UShort_t det,
+ Char_t ring,
+ UShort_t sec,
+ UShort_t str) const;
+protected:
+ Bool_t* fData; // The Data
+ ClassDef(AliFMDBoolMap,1) // Map of Bool_t data per strip
+};
+
+#endif
+//__________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
cout << ClassName() << ": FMD" << fDetector << fRing << "["
<< setw(3) << fSector << ","
<< setw(3) << fStrip << "]"
- << endl;
+ << flush;
}
//====================================================================
#ifndef ALIFMDDIGIT_H
#define ALIFMDDIGIT_H
-
-//////////////////////////////////////////////////////////////////////
+//___________________________________________________________________
//
// Digits classes for the FMD
//
-//////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
# include <TObject.h>
#endif
// -1 + B + exp(-B)
//
-#include "TTree.h" // ROOT_TTree
-#include "TRandom.h" // ROOT_TRandom
-#include "AliLog.h" // ALILOG_H
+#include <TTree.h> // ROOT_TTree
+#include <TRandom.h> // ROOT_TRandom
+#include <AliLog.h> // ALILOG_H
#include "AliFMDDigitizer.h" // ALIFMDDIGITIZER_H
#include "AliFMD.h" // ALIFMD_H
#include "AliFMDHit.h" // ALIFMDHIT_H
#include "AliFMDDigit.h" // ALIFMDDIGIT_H
-#include "AliRunDigitizer.h" // ALIRUNDIGITIZER_H
-#include "AliRun.h" // ALIRUN_H
-#include "AliLoader.h" // ALILOADER_H
-#include "AliRunLoader.h" // ALIRUNLOADER_H
+#include <AliRunDigitizer.h> // ALIRUNDIGITIZER_H
+#include <AliRun.h> // ALIRUN_H
+#include <AliLoader.h> // ALILOADER_H
+#include <AliRunLoader.h> // ALIRUNLOADER_H
//____________________________________________________________________
ClassImp(AliFMDEdepMap);
if (strip % 128 == 0) last = 0;
Float_t edep = fEdep(detector, r->GetId(), sector, strip).fEdep;
- ConvertToCount(edep, last, r->GetSiThickness(), fmd->GetSiDensity(),
- counts);
+ ConvertToCount(edep, last, r->GetSiThickness(),
+ fmd->GetSiDensity(), counts);
last = edep;
AddDigit(fmd, detector, r->GetId(), sector, strip,
edep, UShort_t(counts[0]),
// through a detector.
//
#ifndef ALIHIT_H
-# include "AliHit.h"
+# include <AliHit.h>
#endif
-
-
+//___________________________________________________________________
class AliFMDHit : public AliHit
{
public:
/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
/* $Id$ */
//____________________________________________________________________
-//
-// Base class for FMD poisson algorithms.
//
-// Derived classes will implement various ways of reconstructing the
-// charge particle multiplicity in the FMD.
-//
-#include "AliFMDPoissonAlgorithm.h" // ALIFMDPOISSONALGORITHM_H
-#include "AliFMDDigit.h" // ALIFMDDIGIT_H
-
-//____________________________________________________________________
-ClassImp(AliFMDPoissonAlgorithm);
+// Forward Multiplicity Detector have to be reconstructed number of
+// particles in fixed pseudorapidity interval from fNumOfMinRing
+// to fNumOfMaxRing and phi interval from fNumOfMinSector to
+// fNumOfMaxSector
+//
+#include "AliFMDMult.h" // ALIFMDMULT_H
+#include <TString.h> // ROOT_TString
+#include <Riostream.h> // ROOT_Riostream
//____________________________________________________________________
-AliFMDPoissonAlgorithm::AliFMDPoissonAlgorithm()
- : AliFMDReconstructionAlgorithm("Poisson", "Poisson")
-{}
-
+ClassImp(AliFMDMult);
//____________________________________________________________________
-void
-AliFMDPoissonAlgorithm::Reset()
+AliFMDMult::AliFMDMult(Float_t particles, UShort_t method)
+ : fParticles(particles),
+ fMethod(method)
{
- // Reset internal data
- fTotal = 0;
- fEmpty.Reset(kFALSE);
+ // Constructor
+ switch (fMethod) {
+ case kPoission:
+ case kIterative:
+ case kNaiive:
+ break;
+ default:
+ Warning("AliFMDMult", "unknown method: %d", method);
+ break;
+ }
}
+
//____________________________________________________________________
void
-AliFMDPoissonAlgorithm::ProcessDigit(AliFMDDigit* digit,
- Float_t eta, Float_t phi,
- UShort_t count)
+AliFMDMult::Print(Option_t* option) const
{
- // Process one digit.
- //
- // Parameters:
- //
- // digit Digit to process
- // ipZ Z--coordinate of the primary interaction
- // vertex of this event
+ // Print information
+ //
+ // Options:
//
- if (!digit) return;
- fTotal++;
- if (charge < threshold) fEmpty(digit->Detector() - 1,
- digit->Ring(),
- digit->Setctor(),
- digit->Strip()) = kTRUE;
+ // V Be verbose
+ //
+ TString opt(option);
+ if (!opt.Contains("v", TString::kIgnoreCase)) return;
+ cout << " Method: " << flush;
+ switch (fMethod) {
+ case kPoission: cout << "Poission" << endl; break;
+ case kIterative: cout << "Iterative" << endl; break;
+ case kNaiive: cout << "Naive" << endl; break;
+ default: cout << "Unknown" << endl; break;
+ }
}
-
+
//____________________________________________________________________
-//
+//
// EOF
//
--- /dev/null
+#ifndef ALIFMDMULT_H
+#define ALIFMDMULT_H
+
+/* Reconstracted Particles Class: has number of reconstructed
+ * particles in sectors from NumOfMinSector to NumberOfMaxSector()
+ * rings from NumOfMinRing to NumOfMaxRing for each FMDvolume
+ */
+#ifndef ROOT_TObject
+# include <TObject.h>
+#endif
+
+class AliFMDMult: public TObject
+{
+public:
+ enum EMethod {
+ kPoission,
+ kIterative,
+ kNaiive
+ };
+ AliFMDMult(Float_t particles=0, UShort_t method=kNaiive);
+ virtual ~AliFMDMult() {};
+
+ Float_t Particles() const { return fParticles; }
+ UShort_t Method() const { return fMethod; }
+ virtual void Print(Option_t* opt="") const;
+protected:
+ Float_t fParticles; // Number of particles
+ UShort_t fMethod; // Method use to get fParticles
+
+ ClassDef(AliFMDMult,1) // Base class for multiplicity data
+};
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+// EOF
+//
// Derived classes will implement various ways of reconstructing the
// charge particle multiplicity in the FMD.
//
-#include "AliFMDReconstructionAlgorithm.h" // ALIFMDRECONSTRUCTIONALGORITHM_H
-#include "AliFMDDigit.h" // ALIFMDDIGIT_H
+#include "AliFMDMultAlgorithm.h" // ALIFMDMULTALGORITHM_H
+#include "AliFMDDigit.h" // ALIFMDDIGIT_H
+#include <TClonesArray.h> // ROOT_TClonesArray
//____________________________________________________________________
-ClassImp(AliFMDReconstructionAlgorithm);
+ClassImp(AliFMDMultAlgorithm);
//____________________________________________________________________
-AliFMDReconstructionAlgorithm::AliFMDReconstructionAlgorithm(const char* name,
- const char* title)
- : TNamed(name, title)
+AliFMDMultAlgorithm::AliFMDMultAlgorithm(const char* name, const char* title)
+ : TNamed(name, title),
+ fTreeR(0),
+ fMult(0),
+ fFMD(0)
{}
+//____________________________________________________________________
+AliFMDMultAlgorithm::~AliFMDMultAlgorithm()
+{
+ if (fMult) delete fMult;
+}
+
+
+//____________________________________________________________________
+void
+AliFMDMultAlgorithm::PreEvent(TTree* treeR, Float_t /* ipZ */)
+{
+ if (fMult) fMult->Clear();
+ fNMult = 0;
+ fTreeR = treeR;
+}
+
//____________________________________________________________________
-#ifndef ALIFMDRECONSTRUCTIONALGORITHM_H
-#define ALIFMDRECONSTRUCTIONALGORITHM_H
+#ifndef ALIFMDMULTALGORITHM_H
+#define ALIFMDMULTALGORITHM_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
* reserved.
*
//____________________________________________________________________
class AliFMDDigit;
+class TTree;
+class AliFMD;
+class TClonesArray;
//____________________________________________________________________
-class AliFMDReconstructionAlgorithm : public TNamed
+class AliFMDMultAlgorithm : public TNamed
{
public:
- AliFMDReconstructionAlgorithm(const char* name, const char* title);
- virtual ~AliFMDReconstructionAlgorithm() {}
+ AliFMDMultAlgorithm(const char* name, const char* title);
+ virtual ~AliFMDMultAlgorithm();
- virtual void PreEvent() {};
+ virtual void PreRun(AliFMD* fmd) { fFMD = fmd; }
+ virtual void PreEvent(TTree* treeR, Float_t ipZ);
virtual void ProcessDigit(AliFMDDigit* digit,
Float_t eta,
Float_t phi,
UShort_t counts) = 0;
- virtual void PostEvent() {};
+ virtual void PostEvent() {}
+ virtual void PostRun() {}
protected:
- ClassDef(AliFMDReconstructionAlgorithm, 0) // Base class for algorithms
+ TTree* fTreeR; //! Reconstruction tree
+ TClonesArray* fMult; //! Reconstructed multiplicities
+ Int_t fNMult; //! Number of reconstructed multiplicities
+ AliFMD* fFMD; //! Detector information
+
+ ClassDef(AliFMDMultAlgorithm, 0) // Base class for algorithms
};
#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//____________________________________________________________________
+//
+// Base class for FMD naiive algorithms.
+//
+// Derived classes will implement various ways of reconstructing the
+// charge particle multiplicity in the FMD.
+//
+#include "AliFMD.h" // ALIFMD_H
+#include "AliFMDMultNaiive.h" // ALIFMDMULTNAIIVE_H
+#include "AliFMDMultStrip.h" // ALIFMDMULTNAIIVE_H
+#include "AliFMDDigit.h" // ALIFMDDIGIT_H
+#include <TClonesArray.h> // ROOT_TClonesArray
+#include <TTree.h> // ROOT_TTree
+
+//____________________________________________________________________
+ClassImp(AliFMDMultNaiive);
+
+//____________________________________________________________________
+AliFMDMultNaiive::AliFMDMultNaiive()
+ : AliFMDMultAlgorithm("Naiive", "Naiive")
+{
+ // Default CTOR
+ fMult = new TClonesArray("AliFMDMultStrip", 1000);
+}
+
+//____________________________________________________________________
+void
+AliFMDMultNaiive::PreRun(AliFMD* fmd)
+{
+ // Initialise before a run
+ AliFMDMultAlgorithm::PreRun(fmd);
+ fEdepMip = fmd->GetEdepMip();
+ fGain = (fmd->GetVA1MipRange() / fmd->GetAltroChannelSize()
+ * fEdepMip);
+}
+
+//____________________________________________________________________
+void
+AliFMDMultNaiive::PreEvent(TTree* treeR, Float_t ipZ)
+{
+ // Reset internal data
+ AliFMDMultAlgorithm::PreEvent(treeR, ipZ);
+ fTreeR->Branch("FMDNaiive", &fMult);
+}
+
+//____________________________________________________________________
+void
+AliFMDMultNaiive::ProcessDigit(AliFMDDigit* digit,
+ Float_t eta,
+ Float_t phi,
+ UShort_t count)
+{
+ // Process one digit.
+ //
+ // Parameters:
+ //
+ // digit Digit to process
+ // eta Pseudo-rapidity of digit
+ // phi Azimuthal angle of digit
+ // count ADC (corrected for the pedestal)
+ //
+ // This calculates the energy deposited and the number of MIPs that
+ // this energy deposition corresponds to
+ //
+ // EnergyDeposited = cos(theta) * gain * count
+ // Multiplicity = EnergyDeposited / EnergyDepositedPerMIP
+ //
+ // where gain is a conversion factor from number of counts to an
+ // energy:
+ // Pre_Amp_MIP_Range 1
+ // gain = ----------------- * ---------------------
+ // ADC_channel_size EnergyDepositedPerMip
+ //
+ // and theta is the particles incident angle on the strip, given by
+ //
+ // theta = 2 * atan(exp(-eta))
+ //
+ // The cos(theta) factor corrects for the fact that the particle may
+ // traverse the strip at an angle, and therefor have a longer flight
+ // length, leading to a larger energy deposition.
+ //
+ if (!digit) return;
+ Double_t edep = Adc2Energy(digit, eta, count);
+ Double_t mult = Energy2Multiplicity(digit, edep);
+
+ new ((*fMult)[fNMult]) AliFMDMultStrip(digit->Detector(),
+ digit->Ring(),
+ digit->Sector(),
+ digit->Strip(),
+ eta, phi,
+ edep, mult,
+ AliFMDMult::kNaiive);
+ fNMult++;
+}
+//____________________________________________________________________
+Float_t
+AliFMDMultNaiive::Adc2Energy(AliFMDDigit* /* digit */,
+ Float_t eta,
+ UShort_t count)
+{
+ // Converts number of ADC counts to energy deposited.
+ // Note, that this member function can be overloaded by derived
+ // classes to do strip-specific look-ups in databases or the like,
+ // to find the proper gain for a strip.
+ //
+ // In this simple version, we calculate the energy deposited as
+ //
+ // EnergyDeposited = cos(theta) * gain * count
+ //
+ // where
+ //
+ // Pre_amp_MIP_Range
+ // gain = ----------------- * Energy_deposited_per_MIP
+ // ADC_channel_size
+ //
+ // is constant and the same for all strips.
+ Double_t theta = 2 * TMath::Tan(TMath::Exp(-eta));
+ Double_t edep = TMath::Cos(theta) * fGain * count;
+ return edep;
+}
+
+//____________________________________________________________________
+Float_t
+AliFMDMultNaiive::Energy2Multiplicity(AliFMDDigit* /* digit */,
+ Float_t edep)
+{
+ // Converts an energy signal to number of particles.
+ // Note, that this member function can be overloaded by derived
+ // classes to do strip-specific look-ups in databases or the like,
+ // to find the proper gain for a strip.
+ //
+ // In this simple version, we calculate the multiplicity as
+ //
+ // multiplicity = Energy_deposited / Energy_deposited_per_MIP
+ //
+ // where
+ //
+ // Energy_deposited_per_MIP = 1.664 * SI_density * SI_thickness
+ //
+ // is constant and the same for all strips
+ return edep / fEdepMip;
+}
+
+
+
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+#ifndef ALIFMDMULTNAIIVE_H
+#define ALIFMDMULTNAIIVE_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
+ * reserved.
+ *
+ * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
+ *
+ * See cxx source for full Copyright notice
+ */
+/* $Id$ */
+//____________________________________________________________________
+//
+// Class to do multiplicity reconstruction using the Naiive method.
+// That is, we count the number of empty strips in a region, and
+// derive the charge particle multiplicity from that number.
+//
+
+#ifndef ALIFMDMULTALGORITHM_H
+# include "AliFMDMultAlgorithm.h"
+#endif
+
+//____________________________________________________________________
+class AliFMDMultNaiive : public AliFMDMultAlgorithm
+{
+public:
+ AliFMDMultNaiive();
+ virtual ~AliFMDMultNaiive() {}
+
+ virtual void PreRun(AliFMD* fmd);
+ virtual void PreEvent(TTree* treeR, Float_t ipZ);
+ virtual void ProcessDigit(AliFMDDigit* digit,
+ Float_t eta,
+ Float_t phi,
+ UShort_t counts);
+ void SetGain(Float_t g) { fGain = g; }
+ void SetEdepMip(Float_t e) { fEdepMip = e; }
+ Float_t GetGain() const { return fGain; }
+ Float_t GetEdepMip() const { return fEdepMip; }
+protected:
+ Float_t Adc2Energy(AliFMDDigit* digit, Float_t eta, UShort_t count);
+ Float_t Energy2Multiplicity(AliFMDDigit* digit, Float_t edep);
+ Float_t fGain; // GeV per ADC count
+ Float_t fEdepMip; // Energy deposited per MIP
+
+ ClassDef(AliFMDMultNaiive, 0) // Naiive algorithm
+};
+
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+// EOF
+//
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//____________________________________________________________________
+//
+// Base class for FMD poisson algorithms.
+//
+// Derived classes will implement various ways of reconstructing the
+// charge particle multiplicity in the FMD.
+//
+#include "AliFMD.h" // ALIFMD_H
+#include "AliFMDMultPoisson.h" // ALIFMDMULTPOISSON_H
+#include "AliFMDMultRegion.h" // ALIFMDMULTREGION_H
+#include "AliFMDDigit.h" // ALIFMDDIGIT_H
+#include "AliLog.h" // ALILOG_H
+#include <TClonesArray.h> // ROOT_TClonesArray
+#include <TTree.h> // ROOT_TTree
+
+//____________________________________________________________________
+ClassImp(AliFMDMultPoisson);
+
+//____________________________________________________________________
+AliFMDMultPoisson::AliFMDMultPoisson()
+ : AliFMDMultAlgorithm("Poisson", "Poisson"),
+ fDeltaEta(0),
+ fDeltaPhi(0),
+ fThreshold(0)
+{
+ SetDeltaEta();
+ SetDeltaPhi();
+ SetThreshold();
+ fMult = new TClonesArray("AliFMDMultRegion", 1000);
+}
+
+//____________________________________________________________________
+void
+AliFMDMultPoisson::PreEvent(TTree* tree, Float_t ipZ)
+{
+ // Reset internal data
+ AliFMDMultAlgorithm::PreEvent(tree, ipZ);
+ fCurrentVertexZ = ipZ;
+ fEmpty.Clear(kFALSE);
+
+ // Make a branch in the reconstruction tree.
+ const Int_t kBufferSize = 16000;
+ fTreeR->Branch("FMDPoisson", &fMult, kBufferSize);
+
+}
+
+//____________________________________________________________________
+void
+AliFMDMultPoisson::ProcessDigit(AliFMDDigit* digit,
+ Float_t /* eta */,
+ Float_t /* phi */,
+ UShort_t count)
+{
+ // Process one digit.
+ //
+ // Parameters:
+ //
+ // digit Digit to process
+ // ipZ Z--coordinate of the primary interaction
+ // vertex of this event
+ //
+ if (!digit) return;
+ if (count < fThreshold) fEmpty(digit->Detector() - 1,
+ digit->Ring(),
+ digit->Sector(),
+ digit->Strip()) = kTRUE;
+}
+
+//____________________________________________________________________
+void
+AliFMDMultPoisson::PostEvent()
+{
+ // Fill the branch
+ // Based on the information in the cache, do the reconstruction.
+
+ // Loop over the detectors
+ for (Int_t i = 1; i <= 3; i++) {
+ AliFMDSubDetector* sub = 0;
+ switch (i) {
+ case 1: sub = fFMD->GetFMD1(); break;
+ case 2: sub = fFMD->GetFMD2(); break;
+ case 3: sub = fFMD->GetFMD3(); break;
+ }
+ if (!sub) continue;
+
+ // Loop over the rings in the detector
+ for (Int_t j = 0; j < 2; j++) {
+ Float_t rZ = 0;
+ AliFMDRing* r = 0;
+ switch (j) {
+ case 0: r = sub->GetInner(); rZ = sub->GetInnerZ(); break;
+ case 1: r = sub->GetOuter(); rZ = sub->GetOuterZ(); break;
+ }
+ if (!r) continue;
+
+ // Calculate low/high theta and eta
+ // FIXME: Is this right?
+ Float_t realZ = fCurrentVertexZ + rZ;
+ Float_t thetaOut = TMath::ATan2(r->GetHighR(), realZ);
+ Float_t thetaIn = TMath::ATan2(r->GetLowR(), realZ);
+ Float_t etaOut = - TMath::Log(TMath::Tan(thetaOut / 2));
+ Float_t etaIn = - TMath::Log(TMath::Tan(thetaIn / 2));
+ if (TMath::Abs(etaOut) > TMath::Abs(etaIn)) {
+ Float_t tmp = etaIn;
+ etaIn = etaOut;
+ etaOut = tmp;
+ }
+
+ //-------------------------------------------------------------
+ //
+ // Here starts poisson method
+ //
+ // Calculate eta step per strip, number of eta steps, number of
+ // phi steps, and check the sign of the eta increment
+ Float_t stripEta = (Float_t(r->GetNStrips()) / (etaIn - etaOut));
+ Int_t nEta = Int_t(TMath::Abs(etaIn - etaOut) / fDeltaEta);
+ Int_t nPhi = Int_t(360. / fDeltaPhi);
+ Float_t sign = TMath::Sign(Float_t(1.), etaIn);
+
+ AliDebug(10, Form("FMD%d%c Eta range: %f, %f %d Phi steps",
+ sub->GetId(), r->GetId(), etaOut, etaIn, nPhi));
+
+ // Loop over relevant phi values
+ for (Int_t p = 0; p < nPhi; p++) {
+ Float_t minPhi = p * fDeltaPhi;
+ Float_t maxPhi = minPhi + fDeltaPhi;
+ UShort_t minSector = UShort_t(minPhi / 360) * r->GetNSectors();
+ UShort_t maxSector = UShort_t(maxPhi / 360) * r->GetNSectors();
+
+ AliDebug(10, Form(" Now in phi range %f, %f (sectors %d,%d)",
+ minPhi, maxPhi, minSector, maxSector));
+ // Loop over relevant eta values
+ for (Int_t e = nEta; e >= 0; --e) {
+ Float_t maxEta = etaIn - sign * e * fDeltaEta;
+ Float_t minEta = maxEta - sign * fDeltaEta;
+ if (sign > 0) minEta = TMath::Max(minEta, etaOut);
+ else minEta = TMath::Min(minEta, etaOut);
+ Float_t theta1 = 2 * TMath::ATan(TMath::Exp(-minEta));
+ Float_t theta2 = 2 * TMath::ATan(TMath::Exp(-maxEta));
+ Float_t minR = TMath::Abs(realZ * TMath::Tan(theta2));
+ Float_t maxR = TMath::Abs(realZ * TMath::Tan(theta1));
+ UShort_t minStrip = UShort_t((etaIn - maxEta) * stripEta + 0.5);
+ UShort_t maxStrip = UShort_t((etaIn - minEta) * stripEta + 0.5);
+
+ AliDebug(10, Form(" Now in eta range %f, %f (strips %d, %d)\n"
+ " [radii %f, %f, thetas %f, %f, sign %d]",
+ minEta, maxEta, minStrip, maxStrip,
+ minR, maxR, theta1, theta2, sign));
+
+ // Count number of empty strips
+ Int_t emptyStrips = 0;
+ for (Int_t sector = minSector; sector < maxSector; sector++)
+ for (Int_t strip = minStrip; strip < maxStrip; strip++)
+ if (fEmpty(sub->GetId() - 1, r->GetId(), sector, strip))
+ emptyStrips++;
+
+ // The total number of strips
+ Float_t nTotal = (maxSector - minSector) * (maxStrip - minStrip);
+
+ // Log ratio of empty to total number of strips
+ AliDebug(10, Form("Lambda= %d / %d = %f",
+ emptyStrips, nTotal,
+ Float_t(emptyStrips) / nTotal));
+
+ Double_t lambda = (emptyStrips > 0 ?
+ - TMath::Log(Double_t(emptyStrips) / nTotal) :
+ 1);
+
+ // The reconstructed number of particles is then given by
+ Int_t reconstructed = Int_t(lambda * nTotal + 0.5);
+
+ // Add a AliFMDMultRegion to the reconstruction tree.
+ new((*fMult)[fNMult])
+ AliFMDMultRegion(sub->GetId(), r->GetId(),
+ minSector, maxSector, minStrip, maxStrip,
+ minEta, maxEta, minPhi, maxPhi,
+ reconstructed, AliFMDMultRegion::kPoission);
+ fNMult++;
+ } // phi
+ } // eta
+ } // ring
+ } // detector
+}
+
+
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+#ifndef ALIFMDMULTPOISSON_H
+#define ALIFMDMULTPOISSON_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
+ * reserved.
+ *
+ * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
+ *
+ * See cxx source for full Copyright notice
+ */
+/* $Id$ */
+//____________________________________________________________________
+//
+// Class to do multiplicity reconstruction using the Poisson method.
+// That is, we count the number of empty strips in a region, and
+// derive the charge particle multiplicity from that number.
+//
+
+#ifndef ALIFMDMULTALGORITHM_H
+# include "AliFMDMultAlgorithm.h"
+#endif
+#ifndef ALIFMDBOOLMAP_H
+# include "AliFMDBoolMap.h"
+#endif
+
+//____________________________________________________________________
+class AliFMDMultPoisson : public AliFMDMultAlgorithm
+{
+public:
+ AliFMDMultPoisson();
+ virtual ~AliFMDMultPoisson() {}
+
+ virtual void PreEvent(TTree* treeR, Float_t ipZ);
+ virtual void ProcessDigit(AliFMDDigit* digit,
+ Float_t eta,
+ Float_t phi,
+ UShort_t counts);
+ virtual void PostEvent();
+
+ void SetDeltaEta(Float_t deta=.1) { fDeltaEta = deta; }
+ void SetDeltaPhi(Float_t dphi=360) { fDeltaPhi = dphi; }
+ void SetThreshold(UShort_t t=6) { fThreshold = t; }
+protected:
+ AliFMDBoolMap fEmpty; //! Map of empty channels
+ Float_t fCurrentVertexZ; //! Current IP's Z-coordinate
+ Float_t fDeltaEta; // Bin size in eta
+ Float_t fDeltaPhi; // Bin size in phi
+ UShort_t fThreshold; // Threshold for Poisson recon.
+
+ ClassDef(AliFMDMultPoisson, 0) // Poisson algorithm
+};
+
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+// EOF
+//
// to fNumOfMaxRing and phi interval from fNumOfMinSector to
// fNumOfMaxSector
//
-#include "AliFMDParticles.h" // ALIFMDPARTICLES_H
-#include "Riostream.h" // ROOT_Riostream
+#include "AliFMDMultRegion.h" // ALIFMDPARTICLES_H
+#include <TString.h> // ROOT_TString
+#include <Riostream.h> // ROOT_Riostream
//____________________________________________________________________
-ClassImp(AliFMDParticles)
+ClassImp(AliFMDMultRegion);
+
//____________________________________________________________________
-AliFMDParticles::AliFMDParticles()
+AliFMDMultRegion::AliFMDMultRegion()
: fDetector(0),
fRing('\0'),
fMinSector(0),
fMinEta(0),
fMaxEta(0),
fMinPhi(0),
- fMaxPhi(0),
- fParticles(0),
- fMethod(kNaive)
+ fMaxPhi(0)
{}
//____________________________________________________________________
-AliFMDParticles::AliFMDParticles(UShort_t detector, Char_t ring,
- UShort_t minSector, UShort_t maxSector,
- UShort_t minStrip, UShort_t maxStrip,
- Float_t minEta, Float_t maxEta,
- Float_t minPhi, Float_t maxPhi,
- Float_t particles, UShort_t method)
- : fDetector(detector),
+AliFMDMultRegion::AliFMDMultRegion(UShort_t detector, Char_t ring,
+ UShort_t minSector, UShort_t maxSector,
+ UShort_t minStrip, UShort_t maxStrip,
+ Float_t minEta, Float_t maxEta,
+ Float_t minPhi, Float_t maxPhi,
+ Float_t particles, UShort_t method)
+ : AliFMDMult(particles, method),
+ fDetector(detector),
fRing(ring),
fMinSector(minSector),
fMaxSector(maxSector),
fMinEta(minEta),
fMaxEta(maxEta),
fMinPhi(minPhi),
- fMaxPhi(maxPhi),
- fParticles(particles),
- fMethod(method)
-{
- switch (fMethod) {
- case kPoission:
- case kIterative:
- case kNaive:
- break;
- default:
- Warning("AliFMDParticles", "unknown method: %d", method);
- break;
- }
-}
+ fMaxPhi(maxPhi)
+{}
//____________________________________________________________________
void
-AliFMDParticles::Print(Option_t* /* opt*/) const
+AliFMDMultRegion::Print(Option_t* option) const
{
- cout << "FMD Reconstructed particles: " << fParticles << "\n"
- << " Detector: FMD" << fDetector << fRing << "\n"
- << " Sector range: [" << fMinSector << "," << fMaxSector << "\n"
- << " Strip range: [" << fMinStrip << "," << fMaxStrip << "\n"
- << " Eta range: [" << fMinEta << "," << fMaxEta << "\n"
- << " Phi range: [" << fMinPhi << "," << fMaxPhi << "\n"
- << " Method: " << flush;
- switch (fMethod) {
- case kPoission: cout << "Poission" << endl; break;
- case kIterative: cout << "Iterative" << endl; break;
- case kNaive: cout << "Naive" << endl; break;
- default: cout << "Unknown" << endl; break;
- }
+ // Print information
+ //
+ // Options:
+ // D: Detector (default)
+ // S: Sector range
+ // T: Strip range
+ // E: Eta range (default)
+ // P: Phi range (default)
+ //
+ TString opt(option);
+ cout << "FMD Reconstructed particles: " << fParticles << endl;
+ if (opt.Contains("D", TString::kIgnoreCase))
+ cout << " Detector: FMD" << fDetector << fRing << endl;
+ if (opt.Contains("S", TString::kIgnoreCase))
+ cout << " Sector range: [" << fMinSector << "," << fMaxSector << endl;
+ if (opt.Contains("T", TString::kIgnoreCase))
+ cout << " Strip range: [" << fMinStrip << "," << fMaxStrip << endl;
+ if (opt.Contains("E", TString::kIgnoreCase))
+ cout << " Eta range: [" << fMinEta << "," << fMaxEta << endl;
+ if (opt.Contains("P", TString::kIgnoreCase))
+ cout << " Phi range: [" << fMinPhi << "," << fMaxPhi << endl;
+ AliFMDMult::Print(option);
}
--- /dev/null
+#ifndef ALIFMDMULTREGION_H
+#define ALIFMDMULTREGION_H
+
+/* Reconstracted Particles Class: has number of reconstructed
+ * particles in sectors from NumOfMinSector to NumberOfMaxSector()
+ * rings from NumOfMinRing to NumOfMaxRing for each FMDvolume
+ */
+#ifndef ALIFMDMULT_H
+# include "AliFMDMult.h"
+#endif
+
+class AliFMDMultRegion: public AliFMDMult
+{
+public:
+ AliFMDMultRegion();
+ AliFMDMultRegion (UShort_t detector, Char_t ring,
+ UShort_t minSector, UShort_t maxSector,
+ UShort_t minStrip, UShort_t maxStrip,
+ Float_t minEta, Float_t maxEta,
+ Float_t minPhi, Float_t maxPhi,
+ Float_t particles, UShort_t method);
+ virtual ~AliFMDMultRegion(){};
+
+ UShort_t Detector() const { return fDetector; }
+ Char_t Ring() const { return fRing; }
+ UShort_t MinSector() const { return fMinSector; }
+ UShort_t MaxSector() const { return fMaxSector; }
+ UShort_t MinStrip() const { return fMinStrip; }
+ UShort_t MaxStrip() const { return fMaxStrip; }
+ Float_t MinEta() const { return fMinEta; }
+ Float_t MaxEta() const { return fMaxEta; }
+ Float_t MinPhi() const { return fMinPhi; }
+ Float_t MaxPhi() const { return fMaxPhi; }
+ virtual void Print(Option_t* opt="") const;
+protected:
+ UShort_t fDetector; // Detector #
+ Char_t fRing; // Ring ID
+ UShort_t fMinSector; // First sector of this region
+ UShort_t fMaxSector; // Last sector of this region
+ UShort_t fMinStrip; // First strip of this region
+ UShort_t fMaxStrip; // Second strip of this region
+ Float_t fMinEta; // Least eta covered
+ Float_t fMaxEta; // Largest eta covered
+ Float_t fMinPhi; // Least phi covered
+ Float_t fMaxPhi; // Largest phi covered
+
+ ClassDef(AliFMDMultRegion,1) // Rec. Multiplicity in a eta,phi region
+};
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+// EOF
+//
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//____________________________________________________________________
+//
+// Forward Multiplicity Detector have to be reconstructed number of
+// particles in fixed pseudorapidity interval from fNumOfMinRing
+// to fNumOfMaxRing and phi interval from fNumOfMinSector to
+// fNumOfMaxSector
+//
+#include "AliFMDMultStrip.h" // ALIFMDMULTSTRIP_H
+#include <TString.h> // ROOT_TString
+#include <Riostream.h> // ROOT_Riostream
+
+//____________________________________________________________________
+ClassImp(AliFMDMultStrip);
+
+
+//____________________________________________________________________
+AliFMDMultStrip::AliFMDMultStrip()
+ : fDetector(0),
+ fRing('\0'),
+ fSector(0),
+ fStrip(0),
+ fEta(0),
+ fPhi(0),
+ fEdep(0)
+{}
+
+//____________________________________________________________________
+AliFMDMultStrip::AliFMDMultStrip(UShort_t detector, Char_t ring,
+ UShort_t sector, UShort_t strip,
+ Float_t eta, Float_t phi,
+ Float_t edep, Float_t particles,
+ UShort_t method)
+ : AliFMDMult(particles, method),
+ fDetector(detector),
+ fRing(ring),
+ fSector(sector),
+ fStrip(strip),
+ fEta(eta),
+ fPhi(phi),
+ fEdep(edep)
+{}
+
+
+//____________________________________________________________________
+void
+AliFMDMultStrip::Print(Option_t* option) const
+{
+ // Print information
+ //
+ // Options:
+ // D: Detector (default)
+ // E: Eta range (default)
+ // P: Phi range (default)
+ //
+ TString opt(option);
+ cout << "FMD Reconstructed particles: " << fParticles << endl;
+ if (opt.Contains("D", TString::kIgnoreCase))
+ cout << " Detector: FMD" << fDetector << fRing
+ << "[" << fSector << "," << fStrip << "]" << endl;
+ if (opt.Contains("E", TString::kIgnoreCase))
+ cout << " Eta range: " << fEta << endl;
+ if (opt.Contains("P", TString::kIgnoreCase))
+ cout << " Phi range: " << fPhi << endl;
+ AliFMDMult::Print(option);
+}
+
+
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+#ifndef ALIFMDMULTSTRIP_H
+#define ALIFMDMULTSTRIP_H
+
+/* Reconstracted Particles Class: has number of reconstructed
+ * particles in sectors from NumOfMinSector to NumberOfMaxSector()
+ * rings from NumOfMinRing to NumOfMaxRing for each FMDvolume
+ */
+#ifndef ALIFMDMULT_H
+# include "AliFMDMult.h"
+#endif
+
+class AliFMDMultStrip: public AliFMDMult
+{
+public:
+ AliFMDMultStrip();
+ AliFMDMultStrip (UShort_t detector, Char_t ring,
+ UShort_t sector, UShort_t strip,
+ Float_t eta, Float_t phi,
+ Float_t edep, Float_t particles,
+ UShort_t method);
+ virtual ~AliFMDMultStrip(){};
+
+ UShort_t Detector() const { return fDetector; }
+ Char_t Ring() const { return fRing; }
+ UShort_t Sector() const { return fSector; }
+ UShort_t Strip() const { return fStrip; }
+ Float_t Eta() const { return fEta; }
+ Float_t Phi() const { return fPhi; }
+ Float_t Edep() const { return fEdep; }
+ virtual void Print(Option_t* opt="") const;
+protected:
+ UShort_t fDetector; // Detector #
+ Char_t fRing; // Ring ID
+ UShort_t fSector; // Sector #
+ UShort_t fStrip; // Strip #
+ Float_t fEta; // Eta value
+ Float_t fPhi; // Phi value
+ Float_t fEdep; // Energy deposited
+
+ ClassDef(AliFMDMultStrip,1) // Rec. Multiplicity in a strip
+};
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+// EOF
+//
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/* $Id$ */
-
-//____________________________________________________________________
-//
-// Base class for FMD naiive algorithms.
-//
-// Derived classes will implement various ways of reconstructing the
-// charge particle multiplicity in the FMD.
-//
-#include "AliFMDNaiiveAlgorithm.h" // ALIFMDNAIIVEALGORITHM_H
-#include "AliFMDDigit.h" // ALIFMDDIGIT_H
-
-//____________________________________________________________________
-ClassImp(AliFMDNaiiveAlgorithm);
-
-//____________________________________________________________________
-AliFMDNaiiveAlgorithm::AliFMDNaiiveAlgorithm()
- : AliFMDReconstructionAlgorithm("Naiive", "Naiive")
-{}
-
-
-//____________________________________________________________________
-void
-AliFMDNaiiveAlgorithm::Reset()
-{
- // Reset internal data
- fTotal = 0;
- fEdep.Clear(0);
- fMultiplicity.Clear(0);
-}
-
-//____________________________________________________________________
-void
-AliFMDNaiiveAlgorithm::ProcessDigit(AliFMDDigit* digit,
- Float_t eta,
- Float_t phi,
- UShort_t count)
-{
- // Process one digit.
- //
- // Parameters:
- //
- // digit Digit to process
- // eta Pseudo-rapidity of digit
- // phi Azimuthal angle of digit
- // count ADC (corrected for the pedestal)
- //
- // This calculates the energy deposited and the number of MIPs that
- // this energy deposition corresponds to
- //
- // EnergyDeposited = cos(theta) * gain * count
- // Multiplicity = EnergyDeposited / EnergyDepositedPerMIP
- //
- // where gain is a conversion factor from number of counts to an
- // energy:
- // Pre_Amp_MIP_Range 1
- // gain = ----------------- * ---------------------
- // ADC_channel_size EnergyDepositedPerMip
- //
- // and theta is the particles incident angle on the strip, given by
- //
- // theta = 2 * atan * exp(-eta)
- //
- // The cos(theta) factor corrects for the fact that the particle may
- // traverse the strip at an angle, and therefor have a longer flight
- // length, leading to a larger energy deposition.
- //
- if (!digit) return;
- Double_t theta = 2 * TMath::Tan(TMath::Exp(- eta));
- Double_t edep = TMath::Cos(theta) * fGain * count;
- Double_t mult = edep / fEdepMip;
- fEdep(digit->Detector() - 1, digit->Ring(),
- digit->Setctor(), digit->Strip()) = edep;
- fMultiplicity(digit->Detector() - 1, digit->Ring(),
- digit->Setctor(), digit->Strip()) = mult;
-}
-
-
-//____________________________________________________________________
-//
-// EOF
-//
+++ /dev/null
-#ifndef ALIFMDPARTICLES_H
-#define ALIFMDPARTICLES_H
-
-/* Reconstracted Particles Class: has number of reconstructed
- * particles in sectors from NumOfMinSector to NumberOfMaxSector()
- * rings from NumOfMinRing to NumOfMaxRing for each FMDvolume
- */
-#ifndef ROOT_TObject
-# include <TObject.h>
-#endif
-
-class AliFMDParticles: public TObject
-{
-public:
- enum EMethod {
- kPoission,
- kIterative,
- kNaive
- };
-
- AliFMDParticles();
- AliFMDParticles (UShort_t detector, Char_t ring,
- UShort_t minSector, UShort_t maxSector,
- UShort_t minStrip, UShort_t maxStrip,
- Float_t minEta, Float_t maxEta,
- Float_t minPhi, Float_t maxPhi,
- Float_t particles, UShort_t method);
- virtual ~AliFMDParticles(){};
-
- UShort_t Detector() const { return fDetector; }
- Char_t Ring() const { return fRing; }
- UShort_t MinSector() const { return fMinSector; }
- UShort_t MaxSector() const { return fMaxSector; }
- UShort_t MinStrip() const { return fMinStrip; }
- UShort_t MaxStrip() const { return fMaxStrip; }
- Float_t MinEta() const { return fMinEta; }
- Float_t MaxEta() const { return fMaxEta; }
- Float_t MinPhi() const { return fMinPhi; }
- Float_t MaxPhi() const { return fMaxPhi; }
- Float_t Particles() const { return fParticles; }
- UShort_t Method() const { return fMethod; }
-
- virtual void Print(Option_t* opt="") const;
-protected:
- UShort_t fDetector; // Detector #
- Char_t fRing; // Ring ID
- UShort_t fMinSector; // First sector of this region
- UShort_t fMaxSector; // Last sector of this region
- UShort_t fMinStrip; // First strip of this region
- UShort_t fMaxStrip; // Second strip of this region
- Float_t fMinEta; // Least eta covered
- Float_t fMaxEta; // Largest eta covered
- Float_t fMinPhi; // Least phi covered
- Float_t fMaxPhi; // Largest phi covered
- Float_t fParticles; // Number of particles
- UShort_t fMethod; // Method use to get fParticles
-
- ClassDef(AliFMDParticles,2) // Reconstructed # or particles in a eta,phi region
-};
-#endif
-//____________________________________________________________________
-//
-// Local Variables:
-// mode: C++
-// End:
-//
-// EOF
-//
+++ /dev/null
-#ifndef ALIFMDPOISSONALGORITHM_H
-#define ALIFMDPOISSONALGORITHM_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
- * reserved.
- *
- * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
- *
- * See cxx source for full Copyright notice
- */
-/* $Id$ */
-//____________________________________________________________________
-//
-// Class to do multiplicity reconstruction using the Poisson method.
-// That is, we count the number of empty strips in a region, and
-// derive the charge particle multiplicity from that number.
-//
-
-#ifndef ROOT_TTask
-# include <TTask.h>
-#endif
-
-//____________________________________________________________________
-class AliFMDDigit;
-
-//____________________________________________________________________
-class AliFMDPoissonAlgorithm : public TNamed
-{
-public:
- AliFMDPoissonAlgorithm();
- virtual ~AliFMDPoissonAlgorithm() {}
-
- virtual void Reset();
- virtual void ProcessDigit(AliFMDDigit* digit, Float_t ipZ);
-
-protected:
- ClassDef(AliFMDPoissonAlgorithm, 0) // Poisson algorithm
-};
-
-#endif
-//____________________________________________________________________
-//
-// Local Variables:
-// mode: C++
-// End:
-//
-// EOF
-//
+#ifndef ALIFMDPOLYGON_H
+#define ALIFMDPOLYGON_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
* reserved.
*
*
* See cxx source for full Copyright notice
*/
-#ifndef ALIFMDPOLYGON_H
-#define ALIFMDPOLYGON_H
#ifndef ROOT_TVector2
# include <TVector2.h>
#endif
//
// Class to read ADC values from a AliRawReader object.
//
-#include "AliLog.h" // ALILOG_H
+#include <AliLog.h> // ALILOG_H
#include "AliFMD.h" // ALIFMD_H
#include "AliFMDDigit.h" // ALIFMDDIGIT_H
#include "AliFMDRawStream.h" // ALIFMDRAWSTREAM_H
#include "AliRawReader.h" // ALIRAWREADER_H
#include "AliFMDRawReader.h" // ALIFMDRAWREADER_H
-#include "TArrayI.h" // ROOT_TArrayI
+#include <TArrayI.h> // ROOT_TArrayI
// #include <TClonesArray.h> // ROOT_TClonesArray
//____________________________________________________________________
fFMD(fmd),
fReader(reader)
{
- SetSampleRate();
+ // Default CTOR
+ SetSampleRate(fmd->GetSampleRate());
}
void
AliFMDRawReader::Exec(Option_t*)
{
+ // Read raw data into the digits array
if (!fReader->ReadHeader()) {
Error("ReadAdcs", "Couldn't read header");
return;
//
//
#include "AliFMDRawStream.h" // ALIFMDRAWSTREAM_H
-#include "AliRawReader.h" // ALIRAWREADER_H
+#include <AliRawReader.h> // ALIRAWREADER_H
//____________________________________________________________________
ClassImp(AliFMDRawStream);
//
// Class to write ADC values to a raw data file
//
-#include "AliLog.h" // ALILOG_H
+#include <AliLog.h> // ALILOG_H
+#include <AliLoader.h> // ALILOADER_H
+#include <AliAltroBuffer.h> // ALIALTROBUFFER_H
#include "AliFMD.h" // ALIFMD_H
#include "AliFMDDigit.h" // ALIFMDDIGIT_H
#include "AliFMDRawWriter.h" // ALIFMDRAWREADER_H
-#include "AliAltroBuffer.h" // ALIALTROBUFFER_H
-#include "AliLoader.h" // ALILOADER_H
-#include "TArrayI.h" // ROOT_TArrayI
+#include <TArrayI.h> // ROOT_TArrayI
#include <TClonesArray.h> // ROOT_TClonesArray
//____________________________________________________________________
//
//____________________________________________________________________
-#include "AliFMD.h" // ALIFMD_H
-#include "AliFMDDigit.h" // ALIFMDDIGIT_H
-#include "AliFMDParticles.h" // ALIFMDPARTICLES_H
-#include "AliFMDReconstructor.h" // ALIFMDRECONSTRUCTOR_H
-#include "AliAltroBuffer.h" // ALIALTROBUFFER_H
-#include "AliLog.h" // ALILOG_H
-#include "AliRun.h" // ALIRUN_H
-#include "AliRunLoader.h" // ALIRUNLOADER_H
-#include "AliLoader.h" // ALILOADER_H
-#include "AliHeader.h" // ALIHEADER_H
-#include "AliGenEventHeader.h" // ALIGENEVENTHEADER_H
-#include "AliFMDRawStream.h" // ALIFMDRAWSTREAM_H
-#include "AliFMDRawReader.h" // ALIFMDRAWREADER_H
-#include "AliRawReader.h" // ALIRAWREADER_H
-#include "AliFMDReconstructionAlgorithm.h" // ALIFMDRECONSTRUCTIONALGORITHM_H
+#include <AliLog.h> // ALILOG_H
+#include <AliRun.h> // ALIRUN_H
+#include <AliRunLoader.h> // ALIRUNLOADER_H
+#include <AliLoader.h> // ALILOADER_H
+#include <AliHeader.h> // ALIHEADER_H
+#include <AliRawReader.h> // ALIRAWREADER_H
+#include <AliGenEventHeader.h> // ALIGENEVENTHEADER_H
+#include "AliFMD.h" // ALIFMD_H
+#include "AliFMDDigit.h" // ALIFMDDIGIT_H
+#include "AliFMDReconstructor.h" // ALIFMDRECONSTRUCTOR_H
+#include "AliFMDRawStream.h" // ALIFMDRAWSTREAM_H
+#include "AliFMDRawReader.h" // ALIFMDRAWREADER_H
+#include "AliFMDMultAlgorithm.h" // ALIFMDMULTALGORITHM_H
+#include "AliFMDMultPoisson.h" // ALIFMDMULTPOISSON_H
+#include "AliFMDMultNaiive.h" // ALIFMDMULTNAIIVE_H
//____________________________________________________________________
ClassImp(AliFMDReconstructor);
//____________________________________________________________________
AliFMDReconstructor::AliFMDReconstructor()
: AliReconstructor(),
- fDeltaEta(0),
- fDeltaPhi(0),
- fThreshold(0),
fPedestal(0),
fPedestalWidth(0),
fPedestalFactor(0)
{
// Make a new FMD reconstructor object - default CTOR.
- SetDeltaEta();
- SetDeltaPhi();
- SetThreshold();
SetPedestal();
- fParticles = new TClonesArray("AliFMDParticles", 1000);
fFMDLoader = 0;
fRunLoader = 0;
fFMD = 0;
+ fAlgorithms.Add(new AliFMDMultNaiive);
+ fAlgorithms.Add(new AliFMDMultPoisson);
}
//____________________________________________________________________
AliFMDReconstructor::AliFMDReconstructor(const AliFMDReconstructor& other)
: AliReconstructor(),
- fDeltaEta(0),
- fDeltaPhi(0),
- fThreshold(0),
fPedestal(0),
fPedestalWidth(0),
fPedestalFactor(0)
{
- // Make a new FMD reconstructor object - default CTOR.
- SetDeltaEta(other.fDeltaEta);
- SetDeltaPhi(other.fDeltaPhi);
- SetThreshold(other.fThreshold);
+ // Copy constructor
SetPedestal(other.fPedestal, other.fPedestalWidth, other.fPedestalFactor);
- // fParticles = new TClonesArray("AliFMDParticles", 1000);
fFMDLoader = other.fFMDLoader;
fRunLoader = other.fRunLoader;
fFMD = other.fFMD;
+
+ fAlgorithms.Delete();
+ TIter next(&(other.fAlgorithms));
+ AliFMDMultAlgorithm* algorithm = 0;
+ while ((algorithm = static_cast<AliFMDMultAlgorithm*>(next())))
+ fAlgorithms.Add(algorithm);
+ fAlgorithms.SetOwner(kFALSE);
}
AliFMDReconstructor&
AliFMDReconstructor::operator=(const AliFMDReconstructor& other)
{
- // Make a new FMD reconstructor object - default CTOR.
- SetDeltaEta(other.fDeltaEta);
- SetDeltaPhi(other.fDeltaPhi);
- SetThreshold(other.fThreshold);
- SetPedestal(other.fPedestal, other.fPedestalWidth);
+ // Assignment operator
+ SetPedestal(other.fPedestal, other.fPedestalWidth, other.fPedestalFactor);
- // fParticles = new TClonesArray("AliFMDParticles", 1000);
fFMDLoader = other.fFMDLoader;
fRunLoader = other.fRunLoader;
fFMD = other.fFMD;
+ fAlgorithms.Delete();
+ TIter next(&(other.fAlgorithms));
+ AliFMDMultAlgorithm* algorithm = 0;
+ while ((algorithm = static_cast<AliFMDMultAlgorithm*>(next())))
+ fAlgorithms.Add(algorithm);
+ fAlgorithms.SetOwner(kFALSE);
+
return *this;
}
+
+//____________________________________________________________________
+AliFMDReconstructor::~AliFMDReconstructor()
+{
+ // Destructor
+ fAlgorithms.Delete();
+}
//____________________________________________________________________
void
//
// The reconstruction method is choosen based on the number of empty
// strips.
- fParticles->Clear();
if (!runLoader) {
Error("Exec","Run Loader loader is NULL - Session not opened");
return;
if (!fRunLoader->TreeE()) fRunLoader->LoadHeader();
+ TIter next(&fAlgorithms);
+ AliFMDMultAlgorithm* algorithm = 0;
+ while ((algorithm = static_cast<AliFMDMultAlgorithm*>(next())))
+ algorithm->PreRun(fFMD);
+
if (rawReader) {
Int_t event = 0;
while (rawReader->NextEvent()) {
ProcessEvent(event, 0);
}
+ next.Reset();
+ algorithm = 0;
+ while ((algorithm = static_cast<AliFMDMultAlgorithm*>(next())))
+ algorithm->PostRun();
fFMDLoader->UnloadRecPoints();
fFMDLoader = 0;
// If the recontruction tree isn't loaded, load it
if(fFMDLoader->TreeR()==0) fFMDLoader->MakeTree("R");
- //Make branches to hold the reconstructed particles
- const Int_t kBufferSize = 16000;
- fFMDLoader->TreeR()->Branch("FMD", &fParticles, kBufferSize);
-
// Load or recreate the digits
if (fFMDLoader->LoadDigits((reader ? "UPDATE" : "READ"))) {
if (!reader) {
}
TIter next(&fAlgorithms);
- AliFMDReconstructionAlgorithm* algorithm = 0;
- while ((algorithm = static_cast<AliFMDReconstructionAlgorithm*>(next())))
- algorithm->PreEvent();
+ AliFMDMultAlgorithm* algorithm = 0;
+ while ((algorithm = static_cast<AliFMDMultAlgorithm*>(next())))
+ algorithm->PreEvent(fFMDLoader->TreeR(), fCurrentVertex);
ProcessDigits(digits);
next.Reset();
algorithm = 0;
- while ((algorithm = static_cast<AliFMDReconstructionAlgorithm*>(next())))
+ while ((algorithm = static_cast<AliFMDMultAlgorithm*>(next())))
algorithm->PostEvent();
if (reader) {
}
Float_t realZ = fCurrentVertex + ringZ;
- Float_t stripR = ((ring->GetHighR() - ring->GetLowR()) / ring->GetNStrips()
- * (digit->Strip() + .5) + ring->GetLowR());
+ Float_t stripR = ((ring->GetHighR() - ring->GetLowR())
+ / ring->GetNStrips() * (digit->Strip() + .5)
+ + ring->GetLowR());
Float_t theta = TMath::ATan2(stripR, realZ);
Float_t phi = (2 * TMath::Pi() / ring->GetNSectors()
* (digit->Sector() + .5));
UShort_t counts = SubtractPedestal(digit);
TIter next(&fAlgorithms);
- AliFMDReconstructionAlgorithm* algorithm = 0;
- while ((algorithm = static_cast<AliFMDReconstructionAlgorithm*>(next())))
+ AliFMDMultAlgorithm* algorithm = 0;
+ while ((algorithm = static_cast<AliFMDMultAlgorithm*>(next())))
algorithm->ProcessDigit(digit, eta, phi, counts);
}
}
-
-//____________________________________________________________________
-void
-AliFMDReconstructor::ReconstructFromCache() const
-{
- // Based on the information in the cache, do the reconstruction.
- Int_t nRecon = 0;
- // Loop over the detectors
- for (Int_t i = 1; i <= 3; i++) {
- AliFMDSubDetector* sub = 0;
- switch (i) {
- case 1: sub = fFMD->GetFMD1(); break;
- case 2: sub = fFMD->GetFMD2(); break;
- case 3: sub = fFMD->GetFMD3(); break;
- }
- if (!sub) continue;
-
- // Loop over the rings in the detector
- for (Int_t j = 0; j < 2; j++) {
- Float_t rZ = 0;
- AliFMDRing* r = 0;
- switch (j) {
- case 0: r = sub->GetInner(); rZ = sub->GetInnerZ(); break;
- case 1: r = sub->GetOuter(); rZ = sub->GetOuterZ(); break;
- }
- if (!r) continue;
-
- // Calculate low/high theta and eta
- // FIXME: Is this right?
- Float_t realZ = fCurrentVertex + rZ;
- Float_t thetaOut = TMath::ATan2(r->GetHighR(), realZ);
- Float_t thetaIn = TMath::ATan2(r->GetLowR(), realZ);
- Float_t etaOut = - TMath::Log(TMath::Tan(thetaOut / 2));
- Float_t etaIn = - TMath::Log(TMath::Tan(thetaIn / 2));
- if (TMath::Abs(etaOut) > TMath::Abs(etaIn)) {
- Float_t tmp = etaIn;
- etaIn = etaOut;
- etaOut = tmp;
- }
-
- //-------------------------------------------------------------
- //
- // Here starts poisson method
- //
- // Calculate eta step per strip, number of eta steps, number of
- // phi steps, and check the sign of the eta increment
- Float_t stripEta = (Float_t(r->GetNStrips()) / (etaIn - etaOut));
- Int_t nEta = Int_t(TMath::Abs(etaIn - etaOut) / fDeltaEta);
- Int_t nPhi = Int_t(360. / fDeltaPhi);
- Float_t sign = TMath::Sign(Float_t(1.), etaIn);
-
- AliDebug(10, Form("FMD%d%c Eta range: %f, %f %d Phi steps",
- sub->GetId(), r->GetId(), etaOut, etaIn, nPhi));
-
- // Loop over relevant phi values
- for (Int_t p = 0; p < nPhi; p++) {
- Float_t minPhi = p * fDeltaPhi;
- Float_t maxPhi = minPhi + fDeltaPhi;
- UShort_t minSector = UShort_t(minPhi / 360) * r->GetNSectors();
- UShort_t maxSector = UShort_t(maxPhi / 360) * r->GetNSectors();
-
- AliDebug(10, Form(" Now in phi range %f, %f (sectors %d,%d)",
- minPhi, maxPhi, minSector, maxSector));
- // Loop over relevant eta values
- for (Int_t e = nEta; e >= 0; --e) {
- Float_t maxEta = etaIn - sign * e * fDeltaEta;
- Float_t minEta = maxEta - sign * fDeltaEta;
- if (sign > 0) minEta = TMath::Max(minEta, etaOut);
- else minEta = TMath::Min(minEta, etaOut);
- Float_t theta1 = 2 * TMath::ATan(TMath::Exp(-minEta));
- Float_t theta2 = 2 * TMath::ATan(TMath::Exp(-maxEta));
- Float_t minR = TMath::Abs(realZ * TMath::Tan(theta2));
- Float_t maxR = TMath::Abs(realZ * TMath::Tan(theta1));
- UShort_t minStrip = UShort_t((etaIn - maxEta) * stripEta + 0.5);
- UShort_t maxStrip = UShort_t((etaIn - minEta) * stripEta + 0.5);
-
- AliDebug(10, Form(" Now in eta range %f, %f (strips %d, %d)\n"
- " [radii %f, %f, thetas %f, %f, sign %d]",
- minEta, maxEta, minStrip, maxStrip,
- minR, maxR, theta1, theta2, sign));
-
- // Count number of empty strips
- Int_t emptyStrips = 0;
- for (Int_t sector = minSector; sector < maxSector; sector++)
- for (Int_t strip = minStrip; strip < maxStrip; strip++) emptyStrips++;
- // if (fAdcs(sub->GetId() - 1, r->GetId(), sector, strip)
- // < fThreshold) emptyStrips++;
-
- // The total number of strips
- Float_t nTotal = (maxSector - minSector) * (maxStrip - minStrip);
-
- // Log ratio of empty to total number of strips
- AliDebug(10, Form("Lambda= %d / %d = %f",
- emptyStrips, nTotal,
- Float_t(emptyStrips) / nTotal));
-
- Double_t lambda = (emptyStrips > 0 ?
- - TMath::Log(Double_t(emptyStrips) / nTotal) :
- 1);
-
- // The reconstructed number of particles is then given by
- Int_t reconstructed = Int_t(lambda * nTotal + 0.5);
-
- // Add a AliFMDParticles to the reconstruction tree.
- new((*fParticles)[nRecon])
- AliFMDParticles(sub->GetId(), r->GetId(),
- minSector, maxSector, minStrip, maxStrip,
- minEta, maxEta, minPhi, maxPhi,
- reconstructed, AliFMDParticles::kPoission);
- nRecon++;
- } // phi
- } // eta
- } // ring
- } // detector
-}
-
//____________________________________________________________________
void
#ifndef ROOT_TObjArray
# include <TObjArray.h>
#endif
-// #ifndef ALIFMDUSHORTMAP_H
-// # include <AliFMDUShortMap.h>
-// #endif
//____________________________________________________________________
class TClonesArray;
class AliFMDDigit;
class AliRawReader;
-// typedef AliFMDUShortMap AliFMDAdcMap;
-
-
//____________________________________________________________________
class AliFMDReconstructor: public AliReconstructor
{
public:
AliFMDReconstructor();
AliFMDReconstructor(const AliFMDReconstructor& other);
- virtual ~AliFMDReconstructor() {}
+ virtual ~AliFMDReconstructor();
AliFMDReconstructor& operator=(const AliFMDReconstructor& other);
- void SetDeltaEta(Float_t deta=.1) { fDeltaEta = deta; }
- void SetDeltaPhi(Float_t dphi=360) { fDeltaPhi = dphi; }
- void SetThreshold(UShort_t t=6) { fThreshold = t; }
void SetPedestal(Float_t mean=10, Float_t width=1, Float_t f=3);
virtual void Reconstruct(AliRunLoader* runLoader) const;
AliRawReader* rawReader) const;
virtual void ProcessDigits(TClonesArray* digits) const;
virtual UShort_t SubtractPedestal(AliFMDDigit* digit) const;
- virtual void ReconstructFromCache() const;
- mutable AliRunLoader* fRunLoader; // Run loader
- mutable AliLoader* fFMDLoader; // FMD specific loader
- mutable TClonesArray* fParticles; // Array of particles
- mutable AliFMD* fFMD; // Pointer to FMD manager
+ mutable AliRunLoader* fRunLoader; //! Run loader
+ mutable AliLoader* fFMDLoader; //! FMD specific loader
+ mutable AliFMD* fFMD; //! Pointer to FMD manager
TObjArray fAlgorithms; // Array of algorithms
- Float_t fDeltaEta; // Bin size in eta
- Float_t fDeltaPhi; // Bin size in phi
- UShort_t fThreshold; // Threshold for Poisson recon.
Float_t fPedestal; // Pedestal to subtract
Float_t fPedestalWidth; // Width of pedestal
Float_t fPedestalFactor;// Number of pedestal widths
- mutable Int_t fEmptyStrips; // Number of empty strips
- mutable Int_t fTotalStrips; // Total number of strips
mutable Float_t fCurrentVertex; // Z-coordinate of primary vertex
- enum {
- kMaxDetectors = 3, // Maximum number of sub-det.
- kMaxRings = 2, // Maximum number of rings
- kMaxSectors = 40, // Maximum number of sectors
- kMaxStrips = 512 // Maximum number of strips
- };
-
ClassDef(AliFMDReconstructor, 0) // class for the FMD reconstruction
};
#endif
// Latest changes by Christian Holm Christensen
//
-#include <math.h>
-
+#include <AliLog.h> // ALILOG_H
#include "AliFMDRing.h" // ALIFMDRING_H
-#include "AliLog.h" // ALILOG_H
-#include "TMath.h" // ROOT_TMath
-#include "TH2.h" // ROOT_TH2
-#include "TVirtualMC.h" // ROOT_TVirtualMC
-#include "TVector2.h" // ROOT_TVector2
-#include "TBrowser.h" // ROOT_TBrowser
-#include "TString.h" // ROOT_TString
-#include "TArc.h" // ROOT_TArc
-#include "TObjArray.h" // ROOT_TObjArray
-#include "TXTRU.h" // ROOT_TXTRU
-#include "TNode.h" // ROOT_TNode
-#include "TRotMatrix.h" // ROOT_TRotMatrix
-#include "TList.h" // ROOT_TList
+#include <TMath.h> // ROOT_TMath
+#include <TH2.h> // ROOT_TH2
+#include <TVirtualMC.h> // ROOT_TVirtualMC
+#include <TVector2.h> // ROOT_TVector2
+#include <TBrowser.h> // ROOT_TBrowser
+#include <TString.h> // ROOT_TString
+#include <TArc.h> // ROOT_TArc
+#include <TObjArray.h> // ROOT_TObjArray
+#include <TXTRU.h> // ROOT_TXTRU
+#include <TNode.h> // ROOT_TNode
+#include <TRotMatrix.h> // ROOT_TRotMatrix
+#include <TList.h> // ROOT_TList
const Char_t* AliFMDRing::fgkRingFormat = "FRG%c";
const Char_t* AliFMDRing::fgkVirtualFormat = "FV%c%c";
double xD = fLowR + TMath::Sqrt(r2 - tanTheta2 * lr2);
double xD2 = TMath::Power(xD,2);
//double xD_2 = fLowR - TMath::Sqrt(r2 - tanTheta2 * lr2);
- double yB = sqrt(r2 - hr2 + 2 * fHighR * xD - xD2);
+ double yB = TMath::Sqrt(r2 - hr2 + 2 * fHighR * xD - xD2);
double xC = ((xD + TMath::Sqrt(-tanTheta2 * xD2 + r2
+ r2 * tanTheta2))
/ (1 + tanTheta2));
#include "AliFMDSubDetector.h" // ALIFMDSUBDETECTOR_H
#include "AliFMDRing.h" // ALIFMDRING_H
-#include "AliLog.h" // ALILOG_H
-#include "TVirtualMC.h" // ROOT_TVirtualMC
-#include "TList.h" // ROOT_TList
-#include "TString.h" // ROOT_TString
+#include <AliLog.h> // ALILOG_H
+#include <TVirtualMC.h> // ROOT_TVirtualMC
+#include <TList.h> // ROOT_TList
+#include <TString.h> // ROOT_TString
ClassImp(AliFMDSubDetector);
//
// See also the class AliFMD for a more detailed explanation of the
// various componets.
-#include "TVirtualMC.h" // ROOT_TVirtualMC
+#include <TVirtualMC.h> // ROOT_TVirtualMC
+#include <AliRun.h> // ALIRUN_H
+#include <AliMC.h> // ALIMC_H
+#include <AliLog.h> // ALILOG_H
#include "AliFMDv1.h" // ALIFMDV1_H
-#include "AliRun.h" // ALIRUN_H
-#include "AliMC.h" // ALIMC_H
-#include "AliLog.h" // ALILOG_H
//____________________________________________________________________
ClassImp(AliFMDv1);
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/* $Id$ */
-
-// Script to do test the FMD digitization class.
-void
-Digitize()
-{
- // Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- }
- if (gAlice) {
- delete gAlice;
- gAlice = 0;
- }
-
- AliRunDigitizer * manager = new AliRunDigitizer(1,1);
- manager->SetInputStream(0,"galice.root");
- AliFMDDigitizer *FMD = new AliFMDDigitizer(manager);
- manager->Exec("");
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/* $Id$ */
-
-// Script to do test the FMD digitization class.
-void
-Document()
-{
- gEnv->SetValue("Root.Html.SourceDir", "$(ALICE)/FMD");
- gEnv->SetValue("Root.Html.OutputDir", "$(ALICE)/FMD/html");
-
- gSystem->MakeDirectory("$(ALICE)/FMD/html");
-
- THtml* html = new THtml;
- html->MakeAll(kFALSE, "AliFMD*");
- html->Convert("$(ALICE)/FMD/Digitize.C", "Digitize",
- "FMD/html/src");
- html->Convert("$(ALICE)/FMD/Reconstruct.C", "Reconstruct",
- "FMD/html/src");
- html->Convert("$(ALICE)/FMD/Simulate.C", "Simulate",
- "FMD/html/src");
- html->Convert("$(ALICE)/FMD/DrawFMD.C", "DrawFMD",
- "FMD/html/src");
- html->Convert("$(ALICE)/FMD/ViewFMD.C", "ViewFMD",
- "FMD/html/src");
- html->MakeIndex("AliFMD*");
-
- std::ofstream index("FMD/html/index.html");
- html->WriteHtmlHeader(index, "ALICE FMD Code - Index page");
-
- index << "<h1>ALICE FMD Code</h1>\n"
- << "<ul>\n"
- << "<li><a href=\"USER_Index.html\">Classes</a></li>\n"
- << "<li><a href=\"src/Digitize.C.html\">Digitize script</a></li>\n"
- << "<li><a href=\"src/Reconstruct.C.html\">Reconstruct script</a></li>\n"
- << "<li><a href=\"src/Simulate.C.html\">Simulate script</a></li>\n"
- << "<li><a href=\"src/DrawFMD.C.html\">DrawFMD script</a></li>\n"
- << "<li><a href=\"src/ViewFMD.C.html\">ViewFMD script</a></li>\n"
- << "</ul>\n"
- << std::endl;
- html->WriteHtmlFooter(index, "", "", "", "");
- index.close();
-}
-
-//
-// EOF
-//
#pragma link C++ class AliFMDBaseDigit+;
#pragma link C++ class AliFMDDigit+;
#pragma link C++ class AliFMDSDigit+;
+#pragma link C++ class AliFMDMap+;
#else
# error Not for compilation
// #pragma link C++ class AliFMDMap<UShort_t>;
// #pragma link C++ typedef AliFMDAdcMap;
#pragma link C++ class AliFMDUShortMap+;
-// #pragma link C++ typedef AliFMDAdcMap;
+#pragma link C++ class AliFMDBoolMap+;
#pragma link C++ class AliFMDReconstructor+;
-#pragma link C++ class AliFMDReconstructionAlgorithm+;
-#pragma link C++ class AliFMDParticles+;
+#pragma link C++ class AliFMDMultAlgorithm+;
+#pragma link C++ class AliFMDMultNaiive+;
+#pragma link C++ class AliFMDMultPoisson+;
+#pragma link C++ class AliFMDMult+;
+#pragma link C++ class AliFMDMultRegion+;
+#pragma link C++ class AliFMDMultStrip+;
#pragma link C++ class AliFMDRawStream+;
#pragma link C++ class AliFMDRawReader+;
// #pragma link C++ class std::pair<Float_t,UShort_t>;
// #pragma link C++ class AliFMDMap<std::pair<Float_t,UShort_t> >;
// #pragma link C++ typedef AliFMDEdepMap;
-#pragma link C++ class AliFMDMap+;
#pragma link C++ class AliFMDEdepMap+;
#pragma link C++ class AliFMDHit+;
#pragma link C++ class AliFMD+;
+++ /dev/null
-#include <iomanip>
-
-void
-ReadRaw(Int_t det=2, bool verbose=false, Int_t event=0)
-{
- TString file(Form("raw%d/FMD_%d.ddl", event, AliFMD::kBaseDDL + det - 1));
-
- std::cout << "Reading raw data file " << file << std::endl;
-
- TH1* h = new TH1F("rawData", "Raw Data", 90, 0, 90);
-
-
- // This method creates a text file containing the same information
- // stored in an Altro file. The information in the text file is
- // organized pad by pad and and for each pad it consists in a
- // sequence of bunches (Bunch length +2, Time bin of the last
- // amplitude sample in the bunch, amplitude values) It is used
- // mainly //for debugging
-
- AliAltroBuffer buff(file.Data(),0);
- Int_t numWords,padNum,rowNum,secNum=0;
- Int_t value = 0;
- Int_t zero = 0;
- // if (!buff.ReadDataHeader()) {
- // std::cout<< file << " isn't a valid data file!" << std::endl;
- // }
-
- while(buff.ReadTrailerBackward(numWords,padNum,rowNum,secNum)){
- if (verbose)
- std::cout << "Ring: " << (secNum == 0 ? 'I' : 'O')
- << " Sector: " << std::setw(2) << rowNum
- << " Strip: " << std::setw(3) << padNum
- << " Words: " << std::setw(4) << numWords << std::endl;
- if (numWords == 0) zero++;
- if (numWords % 4){
- if (verbose)
- std::cout << "Skipping trailer of "
- << (4 - numWords % 4) << " words" << std::endl;
- for(Int_t j = 0; j < (4 - numWords % 4); j++)
- value=buff.GetNextBackWord();
- }//end if
- for(Int_t i = 0; i <numWords; i++) {
- value=buff.GetNextBackWord();
- if (verbose) {
- std::cout << std::setw(5) << value << std::flush;
- if (i % 16 == 15) std::cout << std::endl;
- }
- h->Fill(value);
- }//end for
- if (verbose)
- std::cout << std::endl;
- if (zero > 1) {
- std::cout << "Error: Read zero channels - should not happen"
- << std::endl;
- break;
- }
- }//end while
- h->Draw();
- return;
-}
AliReconstruction rec;
rec.SetRunLocalReconstruction("FMD");
rec.SetRunVertexFinder(kFALSE);
- rec.SetRunTracking(kFALSE);
+ // rec.SetRunTracking(kFALSE);
rec.SetFillESD("");
rec.SetInput("./");
rec.Run();
#
# $Id$
-SRCS = AliFMDDigit.cxx
+SRCS = AliFMDDigit.cxx \
+ AliFMDMap.cxx
HDRS = $(SRCS:.cxx=.h)
DHDR := FMDbaseLinkDef.h
#
# $Id$
-SRCS = AliFMDReconstructor.cxx \
- AliFMDReconstructionAlgorithm.cxx \
- AliFMDRawStream.cxx \
- AliFMDRawReader.cxx \
- AliFMDParticles.cxx \
- AliFMDUShortMap.cxx
+SRCS = AliFMDReconstructor.cxx \
+ AliFMDRawStream.cxx \
+ AliFMDRawReader.cxx \
+ AliFMDMultAlgorithm.cxx \
+ AliFMDMultNaiive.cxx \
+ AliFMDMultPoisson.cxx \
+ AliFMDMultRegion.cxx \
+ AliFMDMult.cxx \
+ AliFMDMultStrip.cxx \
+ AliFMDUShortMap.cxx \
+ AliFMDBoolMap.cxx
HDRS = $(SRCS:.cxx=.h)
DHDR := FMDrecLinkDef.h
EINCLUDE := $(ALICE)/RAW
AliFMDPolygon.cxx \
AliFMDHit.cxx \
AliFMDDigitizer.cxx \
- AliFMDMap.cxx \
AliFMDEdepMap.cxx \
AliFMDRawWriter.cxx
HDRS = $(SRCS:.cxx=.h)
--- /dev/null
+Compare.C
+Config.C.all
+Config.C.keep
+Digitize.C
+Document.C
+LsHits.C
+MakeMap.C
+RawTest.C
+ReadRaw.C
+ShowDigits.C
+ShowHits.C
+old
+runIt.C
+runflukageo.sh
+rungeant3geo.sh
+va1_train.C