fLogger(new AliMUONLogger(1000)),
fTriggerStore(new AliMUONTriggerStoreV1),
fDigitStore(0x0),
-fOutputDigitStore(0x0)
+fOutputDigitStore(0x0),
+fInputDigitStore(0x0)
{
/// Ctor.
delete fTriggerStore;
delete fDigitStore;
delete fOutputDigitStore;
-
+ delete fInputDigitStore;
+
AliInfo("Summary of messages");
fLogger->Print();
return adc;
}
+//_____________________________________________________________________________
+void
+AliMUONDigitizerV3::CreateInputDigitStore()
+{
+ /// Create an input digit store, and check that all input files
+ /// actually contains the same type of AliMUONVDigitStore
+
+ fInputDigitStore = 0x0;
+
+ for ( Int_t iFile = 0; iFile < fManager->GetNinputs(); ++iFile )
+ {
+ AliLoader* inputLoader = GetLoader(fManager->GetInputFolderName(iFile));
+
+ inputLoader->LoadSDigits("READ");
+
+ TTree* iTreeS = inputLoader->TreeS();
+ if (!iTreeS)
+ {
+ AliFatal(Form("Could not get access to input file #%d",iFile));
+ }
+
+ AliMUONVDigitStore* inputStore = AliMUONVDigitStore::Create(*iTreeS);
+
+ if (!fInputDigitStore)
+ {
+ fInputDigitStore = inputStore;
+ }
+ else
+ {
+ if ( inputStore->IsA() != fInputDigitStore->IsA() )
+ {
+ AliFatal("Got different types of AliMUONVDigitStore here. Please implement me.");
+ }
+ }
+ }
+}
+
//_____________________________________________________________________________
void
AliMUONDigitizerV3::Exec(Option_t*)
{
AliFatal(Form("Could not get access to input file #%d",iFile));
}
-
- AliMUONVDigitStore* inputStore = AliMUONVDigitStore::Create(*iTreeS);
- inputStore->Connect(*iTreeS);
+
+ if (!fInputDigitStore)
+ {
+ CreateInputDigitStore();
+ }
+ fInputDigitStore->Connect(*iTreeS);
iTreeS->GetEvent(0);
- MergeWithSDigits(fDigitStore,*inputStore,fManager->GetMask(iFile));
+ MergeWithSDigits(fDigitStore,*fInputDigitStore,fManager->GetMask(iFile));
inputLoader->UnloadSDigits();
- delete inputStore;
+ fInputDigitStore->Clear();
}
// At this point, we do have digit arrays (one per chamber) which contains
Bool_t addNoise=kFALSE,
Bool_t noiseOnly=kFALSE);
- /// Set calibration data
+ /// Set calibration data
void SetCalibrationData(AliMUONCalibrationData* calibrationData)
{fCalibrationData = calibrationData;}
static TF1* NoiseFunction();
+ void CreateInputDigitStore();
+
private:
Bool_t fIsInitialized; ///< are we initialized ?
AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters
AliMUONVTriggerStore* fTriggerStore; //!< trigger objects
AliMUONVDigitStore* fDigitStore; //!< temporary digits
AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk
-
- ClassDef(AliMUONDigitizerV3,7) // MUON Digitizer V3-5
+ AliMUONVDigitStore* fInputDigitStore; //!< input digit store
+
+ ClassDef(AliMUONDigitizerV3,8) // MUON Digitizer V3-8
};
#endif
//_____________________________________________________________________________
AliMUONPreClusterFinder::AliMUONPreClusterFinder()
: AliMUONVClusterFinder(),
- fClusters(0x0),
+ fClusters("AliMUONCluster"),
fPads(0x0),
fDetElemId(0),
fArea(),
AliMUONPreClusterFinder::~AliMUONPreClusterFinder()
{
/// dtor : note we're owner of the clusters, but not of the pads
- delete fClusters;
}
//_____________________________________________________________________________
const AliMpArea& area)
{
/// Prepare for clustering, by giving access to segmentations and digit lists
-
- delete fClusters;
- fClusters = new TClonesArray("AliMUONCluster");
+ fClusters.Clear("C");
+
fPads = pads;
fDetElemId = detElemId;
fArea = area;
// AliCodeTimerAuto("pre-clustering")
// Start a new cluster
- Int_t id = fClusters->GetLast()+1;
- AliMUONCluster* cluster = new ((*fClusters)[id]) AliMUONCluster;
+ Int_t id = fClusters.GetLast()+1;
+ AliMUONCluster* cluster = new (fClusters[id]) AliMUONCluster;
cluster->SetUniqueID(id);
AliMUONPad* pad = GetNextPad(0);
if ( ShouldAbort() )
{
AliError("Aborting clustering of that DE because we've got too many pads");
- fClusters->Remove(cluster);
- fClusters->Compress();
+ fClusters.Remove(cluster);
+ fClusters.Compress();
return 0x0;
}
}
// else only 1 pad (not suspicious, but kind of useless, probably noise)
// so we remove it from our list
- fClusters->Remove(cluster);
- fClusters->Compress();
+ fClusters.Remove(cluster);
+ fClusters.Compress();
// then proceed further
return NextCluster();
}
#ifndef ALI_MP_AREA_H
# include "AliMpArea.h"
#endif
+#ifndef ROOT_TClonesArray
+# include <TClonesArray.h>
+#endif
class TStopwatch;
class AliMUONPad;
virtual Bool_t ShouldAbort() const { return fShouldAbort; }
private:
- TClonesArray* fClusters; //!< the clusters we've found (owner)
+ TClonesArray fClusters; //!< the clusters we've found (owner)
TClonesArray** fPads; //!< the pads corresponding to the digits (not owner)
Int_t fDetElemId; //!< which DE we're considering
AliMpArea fArea; //!< area into which to consider pads to *start* a cluster
Bool_t fShouldAbort; //!< to indicate clustering should stop right now
- ClassDef(AliMUONPreClusterFinder,3) // A basic pre-cluster finder
+ ClassDef(AliMUONPreClusterFinder,4) // A basic pre-cluster finder
};
#endif
fDigitCalibrator(0x0),
fClusterServer(0x0),
fTriggerStore(0x0),
-fTrackStore(0x0)
+fTrackStore(0x0),
+fClusterStore(0x0)
{
/// normal ctor
delete fClusterServer;
delete fTriggerStore;
delete fTrackStore;
+ delete fClusterStore;
}
//_____________________________________________________________________________
}
}
- AliMUONVClusterStore* clusterStore(0x0);
-
if ( !alone )
{
- clusterStore = new AliMUONClusterStoreV2;
+ if (!fClusterStore)
+ {
+ fClusterStore = new AliMUONClusterStoreV2;
+ }
CreateClusterServer();
{
if ( i >= 6 && AliMUONReconstructor::GetRecoParam()->BypassSt45() ) continue;
- fClusterServer->Clusterize(i,*clusterStore,area);
+ fClusterServer->Clusterize(i,*fClusterStore,area);
}
}
- Bool_t cok = clusterStore->Connect(clustersTree,alone);
+ Bool_t cok = fClusterStore->Connect(clustersTree,alone);
if (!cok) AliError("Could not connect clusterStore to clusterTree");
- AliDebug(1,Form("Number of clusters found = %d",clusterStore->GetSize()));
+ AliDebug(1,Form("Number of clusters found = %d",fClusterStore->GetSize()));
- StdoutToAliDebug(1,clusterStore->Print());
+ StdoutToAliDebug(1,fClusterStore->Print());
}
if (ok) // at least one type of branches created successfully
clustersTree.Fill();
}
- delete clusterStore;
+ fClusterStore->Clear();
}
//_____________________________________________________________________________
# include "AliReconstructor.h"
#endif
+class AliMUONCalibrationData;
+class AliMUONDigitCalibrator;
class AliMUONDigitMaker;
-class AliMUONVDigitStore;
-class AliMUONVTriggerStore;
-
class AliMUONGeometryTransformer;
-
-class AliMUONTriggerCircuit;
-class TClonesArray;
-class AliMUONVTriggerStore;
-
-class AliMUONDigitCalibrator;
-class AliMUONCalibrationData;
-
-class AliMUONTracker;
-class AliMUONVTrackStore;
-
class AliMUONRecoParam;
-
+class AliMUONTracker;
+class AliMUONTriggerCircuit;
class AliMUONVClusterFinder;
-
class AliMUONVClusterServer;
+class AliMUONVClusterStore;
+class AliMUONVDigitStore;
+class AliMUONVTrackStore;
+class AliMUONVTriggerStore;
+class AliMUONVTriggerStore;
+class TClonesArray;
class AliMUONReconstructor : public AliReconstructor
{
mutable AliMUONVClusterServer* fClusterServer; //!< Clusterizer
mutable AliMUONVTriggerStore* fTriggerStore; //!< Trigger container
mutable AliMUONVTrackStore* fTrackStore; //!< Track container
+ mutable AliMUONVClusterStore* fClusterStore; //!< cluster store (when not in combined tracking mode)
static AliMUONRecoParam* fgRecoParam; //!< parameters used to tune the MUON reconstruction
-
- ClassDef(AliMUONReconstructor,6) // Implementation of AliReconstructor
+
+ ClassDef(AliMUONReconstructor,7) // Implementation of AliReconstructor
};
#endif