#include "AliMUONRawCluster.h"
#include "AliMUONTrack.h"
#include "AliMUONTriggerTrack.h"
+#include "AliLog.h"
ClassImp(AliMUONData)
{
// Protected copy constructor
- Fatal("AliMUONData", "Not implemented.");
+ AliFatal("Not implemented.");
}
//_____________________________________________________________________________
if (this == &rhs) return *this;
- Fatal("operator=", "Not implemented.");
+ AliFatal("Not implemented.");
return *this;
}
TClonesArray &globalTrigger = *fGlobalTrigger;
new(globalTrigger[fNglobaltrigger++]) AliMUONGlobalTrigger(trigger);
}
-//_____________________________________________________________________________
+//____________________________________________________________________________
void AliMUONData::AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
Int_t idpart, Float_t X, Float_t Y, Float_t Z,
Float_t tof, Float_t momentum, Float_t theta,
- Float_t phi, Float_t length, Float_t destep)
+ Float_t phi, Float_t length, Float_t destep,
+ Float_t Xref,Float_t Yref,Float_t Zref)
{
- // Add new hit to the hit list
+ // Add new hit to the hit list
TClonesArray &lhits = *fHits;
new(lhits[fNhits++]) AliMUONHit(fIshunt, track, iChamber,
idpart, X, Y, Z,
tof, momentum, theta,
- phi, length, destep);
+ phi, length, destep,
+ Xref,Yref,Zref);
}
//____________________________________________________________________________
-void AliMUONData::AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
+void AliMUONData::AddHit2(Int_t fIshunt, Int_t track, Int_t detElemId,
Int_t idpart, Float_t X, Float_t Y, Float_t Z,
Float_t tof, Float_t momentum, Float_t theta,
Float_t phi, Float_t length, Float_t destep,
{
// Add new hit to the hit list
TClonesArray &lhits = *fHits;
- new(lhits[fNhits++]) AliMUONHit(fIshunt, track, iChamber,
+ new(lhits[fNhits++]) AliMUONHit(fIshunt, track, detElemId,
idpart, X, Y, Z,
tof, momentum, theta,
phi, length, destep,
- Xref,Yref,Zref);
-}
-//____________________________________________________________________________
-void AliMUONData::AddHit(const AliMUONHit& hit)
-{
- TClonesArray &lhits = *fHits;
- new(lhits[fNhits++]) AliMUONHit(hit);
+ Xref,Yref,Zref, true);
}
//____________________________________________________________________________
-void AliMUONData::AddLocalTrigger(Int_t *localtr)
+void AliMUONData::AddLocalTrigger(const Int_t *localtr, const TArrayI& digits)
{
// add a MUON Local Trigger to the list
TClonesArray &localTrigger = *fLocalTrigger;
- new(localTrigger[fNlocaltrigger++]) AliMUONLocalTrigger(localtr);
+ new(localTrigger[fNlocaltrigger++]) AliMUONLocalTrigger(localtr, digits);
}
//____________________________________________________________________________
void AliMUONData::AddLocalTrigger(const AliMUONLocalTrigger& trigger)
{
// Checking if there are RawCluster Branches In TreeR
if (TreeR()==0x0) {
- Error("TreeR","No treeR in memory");
+ AliError("No treeR in memory");
return kFALSE;
}
else {
{
// Checking if there are RawCluster Branches In TreeR
if (TreeD()==0x0) {
- Error("TreeD","No treeD in memory");
+ AliError("No treeD in memory");
return kFALSE;
}
else {
{
// Checking if there are Trigger Branches In TreeR
if (TreeR()==0x0) {
- Error("TreeR","No treeR in memory");
+ AliError("No treeR in memory");
return kFALSE;
}
else {
{
// Checking if there are Trigger Branches In TreeR
if (TreeD()==0x0) {
- Error("TreeD","No treeD in memory");
+ AliError("No treeD in memory");
return kFALSE;
}
else {
{
// Checking if there are Track Branches In TreeT
if (TreeT()==0x0) {
- Error("TreeT","No treeT in memory");
+ AliError("No treeT in memory");
return kFALSE;
}
else {
{
// Checking if there are TriggerTrack Branches In TreeT
if (TreeT()==0x0) {
- Error("TreeT","No treeT in memory");
+ AliError("No treeT in memory");
return kFALSE;
}
else {
sprintf(branchname,"%sHits",GetName());
branch = TreeH()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch %s is already in tree.",GetName());
+ AliInfo(Form("MakeBranch","Branch %s is already in tree.",GetName()));
return ;
}
branch = TreeH()->Branch(branchname,&fHits,kBufferSize);
branch = 0x0;
branch = TreeD()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch %s is already in tree.",GetName());
+ AliInfo(Form("Branch %s is already in tree.",GetName()));
return;
}
TClonesArray * digits = Digits(iDetectionPlane);
}
branch = TreeD()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch GlobalTrigger is already in treeD.");
+ AliInfo(Form("Branch GlobalTrigger is already in treeD."));
return ;
}
branch = TreeD()->Branch(branchname, &fGlobalTrigger, kBufferSize);
}
branch = TreeD()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch LocalTrigger is already in treeD.");
+ AliInfo(Form("Branch LocalTrigger is already in treeD."));
return;
}
branch = TreeD()->Branch(branchname, &fLocalTrigger, kBufferSize);
branch = 0x0;
branch = TreeS()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch %s is already in tree.",GetName());
+ AliInfo(Form("Branch %s is already in tree.",GetName()));
return;
}
TClonesArray * sdigits = SDigits(iDetectionPlane);
branch = 0x0;
branch = TreeR()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch %s is already in tree.",GetName());
+ AliInfo(Form("Branch %s is already in tree.",GetName()));
return;
}
branch = TreeR()->Branch(branchname, &((*fRawClusters)[i]),kBufferSize);
}
branch = TreeR()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch GlobalTrigger is already in treeR.");
+ AliInfo(Form("Branch GlobalTrigger is already in treeR."));
return ;
}
branch = TreeR()->Branch(branchname, &fGlobalTrigger, kBufferSize);
}
branch = TreeR()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch LocalTrigger is already in treeR.");
+ AliInfo(Form("Branch LocalTrigger is already in treeR."));
return;
}
branch = TreeR()->Branch(branchname, &fLocalTrigger, kBufferSize);
sprintf(branchname,"%sTrack",GetName());
branch = TreeT()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch %s is already in tree.",GetName());
+ AliInfo(Form("Branch %s is already in tree.",GetName()));
return ;
}
branch = TreeT()->Branch(branchname,&fRecTracks,kBufferSize);
sprintf(branchname,"%sTriggerTrack",GetName());
branch = TreeT()->GetBranch(branchname);
if (branch) {
- Info("MakeBranch","Branch %s is already in tree.",GetName());
+ AliInfo(Form("Branch %s is already in tree.",GetName()));
return ;
}
branch = TreeT()->Branch(branchname,&fRecTriggerTracks,kBufferSize);
{
// Reset tracks information
fNrectracks = 0;
- if (fRecTracks) fRecTracks->Clear();
+ if (fRecTracks) fRecTracks->Delete(); // necessary to delete in case of memory allocation
}
//____________________________________________________________________________
void AliMUONData::ResetRecTriggerTracks()
{
// Reset tracks information
fNrectriggertracks = 0;
- if (fRecTriggerTracks) fRecTriggerTracks->Clear();
+ if (fRecTriggerTracks) fRecTriggerTracks->Delete(); // necessary to delete in case of memory allocation
}
//_____________________________________________________________________________
void AliMUONData::SetTreeAddress(Option_t* option)
branch->SetAddress(&fHits);
}
else { //can be invoked before branch creation
- Warning("SetTreeAddress","(%s) Failed for Hits. Can not find branch in tree.",GetName());
+ AliWarning(Form("(%s) Failed for Hits. Can not find branch in tree.",GetName()));
}
}
if (branch) {
branch->SetAddress( &digits );
}
- else Warning("SetTreeAddress","(%s) Failed for Digits Detection plane %d. Can not find branch in tree.",GetName(),i);
+ else AliWarning(Form("(%s) Failed for Digits Detection plane %d. Can not find branch in tree.",GetName(),i));
}
}
}
sprintf(branchname,"%sLocalTrigger",GetName());
branch = TreeD()->GetBranch(branchname);
if (branch) branch->SetAddress(&fLocalTrigger);
- else Warning("SetTreeAddress","(%s) Failed for LocalTrigger. Can not find branch in treeD.",GetName());
+ else AliWarning(Form("(%s) Failed for LocalTrigger. Can not find branch in treeD.",GetName()));
}
if ( TreeD() && fGlobalTrigger && cGLT) {
sprintf(branchname,"%sGlobalTrigger",GetName());
branch = TreeD()->GetBranch(branchname);
if (branch) branch->SetAddress(&fGlobalTrigger);
- else Warning("SetTreeAddress","(%s) Failed for GlobalTrigger. Can not find branch in treeD.",GetName());
+ else AliWarning(Form("(%s) Failed for GlobalTrigger. Can not find branch in treeD.",GetName()));
}
//
branch = TreeS()->GetBranch(branchname);
TClonesArray * sdigits = SDigits(i);
if (branch) branch->SetAddress( &sdigits );
- else Warning("SetTreeAddress","(%s) Failed for SDigits Detection plane %d. Can not find branch in tree.",GetName(),i);
+ else AliWarning(Form("(%s) Failed for SDigits Detection plane %d. Can not find branch in tree.",GetName(),i));
}
}
}
if (fRawClusters) {
branch = TreeR()->GetBranch(branchname);
if (branch) branch->SetAddress( &((*fRawClusters)[i]) );
- else Warning("SetTreeAddress","(%s) Failed for RawClusters Detection plane %d. Can not find branch in tree.",GetName(),i);
+ else AliWarning(Form("(%s) Failed for RawClusters Detection plane %d. Can not find branch in tree.",GetName(),i));
}
}
}
sprintf(branchname,"%sLocalTrigger",GetName());
branch = TreeR()->GetBranch(branchname);
if (branch) branch->SetAddress(&fLocalTrigger);
- else Warning("SetTreeAddress","(%s) Failed for LocalTrigger. Can not find branch in treeR.",GetName());
+ else AliWarning(Form("(%s) Failed for LocalTrigger. Can not find branch in treeR.",GetName()));
}
if ( TreeR() && fGlobalTrigger && cTC) {
sprintf(branchname,"%sGlobalTrigger",GetName());
branch = TreeR()->GetBranch(branchname);
if (branch) branch->SetAddress(&fGlobalTrigger);
- else Warning("SetTreeAddress","(%s) Failed for GlobalTrigger. Can not find branch in treeR.",GetName());
+ else AliWarning(Form("(%s) Failed for GlobalTrigger. Can not find branch in treeR.",GetName()));
}
if ( TreeT() ) {
sprintf(branchname,"%sTrack",GetName());
branch = TreeT()->GetBranch(branchname);
if (branch) branch->SetAddress(&fRecTracks);
- else Warning("SetTreeAddress","(%s) Failed for Tracks. Can not find branch in tree.",GetName());
+ else AliWarning(Form("(%s) Failed for Tracks. Can not find branch in tree.",GetName()));
}
// trigger tracks
if ( TreeT() ) {
sprintf(branchname,"%sTriggerTrack",GetName());
branch = TreeT()->GetBranch(branchname);
if (branch) branch->SetAddress(&fRecTriggerTracks);
- else Warning("SetTreeAddress","(%s) Failed for Trigger Tracks. Can not find branch in tree.",GetName());
+ else AliWarning(Form("(%s) Failed for Trigger Tracks. Can not find branch in tree.",GetName()));
}