UShort_t sector = fmdHit->Sector();
UShort_t strip = fmdHit->Strip();
Float_t edep = fmdHit->Edep();
- UShort_t minstrip = param->GetMinStrip(detector, ring, sector, strip);
- UShort_t maxstrip = param->GetMaxStrip(detector, ring, sector, strip);
+ // UShort_t minstrip = param->GetMinStrip(detector, ring, sector, strip);
+ // UShort_t maxstrip = param->GetMaxStrip(detector, ring, sector, strip);
// Check if strip is `dead'
if (param->IsDead(detector, ring, sector, strip)) {
AliDebug(5, Form("FMD%d%c[%2d,%3d] is marked as dead",
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]",
- detector, ring, sector, strip, minstrip, maxstrip));
- continue;
- }
+ // if (strip < minstrip || strip > maxstrip) {
+ // AliDebug(5, Form("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)
AliFMDParameters* param = AliFMDParameters::Instance();
Float_t convF = 1/param->GetPulseGain(detector,ring,sector,strip);
UShort_t ped = MakePedestal(detector,ring,sector,strip);
- UInt_t maxAdc = param->GetAltroChannelSize();
+ UInt_t maxAdc = param->GetAltroChannelSize()-1;
UShort_t rate = param->GetSampleRate(detector,ring,sector,strip);
// In case we don't oversample, just return the end value.
// (x,y,z) coordinates (in global reference frame)
AliFMDRing* r = GetRing(ring);
if (!r) return;
-#if 1
TGeoMatrix* m = FindTransform(ring, sector);
if (!m) return;
Double_t rho = r->GetStripRadius(strip);
+ r->GetCopperThickness()
+ r->GetChipThickness()
+ r->GetSpacing());
- AliDebug(10,Form("Rho %7.3f, angle %7.3f", rho, phi));
+ AliDebug(30,Form("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(10, Form("Local (%7.3f,%7.3f,%7.3f)",local[0], local[1], local[2]));
+ AliDebug(30, Form("Local (%7.3f,%7.3f,%7.3f)",local[0], local[1], local[2]));
m->LocalToMaster(local, master);
- AliDebug(10, Form("Master (%7.3f,%7.3f,%7.3f)",
+ AliDebug(30, Form("Master (%7.3f,%7.3f,%7.3f)",
master[0],master[1],master[2]));
x = master[0];
y = master[1];
z = master[2];
-#else
- z = GetRingZ(ring);
- r->Detector2XYZ(sector, strip, x, y, z);
-#endif
}
//____________________________________________________________________
#include "AliFMDRecPoint.h" // ALIFMDRECPOINT_H
#include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
#include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
-// #include <AliESDFMD.h> // ALIESDFMD_H
+#include <AliESDFMD.h> // ALIESDFMD_H
#include <AliLog.h>
#include <TStyle.h>
// #include <TArrayF.h>
fMarkers->SetOwner(kTRUE);
fHits->SetOwner(kFALSE);
fgInstance = this;
+ SetMultiplicityCut();
+ SetPedestalFactor();
}
//____________________________________________________________________
return gStyle->GetColorPalette(idx);
}
+//____________________________________________________________________
+void
+AliFMDDisplay::AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
+ TObject* o, Float_t s, Float_t max)
+{
+ // Add a marker to the display
+ //
+ // det Detector
+ // rng Ring
+ // sec Sector
+ // str Strip
+ // o Object to refer to
+ // s Signal
+ // max Maximum of signal
+ //
+ AliFMDGeometry* geom = AliFMDGeometry::Instance();
+ Double_t x, y, z;
+ geom->Detector2XYZ(det, rng, sec, str, x, y, z);
+ Float_t size = .1;
+ Float_t zsize = s / max * 10;
+ Float_t r = TMath::Sqrt(x * x + y * y);
+ Float_t theta = TMath::ATan2(r, z);
+ Float_t phi = TMath::ATan2(y, x);
+ Float_t rz = z + (z < 0 ? 1 : -1) * zsize;
+ TMarker3DBox* marker = new TMarker3DBox(x,y,rz,size,size,zsize,theta,phi);
+ if (o) marker->SetRefObject(o);
+ marker->SetLineColor(LookupColor(s, max));
+ fMarkers->Add(marker);
+}
+
//____________________________________________________________________
Bool_t
fHits->Add(hit);
Float_t size = .1;
+ Float_t zsize = hit->Edep() * 10;
+ Float_t z = hit->Z() + (hit->Z() < 0 ? 1 : -1) * zsize;
Float_t pt = TMath::Sqrt(hit->Py()*hit->Py()+hit->Px()*hit->Px());
Float_t theta = TMath::ATan2(pt, hit->Pz());
Float_t phi = TMath::ATan2(hit->Py(), hit->Px());
- TMarker3DBox* marker = new TMarker3DBox(hit->X(), hit->Y(), hit->Z(),
- size, size, size, theta, phi);
+ TMarker3DBox* marker = new TMarker3DBox(hit->X(), hit->Y(), z,
+ size, size, zsize, theta, phi);
marker->SetLineColor(LookupColor(hit->Edep(), 1));
marker->SetRefObject(hit);
fMarkers->Add(marker);
// Process a digit
if (!digit) { AliError("No digit"); return kFALSE; }
- Double_t x, y, z;
- AliFMDGeometry* geom = AliFMDGeometry::Instance();
AliFMDParameters* parm = AliFMDParameters::Instance();
- Double_t threshold = (parm->GetPedestal(digit->Detector(),
- digit->Ring(),
- digit->Sector(),
- digit->Strip())
- + 4 * parm->GetPedestalWidth(digit->Detector(),
- digit->Ring(),
- digit->Sector(),
- digit->Strip()));
- if (digit->Counts() < threshold) return kTRUE;
+ UShort_t det = digit->Detector();
+ Char_t ring = digit->Ring();
+ UShort_t sec = digit->Sector();
+ UShort_t str = digit->Strip();
+ Double_t ped = parm->GetPedestal(det,ring, sec, str);
+ Double_t pedW = parm->GetPedestalWidth(det,ring, sec, str);
+ Double_t threshold = ped * fPedestalFactor * pedW;
+ Float_t counts = digit->Counts();
+ if (counts < threshold) return kTRUE;
fHits->Add(digit);
- geom->Detector2XYZ(digit->Detector(), digit->Ring(), digit->Sector(),
- digit->Strip(), x, y, z);
- Float_t size = .1;
- Float_t r = TMath::Sqrt(x * x + y * y);
- Float_t theta = TMath::ATan2(r, z);
- Float_t phi = TMath::ATan2(y, x);
- TMarker3DBox* marker = new TMarker3DBox(x,y,z,size,size,size,theta,phi);
- marker->SetRefObject(digit);
- marker->SetLineColor(LookupColor(digit->Counts(), 1024));
- fMarkers->Add(marker);
+
+ AddMarker(det, ring, sec, str, digit, counts, 1024);
return kTRUE;
}
{
// Process reconstructed point
if (!recpoint) { AliError("No recpoint"); return kFALSE; }
- if (recpoint->Particles() < .1) return kTRUE;
+ if (recpoint->Particles() < fMultCut) return kTRUE;
fHits->Add(recpoint);
- Double_t x, y, z;
- AliFMDGeometry* geom = AliFMDGeometry::Instance();
- geom->Detector2XYZ(recpoint->Detector(), recpoint->Ring(),
- recpoint->Sector(), recpoint->Strip(), x, y, z);
+ AddMarker(recpoint->Detector(), recpoint->Ring(), recpoint->Sector(),
+ recpoint->Strip(), recpoint, recpoint->Particles(), 20);
+ return kTRUE;
+}
- Float_t size = .1;
- Float_t r = TMath::Sqrt(x * x + y * y);
- Float_t theta = TMath::ATan2(r, z);
- Float_t phi = TMath::ATan2(y, x);
- TMarker3DBox* marker = new TMarker3DBox(x,y,z,size,size,size,theta,phi);
- marker->SetRefObject(recpoint);
- marker->SetLineColor(LookupColor(recpoint->Particles(), 20));
- fMarkers->Add(marker);
+//____________________________________________________________________
+Bool_t
+AliFMDDisplay::ProcessESD(AliESDFMD* esd)
+{
+ // Process event summary data
+ for (UShort_t det = 1; det <= 3; det++) {
+ Char_t rings[] = { 'I', (det == 1 ? '\0' : 'O'), '\0' };
+ for (Char_t* rng = rings; *rng != '\0'; rng++) {
+ UShort_t nsec = (*rng == 'I' ? 20 : 40);
+ UShort_t nstr = (*rng == 'O' ? 512 : 256);
+ for (UShort_t sec = 0; sec < nsec; sec++) {
+ for (UShort_t str = 0; str < nstr; str++) {
+ Float_t mult = esd->Multiplicity(det,*rng,sec,str);
+ if (mult < fMultCut) continue;
+ AddMarker(det,*rng,sec,str, 0, mult, 20);
+ }
+ }
+ }
+ }
return kTRUE;
}
@param recpoint Reconstructed point
@return @c false on error */
virtual Bool_t ProcessRecPoint(AliFMDRecPoint* recpoint);
+ /** Visualize data in ESD
+ @param esd FMD ESD data
+ @return Always @c true */
+ virtual Bool_t ProcessESD(AliESDFMD* esd);
/** Look up a color index, based on the value @a x and the maximum
value of @a x
@param x Value
@param max Maximum (for example 1023 for digits)
@return @c false on error */
virtual Int_t LookupColor(Float_t x, Float_t max) const;
+ /** Set multiplicity cut
+ @param cut Cut-off in multiplicity */
+ virtual void SetMultiplicityCut(Float_t c=.01) { fMultCut = c; }//*MENU*
+ /** Set pedestal width factor
+ @param fac Factor */
+ virtual void SetPedestalFactor(Float_t f=3) { fPedestalFactor = f; }//*MENU*
protected:
+ /** Copy constructor
+ @param o Object to copy from */
AliFMDDisplay(const AliFMDDisplay& o) : AliFMDInput(o) { }
+ /** Assignment operator
+ @return Reference to this object */
AliFMDDisplay& operator=(const AliFMDDisplay&) { return *this; }
+ /** Add a marker to the display
+ @param det Detector
+ @param rng Ring
+ @param sec Sector
+ @param str Strip
+ @param o Object to refer to
+ @param s Signal
+ @param max Maximum of signal */
+ void AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
+ TObject* o, Float_t s, Float_t max);
static AliFMDDisplay* fgInstance; // Static instance
Bool_t fWait; // Wait until user presses `Continue'
Float_t fY0; // Y at lower left corner or range
Float_t fX1; // X at upper right corner or range
Float_t fY1; // Y at upper right corner or range
+ Float_t fMultCut; // Multiplicity cut
+ Float_t fPedestalFactor; // ADC acceptance factor
Int_t fXPixel; // X pixel of mark
Int_t fYPixel; // Y pixel of mark
Int_t fOldXPixel; // Old x pixel of mark
AliFMDParameters* param = AliFMDParameters::Instance();
// Check that the strip is not marked as dead
if (param->IsDead(digit->Detector(), digit->Ring(),
- digit->Sector(), digit->Strip())) continue;
+ digit->Sector(), digit->Strip())) {
+ AliDebug(10, Form("FMD%d%c[%2d,%3d] is dead", digit->Detector(),
+ digit->Ring(), digit->Sector(), digit->Strip()));
+ continue;
+ }
// digit->Print();
// Get eta and phi
digit->Ring(),
digit->Sector(),
digit->Strip());
- AliDebug(10, Form("Subtracting pedestal %f from signal %d",
+ AliDebug(15, Form("Subtracting pedestal %f from signal %d",
pedM, digit->Counts()));
if (digit->Count3() > 0) counts = digit->Count3();
else if (digit->Count2() > 0) counts = digit->Count2();
else counts = digit->Count1();
counts = TMath::Max(Int_t(counts - pedM), 0);
- if (counts > 0) AliDebug(10, "Got a hit strip");
+ if (counts > 0) AliDebug(15, "Got a hit strip");
return UShort_t(counts);
}
digit->Sector(),
digit->Strip());
Double_t edep = count * gain;
- AliDebug(10, Form("Converting counts %d to energy via factor %f",
+ AliDebug(15, Form("Converting counts %d to energy via factor %f",
count, gain));
return edep;
}
Double_t edepMIP = param->GetEdepMip();
Float_t mult = edep / edepMIP;
if (edep > 0)
- AliDebug(10, Form("Translating energy %f to multiplicity via "
+ AliDebug(15, Form("Translating energy %f to multiplicity via "
"divider %f->%f", edep, edepMIP, mult));
return mult;
}
void
Reconstruct()
{
- AliCDBManager* cdb = AliCDBManager::Instance();
- cdb->SetDefaultStorage("local://$ALICE_ROOT");
- AliLog::SetModuleDebugLevel("FMD", 2);
+ AliLog::SetModuleDebugLevel("FMD", 1);
AliReconstruction rec;
- AliCDBEntry* align = cdb->Get("FMD/Align/Data");
- if (align) {
- TClonesArray* array = dynamic_cast<TClonesArray*>(align->GetObject());
- if (array) {
- Int_t nAlign = array->GetEntries();
- for (Int_t i = 0; i < nAlign; i++) {
- AliAlignObjAngles* a = static_cast<AliAlignObjAngles*>(array->At(i));
- if (!a->ApplyToGeometry()) {
- Warning("ApplyAlignement", "Failed to apply alignment to %s",
- a->GetVolPath());
- }
- }
- }
- }
rec.SetRunLocalReconstruction("FMD");
rec.SetRunVertexFinder(kFALSE);
rec.SetRunTracking("");
void
Simulate()
{
- AliCDBManager* cdb = AliCDBManager::Instance();
- cdb->SetDefaultStorage("local://$ALICE_ROOT");
AliSimulation sim;
- AliCDBEntry* align = cdb->Get("FMD/Align/Data");
- if (align) {
- TClonesArray* array = dynamic_cast<TClonesArray*>(align->GetObject());
- if (array) sim.SetAlignObjArray(array);
- }
- AliLog::SetModuleDebugLevel("FMD", 2);
+ AliLog::SetModuleDebugLevel("FMD", 1);
sim.SetConfigFile("$(ALICE_ROOT)/FMD/Config.C");
// sim.SetMakeSDigits("FMD");
sim.SetMakeDigits("FMD");
--- /dev/null
+//____________________________________________________________________
+//
+// $Id$
+//
+// Draw hits in the specialised FMD event display
+//
+/** Display hits
+ @ingroup FMD_script
+ */
+void
+DisplayDigits()
+{
+ AliCDBManager* cdb = AliCDBManager::Instance();
+ cdb->SetDefaultStorage("local://$ALICE_ROOT");
+ gSystem->Load("libFMDutil.so");
+ AliFMDDisplay* d = new AliFMDDisplay;
+ d->AddLoad(AliFMDInput::kDigits);
+ // d->AddLoad(AliFMDInput::kKinematics);
+ d->Run();
+}
+
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+//____________________________________________________________________
+//
+// $Id$
+//
+// Draw hits in the specialised FMD event display
+//
+/** Display hits
+ @ingroup FMD_script
+ */
+void
+DisplayESD()
+{
+ AliCDBManager* cdb = AliCDBManager::Instance();
+ cdb->SetDefaultStorage("local://$ALICE_ROOT");
+ gSystem->Load("libFMDutil.so");
+ AliFMDDisplay* d = new AliFMDDisplay;
+ d->AddLoad(AliFMDInput::kESD);
+ // d->AddLoad(AliFMDInput::kDigits);
+ // d->AddLoad(AliFMDInput::kKinematics);
+ d->Run();
+}
+
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+//____________________________________________________________________
+//
+// $Id$
+//
+// Draw hits in the specialised FMD event display
+//
+/** Display hits
+ @ingroup FMD_script
+ */
+void
+DisplayRecs()
+{
+ AliCDBManager* cdb = AliCDBManager::Instance();
+ cdb->SetDefaultStorage("local://$ALICE_ROOT");
+ gSystem->Load("libFMDutil.so");
+ AliFMDDisplay* d = new AliFMDDisplay;
+ d->AddLoad(AliFMDInput::kRecPoints);
+ // d->AddLoad(AliFMDInput::kDigits);
+ // d->AddLoad(AliFMDInput::kKinematics);
+ d->Run();
+}
+
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+//____________________________________________________________________
+//
+// $Id$
+//
+// Script that contains a class to draw eloss from hits, versus ADC
+// counts from digits, using the AliFMDInputHits class in the util library.
+//
+// It draws the energy loss versus the p/(mq^2). It can be overlayed
+// with the Bethe-Bloc curve to show how the simulation behaves
+// relative to the expected.
+//
+// Use the script `Compile.C' to compile this class using ACLic.
+//
+#include <TH1D.h>
+#include <AliFMDHit.h>
+#include <AliFMDDigit.h>
+#include <AliFMDInput.h>
+#include <AliFMDEdepMap.h>
+#include <iostream>
+#include <TStyle.h>
+#include <TArrayF.h>
+#include <AliLog.h>
+
+/** @class DrawDigits
+ @brief Draw hit energy loss versus digit ADC
+ @code
+ Root> .L Compile.C
+ Root> Compile("DrawDigits.C")
+ Root> DrawDigits c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
+class DrawDigits : public AliFMDInput
+{
+private:
+ TH1D* fAdc; // Histogram
+public:
+ //__________________________________________________________________
+ DrawDigits(Int_t m=1100, Double_t amin=-0.5, Double_t amax=1099.5)
+ {
+ AddLoad(kDigits);
+ fAdc = new TH1D("adc", "ADC", m, amin, amax);
+ fAdc->SetXTitle("ADC value");
+ }
+ //__________________________________________________________________
+ Bool_t ProcessDigit(AliFMDDigit* digit)
+ {
+ if (!digit) return kTRUE;
+ fAdc->Fill(digit->Counts());
+ return kTRUE;
+ }
+ //__________________________________________________________________
+ Bool_t Finish()
+ {
+ gStyle->SetPalette(1);
+ gStyle->SetOptTitle(0);
+ gStyle->SetCanvasColor(0);
+ gStyle->SetCanvasBorderSize(0);
+ gStyle->SetPadColor(0);
+ gStyle->SetPadBorderSize(0);
+ fAdc->SetStats(kFALSE);
+ fAdc->Draw();
+ return kTRUE;
+ }
+
+ ClassDef(DrawDigits,0);
+};
+
+//____________________________________________________________________
+//
+// EOF
+//
//
#include <TH2D.h>
#include <AliFMDHit.h>
-#include <AliFMDMultStrip.h>
-#include <AliFMDMultRegion.h>
#include <AliFMDDigit.h>
+#include <AliFMDRecPoint.h>
#include <AliFMDInput.h>
#include <AliFMDEdepMap.h>
#include <AliFMDFloatMap.h>
@endcode
@ingroup FMD_script
*/
-class DrawHitsRecs : public AliFMDInputHits
+class DrawHitsRecs : public AliFMDInput
{
private:
- TH2D* fElossVsMult; // Histogram
- TH2D* fHitsVsStrip; // Histogram
- TH2D* fHitsVsRegion; // Histogram
- AliFMDEdepMap fMap;
+ TH2D* fHitEvsAdc;
+ TH2D* fHitEvsRecM; // Histogram
+ TH2D* fHitEvsRecE; // Histogram
+ TH1D* fDiffE; // Histogram
+ TH2D* fHitsVsRecM; // Histogram
+ AliFMDEdepMap fMap;
AliFMDFloatMap fEta;
AliFMDFloatMap fPhi;
AliFMDFloatMap fMult;
fPrimary = primary;
AddLoad(kRecPoints);
AddLoad(kHits);
+ AddLoad(kDigits);
if (fPrimary) AddLoad(kKinematics);
TArrayF eloss(MakeLogScale(n, emin, emax));
TArrayF mults(m+1);
mults[0] = mmin;
for (Int_t i = 1; i < m+1; i++) mults[i] = mults[i-1] + (mmax-mmin)/m;
- fElossVsMult = new TH2D("elossVsMult",
- "#Delta E vs. Multiplicity (single)",
+
+ fHitEvsAdc = new TH2D("hitEvsAdc", "#Delta E_{sim} vs. ADC",
+ n, emin, emax, 1025, -.5, 1024.5);
+ fHitEvsAdc->SetXTitle("#Delta E_{sim} [MeV]");
+ fHitEvsAdc->SetYTitle("ADC");
+
+ fHitEvsRecM = new TH2D("hitEvsRecM", "#Delta E_{sim} vs. M_{rec}",
eloss.fN-1, eloss.fArray, mults.fN-1, mults.fArray);
- fElossVsMult->SetXTitle("#Delta E/#Delta x [MeV/cm]");
- fElossVsMult->SetYTitle("Strip Multiplicity");
+ fHitEvsRecM->SetXTitle("#Delta E_{sim} [MeV]");
+ fHitEvsRecM->SetYTitle("M_{rec}");
+
+ fHitEvsRecE = new TH2D("hitEvsRecE", "#Delta E_{sim} vs. #Delta E_{rec}",
+ n, emin, emax, n, emin, emax);
+ fHitEvsRecE->SetXTitle("#Delta E_{sim} [MeV]");
+ fHitEvsRecE->SetYTitle("#Delta E_{rec} [MeV]");
+
+ fDiffE = new TH1D("diffE",
+ "#frac{#Delta E_{sim}-#Delta E_{rec}}{#Delta E_{sim}}",
+ 1100, -1, 1.1);
+ fDiffE->SetXTitle("#frac{#Delta E_{sim}-#Delta E_{rec}}{#Delta E_{sim}}");
+
Double_t omin = -.5;
Double_t omax = 7.5;
Int_t o = 8;
- fHitsVsStrip = new TH2D("hitsVsStrip",
- "# of Hits vs. Multiplicity (strip)",
+ fHitsVsRecM = new TH2D("hitsVsStrip", "# of Hits vs. M_{rec}",
o, omin, omax, m, mmin, mmax);
- fHitsVsStrip->SetXTitle("# of Hits");
- fHitsVsStrip->SetYTitle("Strip Multiplicity");
+ fHitsVsRecM->SetXTitle("# of Hits");
+ fHitsVsRecM->SetYTitle("M_{rec}");
}
//__________________________________________________________________
/** Begining of event
Bool_t Begin(Int_t ev)
{
fMap.Reset();
- return AliFMDInputHits::Begin(ev);
+ return AliFMDInput::Begin(ev);
}
//__________________________________________________________________
Bool_t ProcessHit(AliFMDHit* hit, TParticle*)
fMap(det, rng, sec, str).fN++;
return kTRUE;
}
+
+ //__________________________________________________________________
+ Bool_t ProcessDigit(AliFMDDigit* digit)
+ {
+ if (!digit) return kTRUE;
+
+ UShort_t det = digit->Detector();
+ Char_t rng = digit->Ring();
+ UShort_t sec = digit->Sector();
+ UShort_t str = digit->Strip();
+ if (str > 511) {
+ AliWarning(Form("Bad strip number %d in digit", str));
+ return kTRUE;
+ }
+ Double_t edep = fMap(det, rng, sec, str).fEdep;
+ if (edep > 0) fHitEvsAdc->Fill(edep, digit->Counts());
+
+ return kTRUE;
+ }
+
//__________________________________________________________________
Bool_t ProcessRecPoint(AliFMDRecPoint* single)
{
- if (!single) continue;
+ if (!single) return kTRUE;
UShort_t det = single->Detector();
Char_t rng = single->Ring();
UShort_t sec = single->Sector();
UShort_t str = single->Strip();
if (str > 511) {
AliWarning(Form("Bad strip number %d in single", str));
- continue;
+ return kTRUE;
+ }
+ Double_t edep = fMap(det, rng, sec, str).fEdep;
+ Int_t nhit = fMap(det, rng, sec, str).fN;
+ if (edep > 0) {
+ fHitEvsRecM->Fill(edep, single->Particles());
+ fHitEvsRecE->Fill(edep, single->Edep());
+ fDiffE->Fill((single->Edep() - edep) / edep);
}
- if (fMap(det, rng, sec, str).fEdep > 0)
- fElossVsMult->Fill(fMap(det, rng, sec, str).fEdep,
- single->Particles());
- if (fMap(det, rng, sec, str).fN > 0)
- fHitsVsStrip->Fill(fMap(det, rng, sec, str).fN,
- single->Particles());
+ if (nhit > 0) fHitsVsRecM->Fill(nhit, single->Particles());
return kTRUE;
}
//__________________________________________________________________
gStyle->SetPadColor(0);
gStyle->SetPadBorderSize(0);
- new TCanvas("c1", "Energy loss vs. Strip Multiplicity");
- fElossVsMult->SetStats(kFALSE);
- fElossVsMult->Draw("COLZ");
+ new TCanvas("c0", fHitEvsAdc->GetTitle());
+ fHitEvsAdc->SetStats(kFALSE);
+ fHitEvsAdc->Draw("COLZ");
+
+ new TCanvas("c1", fHitEvsRecM->GetTitle());
+ fHitEvsRecM->SetStats(kFALSE);
+ fHitEvsRecM->Draw("COLZ");
+
+ new TCanvas("c2", fHitEvsRecE->GetTitle());
+ fHitEvsRecE->SetStats(kFALSE);
+ fHitEvsRecE->Draw("COLZ");
+
+ new TCanvas("c3", fDiffE->GetTitle());
+ fDiffE->Draw();
- new TCanvas("c2", "# of Hits vs. Strip Multiplicity");
- fHitsVsStrip->SetStats(kFALSE);
- fHitsVsStrip->Draw("COLZ");
+ new TCanvas("c4", fHitsVsRecM->GetTitle());
+ fHitsVsRecM->SetStats(kFALSE);
+ fHitsVsRecM->Draw("COLZ");
return kTRUE;
}
--- /dev/null
+//____________________________________________________________________
+//
+// $Id$
+//
+// Make fake alignment data.
+//
+/** @file PrintCalibration.C
+ @author Christian Holm Christensen <cholm@nbi.dk>
+ @date Sun Mar 26 17:58:27 2006
+ @brief Make fake calibration data.
+*/
+/** Make fake calibration data
+ @ingroup simple_script
+ */
+void
+PrintCalibration()
+{
+ AliCDBManager* cdb = AliCDBManager::Instance();
+ cdb->SetDefaultStorage("local://$ALICE_ROOT");
+ cdb->SetRun(0);
+ AliFMDParameters* p = AliFMDParameters::Instance();
+ p->Init();
+ p->Print("fmd1I[0,0]");
+ p->Draw("pedestal");
+}
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+void
+res(Char_t i)
+{
+ Double_t pitch = (i == 'I' ? 0.025 : 0.048);
+ Double_t open = (i == 'I' ? 18.0 : 9.0 ) / 180 * TMath::Pi();
+ Double_t rmin = (i == 'I' ? 4.3 : 15.6 );
+ Double_t rmax = (i == 'I' ? 17.2 : 28.0 );
+ Double_t phimin = 0;
+ Double_t phimax = 2 * TMath::Pi();
+ TF2* xres = new TF2("xres", "sqrt(pow(cos(x),2)*[0]+y*y*pow(sin(x),2)*[1])",
+ phimin,phimax,rmin,rmax);
+ TF2* yres = new TF2("yres", "sqrt(pow(sin(x),2)*[0]+y*y*pow(cos(x),2)*[1])",
+ phimin,phimax,rmin,rmax);
+ xres->SetParameters(pitch*pitch, open*open);
+ yres->SetParameters(pitch*pitch, open*open);
+ xres->GetHistogram()->SetXTitle("#phi [radians]");
+ xres->GetHistogram()->SetYTitle("r [cm]");
+ xres->GetHistogram()->SetZTitle("#delta x [cm]");
+ yres->GetHistogram()->SetXTitle("#phi [radians]");
+ yres->GetHistogram()->SetYTitle("r [cm]");
+ yres->GetHistogram()->SetZTitle("#delta y [cm]");
+ xres->SetLineColor(i == 'I' ? 2 : 6);
+ yres->SetLineColor(i == 'I' ? 3 : 7);
+ gStyle->SetOptTitle(0);
+ gStyle->SetOptStat(0);
+ xres->Draw("surf");
+ yres->Draw("same surf");
+
+ TLegend* l = new TLegend(.7,.8,.95,.95, i == 'I' ? "Inner" : "Outer");
+ l->SetBorderSize(0);
+ l->AddEntry(xres, "#delta x", "l");
+ l->AddEntry(yres, "#delta y", "l");
+ l->Draw();
+}
+