#pragma link off all functions;
#pragma link C++ class AliACORDERawStream+;
+#pragma link C++ class AliACORDEReconstructor+;
+
#endif
--- /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. *
+ **************************************************************************/
+
+/* $Id: AliACORDEReconstructor.cxx 20956 2007-09-26 14:22:18Z mrodrigu $ */
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Class for ACORDE reconstruction //
+//////////////////////////////////////////////////////////////////////////////
+
+#include "AliRawReader.h"
+
+#include "AliACORDEReconstructor.h"
+#include "AliACORDERawStream.h"
+#include "AliESDEvent.h"
+#include "AliACORDEdigit.h"
+
+ClassImp(AliACORDEReconstructor)
+
+AliACORDEReconstructor:: AliACORDEReconstructor():
+ AliReconstructor(),
+ fESDACORDE(0x0),
+ fCalibData(0x0)
+{
+ // Default constructor
+ // Get calibration data
+
+ fCalibData = GetCalibData();
+}
+
+//FALTA IMPLEMENTAR_______________________________________________________________________
+AliACORDECalibData *AliACORDEReconstructor::GetCalibData() const
+{
+ // TO BE IMPLEMENTED !!
+ return 0x0;
+}
+//_____________________________________________________________________________
+AliACORDEReconstructor& AliACORDEReconstructor::operator =
+ (const AliACORDEReconstructor& /*reconstructor*/)
+{
+// assignment operator
+
+ Fatal("operator =", "assignment operator not implemented");
+ return *this;
+}
+
+//_____________________________________________________________________________
+AliACORDEReconstructor::~AliACORDEReconstructor()
+{
+// destructor
+//NECESITAS esta clase
+ delete fESDACORDE;
+}
+
+//_____________________________________________________________________________
+void AliACORDEReconstructor::Init()
+{
+// initializer
+//NECESITAS esta clase
+ fESDACORDE = new AliESDACORDE;
+}
+
+void AliACORDEReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const
+{
+
+ if (!digitsTree) {
+ AliError("No digits tree!");
+ return;
+ }
+
+ TClonesArray* digitsArray = new TClonesArray("AliACORDEdigit");
+ digitsTree->Branch("ACORDEdigit", &digitsArray);
+
+ rawReader->Reset();
+ AliACORDERawStream rawStream(rawReader);
+ if (rawStream.Next()) {
+ for(Int_t iChannel = 0; iChannel < 60; iChannel++) {
+ Int_t index = iChannel / 30;
+ Int_t bit = iChannel % 30;
+ if (rawStream.GetWord(index) & (1 << bit))
+ new ((*digitsArray)[digitsArray->GetEntriesFast()]) AliACORDEdigit(iChannel+1,0);
+ // separate digits for single and multi muon signals !!!
+ // TO BE DONE!!
+ // if (GetWord(index+1) & (1 << bit))
+ // new ((*digitsArray)[digitsArray->GetEntriesFast()]) AliACORDEdigit(iChannel+1,0); // multi-muon digit
+ }
+ }
+
+ digitsTree->Fill();
+
+}
+
+void AliACORDEReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,AliESDEvent* esd) const
+{
+
+ // fills ESD with ACORDE Digits
+
+ if (!digitsTree)
+ {
+ AliError("No digits tree!");
+ return;
+ }
+
+ TClonesArray* digitsArray = NULL;
+ TBranch* digitBranch = digitsTree->GetBranch("ACORDEdigit");
+ if (!digitBranch) {
+ AliError("No ACORDE digits branch found!");
+ return;
+ }
+ digitBranch->SetAddress(&digitsArray);
+
+ digitsTree->GetEvent(0);
+
+ Bool_t AcoADCSingle[60],AcoADCMulti[60];
+ for(Int_t i = 0; i < 60; i++) { AcoADCSingle[i] = AcoADCMulti[i] = kFALSE; }
+
+ Int_t nDigits = digitsArray->GetEntriesFast();
+
+ for (Int_t d=0; d<nDigits; d++) {
+ AliACORDEdigit* digit = (AliACORDEdigit*)digitsArray->At(d);
+ Int_t module = digit->GetModule();
+
+ AcoADCSingle[module-1] = kTRUE;
+ AcoADCMulti[module-1] = kTRUE;
+ }
+
+ fESDACORDE->SetACORDESingleMuon(AcoADCSingle);
+ fESDACORDE->SetACORDEMultiMuon(AcoADCMulti);
+
+ if (esd)
+ {
+ AliDebug(1, Form("Writing ACORDE data to ESD Tree"));
+ esd->SetACORDEData(fESDACORDE);
+ }
+}
+
+
--- /dev/null
+#ifndef ALIACORDERECONSTRUCTOR_H
+#define ALIACORDERECONSTRUCTOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.*/
+/* See cxx source for full Copyright notice */
+/* $Id: AliACORDEReconstructor.h 20956 2007-09-26 14:22:18Z cvetan $ */
+
+///////////////////////////////////////////////////////////////////////////
+/// //
+/// class for ACORDE reconstruction //
+/// //
+///////////////////////////////////////////////////////////////////////////
+
+#include "AliReconstructor.h"
+#include "AliLog.h"
+
+class AliACORDECalibData;
+class AliESDACORDE;
+class AliESDEvent;
+
+class AliACORDEReconstructor: public AliReconstructor {
+public:
+ AliACORDEReconstructor();
+ virtual ~AliACORDEReconstructor();
+ virtual void Init();
+
+ virtual void Reconstruct(AliRawReader* /*rawReader*/,
+ TTree* /*clustersTree*/) const {
+ AliError("Method not implemented"); return;};
+ virtual void Reconstruct(TTree*, TTree*) const {return;};
+
+ virtual void FillESD(TTree* digitsTree, TTree* /*clustersTree*/,
+ AliESDEvent* esd) const;
+
+ virtual void FillESD(AliRawReader* /*rawReader*/, TTree* /*clustersTree*/,
+ AliESDEvent* /*esd*/) const {
+ AliError("Method not implemented"); return;};
+
+ virtual Bool_t HasDigitConversion() const { return kTRUE; }
+ virtual void ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const;
+
+ AliACORDECalibData *GetCalibData() const;
+
+protected:
+//NO PODEMOS USARLOS X Q NO EXISTEN
+ AliESDACORDE* fESDACORDE; // ACORDE ESD object
+
+private:
+ AliACORDEReconstructor(const AliACORDEReconstructor& reconstructor);
+ AliACORDEReconstructor& operator = (const AliACORDEReconstructor& reconstructor);
+
+ AliACORDECalibData* fCalibData; //! calibration data
+
+ ClassDef(AliACORDEReconstructor, 0) // class for the ACORDE reconstruction
+};
+
+#endif
-#-*-Mode: Makefile-*-
-
-SRCS = AliACORDERawStream.cxx
+SRCS = AliACORDERawStream.cxx \
+ AliACORDEReconstructor.cxx
HDRS:= $(SRCS:.cxx=.h)
fPHOSTriggerAmplitudes(0x0),
fESDFMD(0x0),
fESDVZERO(0x0),
+ fESDACORDE(0x0),
fErrorLogs("AliRawDataErrorLog",5)
{
//
fPHOSTriggerAmplitudes(esd.fPHOSTriggerAmplitudes),
fESDFMD(esd.fESDFMD),
fESDVZERO(esd.fESDVZERO),
+ fESDACORDE(esd.fESDACORDE),
fErrorLogs(*((TClonesArray*)esd.fErrorLogs.Clone()))
{
//
delete fEMCALTriggerAmplitudes;
delete fPHOSTriggerPosition;
delete fPHOSTriggerAmplitudes;
+ delete fESDACORDE;
fErrorLogs.Delete();
fESDVZERO->~AliESDVZERO();
new (fESDVZERO) AliESDVZERO();
}
+//
+ if (fESDACORDE){
+ fESDACORDE->~AliESDACORDE();
+ new (fESDACORDE) AliESDACORDE();
+ }
//
fErrorLogs.Delete();
}
#include "AliESDVZERO.h"
#include "AliMultiplicity.h"
#include "AliRawDataErrorLog.h"
+#include "AliESDACORDE.h"
class AliESDfriend;
void SetVZEROData(AliESDVZERO * obj) { fESDVZERO = new AliESDVZERO(*obj); }
AliESDVZERO *GetVZEROData(){ return fESDVZERO; }
-
+ void SetACORDEData(AliESDACORDE * obj){ fESDACORDE = new AliESDACORDE(*obj); }
+ AliESDACORDE *GetACORDEDAta(){ return fESDACORDE; }
AliRawDataErrorLog *GetErrorLog(Int_t i) const {
return (AliRawDataErrorLog *)fErrorLogs.UncheckedAt(i);
}
AliESDFMD *fESDFMD; // FMD object containing rough multiplicity
AliESDVZERO *fESDVZERO; // VZERO object containing rough multiplicity
+ AliESDACORDE *fESDACORDE; // ACORDE ESD object containing bit pattern
TClonesArray fErrorLogs; // Raw-data reading error messages
- ClassDef(AliESD,21) //ESD class
+ ClassDef(AliESD,22) //ESD class
};
#endif
--- /dev/null
+#include "AliESDACORDE.h"
+
+ClassImp(AliESDACORDE)
+
+AliESDACORDE::AliESDACORDE():TObject()
+{
+ //Default constructor
+ for(Int_t i=0;i<60;i++)
+ {
+ fACORDESingleMuon[i] = fACORDEMultiMuon[i] = 0;
+ }
+}
+
+
+AliESDACORDE::AliESDACORDE(const AliESDACORDE &o)
+ :TObject(o)
+
+{
+ //Default constructor
+ for(Int_t i=0;i<60;i++)
+ {
+ fACORDESingleMuon[i] = o.fACORDESingleMuon[i];
+ fACORDEMultiMuon[i] = o.fACORDEMultiMuon[i];
+ }
+}
+
+
+AliESDACORDE::AliESDACORDE(Int_t* MACORDESingleMuon, Int_t* MACORDEMultiMuon):TObject()
+{
+
+ //Constructor
+
+ for(Int_t i=0;i<60;i++)
+ {
+ fACORDESingleMuon[i] = MACORDESingleMuon[i];
+ fACORDEMultiMuon[i] = MACORDEMultiMuon[i];
+ }
+}
+
+AliESDACORDE& AliESDACORDE::operator=(const AliESDACORDE& o)
+{
+ if(this==&o)return *this;
+ TObject::operator=(o);
+
+ // Assignment operator
+ for(Int_t i=0; i<60; i++)
+ {
+ fACORDESingleMuon[i] = o.fACORDESingleMuon[i];
+ fACORDEMultiMuon[i] = o.fACORDEMultiMuon[i];
+ }
+
+ return *this;
+}
+
+
--- /dev/null
+#ifndef AliESDACORDE_H
+#define AliESDACORDE_H
+
+#include <TObject.h>
+
+class AliESDACORDE : public TObject
+{
+
+ public:
+ AliESDACORDE();
+ AliESDACORDE(const AliESDACORDE&);
+ AliESDACORDE(Int_t *ACORDESingleMuon,Int_t *ACORDEMultiMuon);
+ virtual ~AliESDACORDE() {};
+
+ void SetACORDEMultiMuon(Bool_t ACORDEMultiMuon[60]){for(Int_t i=0;i<60;i++){fACORDEMultiMuon[i]=ACORDEMultiMuon[i];}}
+
+ void SetACORDESingleMuon(Bool_t ACORDESingleMuon[60]){for(Int_t i=0;i<60;i++){fACORDESingleMuon[i]=ACORDESingleMuon[i];}}
+
+
+ AliESDACORDE &operator=(const AliESDACORDE& source);
+
+ protected:
+
+ Bool_t fACORDESingleMuon[60]; // array with the Single Muon hits in the 60 Acorde's Modules
+ Bool_t fACORDEMultiMuon[60]; // array with the Multi Muon hits in the 60 Acorde's Modules
+
+
+ ClassDef(AliESDACORDE,2)
+
+};
+
+#endif
#include "AliMultiplicity.h"
#include "AliRawDataErrorLog.h"
#include "AliLog.h"
-
+#include "AliESDACORDE.h"
ClassImp(AliESDEvent)
"CaloClusters",
"EMCALCells",
"PHOSCells",
- "AliRawDataErrorLogs"};
+ "AliRawDataErrorLogs",
+ "AliESDACORDE"};
+
//______________________________________________________________________________
AliESDEvent::AliESDEvent():
AliVEvent(),
fSPDMult(0),
fPHOSTrigger(0),
fEMCALTrigger(0),
+ fESDACORDE(0),
fTracks(0),
fMuonTracks(0),
fPmdTracks(0),
fSPDMult(new AliMultiplicity(*esd.fSPDMult)),
fPHOSTrigger(new AliESDCaloTrigger(*esd.fPHOSTrigger)),
fEMCALTrigger(new AliESDCaloTrigger(*esd.fEMCALTrigger)),
+ fESDACORDE(new AliESDACORDE(*esd.fESDACORDE)),
fTracks(new TClonesArray(*esd.fTracks)),
fMuonTracks(new TClonesArray(*esd.fMuonTracks)),
fPmdTracks(new TClonesArray(*esd.fPmdTracks)),
AddObject(fEMCALCells);
AddObject(fPHOSCells);
AddObject(fErrorLogs);
+ AddObject(fESDACORDE);
GetStdContent();
fEMCALCells = new AliESDCaloCells(*source.fEMCALCells);
fPHOSCells = new AliESDCaloCells(*source.fPHOSCells);
fErrorLogs = new TClonesArray(*source.fErrorLogs);
+ fESDACORDE = new AliESDACORDE(*source.fESDACORDE);
fESDOld = new AliESD(*source.fESDOld);
fESDFriendOld = new AliESDfriend(*source.fESDFriendOld);
// CKB this way?? or
AddObject(fEMCALCells);
AddObject(fPHOSCells);
AddObject(fErrorLogs);
+ AddObject(fESDACORDE);
fConnected = source.fConnected;
fEMCALClusters = source.fEMCALClusters;
fESDVZERO->~AliESDVZERO();
new (fESDVZERO) AliESDVZERO();
}
+ if(fESDACORDE){
+ fESDACORDE->~AliESDACORDE();
+ new (fESDACORDE) AliESDACORDE();
+ }
if(fESDTZERO) fESDTZERO->Reset();
// CKB no clear/reset implemented
if(fTPCVertex){
*fESDVZERO = *obj;
}
+void AliESDEvent::SetACORDEData(AliESDACORDE * obj)
+{
+ if(fESDACORDE)
+ *fESDACORDE = *obj;
+}
+
+
void AliESDEvent::GetESDfriend(AliESDfriend *ev) const
{
//
fEMCALCells = (AliESDCaloCells*)fESDObjects->FindObject(fgkESDListName[kEMCALCells]);
fPHOSCells = (AliESDCaloCells*)fESDObjects->FindObject(fgkESDListName[kPHOSCells]);
fErrorLogs = (TClonesArray*)fESDObjects->FindObject(fgkESDListName[kErrorLogs]);
+ fESDACORDE = (AliESDACORDE*)fESDObjects->FindObject(fgkESDListName[kESDACORDE]);
}
AddObject(new AliESDCaloCells());
AddObject(new AliESDCaloCells());
AddObject(new TClonesArray("AliRawDataErrorLog",0));
+ AddObject(new AliESDACORDE());
// check the order of the indices against enum...
#include "AliESDHeader.h"
#include "AliESDTZERO.h"
#include "AliESDZDC.h"
+#include "AliESDACORDE.h"
// AliESDtrack has to be included so that the compiler
// knows its inheritance tree (= that it is a AliVParticle).
class AliESD;
class AliESDcascade;
class TRefArray;
+class AliESDACORDE;
class AliESDEvent : public AliVEvent {
public:
kEMCALCells,
kPHOSCells,
kErrorLogs,
+ kESDACORDE,
kESDListN
};
AliESDVZERO *GetVZEROData() const { return fESDVZERO; }
void SetVZEROData(AliESDVZERO * obj);
+ // ACORDE
+ AliESDACORDE *GetACORDEData() const { return fESDACORDE;}
+ void SetACORDEData(AliESDACORDE * obj);
void SetESDfriend(const AliESDfriend *f) const;
void GetESDfriend(AliESDfriend *f) const;
AliMultiplicity *fSPDMult; //! SPD tracklet multiplicity
AliESDCaloTrigger* fPHOSTrigger; //! PHOS Trigger information
AliESDCaloTrigger* fEMCALTrigger; //! PHOS Trigger information
+ AliESDACORDE *fESDACORDE; //! ACORDE ESD object caontaining bit pattern
TClonesArray *fTracks; //! ESD tracks
TClonesArray *fMuonTracks; //! MUON ESD tracks
Int_t fPHOSClusters; // Number of PHOS clusters (subset of caloclusters)
Int_t fFirstPHOSCluster; // First PHOS cluster in the fCaloClusters list
- ClassDef(AliESDEvent,7) //ESDEvent class
+ ClassDef(AliESDEvent,8) //ESDEvent class
};
#endif
#pragma link C++ class AliESDVZERO+;
#pragma link C++ class AliESDTZERO+;
+#pragma link C++ class AliESDACORDE+;
+
#pragma link C++ class AliESDMultITS+;
#pragma link C++ class AliMultiplicity+;
AliESDCaloTrigger.cxx \
AliRawDataErrorLog.cxx \
AliMeanVertex.cxx \
- AliESDCaloCells.cxx
+ AliESDCaloCells.cxx \
+ AliESDACORDE.cxx
HDRS:= $(SRCS:.cxx=.h)