////////////////////////////////////
//
-// MUON event reconstructor in ALICE
-//
-// This class contains as data:
-// * the parameters for the event reconstruction
-// * a pointer to the array of hits to be reconstructed (the event)
-// * a pointer to the array of segments made with these hits inside each station
-// * a pointer to the array of reconstructed tracks
-//
-// It contains as methods, among others:
-// * MakeEventToBeReconstructed to build the array of hits to be reconstructed
-// * MakeSegments to build the segments
-// * MakeTracks to build the tracks
+// MUON cluster reconstructor for MUON
//
+// Should implement a virtual class ClusterFinder to chose between VS and AZ method
////////////////////////////////////
#include "AliMUONClusterReconstructor.h"
+#include "AliRun.h" // for gAlice
+#include "AliRunLoader.h"
+#include "AliLoader.h"
+
#include "AliMUON.h"
#include "AliMUONDigit.h"
#include "AliMUONConstants.h"
#include "AliMUONClusterFinderVS.h"
#include "AliMUONClusterInput.h"
#include "AliMUONRawCluster.h"
-#include "AliRun.h" // for gAlice
-#include "AliRunLoader.h"
-#include "AliLoader.h"
+#include "AliRawReader.h" // for raw data
+
const Int_t AliMUONClusterReconstructor::fgkDefaultPrintLevel = 0;
delete dig1;
delete dig2;
}
+
+//____________________________________________________________________
+void AliMUONClusterReconstructor::Digits2Clusters(AliRawReader* /*rawReader*/)
+{
+
+// Perform cluster finding form raw data
+
+ Fatal("Digits2Clusters","clusterization not implemented for raw data input");
+}
class AliMUONRawCluster;
class AliMUONClusterFinderVS;
class AliMUONData;
-
+class AliRawReader;
class AliMUONClusterReconstructor : public TObject
{
// Cluster Finding & Trigger
virtual void Digits2Clusters();
+ virtual void Digits2Clusters(AliRawReader* rawReader);
// void EventDump(void); // dump reconstructed event
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+///////////////////////////////////////////////////////////////////////////////
+///
+/// This class provides access to MUON digits in raw data.
+///
+/// It loops over all MUON digits in the raw data given by the AliRawReader.
+/// The Next method goes to the next digit. If there are no digits left
+/// it returns kFALSE.
+///
+/// First version implement only the structure for the moment
+///
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliMUONRawStream.h"
+
+#include "AliRawReader.h"
+
+
+ClassImp(AliMUONRawStream)
+
+
+AliMUONRawStream::AliMUONRawStream(AliRawReader* rawReader)
+{
+// create an object to read MUON raw digits
+
+ fRawReader = rawReader;
+ fRawReader->Select(0);
+ fData = new UShort_t[fgkDataMax];
+ fDataSize = fPosition = 0;
+ fCount = 0;
+
+}
+
+AliMUONRawStream::AliMUONRawStream(const AliMUONRawStream& stream) :
+ TObject(stream)
+{
+ Fatal("AliMUONRawStream", "copy constructor not implemented");
+}
+
+AliMUONRawStream& AliMUONRawStream::operator = (const AliMUONRawStream&
+ /* stream */)
+{
+ Fatal("operator =", "assignment operator not implemented");
+ return *this;
+}
+
+AliMUONRawStream::~AliMUONRawStream()
+{
+// clean up
+
+ delete[] fData;
+}
+
+
+Bool_t AliMUONRawStream::Next()
+{
+// read the next raw digit
+// returns kFALSE if there is no digit left
+
+ Fatal("Next","method not implemented for raw data input");
+
+
+ return kFALSE;
+}
+
+
--- /dev/null
+#ifndef ALIMUONRAWSTREAM_H
+#define ALITMUONAWSTREAM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+///////////////////////////////////////////////////////////////////////////////
+///
+/// This class provides access to TPC digits in raw data.
+///
+///////////////////////////////////////////////////////////////////////////////
+
+#include <TObject.h>
+
+class AliRawReader;
+
+
+class AliMUONRawStream: public TObject {
+ public :
+ AliMUONRawStream(AliRawReader* rawReader);
+ AliMUONRawStream(const AliMUONRawStream& stream);
+ AliMUONRawStream& operator = (const AliMUONRawStream& stream);
+ virtual ~AliMUONRawStream();
+
+ virtual Bool_t Next();
+
+
+ protected :
+
+ AliRawReader* fRawReader; // object for reading the raw data
+
+
+ static const Int_t fgkDataMax = 10000000; // size of array for uncompressed raw data
+ UShort_t* fData; // uncompressed raw data
+ Int_t fDataSize; // actual size of the uncompressed raw data
+ Int_t fPosition; // current position in fData
+ Int_t fCount; // counter of words to be read for current trailer
+
+
+ ClassDef(AliMUONRawStream, 0) // base class for reading MUON raw digits
+};
+
+#endif
#include "AliHeader.h"
#include "AliGenEventHeader.h"
#include "AliESD.h"
+#include "AliMUONReconstructor.h"
#include "AliMUONData.h"
#include "AliMUONEventReconstructor.h"
#include "AliMUONTrackParam.h"
#include "AliMUONTriggerTrack.h"
#include "AliESDMuonTrack.h"
-#include "AliMUONReconstructor.h"
+#include "AliRawReader.h"
ClassImp(AliMUONReconstructor)
//_____________________________________________________________________________
delete recoEvent;
delete trigDec;
}
+
+//_____________________________________________________________________________
+void AliMUONReconstructor::Reconstruct(AliRunLoader* runLoader, AliRawReader* rawReader) const
+{
+// AliLoader
+ AliLoader* loader = runLoader->GetLoader("MUONLoader");
+
+// used local container for each method
+// passing fLoader as argument, could be avoided ???
+ AliMUONEventReconstructor* recoEvent = new AliMUONEventReconstructor(loader);
+ AliMUONData* dataEvent = recoEvent->GetMUONData();
+
+ AliMUONClusterReconstructor* recoCluster = new AliMUONClusterReconstructor(loader);
+ AliMUONData* dataCluster = recoCluster->GetMUONData();
+
+ AliMUONTriggerDecision* trigDec = new AliMUONTriggerDecision(loader,0,dataCluster);
+ // AliMUONData* dataTrig = trigDec->GetMUONData();
+
+
+ for (Int_t i = 0; i < 10; i++) {
+ AliMUONClusterFinderVS *recModel = new AliMUONClusterFinderVS();
+ recModel->SetGhostChi2Cut(10);
+ recoCluster->SetReconstructionModel(i,recModel);
+ }
+
+ loader->LoadDigits("READ");
+ loader->LoadRecPoints("RECREATE");
+ loader->LoadTracks("RECREATE");
+
+ // Loop over events
+ Int_t iEvent = 0;
+
+ while (rawReader->NextEvent()) {
+ printf("Event %d\n",iEvent);
+ runLoader->GetEvent(iEvent++);
+
+ //----------------------- digit2cluster & Digits2Trigger -------------------
+ if (!loader->TreeR()) loader->MakeRecPointsContainer();
+
+ // tracking branch
+ dataCluster->MakeBranch("RC");
+ dataCluster->SetTreeAddress("D,RC");
+ recoCluster->Digits2Clusters(rawReader);
+ dataCluster->Fill("RC");
+
+ // trigger branch
+ dataCluster->MakeBranch("TC");
+ dataCluster->SetTreeAddress("TC");
+ trigDec->Trigger2Trigger();
+ dataCluster->Fill("TC");
+
+ loader->WriteRecPoints("OVERWRITE");
+
+ //---------------------------- Track & TriggerTrack ---------------------
+ if (!loader->TreeT()) loader->MakeTracksContainer();
+
+ // trigger branch
+ dataEvent->MakeBranch("RL"); //trigger track
+ dataEvent->SetTreeAddress("RL");
+ recoEvent->EventReconstructTrigger();
+ dataEvent->Fill("RL");
+
+ // tracking branch
+ dataEvent->MakeBranch("RT"); //track
+ dataEvent->SetTreeAddress("RT");
+ recoEvent->EventReconstruct();
+ dataEvent->Fill("RT");
+
+ loader->WriteTracks("OVERWRITE");
+
+ //--------------------------- Resetting branches -----------------------
+ dataCluster->ResetDigits();
+ dataCluster->ResetRawClusters();
+ dataCluster->ResetTrigger();
+
+ dataEvent->ResetRawClusters();
+ dataEvent->ResetTrigger();
+ dataEvent->ResetRecTracks();
+ dataEvent->ResetRecTriggerTracks();
+
+ }
+ loader->UnloadDigits();
+ loader->UnloadRecPoints();
+ loader->UnloadTracks();
+
+ delete recoCluster;
+ delete recoEvent;
+ delete trigDec;
+}
+
//_____________________________________________________________________________
void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const
{
virtual ~AliMUONReconstructor();
virtual void Reconstruct(AliRunLoader* runLoader) const;
+ virtual void Reconstruct(AliRunLoader* runLoader,
+ AliRawReader* rawReader) const;
+
virtual void FillESD(AliRunLoader* runLoader, AliESD* esd) const;
ClassDef(AliMUONReconstructor, 0) // class for the MUON reconstruction
#pragma link C++ class AliMUONSubEventTracker+;
#pragma link C++ class AliMUONSubEventTrigger+;
#pragma link C++ class AliMUONRawData+;
+#pragma link C++ class AliMUONRawStream+;
#pragma link C++ class AliMUONReconstructor+;
#pragma link C++ class AliMUONSegmentationSlatModule+;
#pragma link C++ class AliMUONSegmentationSlatModuleN+;
AliMUONSegmentationTrigger.cxx AliMUONResponseTrigger.cxx\
AliMUONResponseTriggerV1.cxx\
AliMUONSegmentationTriggerX.cxx AliMUONSegmentationTriggerY.cxx \
- AliMUONSegmentationDetectionElement.cxx AliMUONSegmentIndex.cxx AliMUONSegmentManuIndex.cxx AliMUONSegmentPosition.cxx\
+ AliMUONSegmentationDetectionElement.cxx AliMUONSegmentIndex.cxx \
+ AliMUONSegmentManuIndex.cxx AliMUONSegmentPosition.cxx\
AliMUON.cxx AliMUONv0.cxx AliMUONv1.cxx AliMUONv3.cxx \
AliMUONChamberGeometry.cxx AliMUONGeometryConstituent.cxx AliMUONGeometryEnvelope.cxx \
AliMUONVGeometryBuilder.cxx AliMUONSt1GeometryBuilder.cxx AliMUONSt1GeometryBuilderV2.cxx \
AliMUONSegmentationSlatModule.cxx AliMUONSegmentationSlatModuleN.cxx \
AliMUONSegmentationSlat.cxx AliMUONSegmentationSlatN.cxx \
AliMUONRecoEvent.cxx AliMUONRecoTrack.cxx AliMUONRecoDisplay.cxx \
- AliMUONMerger.cxx AliMUONFactory.cxx AliMUONDigitizer.cxx AliMUONDigitizerv1.cxx AliMUONDigitizerv2.cxx \
- AliMUONSDigitizerv1.cxx \
+ AliMUONMerger.cxx AliMUONFactory.cxx AliMUONDigitizer.cxx \
+ AliMUONDigitizerv1.cxx AliMUONDigitizerv2.cxx AliMUONSDigitizerv1.cxx \
AliMUONTrackK.cxx AliMUONClusterFinderAZ.cxx AliMUONPixel.cxx \
AliMUONLoader.cxx AliMUONData.cxx AliMUONDataInterface.cxx \
AliMUONDDLTrigger.cxx AliMUONSubEventTrigger.cxx AliMUONDDLTracker.cxx \
- AliMUONRawData.cxx AliMUONSubEventTracker.cxx
+ AliMUONRawData.cxx AliMUONSubEventTracker.cxx AliMUONRawStream.cxx
SRCS += AliMUONSt1Segmentation.cxx AliMUONSt1Response.cxx \