#include "AliFMDDetector.h" // ALIFMDDETECTOR_H
#include "AliFMDRing.h" // ALIFMDRING_H
#include "AliFMDDigitizer.h" // ALIFMDDIGITIZER_H
-#include "AliFMDSDigitizer.h" // ALIFMDSDIGITIZER_H
+#include "AliFMDHitDigitizer.h" // ALIFMDSDIGITIZER_H
+// #define USE_SSDIGITIZER
+//#ifdef USE_SSDIGITIZER
+//# include "AliFMDSSDigitizer.h" // ALIFMDSDIGITIZER_H
+//#endif
// #include "AliFMDGeometryBuilder.h"
#include "AliFMDRawWriter.h" // ALIFMDRAWWRITER_H
#include "AliFMDPoints.h" // ALIFMDPOINTS_H
// Set the TClonesArray to read hits into.
b->SetAddress(&fHits);
}
+//____________________________________________________________________
+void
+AliFMD::SetSDigitsAddressBranch(TBranch *b)
+{
+ // Set the TClonesArray to read hits into.
+ b->SetAddress(&fSDigits);
+}
//____________________________________________________________________
void
// count3 ADC count (a 10-bit word), or -1 if not used
//
TClonesArray& a = *(SDigitsArray());
+ // AliFMDDebug(0, ("Adding sdigit # %d", fNsdigits));
new (a[fNsdigits++])
AliFMDSDigit(detector, ring, sector, strip, edep,
// Create AliFMDDigit's from AliFMDHit's. This is done by making a
// AliFMDDigitizer, and executing that code.
//
- Warning("Hits2Digits", "Try not to use this method.\n"
- "Instead, use AliSimulator");
- AliRunDigitizer* manager = new AliRunDigitizer(1, 1);
- manager->SetInputStream(0, "galice.root");
- manager->SetOutputFile("H2Dfile");
-
- /* AliDigitizer* dig =*/ CreateDigitizer(manager);
- manager->Exec("");
- delete manager;
+ AliFMDHitDigitizer digitizer(this, AliFMDHitDigitizer::kDigits);
+ digitizer.Init();
+ digitizer.Exec("");
}
//____________________________________________________________________
// Create AliFMDSDigit's from AliFMDHit's. This is done by creating
// an AliFMDSDigitizer object, and executing it.
//
- AliFMDSDigitizer* digitizer = new AliFMDSDigitizer("galice.root");
- digitizer->Exec("");
- delete digitizer;
+ AliFMDHitDigitizer digitizer(this, AliFMDHitDigitizer::kSDigits);
+ digitizer.Init();
+ digitizer.Exec("");
}
AliFMD::CreateDigitizer(AliRunDigitizer* manager) const
{
// Create a digitizer object
- AliFMDDigitizer* digitizer = new AliFMDDigitizer(manager);
+
+ /* This is what we probably _should_ do */
+ AliFMDBaseDigitizer* digitizer = 0;
+
+#ifdef USE_SSDIGITIZER
+ digitizer = new AliFMDSSDigitizer(manager);
+#else
+ /* This is what we actually do, and will work */
+#if 0
+ AliInfo("SDigit->Digit conversion not really supported, "
+ "doing Hit->Digit conversion instead");
+#endif
+ digitizer = new AliFMDDigitizer(manager);
+#endif
return digitizer;
}
// This code was made by Raffaele Grosso <rgrosso@mail.cern.ch>. I
// (cholm) will probably want to change it. For one, I think it
// should be the job of the geometry manager to deal with this.
+ AliInfo("Add FMD alignable volumes");
AliFMDGeometry::Instance()->SetAlignableVolumes();
#if 0
for(size_t f = 1; f <= 3; f++){ // Detector 1,2,3