#ifndef AliRICH_h
#define AliRICH_h
-
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-#include <TObjArray.h>
-#include <TClonesArray.h>
-#include <TLorentzVector.h>
#include <AliDetector.h>
-#include <AliHit.h>
-#include <AliDigit.h>
+#include <TClonesArray.h>
+#include <TObjArray.h>
+#include <TVector.h>
+#include <TVector3.h>
+
#include "AliRICHDigitizer.h"
#include "AliRICHParam.h"
+#include "AliRICHCluster.h"
+#include "AliRICHHit.h"
-//__________________AliRICHhit______________________________________________________________________
-class AliRICHhit : public AliHit
-{
-public:
- AliRICHhit():AliHit() {fChamber=fPid=kBad; fEloss=kBad; fInX3.SetXYZ(0,0,0);fOutX3.SetXYZ(0,0,0);
- fMomX=fMomY=fMomZ=fNPads=fCerenkovAngle=fMomFreoX=fMomFreoY=fMomFreoZ=kBad;}
- AliRICHhit(Int_t c,Int_t tid,TVector3 in,TVector3 out,Double_t e):AliHit(0,tid) {fInX3=in; fOutX3=out; fChamber=c; fEloss=e;
- fX=out.X();fY=out.Y();fZ=out.Z();
- fPid=kBad;fMomX=fMomY=fMomZ=fNPads=fCerenkovAngle=fMomFreoX=fMomFreoY=fMomFreoZ=kBad;}
- inline AliRICHhit(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *hits); //old version 3 ?????
- virtual ~AliRICHhit() {;}
-
- Int_t C() const{return fChamber;}
- Int_t Chamber() const{return fChamber;}
- Int_t Pid() const{return fPid;}
- Int_t Particle() const{return fPid;}
- Float_t Eloss() const{return fEloss;}
- Float_t MomX() const{return fMomX;}
- Float_t MomY() const{return fMomY;}
- Float_t MomZ() const{return fMomZ;}
- Float_t CerenkovAngle() const{return fCerenkovAngle;}
- Float_t MomFreoX() const{return fMomFreoX;}
- Float_t MomFreoY() const{return fMomFreoY;}
- Float_t MomFreoZ() const{return fMomFreoZ;}
- TVector3 InX3() const{return fInX3;}
- TVector3 OutX3() const{return fOutX3;}
- Double_t Length() const{return (fOutX3-fInX3).Mag();}
- void Print(Option_t *option="")const; //virtual
-protected:
- Int_t fChamber; //chamber number
- Int_t fPid; //particle code
- Double_t fEloss; //ionisation energy loss in GAP
- Float_t fMomX,fMomY,fMomZ; //momentum at photochatode entry point
- Float_t fNPads; //Pads hit
- Float_t fCerenkovAngle; //Dummy cerenkov angle
- Float_t fMomFreoX,fMomFreoY,fMomFreoZ; //momentum at freon entry point
- TVector3 fInX3; //position at the entrance of the GAP
- TVector3 fOutX3; //position at exit of the GAP
- ClassDef(AliRICHhit,2) //RICH hit class
-};//class AliRICHhit
-//__________________________________________________________________________________________________
-AliRICHhit::AliRICHhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hit)
- :AliHit(shunt, track)
-{
-// old ctor to be deleted
- fChamber=vol[0];
- fPid=(Int_t)hit[0];
- fX=hit[1];fY=hit[2];fZ=hit[3];
- fEloss=hit[7];
- fMomX=hit[14];fMomY=hit[15];fMomZ=hit[16];
- fCerenkovAngle=hit[18];
- fMomFreoX=hit[19];fMomFreoY=hit[20];fMomFreoZ=hit[21];
-}
-
-//__________________AliRICHdigit____________________________________________________________________
-class AliRICHdigit :public AliDigit
-{
-public:
- AliRICHdigit() {fCombiPid=fChamber=fPadX=fPadY=fTracks[0]=fTracks[1]=fTracks[2]=kBad;fQdc=kBad;}
- AliRICHdigit(Int_t c,Int_t x,Int_t y,Double_t q,Int_t cpid,Int_t tid0,Int_t tid1,Int_t tid2)
- {fPadX=x;fPadY=y;fQdc=q;fChamber=10*c+AliRICHParam::Sector(x,y);fCombiPid=cpid;fTracks[0]=tid0;fTracks[1]=tid1;fTracks[2]=tid2;}
- virtual ~AliRICHdigit() {;}
- Int_t Compare(const TObject *pObj) const //virtual
- {if(Id()==((AliRICHdigit*)pObj)->Id()) return 0; else if(Id()>((AliRICHdigit*)pObj)->Id()) return 1; else return -1;}
-
- Bool_t IsSortable() const{return kTRUE;}//virtual
- Int_t CombiPid() const{return fCombiPid;}
- Int_t C() const{return fChamber/10;}
- Int_t S() const{return fChamber-(fChamber/10)*10;}
- Int_t Chamber() const{return C();}
- Int_t Sector() const{return S();}
- Int_t X() const{return fPadX;}
- Int_t Y() const{return fPadY;}
- Int_t Id() const{return fChamber*10000000+fPadX*1000+fPadY;}
- Double_t Q() const{return fQdc;}
- Int_t Tid(Int_t i) const{return fTracks[i];}
- void Print(Option_t *option="")const; //virtual
-protected:
- Int_t fCombiPid; //1000000*Ncerenkovs+1000*Nfeedbacks+Nmips
- Int_t fChamber; //10*chamber number+ sector number
- Int_t fPadX; //pad number along X
- Int_t fPadY; //pad number along Y
- Double_t fQdc; //QDC value, fractions are permitted for summable procedure
- ClassDef(AliRICHdigit,2) //RICH digit class
-};//class AliRICHdigit
-
-//__________________AliRICHcluster__________________________________________________________________
-class AliRICHcluster :public TObject
-{
-public:
- enum ClusterStatus {kEdge,kShape,kSize,kRaw,kResolved};
- AliRICHcluster() {fSize=fQdc=fStatus=fChamber=fDimXY=0;fX=fY=kBad;fDigits=0;}
- virtual ~AliRICHcluster() {delete fDigits;}
- AliRICHcluster& operator=(const AliRICHcluster&) {return *this;}
- Int_t Nlocals() const{return fSize - 10000*(fSize/10000);} //
- Int_t Size() const{return fSize/10000;} //
- Int_t Fsize() const{return fSize;} //
- Int_t DimXY() const{return fDimXY;} //
- Int_t C() const{return fChamber/10;} //
- Int_t S() const{return fChamber-(fChamber/10)*10;} //
- Int_t Fchamber() const{return fChamber;} //
- Int_t Chamber() const{return C();} //
- Int_t Sector() const{return S();} //
- Int_t Q() const{return fQdc;} //
- Double_t X() const{return fX;} //
- Double_t Y() const{return fY;} //
- Int_t Status() const{return fStatus;} //
- void SetStatus(Int_t status) {fStatus=status;} //
- Int_t Nmips() const{return fCombiPid-1000000*Ncerenkovs()-1000*Nfeedbacks();} //
- Int_t Ncerenkovs() const{return fCombiPid/1000000;} //
- Int_t Nfeedbacks() const{return (fCombiPid-1000000*Ncerenkovs())/1000;} //
- Bool_t IsPureMip() const{return fCombiPid<1000;}
- Bool_t IsPureCerenkov() const{return Nmips()==0&&Nfeedbacks()==0;} //
- Bool_t IsPureFeedback() const{return Nmips()==0&&Ncerenkovs()==0;} //
- Int_t CombiPid() const{return fCombiPid;} //
- void SetCombiPid(Int_t ckov,Int_t feeds,Int_t mips) {fCombiPid=1000000*ckov+1000*feeds+mips;} //
- void Fill(AliRICHcluster *pRaw,Double_t x,Double_t y, Double_t q, Int_t combipid)
- {fCombiPid=combipid;fChamber=pRaw->Fchamber();fSize=pRaw->Fsize();
- fQdc=(Int_t)(q*pRaw->Q());fX=x;fY=y;fStatus=kResolved;} //
- TObjArray* Digits() const{return fDigits;} //
- void Print(Option_t *option="")const; //virtual
- inline void AddDigit(AliRICHdigit *pDig); //
- inline void CoG(Int_t nLocals); //
- void Reset() {fSize=fQdc=fStatus=fChamber=fDimXY=kBad;fX=fY=kBad;delete fDigits;fDigits=0;} //
-protected:
- Int_t fCombiPid; //1000000*Ncerenkovs+1000*Nfeedbacks+Nmips
- Int_t fSize; //10000*(how many digits belong to this cluster) + nLocalMaxima
- Int_t fDimXY; //100*xdim+ydim box containing the cluster
- Int_t fQdc; //QDC value
- Int_t fChamber; //10*module number+sector number
- Double_t fX; //local x postion
- Double_t fY; //local y postion
- Int_t fStatus; //flag to mark the quality of the cluster
- TObjArray *fDigits; //! list of digits forming this cluster
- ClassDef(AliRICHcluster,2) //RICH cluster class
-};//class AliRICHcluster
-//__________________________________________________________________________________________________
-void AliRICHcluster::AddDigit(AliRICHdigit *pDig)
-{//
- if(!fDigits) {fQdc=fSize=fCombiPid=0;fDigits = new TObjArray;}
- fQdc+=(Int_t)pDig->Q(); fDigits->Add(pDig);
- fChamber=10*pDig->C()+pDig->S();
- fSize+=10000;
-}
-//__________________________________________________________________________________________________
-void AliRICHcluster::CoG(Int_t nLocals)
-{//
- Int_t xmin=999,ymin=999,xmax=0,ymax=0;
- fX=fY=0;
- for(Int_t iDig=0;iDig<Size();iDig++) {
- AliRICHdigit *pDig=(AliRICHdigit*)fDigits->At(iDig);
- Int_t padX = pDig->X();Int_t padY = pDig->Y();Double_t q=pDig->Q();
- TVector2 x2=AliRICHParam::Pad2Loc(padX,padY);
- fX += x2.X()*q;fY +=x2.Y()*q;
- if(padX<xmin)xmin=padX;if(padX>xmax)xmax=padX;if(padY<ymin)ymin=padY;if(padY>ymax)ymax=padY;
- }
- fX/=fQdc;fY/=fQdc;//Center of Gravity
- fDimXY = 100*(xmax-xmin+1)+ymax-ymin+1;//find box containing cluster
- fSize+=nLocals;
- fStatus=kRaw;
-}//CoG()
-//__________________________________________________________________________________________________
-class AliRICHreco: public TObject
-{
-public:
- AliRICHreco() {fTid=fNphotons=kBad; fThetaCherenkov=kBad;}
- AliRICHreco(Int_t tid,Double_t thetaCherenkov,Int_t nPhotons) {fTid=tid;fThetaCherenkov=thetaCherenkov;fNphotons=nPhotons;}
-
- virtual ~AliRICHreco() {;}
-
- void Print(Option_t *option="")const; //virtual print
-
-protected:
- Int_t fTid; // track Id reference
- Int_t fNphotons; // number of photons contributed to the recontruction
- Double_t fThetaCherenkov; // reconstructed Theta Cerenkov for a given charged track
-
- ClassDef(AliRICHreco,1) //RICH reco class
-
-};//class AliRICHreco
//__________________AliRICH_________________________________________________________________________
-class AliRICHParam;
-class AliRICHChamber;
+class AliESD;
class AliRICH : public AliDetector
{
public:
+//ctor & dtor
AliRICH();
AliRICH(const char *name, const char *title);
- AliRICH(const AliRICH& RICH):AliDetector(RICH) {;}
+ AliRICH(const AliRICH& RICH):AliDetector(RICH) {;} //copy ctor
virtual ~AliRICH();
AliRICH& operator=(const AliRICH&) {return *this;}
- virtual Int_t IsVersion() const =0;
- void Hits2SDigits(); //virtual
- AliDigitizer* CreateDigitizer(AliRunDigitizer* man) const {return new AliRICHDigitizer(man);} //virtual
-
- inline void CreateHits();
- inline void CreateSDigits();
- inline void CreateDigits();
- inline void CreateClusters();
- inline void CreateRecos();
- void AddHit(Int_t chamber,Int_t tid,TVector3 iX3,TVector3 oX3,Double_t eloss=0)
- {TClonesArray &tmp=*fHits;new(tmp[fNhits++])AliRICHhit(chamber,tid,iX3,oX3,eloss);}
- inline void AddSDigit(Int_t c,Int_t x,Int_t y,Double_t q,Int_t pid,Int_t tid);
- void AddDigit(int c,int x,int y,int q,int cpid,int *tid){TClonesArray &tmp=*((TClonesArray*)fDigitsNew->At(c-1));new(tmp[fNdigitsNew[c-1]++])AliRICHdigit(c,x,y,q,cpid,tid[0],tid[1],tid[2]);}
- void AddCluster(AliRICHcluster &cl) {TClonesArray &tmp=*((TClonesArray*)fClusters->At(cl.C()-1));new(tmp[fNclusters[cl.C()-1]++])AliRICHcluster(cl);}
- void AddReco(Int_t tid,Double_t thetaCherenkov,Int_t nPhotons) {TClonesArray &tmp=*(TClonesArray*)fRecos;new(tmp[fNrecos++])AliRICHreco(tid,thetaCherenkov,nPhotons);}
-// void ResetHits() {AliDetector::ResetHits();} //virtual
- void ResetSDigits() {fNsdigits=0; if(fSdigits) fSdigits ->Clear();}
- void ResetDigits() {if(fDigitsNew)for(int i=0;i<kNCH;i++){fDigitsNew->At(i)->Clear();fNdigitsNew[i]=0;}}
- void ResetClusters() {if(fClusters) for(int i=0;i<kNCH;i++){fClusters ->At(i)->Clear();fNclusters[i]=0;}}
- void ResetRecos() {if(fRecos) fRecos->Clear();fNrecos=0;}
- //Hits provided by AliDetector
- TClonesArray* SDigits() const{return fSdigits;}
- TClonesArray* Digits(Int_t iC) const{if(fDigitsNew) return (TClonesArray *)fDigitsNew->At(iC-1);else return 0;}
- TClonesArray* Clusters(Int_t iC) const{if(fClusters) return (TClonesArray *)fClusters->At(iC-1);else return 0;}
- TClonesArray* Recos() const{return fRecos;}
-
- AliRICHChamber* C(Int_t iC) const{return (AliRICHChamber*)fChambers->At(iC-1);}
- AliRICHParam* Param() const{return fpParam;}
- AliRICHParam* P() const{return fpParam;}
- void CreateChambers();
- void CreateMaterials(); //virtual
- virtual void BuildGeometry(); //virtual
- virtual void CreateGeometry(); //virtual
- Float_t AbsoCH4(Float_t x)const;
- Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola)const;
+//framework part
+ virtual Int_t IsVersion() const =0; //interface from
+ virtual void StepManager() =0; //interface from AliMC
+ virtual void Hits2SDigits(); //interface from AliSimulation
+ virtual void Digits2Raw(); //interface from AliSimulation
+ virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* man) const {return new AliRICHDigitizer(man);} //interface from AliSimulation
+ virtual void SetTreeAddress(); //interface from AliLoader
+ virtual void MakeBranch(Option_t *opt=" "); //interface from AliLoader
+ virtual void CreateMaterials(); //interface from AliMC
+ virtual void CreateGeometry(); //interface from AliMC
+ virtual void BuildGeometry(); //interface
+ virtual void Print(Option_t *option="") const; //prints current RICH status
+//private part
+ void GeomPadPanelFrame()const; //defines PPF geometry
+ void GeomAmpGap() const; //defines gap geometry + anod wires
+ void GeomRadiators() const; //defines radiators geometry
+ void GeomSandBox() const; //defines sandbox geometry
+ void GeomRadioSrc() const; //defines radio source geometry
+ void GeomAerogel() const; //defines aerogel geometry
+ static Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola); //deals with Fresnel absorption
- virtual void StepManager()=0;
- void GenerateFeedbacks(Int_t iChamber,Float_t eloss=0);//eloss=0 for photon
- void Print(Option_t *option)const;//virtual
- void MakeBranch(Option_t *opt=" ");
- void SetTreeAddress();//virtual
+ AliRICHHit* Hit (Int_t tid )const; //first hit of given TID
+ inline void HitAdd (Int_t c,Int_t tid,TVector3 in,TVector3 out,Double_t e=0); //add new hit
+ inline void HitsCreate ( ); //create hits container
+ void HitsPrint (Int_t iEvent=0 )const; //prints hits
-// Int_t DistancetoPrimitive(Int_t /*px*/, Int_t /*py*/) {return 9999;}
-
+ TClonesArray* SDigits ( )const{return fSdigits;} //pointer to sdigits list
+ inline void SDigitAdd (Int_t c,TVector pad,Double_t q,Int_t pid,Int_t tid ) ; //add new sdigit
+ inline void SDigitsCreate ( ) ; //create sdigits container
+ void SDigitsReset ( ) {fNsdigits=0; if(fSdigits) fSdigits ->Clear();} //clean a list of sdigits
+ void SDigitsPrint (Int_t iEvent=0 )const; //prints sdigits
+
+ using AliDetector::Digits;
+ TClonesArray* Digits (Int_t iC )const{return fDigs ? (TClonesArray *)fDigs->At(iC-1):0;}
+ inline void DigitAdd (Int_t c,TVector pad,int q,int cfm,int *tid ) ; //add new digit
+ inline void DigitsCreate ( ) ; //create digits
+ void DigitsReset ( ) {if(fDigs)for(int i=0;i<kNchambers;i++){fDigs->At(i)->Clear();fNdigs[i]=0;}} //virtual
+ void DigitsPrint (Int_t iEvent=0 )const; //prints digits
+
+ TClonesArray* Clusters (Int_t iC )const{if(fClus) return (TClonesArray *)fClus->At(iC-1);else return 0;}
+ inline void ClusterAdd (AliRICHCluster &cl ) ; //add new cluster
+ inline void ClustersCreate( ) ; //create clusters container
+ void ClustersReset ( ) {if(fClus)for(int i=0;i<kNchambers;i++){fClus ->At(i)->Clear();fNclus[i]=0;}}
+ void ClustersPrint (Int_t iEvent=0 )const; //prints a list of clusters for a given event
+
+ void OccupancyPrint(Int_t iEvent=0 )const;
+
+ AliRICHChamber* C(Int_t iC) const{return fParam->C(iC);} //provides pointer to a given chamber
+ AliRICHParam* P() const{return fParam;} //provides pointer to a RICH params
+ AliRICH* R() {return this;} //provides pointer to RICH main object
+ TVector Counters() const{return fCounters;} //provides a set of counters
+ void ControlPlots(); //creates ~/RCP.root with a set of QA plots
+ void Display()const; //Display event
+ void DisplayEvent(Int_t,Int_t)const; //Display event
+ static Int_t Nparticles(Int_t iPid,Int_t iEventN,AliRunLoader *pRunLoader); //counts total number of particle with iPid
+ void PrintTracks (Int_t iEvent=0); //prints a list of tracks for a given event
+ void CheckPR ()const; //utility-> run staff for stack ??????
+ void ReadESD(Int_t iEventN, Int_t iChamber)const;
+ void DrawRing(TVector3 entrance,TVector3 vectorTrack,Double_t thetaCer)const;
+
protected:
- enum {kCSI=6,kGAP=9};
- AliRICHParam *fpParam; //main RICH parametrization
- TObjArray *fChambers; //list of RICH chambers
- //fHits and fDigits belong to AliDetector
- TClonesArray *fSdigits; //! List of sdigits
- Int_t fNsdigits; //! Current number of sdigits
+ enum EMedia {kAir=1,kRoha,kSiO2,kC6F14,kCH4,kCsI,kGridCu,kOpSiO2,kGap,kAl,kGlass,kCu,kW,kSteel,kPerpex,kSr90,kMylar,kGel,kReflector};
+ enum ECounters {kStepManager=0,kCerProdTot,kCerProdRad,kCerKillTot,kCerKillRad,kCerKillRef,kEleProdTot};
+ AliRICHParam *fParam; //main RICH parametrization
+ //fHits and fDigits belong to AliDetector
+ TClonesArray *fSdigits; //! list of sdigits
+ Int_t fNsdigits; //! current number of sdigits
- TObjArray *fDigitsNew; //! Each chamber holds it's one lists of digits
- Int_t fNdigitsNew[kNCH]; //! Array of current numbers of digits
+ TObjArray *fDigs; //! each chamber holds it's one lists of digits
+ Int_t fNdigs[7]; //! array of current numbers of digits
- TObjArray *fClusters; //! Each chamber holds it's one lists of clusters
- Int_t fNclusters[kNCH]; //! Array of current numbers of raw clusters
+ TObjArray *fClus; //! each chamber holds it's one lists of clusters
+ Int_t fNclus[7]; //! array of current numbers of raw clusters
- TClonesArray *fRecos; //! pointer to the list of recos
- Int_t fNrecos; //! number of recos
-
- ClassDef(AliRICH,5) //Main RICH class
+ TVector fCounters; //Particle history counters, explanation in StepManager()
+
+ ClassDef(AliRICH,9) //Main RICH class
};//class AliRICH
//__________________________________________________________________________________________________
-void AliRICH::CreateHits()
+void AliRICH::HitsCreate()
{
if(fHits) return;
- if(GetDebug())Info("CreateHits","creating hits container.");
- fHits=new TClonesArray("AliRICHhit",10000); fNhits=0;
+ AliDebug(1,"creating hits container.");
+ fHits=new TClonesArray("AliRICHHit",10000); fNhits=0;
}
//__________________________________________________________________________________________________
-void AliRICH::CreateSDigits()
+void AliRICH::HitAdd(Int_t c,Int_t tid,TVector3 i3,TVector3 o3,Double_t eloss)
+{
+//add new RICH hit to the list of hits
+ TClonesArray &tmp=*fHits;
+ new(tmp[fNhits++])AliRICHHit(c,tid,i3,o3,eloss);
+}//AddHit()
+//__________________________________________________________________________________________________
+void AliRICH::SDigitsCreate()
{
if(fSdigits) return;
- if(GetDebug())Info("CreateSDigits","creating sdigits container.");
- fSdigits=new TClonesArray("AliRICHdigit",10000); fNsdigits=0;
+ AliDebug(1,"creating sdigits container.");
+ fSdigits=new TClonesArray("AliRICHDigit",10000); fNsdigits=0;
+}
+//__________________________________________________________________________________________________
+void AliRICH::SDigitAdd(Int_t c,TVector pad,Double_t q,Int_t pid,Int_t tid)
+{
+ Int_t cfm;
+ switch(pid){
+ case 50000050: cfm=1000000;break;//cerenkov
+ case 50000051: cfm=1000; break;//feedback
+ default: cfm=1; break;//mip
+ }
+ TClonesArray &tmp=*fSdigits; new(tmp[fNsdigits++])AliRICHDigit(c,pad,q,cfm,tid,-1,-1);
}
//__________________________________________________________________________________________________
-void AliRICH::CreateDigits()
+void AliRICH::DigitsCreate()
{
- if(fDigitsNew) return;
- if(GetDebug())Info("CreateDigits","creating digits containers.");
- fDigitsNew = new TObjArray(kNCH);
- for(Int_t i=0;i<kNCH;i++) {fDigitsNew->AddAt(new TClonesArray("AliRICHdigit",10000), i); fNdigitsNew[i]=0;}
+ if(fDigs) return;
+ AliDebug(1,"creating digits containers.");
+ fDigs = new TObjArray(kNchambers);
+ for(Int_t i=0;i<kNchambers;i++) {fDigs->AddAt(new TClonesArray("AliRICHDigit",10000), i); fNdigs[i]=0;}
}
//__________________________________________________________________________________________________
-void AliRICH::CreateClusters()
+void AliRICH::DigitAdd(int c,TVector pad,int q,int cfm,int *tid)
{
- if(fClusters) return;
- if(GetDebug())Info("CreateClusters","creating clusters containers.");
- fClusters = new TObjArray(kNCH);
- for(Int_t i=0;i<kNCH;i++) {fClusters->AddAt(new TClonesArray("AliRICHcluster",10000), i); fNclusters[i]=0;}
+ TClonesArray &tmp=*((TClonesArray*)fDigs->At(c-1));
+ new(tmp[fNdigs[c-1]++])AliRICHDigit(c,pad,q,cfm,tid[0],tid[1],tid[2]);
+}
+//__________________________________________________________________________________________________
+void AliRICH::ClustersCreate()
+{
+ if(fClus) return;
+ AliDebug(1,"creating clusters containers.");
+ fClus = new TObjArray(kNchambers);
+ for(Int_t i=0;i<kNchambers;i++) {fClus->AddAt(new TClonesArray("AliRICHCluster",10000), i); fNclus[i]=0;}
}
//__________________________________________________________________________________________________
-void AliRICH::CreateRecos()
+void AliRICH::ClusterAdd(AliRICHCluster &cl)
{
- if(fRecos) return;
- if(GetDebug())Info("CreateRecos","creating recos containers.");
- fRecos = new TClonesArray("AliRICHreco",1000);fNrecos=0;
+ Int_t c=cl.C()-1;TClonesArray &tmp=*((TClonesArray*)fClus->At(c));
+ new(tmp[fNclus[c]++])AliRICHCluster(cl);
}
//__________________________________________________________________________________________________
-void AliRICH::AddSDigit(Int_t c,Int_t x,Int_t y,Double_t q,Int_t pid,Int_t tid)
-{
- switch(pid){
- case 50000050: pid=1000000;break;//cerenkov
- case 50000051: pid=1000; break;//feedback
- default: pid=1; break;//mip
- }
- TClonesArray &tmp=*fSdigits;
- new(tmp[fNsdigits++])AliRICHdigit(c,x,y,q,pid,tid,kBad,kBad);
-}//AddSDigit()
-
#endif//#ifndef AliRICH_h