#include <AliRun.h> // ALIRUN_H
#include <AliMC.h> // ALIMC_H
#include <AliMagF.h> // ALIMAGF_H
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
+#include "AliFMDDebug.h" // Better debug macros
#include "AliFMD.h" // ALIFMD_H
#include "AliFMDDigit.h" // ALIFMDDIGIT_H
#include "AliFMDSDigit.h" // ALIFMDSDIGIT_H
//
// Default constructor for class AliFMD
//
- AliDebug(10, "\tDefault CTOR");
+ AliFMDDebug(10, ("\tDefault CTOR"));
fHits = 0;
fDigits = 0;
fIshunt = 0;
//
// Standard constructor for Forward Multiplicity Detector
//
- AliDebug(10, "\tStandard CTOR");
+ AliFMDDebug(10, ("\tStandard CTOR"));
fBad = new TClonesArray("AliFMDHit");
// Initialise Hit array
// TGeoManager, and registers the mediums here. Alas, it's not
// really that easy.
//
- AliDebug(10, "\tCreating materials");
+ AliFMDDebug(10, ("\tCreating materials"));
// Get pointer to geometry singleton object.
AliFMDGeometry* geometry = AliFMDGeometry::Instance();
geometry->Init();
{
// Initialize the detector
//
- AliDebug(1, "Initialising FMD detector object");
+ AliFMDDebug(1, ("Initialising FMD detector object"));
// AliFMDGeometry* fmd = AliFMDGeometry::Instance();
// fmd->InitTransformations();
}
//
// Build simple ROOT TNode geometry for event display. With the new
// geometry modeller, TGeoManager, this seems rather redundant.
- AliDebug(10, "\tCreating a simplified geometry");
+ AliFMDDebug(10, ("\tCreating a simplified geometry"));
AliFMDGeometry* fmd = AliFMDGeometry::Instance();
{
// Draw a shaded view of the Forward multiplicity detector. This
// isn't really useful anymore.
- AliDebug(10, "\tDraw detector");
+ AliFMDDebug(10, ("\tDraw detector"));
}
//____________________________________________________________________
&& hit->Sector() == sector
&& hit->Strip() == strip
&& hit->Track() == track) {
- AliDebug(1, Form("already had a hit in FMD%d%c[%2d,%3d] for track # %d,"
+ AliFMDDebug(1, ("already had a hit in FMD%d%c[%2d,%3d] for track # %d,"
" adding energy (%f) to that hit (%f) -> %f",
detector, ring, sector, strip, track, edep, hit->Edep(),
hit->Edep() + edep));
new (a[fNdigits++])
AliFMDDigit(detector, ring, sector, strip, count1, count2, count3);
+ AliFMDDebug(15, ("Adding digit # %5d/%5d for FMD%d%c[%2d,%3d]=(%d,%d,%d)",
+ fNdigits-1, a.GetEntriesFast(),
+ detector, ring, sector, strip, count1, count2, count3));
+
}
//____________________________________________________________________
{
// Browse this object.
//
- AliDebug(30, "\tBrowsing the FMD");
+ AliFMDDebug(30, ("\tBrowsing the FMD"));
AliDetector::Browse(b);
b->Add(AliFMDGeometry::Instance());
}
#include <TMath.h> // ROOT_TMath
#include "AliFMD3.h" // ALIFMD3_H
-#include "AliLog.h" // ALILOG_H
+#include "AliFMDDebug.h" // ALIFMDDEBUG_H ALILOG_H
#include "AliFMDRing.h" // ALIFMDRING_H
//====================================================================
// storage `local://cdb' which is a directory in the current
// directory.
//
-#include "AliLog.h" // ALILOG_H
+#include "AliFMDDebug.h" // ALIFMDDEBUG_H ALILOG_H
#include "AliFMDAlignFaker.h" // ALIFMDALIGNFAKER_H
#include <AliCDBManager.h> // ALICDBMANAGER_H
#include <AliCDBStorage.h> // ALICDBSTORAGE_H
alignName.Data(), path.Data()));
alignName = path;
}
- AliDebug(1, Form("Making alignment for %s -> %s (%d)",
+ AliFMDDebug(1, ("Making alignment for %s -> %s (%d)",
alignName.Data(), path.Data(), id));
if (IS_NODE_HALF(name)) MakeAlignHalf(alignName, id);
if (IS_NODE_SENSOR(name)) MakeAlignSensor(alignName, id);
// rotX Rotation about X-axis
// rotY Rotation about Y-axis
// rotZ Rotation about Z-axis
- AliDebug(3, Form("Make alignment for %s (volume %d): (%f,%f,%f) (%f,%f,%f)",
+ AliFMDDebug(3, ("Make alignment for %s (volume %d): (%f,%f,%f) (%f,%f,%f)",
path.Data(), id, transX, transY, transZ, rotX, rotY, rotZ));
Int_t nAlign = fArray->GetEntries();
id = 0;
AliFMDAlignFaker::MakeAlignHalf(const TString& path, Int_t id)
{
// Make alignment of a half ring/cone
- AliDebug(15, Form("Make alignment for half-ring/cone %s", path.Data()));
+ AliFMDDebug(15, ("Make alignment for half-ring/cone %s", path.Data()));
Double_t transX = gRandom->Uniform(fHalfTransMin.X(), fHalfTransMax.X());
Double_t transY = gRandom->Uniform(fHalfTransMin.Y(), fHalfTransMax.Y());
Double_t transZ = gRandom->Uniform(fHalfTransMin.Z(), fHalfTransMax.Z());
AliFMDAlignFaker::MakeAlignSensor(const TString& path, Int_t id)
{
// Make alignment of a sensor
- AliDebug(15, Form("Make alignment for sensor %s", path.Data()));
+ AliFMDDebug(15, ("Make alignment for sensor %s", path.Data()));
Double_t transX = gRandom->Uniform(fSensorTransMin.X(), fSensorTransMax.X());
Double_t transY = gRandom->Uniform(fSensorTransMin.Y(), fSensorTransMax.Y());
Double_t transZ = gRandom->Uniform(fSensorTransMin.Z(), fSensorTransMax.Z());
UShort_t* data)
{
Int_t ret, tmp;
- AliDebug(15, Form("Reading a channel"));
+ AliFMDDebug(15, ("Reading a channel"));
if ((ret = ExtractTrailer(hwaddr, last)) < 0) {
AliError(Form("Failed to read trailer: %s", ErrorString(-ret)));
return ret;
}
- AliDebug(15, Form("Now extracting bunches from %d 10 bit words", last));
+ AliFMDDebug(15, ("Now extracting bunches from %d 10 bit words", last));
tmp = ExtractBunches(last, data);
if (tmp < 0) {
AliError(Form("Failed to read bunches: %s", ErrorString(-tmp)));
Int_t
AliFMDAltroReader::ExtractTrailer(UShort_t& hwaddr, UShort_t& last)
{
- AliDebug(15, "Extracting trailer");
+ AliFMDDebug(15, ("Extracting trailer"));
W40_t trailer = GetNextW40();
if (trailer < 0) {
AliError(Form("Trailer 0x%x is bad: %s", trailer, ErrorString(-trailer)));
AliError(Form("Failed to read bunch data: %s", ErrorString(-s)));
return 2;
}
- AliDebug(50,Form("Assigning to data[%d - (%d - 1)] = 0x%X", t, i, s));
+ AliFMDDebug(50, ("Assigning to data[%d - (%d - 1)] = 0x%X", t, i, s));
data[t - (i-1)] = s;
ret++;
}
fInput.read((char*)&fBuffer, 5 * sizeof(char));
if (fInput.bad()) return -kBadRead;
fIBuffer = 4;
- AliDebug(15, Form(" 0x%03x 0x%03x 0x%03x 0x%03x 0x%010x %6d",
+ AliFMDDebug(15, (" 0x%03x 0x%03x 0x%03x 0x%03x 0x%010x %6d",
ExtractW10(3, fBuffer), ExtractW10(2, fBuffer),
ExtractW10(1, fBuffer), ExtractW10(0, fBuffer),
fBuffer, fCurrent));
AliFMDAltroWriter::AliFMDAltroWriter(std::ostream& stream)
: fThreshold(0), fTotal(0), fOutput(stream)
{
- AliDebug(15, "New AliFMDAltroWriter object");
+ AliFMDDebug(15, ("New AliFMDAltroWriter object"));
fTime = 0;
fLength = 0;
fLast = 0;
if (fOutput.bad()) return -kBadSeek;
AliRawDataHeader header;
header.fSize = (UShort_t(end) - fHeader);
- AliDebug(15, Form("Size set to %d (%d)", header.fSize, fTotal));
+ AliFMDDebug(15, ("Size set to %d (%d)", header.fSize, fTotal));
header.SetAttribute(0);
fOutput.write((char*)(&header), sizeof(header));
if (fOutput.bad()) return -kBadWrite;
#include "AliFMDBaseDigit.h" // ALIFMDDIGIT_H
#include "Riostream.h" // ROOT_Riostream
#include <TString.h>
-#include <AliLog.h>
+// #include <AliLog.h>
+#include "AliFMDDebug.h" // Better debug macros
//====================================================================
ClassImp(AliFMDBaseDigit)
#include <TMath.h>
#include <TTree.h> // ROOT_TTree
//#include <TRandom.h> // ROOT_TRandom
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
+#include "AliFMDDebug.h" // Better debug macros
#include "AliFMDBaseDigitizer.h" // ALIFMDDIGITIZER_H
#include "AliFMD.h" // ALIFMD_H
#include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
fShapingTime(0)
{
// Normal CTOR
- AliDebug(1," processed");
+ AliFMDDebug(1, (" processed"));
SetShapingTime();
}
AliFMDMap::kMaxStrips)
{
// Normal CTOR
- AliDebug(1," processed");
+ AliFMDDebug(1, (" processed"));
SetShapingTime();
}
// UShort_t minstrip = param->GetMinStrip(detector, ring, sector, strip);
// UShort_t maxstrip = param->GetMaxStrip(detector, ring, sector, strip);
// Check if strip is `dead'
+ AliFMDDebug(2, ("Hit in FMD%d%c[%2d,%3d]=%f",
+ detector, ring, sector, strip, edep));
if (param->IsDead(detector, ring, sector, strip)) {
- AliDebug(5, Form("FMD%d%c[%2d,%3d] is marked as dead",
+ AliFMDDebug(1, ("FMD%d%c[%2d,%3d] is marked as dead",
detector, ring, sector, strip));
continue;
}
// Check if strip is out-side read-out range
// if (strip < minstrip || strip > maxstrip) {
- // AliDebug(5, Form("FMD%d%c[%2d,%3d] is outside range [%3d,%3d]",
+ // AliFMDDebug(5, ("FMD%d%c[%2d,%3d] is outside range [%3d,%3d]",
// detector,ring,sector,strip,minstrip,maxstrip));
// continue;
// }
// Give warning in case of double hit
if (fEdep(detector, ring, sector, strip).fEdep != 0)
- AliDebug(5, Form("Double hit in %d%c(%d,%d)",
+ AliFMDDebug(5, ("Double hit in %d%c(%d,%d)",
detector, ring, sector, strip));
// Sum energy deposition
// Add this to the energy deposited for this strip
} // hit loop
} // track loop
- AliDebug(1, Form("Size of cache: %d bytes, read %d bytes",
+ AliFMDDebug(1, ("Size of cache: %d bytes, read %d bytes",
sizeof(fEdep), read));
}
TArrayI counts(3);
for (UShort_t detector=1; detector <= 3; detector++) {
+ AliFMDDebug(5, ("Processing hits in FMD%d", detector));
// Get pointer to subdetector
AliFMDDetector* det = geometry->GetDetector(detector);
if (!det) continue;
for (UShort_t ringi = 0; ringi <= 1; ringi++) {
Char_t ring = ringi == 0 ? 'I' : 'O';
+ AliFMDDebug(5, (" Processing hits in FMD%d%c", detector,ring));
// Get pointer to Ring
AliFMDRing* r = det->GetRing(ring);
if (!r) continue;
UShort_t nSectors = UShort_t(360. / r->GetTheta());
// Loop over the number of sectors
for (UShort_t sector = 0; sector < nSectors; sector++) {
+ AliFMDDebug(5, (" Processing hits in FMD%d%c[%2d]",
+ detector,ring,sector));
// Get number of strips
UShort_t nStrips = r->GetNStrips();
// Loop over the stips
AddDigit(fmd, detector, ring, sector, strip, edep,
UShort_t(counts[0]), Short_t(counts[1]),
Short_t(counts[2]));
+ AliFMDDebug(10, (" Adding digit in FMD%d%c[%2d,%3d]=%d",
+ detector,ring,sector,strip,counts[0]));
#if 0
// This checks if the digit created will give the `right'
// number of particles when reconstructed, using a naiive
Float_t a = edep * convF + ped;
if (a < 0) a = 0;
counts[0] = UShort_t(TMath::Min(a, Float_t(maxAdc)));
- AliDebug(2, Form("FMD%d%c[%2d,%3d]: converting ELoss %f to "
+ AliFMDDebug(2, ("FMD%d%c[%2d,%3d]: converting ELoss %f to "
"ADC %4d (%f,%d)",
detector,ring,sector,strip,edep,counts[0],convF,ped));
return;
// - why oh why do we need to shit where we eat - it's just not
// healty).
//
-#include "AliLog.h" // ALILOG_H
+#include "AliFMDDebug.h" // ALIFMDDEBUG_H ALILOG_H
#include "AliFMDCalibFaker.h" // ALIFMDCALIBFAKER_H
#include "AliFMDCalibGain.h" // ALIFMDCALIBGAIN_H
#include "AliFMDCalibPedestal.h" // ALIFMDCALIBPEDESTAL_H
//
#include "AliFMDCalibSampleRate.h" // ALIFMDCALIBGAIN_H
// #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
-#include <AliLog.h>
+// #include <AliLog.h>
+#include "AliFMDDebug.h" // Better debug macros
//____________________________________________________________________
ClassImp(AliFMDCalibSampleRate)
// Get the sample rate
UInt_t nSec = (ring == 'I' ? 20 : 40);
UInt_t board = sec / nSec;
- AliDebug(10, Form("Getting sample rate for FMD%d%c[%2d,0] (board %d)",
+ AliFMDDebug(10, ("Getting sample rate for FMD%d%c[%2d,0] (board %d)",
det, ring, sec, board));
return fRates(det, ring, board, 0);
}
#include "AliFMDDetector.h" // ALIFMDSUBDETECTOR_H
#include "AliFMDRing.h" // ALIFMDRING_H
-#include "AliLog.h" // ALILOG_H
+#include "AliFMDDebug.h" // ALIFMDDEBUG_H ALILOG_H
//====================================================================
ClassImp(AliFMDDetector)
// Find all local<->global transformations for this detector.
if ((!fInner || (fInner && fInnerTransforms)) &&
(!fOuter || (fOuter && fOuterTransforms))) {
- AliDebug(5, Form("Transforms for FMD%d already registered", fId));
+ AliFMDDebug(5, ("Transforms for FMD%d already registered", fId));
return;
}
- AliDebug(5, Form("Initializing transforms for FMD%d", fId));
+ AliFMDDebug(5, ("Initializing transforms for FMD%d", fId));
if (!gGeoManager) {
AliFatal("No TGeoManager defined");
return;
// Get nodes names
const Char_t* name = node->GetName();
if (!name) continue;
- AliDebug(50, Form("Got volume %s", name));
+ AliFMDDebug(50, ("Got volume %s", name));
// Check if this node is this detector
// The base offset for numbers in the ASCII table is 48
if (IS_NODE_THIS(name)) {
- AliDebug(20, Form("Found detector node '%s' for FMD%d", name, fId));
+ AliFMDDebug(20, ("Found detector node '%s' for FMD%d", name, fId));
thisNodeFound = kTRUE;
}
// if the detector was found, then we're on that branch, and we
// check if this node represents a module in that branch.
if (thisNodeFound && IS_NODE_SENSOR(name)) {
- AliDebug(20, Form("Found sensor node '%s' for FMD%d", name, fId));
+ AliFMDDebug(20, ("Found sensor node '%s' for FMD%d", name, fId));
// Get the ring Id.
Char_t ringid = name[1];
// and if so, go on to the next node.
Bool_t& done = (ring == fInner ? allInners : allOuters);
if ((done = HasAllTransforms(ringid))) {
- AliDebug(20, Form("Already has all module transforms for ring %c",
+ AliFMDDebug(20, ("Already has all module transforms for ring %c",
ringid));
continue;
}
void
AliFMDDetector::SetAlignableVolumes() const
{
- AliDebug(10, Form("Making alignable volumes for FMD%d", fId));
+ AliFMDDebug(10, ("Making alignable volumes for FMD%d", fId));
if (!gGeoManager) {
AliFatal("No TGeoManager defined");
return;
// Get nodes names
const Char_t* name = node->GetName();
if (!name) continue;
- AliDebug((name[0] == 'F' ? 40 : 50), Form("Got volume %s", name));
+ AliFMDDebug((name[0] == 'F' ? 40 : 50), ("Got volume %s", name));
// Check if this node is this detector
// The base offset for numbers in the ASCII table is 48
if (IS_NODE_THIS(name)) {
- AliDebug(20, Form("Found detector node '%s' for FMD%d", name, fId));
+ AliFMDDebug(20, ("Found detector node '%s' for FMD%d", name, fId));
thisNodeFound = kTRUE;
}
// if a half ring is found, then we're on that branch, and we
// check if this node represents a half ring on that branch
if (thisNodeFound && IS_NODE_HALF(name)) {
- AliDebug(30, Form("Found half node '%s' for FMD%d", name, fId));
+ AliFMDDebug(30, ("Found half node '%s' for FMD%d", name, fId));
// Get the half Id.
thisHalf = name[3];
// Check if we're done
Bool_t done = (thisHalf == 'T' ? hasTop : hasBottom);
if (done) {
- AliDebug(20,Form("Already has all halves for detector %c",name[1]));
+ AliFMDDebug(20, ("Already has all halves for detector %c",name[1]));
continue;
}
// if the detector was found, then we're on that branch, and we
// check if this node represents a module in that branch.
if (thisNodeFound && thisHalf && IS_NODE_SENSOR(name)) {
- AliDebug(30, Form("Found sensor node '%s' for FMD%d", name, fId));
+ AliFMDDebug(30, ("Found sensor node '%s' for FMD%d", name, fId));
// Get the ring Id.
Char_t ringid = name[1];
default: continue;
}
if (done) {
- AliDebug(20,Form("Already has all sensor volumes for ring %c",ringid));
+ AliFMDDebug(20, ("Already has all sensor volumes for ring %c",ringid));
continue;
}
// Get the copy (module) number, and check that it hasn't
}
}
if (!align.IsNull() && !path.IsNull()) {
- AliDebug(20, Form("Got %s -> %s", path.Data(), align.Data()));
+ AliFMDDebug(20, ("Got %s -> %s", path.Data(), align.Data()));
TGeoPNEntry* entry =
gGeoManager->SetAlignableEntry(align.Data(),path.Data());
if(!entry)
#endif
align = "";
}
- AliDebug(20, Form("FMD%d: top: %d bottom: %d Inner: %d/%d Outer %d/%d",
+ AliFMDDebug(20, ("FMD%d: top: %d bottom: %d Inner: %d/%d Outer %d/%d",
fId, hasTop, hasBottom, iInnerSensor, nInnerSensor,
iOuterSensor, nOuterSensor));
}
+ r->GetCopperThickness()
+ r->GetChipThickness()
+ r->GetSpacing());
- AliDebug(30,Form("Rho %7.3f, angle %7.3f", rho, phi));
+ AliFMDDebug(30, ("Rho %7.3f, angle %7.3f", rho, phi));
# define DEGRAD TMath::Pi() / 180.
Double_t local[] = { rho * TMath::Cos(phi * DEGRAD),
rho * TMath::Sin(phi * DEGRAD),
-modThick + siThick / 2 };
Double_t master[3];
- AliDebug(30, Form("Local (%7.3f,%7.3f,%7.3f)",local[0], local[1], local[2]));
+ AliFMDDebug(30, ("Local (%7.3f,%7.3f,%7.3f)",local[0], local[1], local[2]));
m->LocalToMaster(local, master);
- AliDebug(30, Form("Master (%7.3f,%7.3f,%7.3f)",
+ AliFMDDebug(30, ("Master (%7.3f,%7.3f,%7.3f)",
master[0],master[1],master[2]));
x = master[0];
y = master[1];
#include <TTree.h> // ROOT_TTree
#include <TRandom.h> // ROOT_TRandom
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
+#include "AliFMDDebug.h" // Better debug macros
#include "AliFMDDigitizer.h" // ALIFMDDIGITIZER_H
#include "AliFMD.h" // ALIFMD_H
// #include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
: AliFMDBaseDigitizer(manager)
{
// Normal CTOR
- AliDebug(1," processed");
+ AliFMDDebug(1, (" processed"));
}
//____________________________________________________________________
Int_t nFiles= fManager->GetNinputs();
for (Int_t inputFile = 0; inputFile < nFiles; inputFile++) {
- AliDebug(1,Form(" Digitizing event number %d",
+ AliFMDDebug(1, (" Digitizing event number %d",
fManager->GetOutputEventNr()));
// Get the current loader
fRunLoader =
// Fill the tree
Int_t write = 0;
write = digitTree->Fill();
- AliDebug(1, Form("Wrote %d bytes to digit tree", write));
+ AliFMDDebug(1, ("Wrote %d bytes to digit tree", write));
// Write the digits to disk
outFMD->WriteDigits("OVERWRITE");
#include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
#include <AliESDFMD.h> // ALIESDFMD_H
-#include <AliLog.h>
+// #include <AliLog.h>
+#include "AliFMDDebug.h" // Better debug macros
//____________________________________________________________________
ClassImp(AliFMDDisplay)
Double_t pedW = parm->GetPedestalWidth(det,ring, sec, str);
Double_t threshold = ped + fPedestalFactor * pedW;
Float_t counts = digit->Counts();
- AliDebug(10, Form("FMD%d%c[%2d,%3d] ADC: %d > %d (=%4.2f+%4.2f*%4.2f)",
+ AliFMDDebug(10, ("FMD%d%c[%2d,%3d] ADC: %d > %d (=%4.2f+%4.2f*%4.2f)",
digit->Detector(), digit->Ring(), digit->Sector(),
digit->Strip(), Int_t(counts), Int_t(threshold),
ped, fPedestalFactor, pedW));
#include <iostream>
#include <TApplication.h>
-#include <TButton.h>
+// #include <TButton.h>
#include <TCanvas.h>
#include <TH2F.h>
-#include <TH3F.h>
+// #include <TH3F.h>
#include <TLatex.h>
#include <TLine.h>
#include <TMath.h>
#include <TRandom.h>
-#include <TStyle.h>
+// #include <TStyle.h>
#include <TSystem.h>
#include <TVector2.h>
-#include <TView.h>
+// #include <TView.h>
#include "AliFMDDetector.h"
#include "AliFMDFancy.h" // ALIFMDDISPLAY_H
#include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
#include "AliFMDHit.h"
-#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
+// #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
#include "AliFMDRing.h"
-#include <AliLog.h>
//____________________________________________________________________
ClassImp(AliFMDFancy)
fLine(.15, .27, .85, .27),
fTotal(.2, .15, "Total: ")
{
+ // CTOR
fEvent.SetBit(TLatex::kTextNDC);
fFMD1IHits.SetBit(TLatex::kTextNDC);
fFMD2IHits.SetBit(TLatex::kTextNDC);
}
//____________________________________________________________________
-AliFMDFancy::Detector::Detector(UShort_t id)
+AliFMDFancy::AliFancyDetector::AliFancyDetector(UShort_t id)
: fId(id)
{
+ // CTOR
fInnerHits.SetName(Form("FMD%dI", id));
fInnerHits.SetMarkerStyle(1); // 20);
fInnerHits.SetMarkerSize(.2);
}
//____________________________________________________________________
-AliFMDFancy::Detector::~Detector()
+AliFMDFancy::AliFancyDetector::~AliFancyDetector()
{
+ // DTOR
fShapes.Delete();
if (fFrame) delete fFrame;
}
//____________________________________________________________________
AliFMDFancy::~AliFMDFancy()
-{}
+{
+ // DTOR
+}
//____________________________________________________________________
void
-AliFMDFancy::Detector::AddHistogram(TGraph2D& g, const char* opt)
+AliFMDFancy::AliFancyDetector::AddHistogram(TGraph2D& g, const char* opt)
{
+ // CTOR
TH2* h = g.GetHistogram(opt);
if (!h) return;
+ // Code checker doesn't think this using the TH2 interface -
+ // ridiculous.
h->SetBins(1, -fMaxR, fMaxR, 1, -fMaxR, fMaxR);
h->GetZaxis()->SetRangeUser(fMinZ, fMaxZ);
}
//____________________________________________________________________
void
-AliFMDFancy::Detector::Init()
+AliFMDFancy::AliFancyDetector::Init()
{
+ // Initialise
AliFMDGeometry* geom = AliFMDGeometry::Instance();
AliFMDDetector* det = geom->GetDetector(fId);
if (!det) return;
//____________________________________________________________________
void
-AliFMDFancy::Detector::Begin(Int_t /* event */)
+AliFMDFancy::AliFancyDetector::Begin(Int_t /* event */)
{
+ // Called at the begining of an event.
TIter next(&fShapes);
TGraph2D* g = 0;
fFrame->Draw("surf fb");
//____________________________________________________________________
void
-AliFMDFancy::Detector::Clear(Int_t /* event */)
+AliFMDFancy::AliFancyDetector::Clear(Int_t /* event */)
{
+ // Clear
fNInnerHits = 0;
fNOuterHits = 0;
}
Bool_t
AliFMDFancy::Begin(Int_t event)
{
+ // Called at the begining of an event
if (!fCanvas) {
const char* which[] = { "Continue", "Redisplay", 0 };
MakeCanvas(which);
//____________________________________________________________________
void
-AliFMDFancy::Detector::End()
+AliFMDFancy::AliFancyDetector::End()
{
+ // Called at the end of an event
Char_t rs[] = { 'I', 'O', '\0' };
Char_t* rp = rs;
Char_t r;
Int_t m = (r == 'I' ? 512 * 10 * 2 : 256 * 20 * 2);
if (n == 0) continue;
for (Int_t i = n; i < g.GetN(); i++) g.RemovePoint(i);
+ // The code checker thinks this is not using declarations from
+ // iostram and iomanip - that's just silly.
std::cout << g.GetName() << " has " << std::setw(4) << n << "/"
<< std::setw(5) << m << " points" << std::endl;
g.Draw("same fb p");
Bool_t
AliFMDFancy::End()
{
+ // Called at the end of an event
AliFMDGeometry* geom = AliFMDGeometry::Instance();
AliFMDDetector* det;
Int_t total = 0;
fCanvas->cd();
fWait = kTRUE;
while (fWait) {
- gApplication->StartIdleing();
- gSystem->InnerLoop();
- gApplication->StopIdleing();
+ // Hmm - code checker doesn't believe this is using the
+ // TApplication or TSystem declaration - morron. Thank God for
+ // optimising compilers.
+ TApplication* a = gApplication;
+ TSystem* s = gSystem;
+ a->StartIdleing();
+ s->InnerLoop();
+ a->StopIdleing();
}
return AliFMDInput::End();
}
Bool_t
AliFMDFancy::ProcessHit(AliFMDHit* hit, TParticle*)
{
+ // Process a hit.
AddMarker(hit->Detector(), hit->Ring(), hit->Sector(), hit->Strip(),
hit, hit->Edep(), 0);
return kTRUE;
}
//____________________________________________________________________
void
-AliFMDFancy::Detector::AddMarker(Char_t rng, UShort_t sec, UShort_t str,
- Float_t, Float_t)
+AliFMDFancy::AliFancyDetector::AddMarker(Char_t rng, UShort_t sec,
+ UShort_t str, Float_t, Float_t)
{
+ // Add a marker to the display
AliFMDGeometry* geom = AliFMDGeometry::Instance();
Double_t x, y, z;
geom->Detector2XYZ(fId, rng, sec, str, x, y, z);
+ // Trick the code-checker to think that we're using the TRandom
+ // interface. The silly code checker also thinks that TMath is a
+ // class and not a namespace - sigh!
+ TRandom* rand = gRandom;
if (true) {
AliFMDRing* r = geom->GetRing(rng);
Double_t t = .9 * r->GetTheta() / 2;
- Double_t a = gRandom->Uniform(-t,t) * TMath::Pi() / 180;
+ Double_t a = rand->Uniform(-t,t) * TMath::Pi() / 180;
Double_t x1 = x * TMath::Cos(a) - y * TMath::Sin(a);
Double_t y1 = x * TMath::Sin(a) + y * TMath::Cos(a);
x = x1;
class TPad;
class TH1;
class TH2;
-class TH3;
+// class TH3;
//___________________________________________________________________
class AliFMDFancy : public AliFMDDisplay
{
public:
- struct Detector
+ /** Sigh! the code checker thinks that all structs are POD - morron
+ */
+ class AliFancyDetector
{
- Detector(UShort_t id);
- ~Detector();
-
+ public:
+ /** CTOR */
+ AliFancyDetector(UShort_t id);
+ /** DTOR */
+ ~AliFancyDetector();
+ /** Initialise */
void Init();
+ /** Called at the beginning of an event */
void Begin(Int_t event=0);
+ /** Clear display */
void Clear(Int_t event=0);
+ /** Called that the end of an event */
void End();
+ /** Add a marker */
void AddMarker(Char_t rng, UShort_t sec, UShort_t str,
Float_t v, Float_t max);
- TH1* fFrame;
- Int_t fId;
- TObjArray fShapes;
- Int_t fNInnerHits;
- TGraph2D fInnerHits;
- Int_t fNOuterHits;
- TGraph2D fOuterHits;
- Double_t fMaxR;
- Double_t fMinZ;
- Double_t fMaxZ;
+ /** Mother frame */
+ TH1* fFrame; // Mother frame
+ /** Identifier */
+ Int_t fId; // Identifier
+ /** Array of shapes */
+ TObjArray fShapes; // Array of shapes
+ /** Number of inner hits */
+ Int_t fNInnerHits; // Number of inner hits
+ /** Graph of inner hits */
+ TGraph2D fInnerHits; // Graph of inner hits
+ /** Number of outer hits */
+ Int_t fNOuterHits; // Number of outer hits
+ /** Graph of outer hits */
+ TGraph2D fOuterHits; // Graph of outer hits
+ /** Maximum radius */
+ Double_t fMaxR; // Maximum radius
+ /** Minimum Z */
+ Double_t fMinZ; // Minimum Z
+ /** Maximum Z */
+ Double_t fMaxZ; // Maximum Z
private:
- void AddHistogram(TGraph2D& g, const char* opt="");
- Detector(const Detector& );
- Detector& operator=(const Detector& ) { return *this; }
+ /** Add a histogram to a 2D graph. For some reason the code
+ checker thinks that this function can be made const - well, it
+ cannot, since the graph passed down is a member of this
+ object, and would be const in the this context if the member
+ function is const. Since we modify the graph, we cannot make
+ it a const reference, no matter how much we'd like to. */
+ void AddHistogram(TGraph2D& g, const char* toopt="");
+ /** Copy ctor */
+ AliFancyDetector(const AliFancyDetector& );
+ /** Assignement operator */
+ AliFancyDetector& operator=(const AliFancyDetector& ) { return *this; }
};
/** Constructor
/** Called at end of an event
@return @c false on error */
virtual Bool_t End();
- protected:
+protected:
+ /** Copy ctor */
AliFMDFancy(const AliFMDFancy& );
+ /** Assignement operator */
AliFMDFancy& operator=(const AliFMDFancy& ) { return *this; }
/** Add a marker to the display
@param det Detector
@param o Object to refer to
@param s Signal
@param max Maximum of signal */
- virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
- TObject* o, Float_t s, Float_t max);
-
+ virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec,
+ UShort_t str, TObject* o, Float_t s, Float_t max);
+ /** Process a hit
+ @param hit hit to process */
virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*);
+
/** FMD1 Pad */
- TPad* fFMD1Pad;
- /** FMD1 Frame */
- Detector fFMD1;
+ TPad* fFMD1Pad; // FMD1 Pad
+ /** FMD1 Frame */
+ AliFancyDetector fFMD1; // FMD1 Frame
/** FMD2 Pad */
- TPad* fFMD2Pad;
- /** FMD2 Frame */
- Detector fFMD2;
+ TPad* fFMD2Pad; // FMD2 Pad
+ /** FMD2 Frame */
+ AliFancyDetector fFMD2; // FMD2 Frame
/** FMD3 Pad */
- TPad* fFMD3Pad;
- /** FMD3 Frame */
- Detector fFMD3;
+ TPad* fFMD3Pad; // FMD3 Pad
+ /** FMD3 Frame */
+ AliFancyDetector fFMD3; // FMD3 Frame
/** Summary pad */
- TPad* fSummary;
+ TPad* fSummary; // Summary pad
/** Text fields */
- TLatex fEvent;
- TLatex fFMD1IHits;
- TLatex fFMD2IHits;
- TLatex fFMD2OHits;
- TLatex fFMD3IHits;
- TLatex fFMD3OHits;
- TLine fLine;
- TLatex fTotal;
+ TLatex fEvent; // Text fields
+ /** Number of hits in FMD1i */
+ TLatex fFMD1IHits; // Number of hits in FMD1i
+ /** Number of hits in FMD2i */
+ TLatex fFMD2IHits; // Number of hits in FMD2i
+ /** Number of hits in FMD2o */
+ TLatex fFMD2OHits; // Number of hits in FMD2o
+ /** Number of hits in FMD3i */
+ TLatex fFMD3IHits; // Number of hits in FMD3i
+ /** Number of hits in FMD3o */
+ TLatex fFMD3OHits; // Number of hits in FMD3o
+ /** Just a line */
+ TLine fLine; // Just a line
+ /** Number of hits in FMD */
+ TLatex fTotal; // Number of hits in FMD
ClassDef(AliFMDFancy,0)
};
#include "AliFMD2.h" // ALIFMD2_H
#include "AliFMD3.h" // ALIFMD2_H
#include "AliRecPoint.h" // ALIRECPOINT_H
-#include "AliLog.h" // ALIRECPOINT_H
+#include "AliFMDDebug.h" // ALILOG_H
#include <TVector3.h> // ROOT_TVector3
// #include <TMatrix.h> // ROOT_TMatrix
// #include <TParticle.h> // ROOT_TParticle
AliError("No TGeoManager defined");
return;
}
- AliDebug(0, "Initialising transforms for FMD geometry");
+ AliFMDDebug(0, ("Initialising transforms for FMD geometry"));
if (fFMD1) fFMD1->InitTransformations();
if (fFMD2) fFMD2->InitTransformations();
if (fFMD3) fFMD3->InitTransformations();
// Set active volumes
fActive.Set(n);
for (Int_t i = 0; i < n; i++) {
- AliDebug(1, Form("Active vol id # %d: %d", i, active[i]));
+ AliFMDDebug(1, ("Active vol id # %d: %d", i, active[i]));
fActive[i] = active[i];
}
}
Int_t moduleDepth = FindNodeDepth("FIFV_0", "ALIC");
Int_t sectorDepth = FindNodeDepth("FISE_1", "ALIC");
fActive.Reset(-1);
- AliDebug(1, Form("Geometry depths:\n"
+ AliFMDDebug(1, ("Geometry depths:\n"
" Sector: %d\n"
" Module: %d\n"
" Ring: %d\n"
if (striVol) AddActive(striVol->GetNumber());
if (stroVol) AddActive(stroVol->GetNumber());
}
- AliDebug(1, Form("Geometry offsets:\n"
+ AliFMDDebug(1, ("Geometry offsets:\n"
" Sector: %d\n"
" Module: %d\n"
" Ring: %d\n"
#include "AliFMD2.h" // ALIFMD2_H
#include "AliFMD3.h" // ALIFMD3_H
// #include "AliFMD.h" // ALIFMD_H
-#include "AliLog.h" // ALILOG_H
+#include "AliFMDDebug.h" // ALILOG_H
//====================================================================
ClassImp(AliFMDGeometryBuilder)
// Adding modules to half-rings
Int_t nmod = r->GetNModules();
- AliDebug(10, Form("making %d modules in ring %c", nmod, id));
+ AliFMDDebug(10, ("making %d modules in ring %c", nmod, id));
for (Int_t i = 0; i < nmod; i++) {
if (i == nmod / 2) halfRing = ringBotVolume;
Bool_t front = (i % 2 == 0);
Double_t z2 = z1 + siThick / 2 + space;
Double_t th = (2 * i + 1) * theta;
TGeoVolume* vol = (front ? frontVolume : backVolume);
- AliDebug(20, Form("Placing copy %d of %s and %s in %s at z=%f and %f, "
+ AliFMDDebug(20, ("Placing copy %d of %s and %s in %s at z=%f and %f, "
"and theta=%f", i, sensorVolume->GetName(),
vol->GetName(), halfRing->GetName(), z1, z2, th));
TGeoMatrix* mat1 = new TGeoCombiTrans(0,0,z1,0);
// Place ring in mother volume
// TGeoMatrix*matrix=new TGeoTranslation(Form("FMD%d%c trans",id,c),0,0,0);
- AliDebug(5, Form("Placing volumes %s and %s in %s and %s at z=%f",
+ AliFMDDebug(5, ("Placing volumes %s and %s in %s and %s at z=%f",
tvol->GetName(), bvol->GetName(),
topMother->GetName(), botMother->GetName(), z));
topMother->AddNode(tvol, Int_t(c), new TGeoTranslation(0,0,z));
r->GetLegLength() +
hcThick / 2);
- AliDebug(15, Form("Placing a copy of %s in %s and %s at z=%f",
+ AliFMDDebug(15, ("Placing a copy of %s in %s and %s at z=%f",
hcVol->GetName(), topMother->GetName(),
botMother->GetName(), z));
// Add to top
// Must add this after filling the assembly.
TGeoVolume* top = gGeoManager->GetVolume("ALIC");
TGeoMatrix* matrix = new TGeoTranslation("FMD1 trans", 0, 0, z);
- AliDebug(5, Form("Placing volumes %s and %s in ALIC at z=%f",
+ AliFMDDebug(5, ("Placing volumes %s and %s in ALIC at z=%f",
fmd1TopVolume->GetName(), fmd1BotVolume->GetName(), z));
top->AddNode(fmd1TopVolume, fmd1->GetId(), matrix);
top->AddNode(fmd1BotVolume, fmd1->GetId(), matrix);
// Must be done after filling the assemblies
TGeoVolume* top = gGeoManager->GetVolume("ALIC");
TGeoMatrix* matrix = new TGeoTranslation("FMD2 trans", 0, 0, z);
- AliDebug(5, Form("Placing volumes %s and %s in ALIC at z=%f",
+ AliFMDDebug(5, ("Placing volumes %s and %s in ALIC at z=%f",
fmd2TopVolume->GetName(), fmd2BotVolume->GetName(), z));
top->AddNode(fmd2TopVolume, fmd2->GetId(), matrix);
top->AddNode(fmd2BotVolume, fmd2->GetId(), matrix);
Double_t phi = 360. / n * i + 180. / n;
Double_t x = r * TMath::Cos(TMath::Pi() / 180 * phi);
Double_t y = r * TMath::Sin(TMath::Pi() / 180 * phi);
- AliDebug(15, Form("Placing flange %d in %s at (%f,%f,%f) r=%f, phi=%f",
+ AliFMDDebug(15, ("Placing flange %d in %s at (%f,%f,%f) r=%f, phi=%f",
i, mother->GetName(), x, y, zi, r, phi));
TGeoRotation* rot = new TGeoRotation;
rot->RotateZ(phi);
rot->RotateY(180);
TGeoVolume* top = gGeoManager->GetVolume("ALIC");
TGeoMatrix* mmatrix = new TGeoCombiTrans("FMD3 trans", 0, 0, z, rot);
- AliDebug(5, Form("Placing volumes %s and %s in ALIC at z=%f",
+ AliFMDDebug(5, ("Placing volumes %s and %s in ALIC at z=%f",
fmd3TopVolume->GetName(), fmd3BotVolume->GetName(), z));
top->AddNode(fmd3TopVolume, fmd3->GetId(), mmatrix);
top->AddNode(fmd3BotVolume, fmd3->GetId(), mmatrix);
AliFMDGeometryBuilder::Exec(Option_t*)
{
// Setup up the FMD geometry.
- AliDebug(1, Form("\tGeometry options: %s",
+ AliFMDDebug(1, ("\tGeometry options: %s",
(fDetailed ? "divided into strips" : "one volume")));
if (!gGeoManager) {
AliFatal("No TGeoManager defined");
#include <TString.h>
#include "AliFMDHit.h" // ALIFMDHIT_H
-// #include "AliLog.h" // ALILOG_H
+// #include "AliFMDDebug.h" // ALIFMDDEBUG_H ALILOG_H
//____________________________________________________________________
ClassImp(AliFMDHit)
// Latest changes by Christian Holm Christensen
//
#include "AliFMDInput.h" // ALIFMDHIT_H
-#include "AliLog.h" // ALILOG_H
+#include "AliFMDDebug.h" // ALIFMDDEBUG_H ALILOG_H
#include "AliLoader.h" // ALILOADER_H
#include "AliRunLoader.h" // ALIRUNLOADER_H
#include "AliRun.h" // ALIRUN_H
AliInfo(Form("Now in event %d/%d", event, NEvents()));
// Possibly load global kinematics information
- if (TESTBIT(fTreeMask, kKinematics)) {
+ if (TESTBIT(fTreeMask, kKinematics) || TESTBIT(fTreeMask, kTracks)) {
AliInfo("Getting kinematics");
if (fLoader->LoadKinematics()) return kFALSE;
fStack = fLoader->Stack();
}
// Possibly load FMD Hit information
- if (TESTBIT(fTreeMask, kHits)) {
+ if (TESTBIT(fTreeMask, kHits) || TESTBIT(fTreeMask, kTracks)) {
AliInfo("Getting FMD hits");
if (fFMDLoader->LoadHits()) return kFALSE;
fTreeH = fFMDLoader->TreeH();
//
if (TESTBIT(fTreeMask, kHits))
if (!ProcessHits()) return kFALSE;
+ if (TESTBIT(fTreeMask, kTracks))
+ if (!ProcessTracks()) return kFALSE;
if (TESTBIT(fTreeMask, kDigits))
if (!ProcessDigits()) return kFALSE;
if (TESTBIT(fTreeMask, kSDigits))
return kTRUE;
}
+//____________________________________________________________________
+Bool_t
+AliFMDInput::ProcessTracks()
+{
+ // Read the hit tree, and pass each hit to the member function
+ // ProcessHit.
+ if (!fStack) {
+ AliError("No track tree defined");
+ return kFALSE;
+ }
+ if (!fTreeH) {
+ AliError("No hit tree defined");
+ return kFALSE;
+ }
+ Int_t nTracks = fTreeH->GetEntries();
+ for (Int_t i = 0; i < nTracks; i++) {
+ TParticle* track = fStack->Particle(i);
+ if (!track) continue;
+ Int_t hitRead = fTreeH->GetEntry(i);
+ if (hitRead <= 0) continue;
+ if (!fArrayH) {
+ AliError("No hit array defined");
+ return kFALSE;
+ }
+ Int_t nHit = fArrayH->GetEntries();
+ if (nHit <= 0) continue;
+
+ for (Int_t j = 0; j < nHit; j++) {
+ AliFMDHit* hit = static_cast<AliFMDHit*>(fArrayH->At(j));
+ if (!hit) continue;
+ if (!ProcessTrack(i, track, hit)) return kFALSE;
+ }
+ // if (!ProcessTrack(i, track, fArrayH)) return kFALSE;
+ }
+ return kTRUE;
+}
+
//____________________________________________________________________
Bool_t
AliFMDInput::ProcessDigits()
return fIsInit;
}
// Possibly unload global kinematics information
- if (TESTBIT(fTreeMask, kKinematics)) {
+ if (TESTBIT(fTreeMask, kKinematics) || TESTBIT(fTreeMask, kTracks)) {
fLoader->UnloadKinematics();
// fTreeK = 0;
fStack = 0;
}
// Possibly unload FMD Hit information
- if (TESTBIT(fTreeMask, kHits)) {
+ if (TESTBIT(fTreeMask, kHits) || TESTBIT(fTreeMask, kTracks)) {
fFMDLoader->UnloadHits();
fTreeH = 0;
}
kRecPoints, // Reconstructed points
kESD, // Load ESD's
kRaw, // Read raw data
- kGeometry // Not really a tree
+ kGeometry, // Not really a tree
+ kTracks // Hits and tracs - for BG study
};
/** CTOR */
AliFMDInput();
optionally the corresponding kinematics track.
@return @c false on error */
virtual Bool_t ProcessHits();
+ /** Loop over all tracks, and call ProcessTrack with each hit for
+ that track
+ @return @c false on error */
+ virtual Bool_t ProcessTracks();
/** Loop over all digits, and call ProcessDigit for each digit.
@return @c false on error */
virtual Bool_t ProcessDigits();
@param p Associated track
@return @c false on error */
virtual Bool_t ProcessHit(AliFMDHit* h, TParticle* p);
+ /** Process one hit per track. Users should over this to process
+ each hit.
+ @param i Track number
+ @param p Track
+ @param h Associated Hit
+ @return @c false on error */
+ virtual Bool_t ProcessTrack(Int_t i, TParticle* p, AliFMDHit* h);
/** Process one digit. Users should over this to process each
digit.
@param digit Digit
};
inline Bool_t AliFMDInput::ProcessHit(AliFMDHit*,TParticle*) { return kTRUE; }
+inline Bool_t AliFMDInput::ProcessTrack(Int_t,TParticle*,
+ AliFMDHit*) { return kTRUE; }
inline Bool_t AliFMDInput::ProcessDigit(AliFMDDigit*) { return kTRUE; }
inline Bool_t AliFMDInput::ProcessSDigit(AliFMDSDigit*) { return kTRUE; }
inline Bool_t AliFMDInput::ProcessRawDigit(AliFMDDigit*) { return kTRUE; }
// `Init'. Optionally, the class can serve hard-coded constants, if
// no CDB is available.
//
-#include "AliLog.h" // ALILOG_H
+#include "AliFMDDebug.h" // ALILOG_H
#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
#include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
#include "AliFMDRing.h" // ALIFMDRING_H
AliCDBManager* cdb = AliCDBManager::Instance();
AliCDBEntry* gain = cdb->Get(fgkPulseGain);
if (!gain) {
- AliWarning(Form("No %s found in CDB, perhaps you need to "
+ AliFatal(Form("No %s found in CDB, perhaps you need to "
"use AliFMDCalibFaker?", fgkPulseGain));
return;
}
- AliDebug(1, Form("Got gain from CDB"));
+ AliFMDDebug(1, ("Got gain from CDB"));
fPulseGain = dynamic_cast<AliFMDCalibGain*>(gain->GetObject());
- if (!fPulseGain) AliWarning("Invalid pulser gain object from CDB");
+ if (!fPulseGain) AliFatal("Invalid pulser gain object from CDB");
}
//__________________________________________________________________
void
AliCDBManager* cdb = AliCDBManager::Instance();
AliCDBEntry* pedestal = cdb->Get(fgkPedestal);
if (!pedestal) {
- AliWarning(Form("No %s found in CDB, perhaps you need to "
+ AliFatal(Form("No %s found in CDB, perhaps you need to "
"use AliFMDCalibFaker?", fgkPedestal));
return;
}
- AliDebug(1, Form("Got pedestal from CDB"));
+ AliFMDDebug(1, ("Got pedestal from CDB"));
fPedestal = dynamic_cast<AliFMDCalibPedestal*>(pedestal->GetObject());
- if (!fPedestal) AliWarning("Invalid pedestal object from CDB");
+ if (!fPedestal) AliFatal("Invalid pedestal object from CDB");
}
//__________________________________________________________________
AliCDBManager* cdb = AliCDBManager::Instance();
AliCDBEntry* deadMap = cdb->Get(fgkDead);
if (!deadMap) {
- AliWarning(Form("No %s found in CDB, perhaps you need to "
+ AliFatal(Form("No %s found in CDB, perhaps you need to "
"use AliFMDCalibFaker?", fgkDead));
return;
}
- AliDebug(1, Form("Got dead map from CDB"));
+ AliFMDDebug(1, ("Got dead map from CDB"));
fDeadMap = dynamic_cast<AliFMDCalibDeadMap*>(deadMap->GetObject());
- if (!fDeadMap) AliWarning("Invalid dead map object from CDB");
+ if (!fDeadMap) AliFatal("Invalid dead map object from CDB");
}
//__________________________________________________________________
AliCDBManager* cdb = AliCDBManager::Instance();
AliCDBEntry* zeroSup = cdb->Get(fgkZeroSuppression);
if (!zeroSup) {
- AliWarning(Form("No %s found in CDB, perhaps you need to "
+ AliFatal(Form("No %s found in CDB, perhaps you need to "
"use AliFMDCalibFaker?", fgkZeroSuppression));
return;
}
- AliDebug(1, Form("Got zero suppression from CDB"));
+ AliFMDDebug(1, ("Got zero suppression from CDB"));
fZeroSuppression =
dynamic_cast<AliFMDCalibZeroSuppression*>(zeroSup->GetObject());
- if (!fZeroSuppression)AliWarning("Invalid zero suppression object from CDB");
+ if (!fZeroSuppression)AliFatal("Invalid zero suppression object from CDB");
}
//__________________________________________________________________
AliCDBManager* cdb = AliCDBManager::Instance();
AliCDBEntry* sampRat = cdb->Get(fgkSampleRate);
if (!sampRat) {
- AliWarning(Form("No %s found in CDB, perhaps you need to "
+ AliFatal(Form("No %s found in CDB, perhaps you need to "
"use AliFMDCalibFaker?", fgkSampleRate));
return;
}
- AliDebug(1, Form("Got zero suppression from CDB"));
+ AliFMDDebug(1, ("Got zero suppression from CDB"));
fSampleRate = dynamic_cast<AliFMDCalibSampleRate*>(sampRat->GetObject());
- if (!fSampleRate) AliWarning("Invalid zero suppression object from CDB");
+ if (!fSampleRate) AliFatal("Invalid zero suppression object from CDB");
}
//__________________________________________________________________
AliCDBManager* cdb = AliCDBManager::Instance();
AliCDBEntry* hwMap = cdb->Get(fgkAltroMap);
if (!hwMap) {
- AliWarning(Form("No %s found in CDB, perhaps you need to "
+ AliFatal(Form("No %s found in CDB, perhaps you need to "
"use AliFMDCalibFaker?", fgkAltroMap));
fAltroMap = new AliFMDAltroMapping;
return;
}
- AliDebug(1, Form("Got ALTRO map from CDB"));
+ AliFMDDebug(1, ("Got ALTRO map from CDB"));
fAltroMap = dynamic_cast<AliFMDAltroMapping*>(hwMap->GetObject());
if (!fAltroMap) {
- AliWarning("Invalid ALTRO map object from CDB");
+ AliFatal("Invalid ALTRO map object from CDB");
fAltroMap = new AliFMDAltroMapping;
}
}
AliCDBManager* cdb = AliCDBManager::Instance();
AliCDBEntry* range = cdb->Get(fgkStripRange);
if (!range) {
- AliWarning(Form("No %s found in CDB, perhaps you need to "
+ AliFatal(Form("No %s found in CDB, perhaps you need to "
"use AliFMDCalibFaker?", fgkStripRange));
return;
}
- AliDebug(1, Form("Got strip range from CDB"));
+ AliFMDDebug(1, ("Got strip range from CDB"));
fStripRange = dynamic_cast<AliFMDCalibStripRange*>(range->GetObject());
- if (!fStripRange) AliWarning("Invalid strip range object from CDB");
+ if (!fStripRange) AliFatal("Invalid strip range object from CDB");
}
fFixedPulseGain = fVA1MipRange * GetEdepMip() / fAltroChannelSize;
return fFixedPulseGain;
}
- AliDebug(50, Form("pulse gain for FMD%d%c[%2d,%3d]=%f",
+ AliFMDDebug(50, ("pulse gain for FMD%d%c[%2d,%3d]=%f",
detector, ring, sector, strip,
fPulseGain->Value(detector, ring, sector, strip)));
return fPulseGain->Value(detector, ring, sector, strip);
{
// Check if the channel is dead
if (!fDeadMap) return kFALSE;
- AliDebug(50, Form("Dead for FMD%d%c[%2d,%3d]=%s",
+ AliFMDDebug(50, ("Dead for FMD%d%c[%2d,%3d]=%s",
detector, ring, sector, strip,
fDeadMap->operator()(detector, ring, sector, strip) ?
"no" : "yes"));
// Get zero suppression threshold
if (!fZeroSuppression) return fFixedZeroSuppression;
// Need to map strip to ALTRO chip.
- AliDebug(50, Form("zero sup. for FMD%d%c[%2d,%3d]=%f",
+ AliFMDDebug(50, ("zero sup. for FMD%d%c[%2d,%3d]=%f",
detector, ring, sector, strip,
fZeroSuppression->operator()(detector, ring,
sector, strip)));
if (!fSampleRate) return fFixedSampleRate;
// Need to map sector to digitizier card.
UInt_t ret = fSampleRate->Rate(det, ring, sector, str);
- AliDebug(50, Form("Sample rate for FMD%d%c[%2d,%3d]=%d",
+ AliFMDDebug(50, ("Sample rate for FMD%d%c[%2d,%3d]=%d",
det, ring, sector, str, ret));
return ret;
}
if (!fStripRange) return fFixedMinStrip;
// Need to map sector to digitizier card.
UInt_t ret = fStripRange->Min(det, ring, sector, str);
- AliDebug(50, Form("Min strip # for FMD%d%c[%2d,%3d]=%d",
+ AliFMDDebug(50, ("Min strip # for FMD%d%c[%2d,%3d]=%d",
det, ring, sector, str, ret));
return ret;
}
if (!fStripRange) return fFixedMaxStrip;
// Need to map sector to digitizier card.
UInt_t ret = fStripRange->Max(det, ring, sector, str);
- AliDebug(50, Form("Max strip # for FMD%d%c[%2d,%3d]=%d",
+ AliFMDDebug(50, ("Max strip # for FMD%d%c[%2d,%3d]=%d",
det, ring, sector, str, ret));
return ret;
}
{
// Get the pedesal
if (!fPedestal) return fFixedPedestal;
- AliDebug(50, Form("pedestal for FMD%d%c[%2d,%3d]=%f",
+ AliFMDDebug(50, ("pedestal for FMD%d%c[%2d,%3d]=%f",
detector, ring, sector, strip,
fPedestal->Value(detector, ring, sector, strip)));
return fPedestal->Value(detector, ring, sector, strip);
{
// Get the pedesal
if (!fPedestal) return fFixedPedestalWidth;
- AliDebug(50, Form("pedetal width for FMD%d%c[%2d,%3d]=%f",
+ AliFMDDebug(50, ("pedetal width for FMD%d%c[%2d,%3d]=%f",
detector, ring, sector, strip,
fPedestal->Width(detector, ring, sector, strip)));
return fPedestal->Width(detector, ring, sector, strip);
// Latest changes by Christian Holm Christensen
//
-#include <iostream>
+// #include <iostream>
-#include <TApplication.h>
-#include <TButton.h>
+// #include <TApplication.h>
+// #include <TButton.h>
#include <TCanvas.h>
#include <TH2F.h>
#include <TMath.h>
#include <TPad.h>
#include <TRandom.h>
-#include <TSlider.h>
+// #include <TSlider.h>
#include <TStyle.h>
-#include <TSystem.h>
+// #include <TSystem.h>
#include <TVector2.h>
-#include <TView.h>
-
+// #include <TView.h>
+#include <TGraph.h>
#include "AliFMDPattern.h" // ALIFMDDISPLAY_H
#include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
-#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
+//#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
#include "AliFMDRing.h"
-#include "AliFMDDetector.h"
+// #include "AliFMDDetector.h"
#include "AliFMDHit.h"
-#include <AliLog.h>
+// #include <AliLog.h>
+#include "AliFMDDebug.h" // Better debug macros
+class AliFMDDetector;
//____________________________________________________________________
ClassImp(AliFMDPattern)
#endif
//____________________________________________________________________
-AliFMDPattern::Detector::Detector(UShort_t id)
+AliFMDPattern::AliFMDPatternDetector::AliFMDPatternDetector(UShort_t id)
: fId(id),
fCounts(0),
fGraphs(0),
fFrame(0)
-{}
+{
+ // CTOR
+ //
+ // Parameters:
+ //
+ // ID Identifier
+}
//____________________________________________________________________
-AliFMDPattern::Detector::~Detector()
+AliFMDPattern::AliFMDPatternDetector::~AliFMDPatternDetector()
{
+ // DTOR
+ // Destructor -
+ // deletes mother frame
if (fFrame) delete fFrame;
}
//____________________________________________________________________
void
-AliFMDPattern::Detector::DrawShape(TObjArray& a)
+AliFMDPattern::AliFMDPatternDetector::DrawShape(TObjArray& a)
{
+ // Draw all shapes.
+ //
+ // Paramters
+ //
+ // a Array of shapes
+ //
TIter next(&a);
TGraph* g = 0;
while ((g = static_cast<TGraph*>(next()))) {
//____________________________________________________________________
void
-AliFMDPattern::Detector::Begin(Int_t nlevel, Double_t r,
+AliFMDPattern::AliFMDPatternDetector::Begin(Int_t nlevel, Double_t r,
TObjArray& inners, TObjArray& outers)
{
- if (nlevel < 1) nlevel = gStyle->GetNumberOfColors();
+ // Start of a run.
+ //
+ // Parameters
+ //
+ // nlevel Number of levels
+ // r Radius
+ // inners Array of inner shapes
+ // outers Array of outer shapes
+ //
+
+ // To make code-checker shut up
+ TStyle* style = gStyle;
+ if (nlevel < 1) nlevel = style->GetNumberOfColors();
fCounts.Set(nlevel);
if (!fFrame) {
+ // The code-checker thinks this is not using the declaration of
+ // TH2F - what a morron!
fFrame = new TH2F(Form("fmd%dFrame", fId), Form("FMD%d", fId),
10, -r, r, 10, -r, r);
fFrame->SetStats(kFALSE);
if (fId != 1) DrawShape(outers);
for (Int_t i = 0; i < nlevel; i++) {
TGraph* g = new TGraph;
- Int_t idx = Int_t(Float_t(i) / nlevel * gStyle->GetNumberOfColors());
- Int_t col = gStyle->GetColorPalette(idx);
+ Int_t idx = Int_t(Float_t(i) / nlevel * style->GetNumberOfColors());
+ Int_t col = style->GetColorPalette(idx);
g->SetName(Form("FMD%d_L%02d", fId, i));
g->SetMarkerColor(col);
g->SetLineColor(col);
//____________________________________________________________________
void
-AliFMDPattern::Detector::Clear()
+AliFMDPattern::AliFMDPatternDetector::Clear()
{
+ // Clear this display.
+ // Simply reset counters to zero.
+ // Avoid deleting memory.
fCounts.Reset(0);
}
//____________________________________________________________________
void
-AliFMDPattern::Detector::End()
+AliFMDPattern::AliFMDPatternDetector::End()
{
+ // Called when displaying the data.
+ // Simply resets number of points at each level to
+ // the seen number of hits at that level.
+ // Avoid deleting memory.
TIter next(&fGraphs);
TGraph* g = 0;
Int_t i = 0;
}
//____________________________________________________________________
void
-AliFMDPattern::Detector::AddMarker(Double_t x, Double_t y, Float_t s,
+AliFMDPattern::AliFMDPatternDetector::AddMarker(Double_t x, Double_t y, Float_t s,
Float_t max)
{
- Int_t i = TMath::Min(Int_t(fCounts.fN * s / max),
+ // Add a marker at (X,Y,Z). The marker color and size is chosen
+ // relative to the MAX argument.
+ //
+ // Parameters
+ //
+ // X,Y,Z Coordiantes
+ // MAX Maximum value.
+ //
+ /** Sigh, for some odd reason, the code-checker does not recognise
+ this a usage of the TMath namespace declaration! Idiot */
+ Int_t i = TMath::Min(Int_t(fCounts.fN * s / max),
Int_t(fGraphs.GetEntries()-1));
TGraph* g = static_cast<TGraph*>(fGraphs.At(i));
if (!g) return;
fLine(.15, .47, .85, .47),
fTotal(.2, .35, "Total: ")
{
+ // Constructor.
+ //
+ // Parameters
+ //
+ // gAliceFile The galice.root file to use - if any.
+ //
+
// RemoveLoad(kGeometry);
fEvent.SetBit(TLatex::kTextNDC);
fFMD1Sum.SetBit(TLatex::kTextNDC);
//____________________________________________________________________
AliFMDPattern::~AliFMDPattern()
{
+ // DTOR
+ // Free all allocated shapes.
+ // note, that most members are real objects, so we do not need to
+ // deal with them here.
fInners.Delete();
fOuters.Delete();
}
Bool_t
AliFMDPattern::Init()
{
- // Initialize. GEt transforms and such,
+ // Initialize. Get transforms and such,
if (!AliFMDInput::Init()) return kFALSE;
AliFMDGeometry* geom = AliFMDGeometry::Instance();
geom->Init();
Bool_t
AliFMDPattern::Begin(Int_t event)
{
+ // Called at the begining of an event.
+ //
+ // Parameters
+ //
+ // EVENT The event number
+ //
MakeAux();
if (!fCanvas) {
const char* which[] = { "Continue", "Redisplay", 0 };
MakeCanvas(which);
AliFMDGeometry* geom = AliFMDGeometry::Instance();
- AliFMDDetector* det;
- if ((det = geom->GetDetector(1))) {
+ // AliFMDDetector* det;
+ if ((/* det = */ geom->GetDetector(1))) {
fPad->cd();
fFMD1Pad = new TPad("FMD1", "FMD1", 0.0, 0.50, 0.5, 1.0, 0, 0);
fFMD1Pad->Draw();
fFMD1Pad->cd();
fFMD1.Begin(-1, fInnerMax, fInners, fOuters);
}
- if ((det = geom->GetDetector(2))) {
+ if ((/* det = */ geom->GetDetector(2))) {
fPad->cd();
fFMD2Pad = new TPad("FMD2", "FMD2", 0.5, 0.50, 1.0, 1.0, 0, 0);
fFMD2Pad->Draw();
fFMD2Pad->cd();
fFMD2.Begin(-1, fOuterMax, fInners, fOuters);
}
- if ((det = geom->GetDetector(3))) {
+ if ((/* det = */ geom->GetDetector(3))) {
fPad->cd();
fFMD3Pad = new TPad("FMD3", "FMD3", 0.0, 0.0, .5, .5, 0, 0);
fFMD3Pad->Draw();
void
AliFMDPattern::Redisplay()
{
+ // Redraw the displayu
fFMD1.Clear();
fFMD2.Clear();
fFMD3.Clear();
void
AliFMDPattern::AtEnd()
{
+ // Called at the end of an event.
DrawAux();
Int_t total = 0;
Bool_t
AliFMDPattern::ProcessHit(AliFMDHit* hit, TParticle*)
{
+ // Process a hit.
+ //
+ // Parameters
+ //
+ // HIT The hit to process.
+ //
+ // The TParticle argument is never used.
switch (hit->Detector()) {
case 1: fFMD1.AddMarker(hit->X(), hit->Y(), hit->Edep(), 1); break;
case 2: fFMD2.AddMarker(hit->X(), hit->Y(), hit->Edep(), 1); break;
//____________________________________________________________________
void
-AliFMDPattern::AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
+AliFMDPattern::AddMarker(UShort_t det, Char_t rng,
+ UShort_t sec, UShort_t str,
TObject*, Float_t s, Float_t max)
{
// Add a marker to the display
// s Signal
// max Maximum of signal
//
- Detector* d = 0;
+ AliFMDPatternDetector* d = 0;
switch (det) {
case 1: d = &fFMD1; break;
case 2: d = &fFMD2; break;
AliFMDGeometry* geom = AliFMDGeometry::Instance();
Double_t x, y, z;
geom->Detector2XYZ(det, rng, sec, str, x, y, z);
+ // Make code-checker shut the f**k up
+ TRandom* rand = gRandom;
if (true) {
AliFMDRing* r = geom->GetRing(rng);
Double_t t = .9 * r->GetTheta() / 2;
- Double_t a = gRandom->Uniform(-t,t) * TMath::Pi() / 180;
+ Double_t a = rand->Uniform(-t,t) * TMath::Pi() / 180;
Double_t x1 = x * TMath::Cos(a) - y * TMath::Sin(a);
Double_t y1 = x * TMath::Sin(a) + y * TMath::Cos(a);
x = x1;
#include "AliFMDDisplay.h"
#include <TArrayI.h>
#include <TObjArray.h>
-#include <TGraph.h>
+// #include <TGraph.h>
#include <TLatex.h>
#include <TLine.h>
class TCanvas;
class AliFMDPattern : public AliFMDDisplay
{
public:
- struct Detector
+ /** @class AliFMDPatternDetector
+ @brief Utility for the pattern display.
+ The name is this long, because the code-checker even cares about
+ nested names, even though it seems a bit nit-picking and
+ retareded. It's a class rather than a structure, because the
+ code checker thinks that structs are only for POD - sigh! */
+ class AliFMDPatternDetector
{
- Detector(UShort_t id);
- ~Detector();
+ public:
+ /** Constructor */
+ AliFMDPatternDetector(UShort_t id);
+ /** Destructor */
+ ~AliFMDPatternDetector();
+ /** Clear this detector */
void Clear();
+ /** Get the total number of hits */
Int_t Total() const { return Int_t(fCounts.GetSum()); }
+ /** Called at the end of things */
void End();
- void Begin(Int_t nlvl, Double_t r, TObjArray& inners, TObjArray& outers);
+ /** Initiate.
+ @param nlvl Number of levels.
+ @param r Radius
+ @param inners Array of inner shapes
+ @param outers Array of outer shapes */
+ void Begin(Int_t nlvl, Double_t r, TObjArray& inners,
+ TObjArray& outers);
+ /** Draw everything
+ @param a Array of shapes to draw */
void DrawShape(TObjArray& a);
+ /** Add a marker at specified coordinates
+ @param X X coordinate
+ @param Y Y coordinate
+ @param Z Z coordinate
+ @param max The maximum value to scale to */
void AddMarker(Double_t x, Double_t y, Float_t s, Float_t max);
- Int_t fId;
- TArrayI fCounts;
- TObjArray fGraphs;
- TH2* fFrame;
+ Int_t fId; // Identifier #
+ TArrayI fCounts; // Number of counts at each level
+ TObjArray fGraphs; // Array of graphs - one for each level
+ TH2* fFrame; // The mother frame
+ private:
+ /** Copy constructor
+ - Not implemented. */
+ AliFMDPatternDetector(const AliFMDPattern&);
+ /** Assignement operator
+ -- Not implemented */
+ AliFMDPatternDetector& operator=(const AliFMDPatternDetector&);
+
};
@return @c false on error */
virtual Bool_t Begin(Int_t event);
protected:
+ /** Copy constructor
+ - Not implemented. */
+ AliFMDPattern(const AliFMDPattern&);
+ /** Assignement operator
+ -- Not implemented */
+ AliFMDPattern& operator=(const AliFMDPattern&);
/** Add a marker to the display
@param det Detector
@param rng Ring
@param o Object to refer to
@param s Signal
@param max Maximum of signal */
- virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
- TObject* o, Float_t s, Float_t max);
+ virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec,
+ UShort_t str, TObject* o, Float_t s, Float_t max);
+ /** @param hit Hit to process */
virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*);
+ /** Re-draw the patterns */
virtual void Redisplay();
+ /** Called at the end. */
virtual void AtEnd();
/** Graph to show shape of inner sensor */
- TObjArray fInners;
+ TObjArray fInners; // Graph to show shape of inner sensor
/** Graph to show shape of outer sensor */
- TObjArray fOuters;
+ TObjArray fOuters; // Graph to show shape of outer sensor
/** Max inner radius */
- Float_t fInnerMax;
+ Float_t fInnerMax; // Max inner radius
/** Max outer radius */
- Float_t fOuterMax;
+ Float_t fOuterMax; // Max outer radius
/** FMD1 Pad */
- TPad* fFMD1Pad;
- /** FMD1 Frame */
- Detector fFMD1;
+ TPad* fFMD1Pad; // FMD1 Pad
+ /** FMD1 Frame */
+ AliFMDPatternDetector fFMD1; // FMD1 Frame
/** FMD2 Pad */
- TPad* fFMD2Pad;
- /** FMD2 Frame */
- Detector fFMD2;
+ TPad* fFMD2Pad; // FMD2 Pad
+ /** FMD2 Frame */
+ AliFMDPatternDetector fFMD2; // FMD2 Frame
/** FMD3 Pad */
- TPad* fFMD3Pad;
- /** FMD3 Frame */
- Detector fFMD3;
+ TPad* fFMD3Pad; // FMD3 Pad
+ /** FMD3 Frame */
+ AliFMDPatternDetector fFMD3; // FMD3 Frame
/** Summary pad */
- TPad* fSummary;
+ TPad* fSummary; // Summary pad
/** Text fields */
- TLatex fEvent;
- TLatex fFMD1Sum;
- TLatex fFMD2Sum;
- TLatex fFMD3Sum;
- TLine fLine;
- TLatex fTotal;
+ TLatex fEvent; // Text fields
+ TLatex fFMD1Sum; // Total in FMD1
+ TLatex fFMD2Sum; // Total in FMD1
+ TLatex fFMD3Sum; // Total in FMD1
+ TLine fLine; // Just a line
+ TLatex fTotal; // Total in FMD
- ClassDef(AliFMDPattern,0)
+ ClassDef(AliFMDPattern,0) // Display FMD data as hit-patterns.
};
// | AliAltroStream |
// +----------------+
//
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
+#include "AliFMDDebug.h" // Better debug macros
#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
#include "AliFMDDigit.h" // ALIFMDDIGIT_H
#include "AliFMDRawStream.h" // ALIFMDRAWSTREAM_H
fTree->Branch("FMD", &array);
ReadAdcs(array);
Int_t nWrite = fTree->Fill();
- AliDebug(1, Form("Got a grand total of %d digits, wrote %d bytes to tree",
+ AliFMDDebug(1, ("Got a grand total of %d digits, wrote %d bytes to tree",
array->GetEntries(), nWrite));
}
// Data array is approx twice the size needed.
UShort_t data[2048];
while (input.ReadChannel(ddl, hwaddr, last, data)) {
- AliDebug(5, Form("Read channel 0x%x of size %d", hwaddr, last));
+ AliFMDDebug(5, ("Read channel 0x%x of size %d", hwaddr, last));
UShort_t det, sec, str;
Char_t ring;
if (!pars->Hardware2Detector(ddl, hwaddr, det, ring, sec, str)) {
rate = pars->GetSampleRate(det, ring, sec, str);
stripMin = pars->GetMinStrip(det, ring, sec, str);
stripMax = pars->GetMaxStrip(det, ring, sec, str);
- AliDebug(5, Form("DDL 0x%04x, address 0x%03x maps to FMD%d%c[%2d,%3d]",
+ AliFMDDebug(5, ("DDL 0x%04x, address 0x%03x maps to FMD%d%c[%2d,%3d]",
ddl, hwaddr, det, ring, sec, str));
// Loop over the `timebins', and make the digits
AliError(Form("Current strip is %d but DB says max is %d",
curStr, stripMax));
}
- AliDebug(5, Form("making digit for FMD%d%c[%2d,%3d] from sample %4d",
+ AliFMDDebug(5, ("making digit for FMD%d%c[%2d,%3d] from sample %4d",
det, ring, sec, curStr, i));
new ((*array)[n]) AliFMDDigit(det, ring, sec, curStr, data[i],
(rate >= 2 ? data[i+1] : 0),
size_t nchar = fReader->GetDataSize();
UShort_t ddl = fReader->GetDDLID();
UShort_t rate = 0;
- AliDebug(1, Form("Reading %d bytes (%d 10bit words) from %d",
+ AliFMDDebug(1, ("Reading %d bytes (%d 10bit words) from %d",
nchar, nchar * 8 / 10, ddl));
// Make a stream to read from
std::string str((char*)(cdata), nchar);
// Data array is approx twice the size needed.
UShort_t data[2048], hwaddr, last;
while (r.ReadChannel(hwaddr, last, data) > 0) {
- AliDebug(5, Form("Read channel 0x%x of size %d", hwaddr, last));
+ AliFMDDebug(5, ("Read channel 0x%x of size %d", hwaddr, last));
UShort_t det, sec, str;
Char_t ring;
if (!pars->Hardware2Detector(ddl, hwaddr, det, ring, sec, str)) {
rate = pars->GetSampleRate(det, ring, sec, str);
stripMin = pars->GetMinStrip(det, ring, sec, str);
stripMax = pars->GetMaxStrip(det, ring, sec, str);
- AliDebug(5, Form("DDL 0x%04x, address 0x%03x maps to FMD%d%c[%2d,%3d]",
+ AliFMDDebug(5, ("DDL 0x%04x, address 0x%03x maps to FMD%d%c[%2d,%3d]",
ddl, hwaddr, det, ring, sec, str));
// Loop over the `timebins', and make the digits
AliError(Form("Current strip is %d but DB says max is %d",
curStr, stripMax));
}
- AliDebug(5, Form("making digit for FMD%d%c[%2d,%3d] from sample %4d",
+ AliFMDDebug(5, ("making digit for FMD%d%c[%2d,%3d] from sample %4d",
det, ring, sec, curStr, i));
new ((*array)[n]) AliFMDDigit(det, ring, sec, curStr, data[i],
(rate >= 2 ? data[i+1] : 0),
count++;
Int_t ddl = fReader->GetDDLID();
- AliDebug(10, Form("Current DDL is %d", ddl));
+ AliFMDDebug(10, ("Current DDL is %d", ddl));
if (ddl != oldDDL || input.IsNewStrip() || !next) {
// Make a new digit, if we have some data (oldDetector == 0,
// means that we haven't really read anything yet - that is,
// it's the first time we get here).
if (oldDetector > 0) {
// Got a new strip.
- AliDebug(10, Form("Add a new strip: FMD%d%c[%2d,%3d] "
+ AliFMDDebug(10, ("Add a new strip: FMD%d%c[%2d,%3d] "
"(current: FMD%d%c[%2d,%3d])",
oldDetector, input.PrevRing(),
input.PrevSector() , input.PrevStrip(),
}
if (!next) {
- AliDebug(10, Form("Read %d channels for FMD%d",
+ AliFMDDebug(10, ("Read %d channels for FMD%d",
count + 1, detector));
break;
}
// If we got a new DDL, it means we have a new detector.
if (ddl != oldDDL) {
if (detector != 0)
- AliDebug(10, Form("Read %d channels for FMD%d", count + 1, detector));
+ AliFMDDebug(10, ("Read %d channels for FMD%d", count + 1, detector));
// Reset counts, and update the DDL cache
count = 0;
oldDDL = ddl;
AliError(Form("Unknown DDL 0x%x for FMD", ddl));
return;
}
- AliDebug(10, Form("Reading ADCs for 0x%x - That is FMD%d",
+ AliFMDDebug(10, ("Reading ADCs for 0x%x - That is FMD%d",
fReader->GetEquipmentId(), detector));
}
counts.Reset(-1);
counts[input.Sample()] = input.Count();
- AliDebug(10, Form("ADC of FMD%d%c[%2d,%3d] += %d",
+ AliFMDDebug(10, ("ADC of FMD%d%c[%2d,%3d] += %d",
detector, input.Ring(), input.Sector(),
input.Strip(), input.Count()));
oldDetector = detector;
#include "AliFMDRawStream.h" // ALIFMDRAWSTREAM_H
// #include <AliRawReader.h> // ALIRAWREADER_H
#include "AliFMDParameters.h"
-#include <AliLog.h>
+// #include <AliLog.h>
+#include "AliFMDDebug.h" // Better debug macros
// #include <iomanip>
// #include <iostream>
do {
Int_t signal = last;
if (last > 0x3FF) {
- AliDebug(30, Form("Last is 0x%x, so reading a new word", last));
+ AliFMDDebug(30, ("Last is 0x%x, so reading a new word", last));
next = Next();
if (!next) break;
signal = GetSignal();
if (GetHWAddress() != GetPrevHWAddress() && GetPrevHWAddress() >= 0) {
- AliDebug(15, Form("New hardware address, was 0x%x, now 0x%x",
+ AliFMDDebug(15, ("New hardware address, was 0x%x, now 0x%x",
GetPrevHWAddress(), GetHWAddress()));
addr = GetPrevHWAddress();
ddl = GetPrevDDLNumber();
// ALTRO format. See the Exec member function for more information on
// that format.
//
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
+#include "AliFMDDebug.h" // Better debug macros
#include <AliLoader.h> // ALILOADER_H
#include <AliAltroBuffer.h> // ALIALTROBUFFER_H
#include "AliFMD.h" // ALIFMD_H
digitBranch->SetAddress(&digits);
Int_t nEvents = Int_t(digitTree->GetEntries());
+ AliFMDDebug(5, ("Got a total of %5d events from tree", nEvents));
for (Int_t event = 0; event < nEvents; event++) {
fFMD->ResetDigits();
digitTree->GetEvent(event);
// WRite an array of digits to disk file
Int_t nDigits = digits->GetEntries();
if (nDigits < 1) return;
+ AliFMDDebug(5, ("Got a total of %5d digits from tree", nDigits));
AliFMDParameters* pars = AliFMDParameters::Instance();
UShort_t threshold = 0;
- UInt_t prevddl = 0;
+ UInt_t prevddl = 0xFFFF;
UInt_t prevaddr = 0xFFF;
// UShort_t prevStrip = 0;
// 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.
+ UShort_t oldDet = 1000;
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();
UInt_t ddl;
UInt_t addr;
+ if (det != oldDet) {
+ AliFMDDebug(5, ("Got new detector: %d (was %d)", det, oldDet));
+ oldDet = det;
+ }
+ AliFMDDebug(10, ("Processing digit # %5d FMD%d%c[%2d,%3d]",
+ i, det, ring, sector, strip));
threshold = pars->GetZeroSuppression(det, ring, sector, strip);
if (!pars->Detector2Hardware(det, ring, sector, strip, ddl, addr)) {
AliError(Form("Failed to get hardware address for FMD%d%c[%2d,%3d]",
det, ring, sector, strip));
continue;
}
+ AliFMDDebug(10, ("FMD%d%c[%2d,%3d]-> ddl: 0x%x addr: 0x%x",
+ det, ring, sector, strip, ddl, addr));
if (addr != prevaddr) {
// Flush a channel to output
- AliDebug(15, Form("Now hardware address 0x%x from FMD%d%c[%2d,%3d] "
- "(board 0x%x, chip 0x%x, channel 0x%x), flushing old "
- "channel at 0x%x with %d words",
- addr, det, ring, sector, strip,
- (addr >> 7), (addr >> 4) & 0x7, addr & 0xf,
- prevaddr, nWords));
+ AliFMDDebug(15, ("Now hardware address 0x%x from FMD%d%c[%2d,%3d] "
+ "(board 0x%x, chip 0x%x, channel 0x%x), flushing old "
+ "channel at 0x%x with %d words",
+ addr, det, ring, sector, strip,
+ (addr >> 7), (addr >> 4) & 0x7, addr & 0xf,
+ prevaddr, nWords));
if (altro) altro->WriteChannel(prevaddr,nWords,data.fArray,threshold);
nWords = preSamples;
prevaddr = addr;
for (size_t i = 0; i < nWords; i++) data[i] = digit->Count(0);
}
if (ddl != prevddl) {
- AliDebug(15, Form("FMD: New DDL, was %d, now %d", prevddl, ddl));
+ AliFMDDebug(5, ("FMD: New DDL, was %d, now %d", prevddl, ddl));
// 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(15, Form("Closing output"));
+ AliFMDDebug(15, ("Closing output"));
altro->Flush();
altro->WriteDataHeader(kFALSE, kFALSE);
delete altro;
prevddl = ddl;
// Need to open a new DDL!
TString filename(AliDAQ::DdlFileName(fFMD->GetName(), ddl));
- AliDebug(15, Form("New altro buffer with DDL file %s", filename.Data()));
+ AliFMDDebug(5, ("New altro buffer with DDL file %s", filename.Data()));
// Create a new altro buffer - a `1' as the second argument
// means `write mode'
altro = new AliAltroBuffer(filename.Data());
det, ring, sector, strip));
continue;
}
- AliDebug(40, Form("Got DDL=%d and address=%d from FMD%d%c[%2d,%3d]",
+ AliFMDDebug(40, ("Got DDL=%d and address=%d from FMD%d%c[%2d,%3d]",
thisDDL, thisHwaddr, det, ring, sector, strip));
// Check if we're still in the same channel
if (thisHwaddr != hwaddr) {
- AliDebug(30, Form("Now hardware address 0x%x from FMD%d%c[%2d,%3d] "
+ AliFMDDebug(30, ("Now hardware address 0x%x from FMD%d%c[%2d,%3d] "
"(board 0x%x, chip 0x%x, channel 0x%x)",
thisHwaddr, det, ring, sector, strip,
(thisHwaddr >> 7), (thisHwaddr >> 4) & 0x7,
// Check if we're still in the same detector (DDL)
if (ddl != thisDDL) {
if (writer) {
- AliDebug(1, Form("Closing altro writer %p", writer));
+ AliFMDDebug(1, ("Closing altro writer %p", writer));
if ((ret = writer->Close()) < 0) {
AliError(Form("Error: %s", writer->ErrorString(ret)));
return;
// If we haven't got a writer (either because none were made so
// far, or because we've switch DDL), make one.
if (!writer) {
- AliDebug(1, Form("Opening new ALTRO writer w/file %s", AliDAQ::DdlFileName("FMD",ddl)));
+ AliFMDDebug(1, ("Opening new ALTRO writer w/file %s",
+ AliDAQ::DdlFileName("FMD",ddl)));
file = new std::ofstream(AliDAQ::DdlFileName("FMD",ddl));
if (!file || !*file) {
- AliFatal(Form("Failed to open file %s", AliDAQ::DdlFileName("FMD",ddl)));
+ AliFatal(Form("Failed to open file %s",
+ AliDAQ::DdlFileName("FMD",ddl)));
return;
}
writer = new AliFMDAltroWriter(*file);
//
//____________________________________________________________________
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
// #include <AliRun.h> // ALIRUN_H
+#include "AliFMDDebug.h"
#include <AliRunLoader.h> // ALIRUNLOADER_H
#include <AliHeader.h> // ALIHEADER_H
#include <AliGenEventHeader.h> // ALIGENEVENTHEADER_H
AliFMDReconstructor::Init(AliRunLoader* runLoader)
{
// Initialize the reconstructor
- AliDebug(2, Form("Init called with runloader 0x%x", runLoader));
+ AliFMDDebug(2, ("Init called with runloader 0x%x", runLoader));
// Initialize the geometry
AliFMDGeometry* geom = AliFMDGeometry::Instance();
geom->Init();
TTree* digitsTree) const
{
// Convert Raw digits to AliFMDDigit's in a tree
- AliDebug(2, "Reading raw data into digits tree");
+ AliFMDDebug(2, ("Reading raw data into digits tree"));
AliFMDRawReader rawRead(reader, digitsTree);
// rawRead.SetSampleRate(fFMD->GetSampleRate());
rawRead.Exec();
if (fESD) {
const AliESDVertex* vertex = fESD->GetVertex();
if (vertex) {
- AliDebug(2, Form("Got vertex from ESD: %f", vertex->GetZv()));
+ AliFMDDebug(2, ("Got vertex from ESD: %f", vertex->GetZv()));
fCurrentVertex = vertex->GetZv();
fVertexType = kESDVertex;
return;
genHeader->PrimaryVertex(vtx);
fCurrentVertex = vtx[2];
fVertexType = kGenVertex;
- AliDebug(2, Form("Got vertex from generator: %f", fCurrentVertex));
+ AliFMDDebug(2, ("Got vertex from generator: %f", fCurrentVertex));
AliWarning("Got vertex from generator event header");
return;
}
// Get the FMD branch holding the digits.
// FIXME: The vertex may not be known yet, so we may have to move
// some of this to FillESD.
- AliDebug(2, "Reconstructing from digits in a tree");
+ AliFMDDebug(2, ("Reconstructing from digits in a tree"));
GetVertex();
TBranch *digitBranch = digitsTree->GetBranch("FMD");
fTreeR = clusterTree;
fTreeR->Branch("FMD", &fMult);
- AliDebug(5, "Getting entry 0 from digit branch");
+ AliFMDDebug(5, ("Getting entry 0 from digit branch"));
digitBranch->GetEntry(0);
- AliDebug(5, "Processing digits");
+ AliFMDDebug(5, ("Processing digits"));
ProcessDigits(digits);
Int_t written = clusterTree->Fill();
- AliDebug(10, Form("Filled %d bytes into cluster tree", written));
+ AliFMDDebug(10, ("Filled %d bytes into cluster tree", written));
digits->Delete();
delete digits;
}
// number of corrected ADC counts, and pass it on to the algorithms
// used.
Int_t nDigits = digits->GetEntries();
- AliDebug(1, Form("Got %d digits", nDigits));
+ AliFMDDebug(1, ("Got %d digits", nDigits));
fESDObj->SetNoiseFactor(fNoiseFactor);
fESDObj->SetAngleCorrected(fAngleCorrect);
for (Int_t i = 0; i < nDigits; i++) {
// Check that the strip is not marked as dead
if (param->IsDead(digit->Detector(), digit->Ring(),
digit->Sector(), digit->Strip())) {
- AliDebug(10, Form("FMD%d%c[%2d,%3d] is dead", digit->Detector(),
+ AliFMDDebug(10, ("FMD%d%c[%2d,%3d] is dead", digit->Detector(),
digit->Ring(), digit->Sector(), digit->Strip()));
continue;
}
// Make rough multiplicity
Double_t mult = Energy2Multiplicity(digit, edep);
- AliDebug(10, Form("FMD%d%c[%2d,%3d]: "
+ AliFMDDebug(10, ("FMD%d%c[%2d,%3d]: "
"ADC: %d, Counts: %d, Energy: %f, Mult: %f",
digit->Detector(), digit->Ring(), digit->Sector(),
digit->Strip(), digit->Counts(), counts, edep, mult));
digit->Ring(),
digit->Sector(),
digit->Strip());
- AliDebug(15, Form("Subtracting pedestal %f from signal %d",
+ AliFMDDebug(15, ("Subtracting pedestal %f from signal %d",
ped, digit->Counts()));
if (digit->Count3() > 0) adc = digit->Count3();
else if (digit->Count2() > 0) adc = digit->Count2();
else adc = digit->Count1();
counts = TMath::Max(Int_t(adc - ped), 0);
if (counts < noise * fNoiseFactor) counts = 0;
- if (counts > 0) AliDebug(15, "Got a hit strip");
+ if (counts > 0) AliFMDDebug(15, ("Got a hit strip"));
if (fDiagStep1) fDiagStep1->Fill(adc, counts);
return UShort_t(counts);
digit->Ring(),
digit->Sector(),
digit->Strip());
- AliDebug(15, Form("Converting counts %d to energy via factor %f",
+ AliFMDDebug(15, ("Converting counts %d to energy via factor %f",
count, gain));
Double_t edep = count * gain;
Double_t theta = 2 * TMath::ATan(TMath::Exp(-eta));
Double_t corr = TMath::Abs(TMath::Cos(theta));
Double_t cedep = corr * edep;
- AliDebug(10, Form("correcting for path %f * %f = %f (eta=%f, theta=%f)",
+ AliFMDDebug(10, ("correcting for path %f * %f = %f (eta=%f, theta=%f)",
edep, corr, cedep, eta, theta));
if (fDiagStep3) fDiagStep3->Fill(edep, cedep);
edep = cedep;
Double_t edepMIP = param->GetEdepMip();
Float_t mult = edep / edepMIP;
if (edep > 0)
- AliDebug(15, Form("Translating energy %f to multiplicity via "
+ AliFMDDebug(15, ("Translating energy %f to multiplicity via "
"divider %f->%f", edep, edepMIP, mult));
if (fDiagStep4) fDiagStep4->Fill(edep, mult);
return mult;
// nothing to be done
// FIXME: The vertex may not be known when Reconstruct is executed,
// so we may have to move some of that member function here.
- AliDebug(2, Form("Calling FillESD with two trees and one ESD"));
+ AliFMDDebug(2, ("Calling FillESD with two trees and one ESD"));
// fESDObj->Print();
if (esd) {
- AliDebug(2, Form("Writing FMD data to ESD tree"));
+ AliFMDDebug(2, ("Writing FMD data to ESD tree"));
esd->SetFMDData(fESDObj);
}
if (!fDiagnostics || !esd) return;
static bool first = true;
Int_t evno = esd->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
- AliDebug(1, Form("Writing diagnostics histograms to FMD.Diag.root/%03d",
+ AliFMDDebug(1, ("Writing diagnostics histograms to FMD.Diag.root/%03d",
evno));
TFile f("FMD.Diag.root", (first ? "RECREATE" : "UPDATE"));
first = false;
{
// Cannot be used. See member function with same name but with 2
// TTree arguments. Make sure you do local reconstrucion
- AliDebug(2, Form("Calling FillESD with loader and tree"));
+ AliFMDDebug(2, ("Calling FillESD with loader and tree"));
AliError("MayNotUse");
}
//____________________________________________________________________
{
// Cannot be used. See member function with same name but with 2
// TTree arguments. Make sure you do local reconstrucion
- AliDebug(2, Form("Calling FillESD with loader"));
+ AliFMDDebug(2, ("Calling FillESD with loader"));
AliError("MayNotUse");
}
//____________________________________________________________________
{
// Cannot be used. See member function with same name but with 2
// TTree arguments. Make sure you do local reconstrucion
- AliDebug(2, Form("Calling FillESD with loader and raw reader"));
+ AliFMDDebug(2, ("Calling FillESD with loader and raw reader"));
AliError("MayNotUse");
}
//____________________________________________________________________
{
// Cannot be used. See member function with same name but with 2
// TTree arguments. Make sure you do local reconstrucion
- AliDebug(2, Form("Calling FillESD with raw reader, tree, and ESD"));
+ AliFMDDebug(2, ("Calling FillESD with raw reader, tree, and ESD"));
AliError("MayNotUse");
}
//____________________________________________________________________
{
// Cannot be used. See member function with same name but with 2
// TTree arguments. Make sure you do local reconstrucion
- AliDebug(2, Form("Calling FillESD with loader and ESD"));
+ AliFMDDebug(2, ("Calling FillESD with loader and ESD"));
AliError("MayNotUse");
}
//____________________________________________________________________
{
// Cannot be used. See member function with same name but with 2
// TTree arguments. Make sure you do local reconstrucion
- AliDebug(2, Form("Calling FillESD with loader, raw reader, and ESD"));
+ AliFMDDebug(2, ("Calling FillESD with loader, raw reader, and ESD"));
AliError("MayNotUse");
}
// #include <TTree.h> // ROOT_TTree
//#include <TRandom.h> // ROOT_TRandom
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
+#include "AliFMDDebug.h" // Better debug macros
#include "AliFMDSDigitizer.h" // ALIFMDDIGITIZER_H
#include "AliFMD.h" // ALIFMD_H
// #include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
: AliFMDBaseDigitizer("FMDSDigitizer", "FMD SDigitizer")
{
// Normal CTOR
- AliDebug(1," processed");
+ AliFMDDebug(1, (" processed"));
fRunLoader = AliRunLoader::GetRunLoader(); // Open(headerFile);
if (!fRunLoader)
Int_t nEvents = Int_t(fRunLoader->TreeE()->GetEntries());
for (Int_t event = 0; event < nEvents; event++) {
- AliDebug(1,Form(" Digitizing event number %d", event));
+ AliFMDDebug(1, (" Digitizing event number %d", event));
// Get the current loader
fRunLoader->GetEvent(event);
#include <TVirtualMC.h> // ROOT_TVirtualMC
#include <AliRun.h> // ALIRUN_H
#include <AliMC.h> // ALIMC_H
-#include <AliLog.h> // ALILOG_H
+// #include <AliLog.h> // ALILOG_H
+#include "AliFMDDebug.h" // Better debug macros
#include "AliFMDv1.h" // ALIFMDV1_H
// #include "AliFMDGeometryBuilder.h"
#include "AliFMDGeometry.h"
if (t < 0 || t > 2 * theta) return kFALSE;
else if (t > theta) sector += 1;
- AliDebug(40, Form("<1> Inside an active FMD volume FMD%d%c[%2d,%3d] %s",
+ AliFMDDebug(40, ("<1> Inside an active FMD volume FMD%d%c[%2d,%3d] %s",
detector, ring, sector, strip, mc->CurrentVolPath()));
return kTRUE;
}
}
else
sector = sectordiv;
- AliDebug(30, Form("Getting ring volume with offset %d -> %s",
+ AliFMDDebug(30, ("Getting ring volume with offset %d -> %s",
fmd->GetRingOff(),
mc->CurrentVolOffName(fmd->GetRingOff())));
Int_t iring; mc->CurrentVolOffID(fmd->GetRingOff(), iring);
#if 0
if (rz < 0) {
Int_t s = ((n - sector + n / 2) % n) + 1;
- AliDebug(1, Form("Recalculating sector to %d (=%d-%d+%d/2%%%d+1 z=%f)",
+ AliFMDDebug(1, ("Recalculating sector to %d (=%d-%d+%d/2%%%d+1 z=%f)",
s, n, sector, n, n, rz));
sector = s;
}
sector--;
// Get track position
mc->TrackPosition(v);
- AliDebug(15, Form("<2> Inside an active FMD volume FMD%d%c[%2d,%3d] %s",
+ AliFMDDebug(15, ("<2> Inside an active FMD volume FMD%d%c[%2d,%3d] %s",
detector, ring, sector, strip, mc->CurrentVolPath()));
return kTRUE;
if (mc->IsTrackOut()) what.Append("out ");
Int_t mother = gAlice->GetMCApp()->GetPrimary(trackno);
- AliDebug(15, Form("Track # %5d deposits a lot of energy\n"
+ AliFMDDebug(15, ("Track # %5d deposits a lot of energy\n"
" Volume: %s\n"
" Momentum: (%7.4f,%7.4f,%7.4f)\n"
" PDG: %d (%s)\n"
Int_t vol = mc->CurrentVolID(copy);
AliFMDGeometry* fmd = AliFMDGeometry::Instance();
if (!fmd->IsActive(vol)) {
- AliDebug(50, Form("Not an FMD volume %d '%s'",vol,mc->CurrentVolName()));
+ AliFMDDebug(50, ("Not an FMD volume %d '%s'",vol,mc->CurrentVolName()));
return;
}
TLorentzVector v;
// Reset the energy deposition for this track, and update some of
// our parameters.
if (entering) {
- AliDebug(15, Form("Track # %8d entering active FMD volume %s: "
+ AliFMDDebug(15, ("Track # %8d entering active FMD volume %s: "
"Edep=%f (%f,%f,%f)", trackno, mc->CurrentVolPath(),
edep, v.X(), v.Y(), v.Z()));
fCurrentP = p;
// If the track is inside, then update the energy deposition
if (inside && fCurrentDeltaE >= 0) {
fCurrentDeltaE += edep;
- AliDebug(15, Form("Track # %8d inside active FMD volume %s: Edep=%f, "
+ AliFMDDebug(15, ("Track # %8d inside active FMD volume %s: Edep=%f, "
"Accumulated Edep=%f (%f,%f,%f)", trackno,
mc->CurrentVolPath(), edep, fCurrentDeltaE,
v.X(), v.Y(), v.Z()));
if (out) {
if (fCurrentDeltaE >= 0) {
fCurrentDeltaE += edep;
- AliDebug(15, Form("Track # %8d exiting active FMD volume %s: Edep=%g, "
+ AliFMDDebug(15, ("Track # %8d exiting active FMD volume %s: Edep=%g, "
"Accumulated Edep=%g (%f,%f,%f)", trackno,
mc->CurrentVolPath(), edep, fCurrentDeltaE,
v.X(), v.Y(), v.Z()));
#ifdef CHECK_TRANS
Double_t x, y, z;
fmd->Detector2XYZ(detector, ring, sector, strip, x, y ,z);
- AliDebug(1, Form("Hit at (%f,%f,%f), geometry says (%f,%f,%f)",
+ AliFMDDebug(1, ("Hit at (%f,%f,%f), geometry says (%f,%f,%f)",
fCurrentV.X(), fCurrentV.Y(), fCurrentV.Z(), x, y, z));
#endif
}
// This part for configuration
// EG_t eg = test50;
// EG_t eg = kParam_fmd;
- // EG_t eg = kParam_2000; // kPythia;
- EG_t eg = kFMDFlat;
+ EG_t eg = kParam_2000; // kPythia;
+ // EG_t eg = kFMDFlat;
Geo_t geo = kNoHoles;
Rad_t rad = kGluonRadiation;
Mag_t mag = k5kG;
void
Reconstruct()
{
- AliLog::SetModuleDebugLevel("FMD", 1);
+ // AliLog::SetModuleDebugLevel("FMD", 1);
AliReconstruction rec;
rec.SetRunLocalReconstruction("FMD");
rec.SetRunVertexFinder(kFALSE);
#include <TStyle.h>
#include <TArrayF.h>
#include <AliLog.h>
+#include <TMath.h>
/** @class DrawHitsDigits
@brief Draw hit energy loss versus digit ADC
TH2D* fHitEvsRecE; // Histogram
TH1D* fDiffE; // Histogram
TH2D* fHitsVsRecM; // Histogram
+ TH2D* fDiffM; // Histogram
AliFMDEdepMap fMap;
AliFMDFloatMap fEta;
AliFMDFloatMap fPhi;
o, omin, omax, m, mmin, mmax);
fHitsVsRecM->SetXTitle("# of Hits");
fHitsVsRecM->SetYTitle("M_{rec}");
+
+ fDiffM = new TH2D("diffM", "M_{sim} - M_{rec}",
+ 41, -20.5, 20.5, 70, 1.5, 5);
+ // 36, -TMath::Pi(),TMath::Pi());
+ fDiffM->SetXTitle("M_{sim} - M_{rec}");
+ fDiffM->SetYTitle("|#eta|");
+ // fDiffM->SetYTitle("Detector");
+
}
//__________________________________________________________________
/** Begining of event
fDiffE->Fill((single->Edep() - edep) / edep);
}
if (nhit > 0) fHitsVsRecM->Fill(nhit, single->Particles());
+ fDiffM->Fill(nhit - single->Particles(), TMath::Abs(single->Eta()));
return kTRUE;
}
//__________________________________________________________________
gStyle->SetCanvasBorderSize(0);
gStyle->SetPadColor(0);
gStyle->SetPadBorderSize(0);
+ TCanvas* c = 0;
- new TCanvas("c0", fHitEvsAdc->GetTitle());
+ c = new TCanvas("c0", fHitEvsAdc->GetTitle());
fHitEvsAdc->SetStats(kFALSE);
fHitEvsAdc->Draw("COLZ");
- new TCanvas("c1", fHitEvsRecM->GetTitle());
+ c = new TCanvas("c1", fHitEvsRecM->GetTitle());
fHitEvsRecM->SetStats(kFALSE);
fHitEvsRecM->Draw("COLZ");
- new TCanvas("c2", fHitEvsRecE->GetTitle());
+ c = new TCanvas("c2", fHitEvsRecE->GetTitle());
fHitEvsRecE->SetStats(kFALSE);
fHitEvsRecE->Draw("COLZ");
- new TCanvas("c3", fDiffE->GetTitle());
+ c = new TCanvas("c3", fDiffE->GetTitle());
+ c->SetLogz();
fDiffE->Draw();
- new TCanvas("c4", fHitsVsRecM->GetTitle());
+ c = new TCanvas("c4", fHitsVsRecM->GetTitle());
+ c->SetLogz();
fHitsVsRecM->SetStats(kFALSE);
fHitsVsRecM->Draw("COLZ");
+ c = new TCanvas("c5", fDiffM->GetTitle());
+ fDiffM->SetFillColor(2);
+ fDiffM->SetFillStyle(3001);
+ c->SetLogz();
+ fDiffM->Draw("colz");
+
+
return kTRUE;
}