#include <AliHeader.h>
#include <TH1F.h> //HitQA()
#include <AliLog.h> //in many methods to print AliInfo
+
ClassImp(AliHMPID)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPID::AliHMPID(const char *name, const char *title):AliDetector(name,title),fSdi(0),fDig(0),fClu(0)
+AliHMPID::AliHMPID(const char *name, const char *title):AliDetector(name,title),fDoFeed(kTRUE),fSdi(0),fDig(0),fClu(0)
{
//Named ctor
AliDebug(1,"Start.");
//AliDetector ctor deals with Hits and Digits (reset them to 0, does not create them)
HitCreate(); gAlice->GetMCApp()->AddHitList(fHits);
+
+ TString ttl=title;
+ fDoFeed=!ttl.Contains("NoFeedBack");
AliDebug(1,"Stop.");
}//AliHMPID::AliHMPID(const char *name, const char *title)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
const char *cR = strstr(option,"R");
const char *cS = strstr(option,"S");
- if(cH&& TreeH()){HitCreate(); MakeBranchInTree( TreeH(), "HMPID" ,&fHits ,kBufSize,0);}
+ if(cH&&fLoader->TreeH()){HitCreate(); MakeBranchInTree(fLoader->TreeH(), "HMPID" ,&fHits ,kBufSize,0);}
if(cS&&fLoader->TreeS()){SdiCreate(); MakeBranchInTree(fLoader->TreeS(), "HMPID" ,&fSdi ,kBufSize,0);}
if(cD&&fLoader->TreeD()){DigCreate();for(Int_t i=0;i<7;i++) MakeBranchInTree(fLoader->TreeD(),Form("HMPID%d",i),&((*fDig)[i]),kBufSize,0);}
if(cR&&fLoader->TreeR()){CluCreate();for(Int_t i=0;i<7;i++) MakeBranchInTree(fLoader->TreeR(),Form("HMPID%d",i),&((*fClu)[i]),kBufSize,0);}
// GetLoader()->UnloadHits();
// return 0;
// }
-//__________________________________________________________________________________________________
-void AliHMPID::HitPrint(Int_t iEvtN)const
-{
-//Prints a list of HMPID hits for a given event. Default is event number 0.
- if(GetLoader()->GetRunLoader()->GetEvent(iEvtN)) return;
- AliInfo(Form("List of HMPID hits for event %i",iEvtN));
- if(GetLoader()->LoadHits()) return;
-
- Int_t iTotalHits=0;
- for(Int_t iPrimN=0;iPrimN<GetLoader()->TreeH()->GetEntries();iPrimN++){//prims loop
- GetLoader()->TreeH()->GetEntry(iPrimN);
- Hits()->Print();
- iTotalHits+=Hits()->GetEntries();
- }
- GetLoader()->UnloadHits();
- AliInfo(Form("totally %i hits",iTotalHits));
-}
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPID::SdiPrint(Int_t iEvt)const
-{
-//prints a list of HMPID sdigits for a given event
- if(GetLoader()->GetRunLoader()->GetEvent(iEvt)) return;
- Info("PrintSDigits","List of HMPID sdigits for event %i",iEvt);
- if(GetLoader()->LoadSDigits()) return;
-
- GetLoader()->TreeS()->GetEntry(0);
- SdiLst()->Print();
- GetLoader()->UnloadSDigits();
- Printf("totally %i sdigits",SdiLst()->GetEntries());
-}
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPID::DigPrint(Int_t iEvt)const
-{
-//prints a list of HMPID digits for a given event
- if(GetLoader()->GetRunLoader()->GetEvent(iEvt)) return;
- Printf("List of HMPID digits for event %i",iEvt);
- if(GetLoader()->LoadDigits()) return;
-
- GetLoader()->TreeD()->GetEntry(0);
- DigLst()->Print();
- Int_t totDigs=0;
- for(Int_t i=0;i<7;i++) {totDigs+=DigLst(i)->GetEntries();}
- Printf("totally %i Digits",totDigs);
- GetLoader()->UnloadDigits();
-}
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPID::CluPrint(Int_t iEvtN)const
-{
-//prints a list of HMPID clusters for a given event
- Printf("List of HMPID clusters for event %i",iEvtN);
- GetLoader()->GetRunLoader()->GetEvent(iEvtN);
- if(GetLoader()->LoadRecPoints()) return;
-
- Int_t iCluCnt=0;
- GetLoader()->TreeR()->GetEntry(0);
- for(Int_t iCh=0;iCh<7;iCh++){
- TClonesArray *pCluLst=(TClonesArray*)fClu->At(iCh); iCluCnt+=pCluLst->GetEntries(); pCluLst->Print();
- }
- GetLoader()->UnloadRecPoints();
- Printf("totally %i clusters for event %i",iCluCnt,iEvtN);
-}
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++