- fDiagStep1 = new TH2I("diagStep1", "Read ADC vs. Noise surpressed ADC",
- 1024, -.5, 1023.5, 1024, -.5, 1023.5);
- fDiagStep1->SetDirectory(0);
- fDiagStep1->GetXaxis()->SetTitle("ADC (read)");
- fDiagStep1->GetYaxis()->SetTitle(Form("ADC (noise surpressed %4.f)",
- fNoiseFactor));
- fDiagStep2 = new TH2F("diagStep2", "ADC vs Edep deduced",
- 1024, -.5, 1023.5, 100, 0, 2);
- fDiagStep2->SetDirectory(0);
- fDiagStep2->GetXaxis()->SetTitle("ADC (noise surpressed)");
- fDiagStep2->GetYaxis()->SetTitle("#Delta E [GeV]");
- fDiagStep3 = new TH2F("diagStep3", "Edep vs Edep path corrected",
- 100, 0., 2., 100, 0., 2.);
- fDiagStep3->SetDirectory(0);
- fDiagStep3->GetXaxis()->SetTitle("#Delta E [GeV]");
- fDiagStep3->GetYaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
- fDiagStep4 = new TH2F("diagStep4", "Edep vs Multiplicity deduced",
- 100, 0., 2., 100, -.1, 19.9);
- fDiagStep4->SetDirectory(0);
- fDiagStep4->GetXaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
- fDiagStep4->GetYaxis()->SetTitle("Multiplicity");
- fDiagAll = new TH2F("diagAll", "Read ADC vs Multiplicity deduced",
- 1024, -.5, 1023.5, 100, -.1, 19.9);
- fDiagAll->SetDirectory(0);
- fDiagAll->GetXaxis()->SetTitle("ADC (read)");
- fDiagAll->GetYaxis()->SetTitle("Multiplicity");
+ if (!fDiagStep1) {
+ fDiagStep1 = new TH2I("diagStep1", "Read ADC vs. Noise surpressed ADC",
+ 1024, -.5, 1023.5, 1024, -.5, 1023.5);
+ fDiagStep1->SetDirectory(0);
+ fDiagStep1->GetXaxis()->SetTitle("ADC (read)");
+ fDiagStep1->GetYaxis()->SetTitle(Form("ADC (noise surpressed %4.f)",
+ fNoiseFactor));
+ }
+ if (!fDiagStep2) {
+ fDiagStep2 = new TH2F("diagStep2", "ADC vs Edep deduced",
+ 1024, -.5, 1023.5, 100, 0, 2);
+ fDiagStep2->SetDirectory(0);
+ fDiagStep2->GetXaxis()->SetTitle("ADC (noise surpressed)");
+ fDiagStep2->GetYaxis()->SetTitle("#Delta E [GeV]");
+ }
+ if (!fDiagStep3) {
+ fDiagStep3 = new TH2F("diagStep3", "Edep vs Edep path corrected",
+ 100, 0., 2., 100, 0., 2.);
+ fDiagStep3->SetDirectory(0);
+ fDiagStep3->GetXaxis()->SetTitle("#Delta E [GeV]");
+ fDiagStep3->GetYaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
+ }
+ if (!fDiagStep4) {
+ fDiagStep4 = new TH2F("diagStep4", "Edep vs Multiplicity deduced",
+ 100, 0., 2., 100, -.1, 19.9);
+ fDiagStep4->SetDirectory(0);
+ fDiagStep4->GetXaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
+ fDiagStep4->GetYaxis()->SetTitle("Multiplicity");
+ fDiagAll = new TH2F("diagAll", "Read ADC vs Multiplicity deduced",
+ 1024, -.5, 1023.5, 100, -.1, 19.9);
+ }
+ if (fDiagAll) {
+ fDiagAll->SetDirectory(0);
+ fDiagAll->GetXaxis()->SetTitle("ADC (read)");
+ fDiagAll->GetYaxis()->SetTitle("Multiplicity");
+ }
- if (param->IsDead(d, r, s, t))
+ // A strip can be marked `bad' for two reasons:
+ //
+ // - The raw reader fails to read the value
+ // - The strip is marked in OCDB as bad (IsDead)
+ //
+ // Hence, a dead strip will always be marked kInvalid here,
+ // while a non-dead bad-read strip will be filled with 0.
+ if (fBad(d, r, s, t)) {
+ AliDebugF(5, "Marking FMD%d%c[%2d,%3d] as bad", d, r, s, t);
+ esd->SetMultiplicity(d, r, s, t, AliESDFMD::kInvalidMult);
+ }
+ if (param->IsDead(d, r, s, t)) {
+ AliDebugF(5, "Marking FMD%d%c[%2d,%3d] as dead", d, r, s, t);
+//____________________________________________________________________
+Bool_t
+AliFMDReconstructor::PreReconstruct() const
+{
+ AliFMDDebug(1, ("Before reoconstructing"));
+ if (fZombie) {
+ AliWarning("I'm a zombie - cannot do anything");
+ return false;
+ }
+
+ // Get our vertex
+ GetVertex(fESD);
+
+ // Reset bad flags
+ fBad.Reset(false);
+
+ // Reset the output ESD
+ if (fESDObj) {
+ fESDObj->Clear();
+
+ // Pre-set eta values
+ for (UShort_t d=1; d<=3; d++) {
+ UShort_t nQ = (d == 1 ? 1 : 2);
+ for (UShort_t q=0; q<nQ; q++) {
+ UShort_t nStr = (q == 0 ? 512 : 256);
+ Char_t r = (q == 0 ? 'I' : 'O');
+
+ for (UShort_t t = 0; t < nStr; t++) {
+ Float_t eta, phi;
+ // Always use sector 0
+ PhysicalCoordinates(d, r, 0, t, eta, phi);
+ fESDObj->SetEta(d, r, 0, t, eta);
+ }
+ }
+ }
+ }
+
+
+ return true;
+}
+
+//____________________________________________________________________
+void
+AliFMDReconstructor::ProcessDigits(TClonesArray* digits,
+ const AliFMDRawReader& rawRead) const
+{
+ // For each digit, find the pseudo rapdity, azimuthal angle, and
+ // number of corrected ADC counts, and pass it on to the algorithms
+ // used.
+ //
+ // Parameters:
+ // digits Array of digits
+ //
+ if (fZombie) {
+ AliWarning("I'm a zombie - cannot do anything");
+ return;
+ }
+ AliFMDAltroMapping* map = AliFMDParameters::Instance()->GetAltroMap();
+ for (size_t i = 1; i <= 3; i++) {
+ fZS[i-1] = rawRead.IsZeroSuppressed(map->Detector2DDL(i));
+ fZSFactor[i-1] = rawRead.NoiseFactor(map->Detector2DDL(i));
+ }
+ UseRecoParam(kTRUE);
+ ProcessDigits(digits);
+ UseRecoParam(kFALSE);
+}
+
- AliFMDParameters* param = AliFMDParameters::Instance();
+ Int_t dbg = AliLog::GetDebugLevel("FMD","");
+ Bool_t dhr = dbg > 3 && dbg < 10;
+ if (dhr) printf("FMD%d%c[%2d,%3d] adc=%4d ", det, rng, sec, str, adc);
+
+ if (adc >= AliFMDRawReader::kBadSignal) {
+ AliFMDDebug(10, ("FMD%d%c[%2d,%3d] is marked bad", det, rng, sec, str));
+ if (dhr) Printf("bad");
+ fBad(det,rng,sec,str) = true;
+ return;
+ }
+
AliFMDDebug(10, ("FMD%d%c[%2d,%3d]: "
"ADC: %d, Counts: %d, Energy: %f, Mult: %f",
det, rng, sec, str, adc, counts, edep, mult));
// Create a `RecPoint' on the output branch.
if (fMult) {
AliFMDDebug(10, ("FMD%d%c[%2d,%3d]: "
"ADC: %d, Counts: %d, Energy: %f, Mult: %f",
det, rng, sec, str, adc, counts, edep, mult));
// Create a `RecPoint' on the output branch.
if (fMult) {