From aed240d46ec890e36e1661af4805fafc8f029db1 Mon Sep 17 00:00:00 2001 From: kir Date: Wed, 5 Nov 2003 14:31:17 +0000 Subject: [PATCH] old digits-clusters removed --- RICH/AliRICH.cxx | 30 +- RICH/AliRICH.h | 61 +--- RICH/AliRICHDigit.cxx | 56 ---- RICH/AliRICHDigit.h | 52 ---- RICH/AliRICHDigitizer.cxx | 273 +----------------- RICH/AliRICHDigitizer.h | 36 +-- RICH/AliRICHDisplFast.cxx | 194 ++++--------- RICH/AliRICHDisplFast.h | 16 +- RICH/AliRICHDisplay.cxx | 53 ++-- RICH/AliRICHHitMapA1.cxx | 166 ----------- RICH/AliRICHHitMapA1.h | 51 ---- RICH/AliRICHPoints.cxx | 29 +- RICH/AliRICHPoints.h | 4 +- RICH/AliRICHRawCluster.cxx | 69 ----- RICH/AliRICHRawCluster.h | 35 --- RICH/AliRICHRecon.cxx | 12 +- RICH/AliRICHTransientDigit.cxx | 81 ------ RICH/AliRICHTransientDigit.h | 33 --- RICH/AliRICHTresholdMap.cxx | 2 - RICH/AliRICHv3.cxx | 507 --------------------------------- RICH/AliRICHv3.h | 1 - RICH/ConfigRich.C | 2 +- RICH/Opticals.h | 220 ++++++-------- RICH/RICHLinkDef.h | 4 - RICH/libRICH.pkg | 5 +- RICH/menu.C | 31 +- 26 files changed, 243 insertions(+), 1780 deletions(-) delete mode 100644 RICH/AliRICHDigit.cxx delete mode 100644 RICH/AliRICHDigit.h delete mode 100644 RICH/AliRICHHitMapA1.cxx delete mode 100644 RICH/AliRICHHitMapA1.h delete mode 100644 RICH/AliRICHRawCluster.cxx delete mode 100644 RICH/AliRICHRawCluster.h delete mode 100644 RICH/AliRICHTransientDigit.cxx delete mode 100644 RICH/AliRICHTransientDigit.h diff --git a/RICH/AliRICH.cxx b/RICH/AliRICH.cxx index ab273c5b02e..795f9defdda 100644 --- a/RICH/AliRICH.cxx +++ b/RICH/AliRICH.cxx @@ -72,8 +72,6 @@ AliRICH::AliRICH() fCerenkovs =0; fNcerenkovs =0; fSpecials =0; fNspecials =0; - fDchambers =0; for(int i=0;iGetMCApp()->AddHitList(fCerenkovs); fSpecials= 0; CreateSpecialsOld(); - fDchambers= 0; - fRawClusters=0; fCkovNumber=fFreonProd=0; if(GetDebug())Info("named ctor","Stop."); @@ -113,8 +109,6 @@ AliRICH::~AliRICH() if(fCerenkovs) delete fCerenkovs; if(fSpecials) delete fSpecials; - if(fDchambers) {fDchambers->Delete(); delete fDchambers;} - if(fRawClusters) {fRawClusters->Delete(); delete fRawClusters;} if(GetDebug()) Info("dtor","Stop."); }//AliRICH::~AliRICH() //__________________________________________________________________________________________________ @@ -169,7 +163,7 @@ void AliRICH::SDigits2Digits() gAlice->GetRunLoader()->GetEvent(iEventN); if(!GetLoader()->TreeD()) GetLoader()->MakeTree("D"); MakeBranch("D"); //create TreeD with RICH branches - ResetSDigits();ResetDigitsOld();//reset lists of sdigits and digits + ResetSDigits();ResetDigits();//reset lists of sdigits and digits GetLoader()->TreeS()->GetEntry(0); SDigits()->Sort(); @@ -202,7 +196,7 @@ void AliRICH::SDigits2Digits() if(GetDebug()) Info("SDigits2Digits","Event %i processed.",iEventN); }//events loop GetLoader()->UnloadSDigits(); GetLoader()->UnloadDigits(); - ResetSDigits(); ResetDigitsOld(); + ResetSDigits(); ResetDigits(); if(GetDebug()) Info("SDigits2Digits","Stop."); }//void AliRICH::SDigits2Digits() //__________________________________________________________________________________________________ @@ -535,20 +529,15 @@ void AliRICH::MakeBranch(Option_t* option) if(cD&&fLoader->TreeD()){//D CreateDigits(); - CreateDigitsOld(); for(Int_t i=0;iTreeD(),Form("%sDigits%d",GetName(),i+1),&((*fDchambers)[i]),kBufferSize,0); MakeBranchInTree(fLoader->TreeD(),Form("%s%d",GetName(),i+1),&((*fDigitsNew)[i]),kBufferSize,0); } }//D if(cR&&fLoader->TreeR()){//R CreateClusters(); - CreateRawClustersOld(); - for(Int_t i=0;iTreeR(),Form("%sClusters%d",GetName(),i+1), &((*fClusters)[i]), kBufferSize, 0); - MakeBranchInTree(fLoader->TreeR(),Form("%sRawClusters%d",GetName(),i+1), &((*fRawClusters)[i]), kBufferSize, 0); - } + for(Int_t i=0;iTreeR(),Form("%sClusters%d",GetName(),i+1), &((*fClusters)[i]), kBufferSize, 0); }//R if(GetDebug())Info("MakeBranch","Stop."); }//void AliRICH::MakeBranch(Option_t* option) @@ -577,24 +566,15 @@ void AliRICH::SetTreeAddress() for(int i=0;iTreeD()->GetBranch(Form("%s%d",GetName(),i+1)); if(branch){CreateDigits(); branch->SetAddress(&((*fDigitsNew)[i]));} - - branch=fLoader->TreeD()->GetBranch(Form("%sDigits%d",GetName(),i+1)); - if(branch){CreateDigitsOld(); branch->SetAddress(&((*fDchambers)[i]));} - }//for + } }//D if(fLoader->TreeR()){//R if(GetDebug())Info("SetTreeAddress","tree R is requested."); - for(int i=0;iTreeR()->GetBranch(Form("%sClusters%d" ,GetName(),i+1)); if(branch){CreateClusters(); branch->SetAddress(&((*fClusters)[i]));} } - - for(int i=0;iTreeR()->GetBranch(Form("%sRawClusters%d" ,GetName(),i+1)); - if(branch){CreateRawClustersOld(); branch->SetAddress(&((*fRawClusters)[i]));} - } }//R if(GetDebug())Info("SetTreeAddress","Stop."); }//void AliRICH::SetTreeAddress() diff --git a/RICH/AliRICH.h b/RICH/AliRICH.h index 66b4161495f..57b3d6adddd 100644 --- a/RICH/AliRICH.h +++ b/RICH/AliRICH.h @@ -15,10 +15,7 @@ #include "AliRICHChamber.h" #include "AliRICHParam.h" - -#include "AliRICHDigit.h" #include "AliRICHSDigit.h" -#include "AliRICHRawCluster.h" //__________________AliRICHhit______________________________________________________________________ //__________________________________________________________________________________________________ @@ -322,29 +319,16 @@ public: // OLD staff OLD staff inline void AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs); inline void AddSpecialOld(Int_t *); - inline void AddDigitOld(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits); - inline void AddClusterOld(Int_t iChamber, const AliRICHRawCluster& cluster); inline void CreateCerenkovsOld(); inline void CreateSpecialsOld(); - inline void CreateDigitsOld(); - inline void CreateRawClustersOld(); - void ResetDigitsOld() {if(fDchambers) for(int i=0;iAt(i)->Clear();fNdch[i]=0;}} //virtual void ResetSpecialsOld(){fNspecials=0; if(fSpecials) fSpecials->Clear();} - void ResetRawClusters(){if(fRawClusters)for(int i=0;iAt(i)->Clear();fNrawch[i]=0;}} - - TClonesArray* DigitsOld(Int_t iC) const{if(fDchambers) return (TClonesArray *)fDchambers->At(iC-1);else return 0;} - TClonesArray* ClustersOld(Int_t iC) const{if(fRawClusters)return (TClonesArray *)fRawClusters->At(iC-1);else return 0;} TClonesArray* Specials() const{return fSpecials;} TClonesArray* Cerenkovs() const{return fCerenkovs;} AliRICHChamber& Chamber(Int_t id) {return *((AliRICHChamber *) (*fChambers)[id]);} - TObjArray *Dchambers() const{return fDchambers;} - Int_t *Ndch() {return fNdch;} - TClonesArray *DigitsAddress(Int_t id) const{return ((TClonesArray *) (*fDchambers)[id]);} - TClonesArray *RawClustAddress(Int_t id) const{return ((TClonesArray *) (*fRawClusters)[id]);} // Int_t DistancetoPrimitive(Int_t /*px*/, Int_t /*py*/) {return 9999;} protected: @@ -352,25 +336,21 @@ protected: TObjArray *fChambers; //list of RICH chambers //fHits and fDigits belong to AliDetector TClonesArray *fSdigits; //! List of sdigits - Int_t fNsdigits; //Current number 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 + Int_t fNdigitsNew[kNCH]; //! 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 + Int_t fNclusters[kNCH]; //! Array of current numbers of raw clusters TClonesArray *fCerenkovs; //! ??? List of cerenkovs - Int_t fNcerenkovs; //??? Current number of cerenkovs + Int_t fNcerenkovs; //! ??? Current number of cerenkovs TClonesArray *fSpecials; //! ??? List of specials - Int_t fNspecials; //??? Current number of specials - TObjArray *fDchambers; //! Array of lists of digits - Int_t fNdch[kNCH]; //Array of current numbers of digits - TObjArray *fRawClusters; //! Array of lists of raw clusters - Int_t fNrawch[kNCH]; //Array of current numbers of raw clusters + Int_t fNspecials; //! ??? Current number of specials Int_t fCkovNumber; // Number of Cerenkov photons Int_t fFreonProd; // Cerenkovs produced in freon Int_t fFeedbacks; // Number of feedback photons - ClassDef(AliRICH,3) //Main RICH class + ClassDef(AliRICH,4) //Main RICH class };//class AliRICH //__________________________________________________________________________________________________ void AliRICH::AddHit(Int_t track, Int_t *vol, Float_t *hits) @@ -445,22 +425,6 @@ void AliRICH::CreateSpecialsOld() fSpecials=new TClonesArray("AliRICHSDigit",100000); fNspecials=0; } //__________________________________________________________________________________________________ -void AliRICH::CreateDigitsOld() -{ - if(fDchambers) return; - if(GetDebug())Info("CreateDigitsOld","creating digits containers."); - fDchambers = new TObjArray(kNCH); - for(Int_t i=0;iAddAt(new TClonesArray("AliRICHDigit",10000), i); -} -//__________________________________________________________________________________________________ -void AliRICH::CreateRawClustersOld() -{ - if(fRawClusters) return; - if(GetDebug())Info("CreateClustersOld","creating clusters containers."); - fRawClusters = new TObjArray(kNCH); - for(Int_t i=0; iAddAt(new TClonesArray("AliRICHRawCluster",10000), i); -} -//__________________________________________________________________________________________________ void AliRICH::AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs) {//Adds the current RICH cerenkov hit to the Cerenkovs list TClonesArray &tmp=*fCerenkovs; @@ -472,17 +436,4 @@ void AliRICH::AddSpecialOld(Int_t *aiSDigit) TClonesArray &lSDigits = *fSpecials; new(lSDigits[fNspecials++]) AliRICHSDigit(aiSDigit); } -//__________________________________________________________________________________________________ -void AliRICH::AddDigitOld(Int_t iChamber, Int_t *tracks, Int_t *charges, Int_t *digits) -{// Adds the current digit to the RICH list of S digits - TClonesArray &ldigits = *((TClonesArray*)fDchambers->At(iChamber-1)); - new(ldigits[fNdch[iChamber-1]++]) AliRICHDigit(tracks,charges,digits); -} -//__________________________________________________________________________________________________ -void AliRICH::AddClusterOld(Int_t iChamber, const AliRICHRawCluster& c) -{// Add a RICH raw cluster to the list - TClonesArray &tmp= *((TClonesArray*)fRawClusters->At(iChamber-1)); - new(tmp[fNrawch[iChamber-1]++]) AliRICHRawCluster(c); -} -//__________________________________________________________________________________________________ #endif//#ifndef AliRICH_h diff --git a/RICH/AliRICHDigit.cxx b/RICH/AliRICHDigit.cxx deleted file mode 100644 index 21c13b3a6c9..00000000000 --- a/RICH/AliRICHDigit.cxx +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************** - * 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$ */ - -#include "AliRICHDigit.h" - -ClassImp(AliRICHDigit) -//_____________________________________________________________________________ -AliRICHDigit::AliRICHDigit(Int_t *digits) -{ - // - // Creates a RICH digit object to be updated - // - fPadX = digits[0]; - fPadY = digits[1]; - fSignal = digits[2]; - fPhysics = digits[3]; - fHit = digits[4]; - -} -//_____________________________________________________________________________ -AliRICHDigit::AliRICHDigit(Int_t *tracks, Int_t *charges, Int_t *digits) -{ - // - // Creates a RICH digit object - // - fPadX = digits[0]; - fPadY = digits[1]; - fSignal = digits[2]; - fPhysics = digits[3]; - fHit = digits[4]; - - for(Int_t i=0; i #include -#include "AliRunLoader.h" -#include "AliLoader.h" +#include +#include #include "AliRICHDigitizer.h" -#include "AliRICHChamber.h" -#include "AliHitMap.h" -#include "AliRICHHitMapA1.h" #include "AliRICH.h" -#include "AliRICHSDigit.h" -#include "AliRICHDigit.h" -#include "AliRICHTransientDigit.h" #include "AliRun.h" #include "AliPDG.h" #include "AliRunDigitizer.h" ClassImp(AliRICHDigitizer) -//__________________________________________________________________________________________________ -AliRICHDigitizer::AliRICHDigitizer() -{//default ctor - don't use it - fHits = 0; - fSDigits = 0; - fHitMap = 0; - fTDList = 0; -}//default ctor //__________________________________________________________________________________________________ AliRICHDigitizer::AliRICHDigitizer(AliRunDigitizer *pManager) :AliDigitizer(pManager) {//main ctor which should be used - if(fManager->GetDebug())Info("main ctor","Start."); - fHits = 0; - fSDigits = 0; - fHitMap = 0; - fTDList = 0; - fDebug = pManager->GetDebug(); }//main ctor //__________________________________________________________________________________________________ AliRICHDigitizer::~AliRICHDigitizer() {//dtor if(fManager->GetDebug())Info("dtor","Start."); - - if(fHits) {fHits->Delete(); delete fHits;} - if(fSDigits) {fSDigits->Delete();delete fSDigits;} - if(fTDList) {fTDList->Delete(); delete fTDList;} - for(Int_t i=0; iTestHit(p->PadX(),p->PadY())); -}//Exists -//__________________________________________________________________________________________________ -void AliRICHDigitizer::Update(AliRICHSDigit *padhit) -{ - AliRICHTransientDigit *pdigit = - static_cast( - fHitMap[fNch]->GetHit(padhit->PadX(),padhit->PadY())); - - // update charge - // - Int_t iqpad = Int_t(padhit->QPad()); // charge per pad - pdigit->AddSignal(iqpad); - pdigit->AddPhysicsSignal(iqpad); - // update list of tracks - // - Int_t track, charge; - track = fTrack+fMask; - if (fSignal) { - charge = iqpad; - } else { - charge = kBgTag; - } - pdigit->UpdateTrackList(track,charge); -}//Update() -//__________________________________________________________________________________________________ -void AliRICHDigitizer::CreateNew(AliRICHSDigit *padhit) -{ - fTDList->AddAtAndExpand( - new AliRICHTransientDigit(fNch,fDigits),fCounter); - fHitMap[fNch]->SetHit(padhit->PadX(),padhit->PadY(),fCounter); - - AliRICHTransientDigit* pdigit = - static_cast(fTDList->Last()); - // list of tracks - Int_t track, charge; - if (fSignal) { - track = fTrack; - charge = padhit->QPad(); - } else { - track = kBgTag; - charge = kBgTag; - } - pdigit->AddToTrackList(track,charge); - fCounter++; -}//CreateNew() -//__________________________________________________________________________________________________ -Bool_t AliRICHDigitizer::Init() -{// Initialisation - if(GetDebug())Info("Init","Start."); - fHits = new TClonesArray("AliRICHhit",1000); - fSDigits = new TClonesArray("AliRICHSDigit",1000); - return kTRUE; -}//Init() -//__________________________________________________________________________________________________ -void AliRICHDigitizer::Exec(Option_t* option) -{ - if(GetDebug())Info("Exec","Start with option=%s",option); - - AliRICHChamber* iChamber; - AliSegmentation* segmentation; - AliRunLoader *pInAL, *pOutAL;//in and out Run loaders AliLoader *pInRL, *pOutRL;//in and out RICH loaders pOutAL = AliRunLoader::GetRunLoader(fManager->GetOutputFolderName()); pOutRL = pOutAL->GetLoader("RICHLoader"); - fTDList = new TObjArray; AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH"); @@ -152,199 +64,22 @@ void AliRICHDigitizer::Exec(Option_t* option) if(!pOutRL->TreeD()) pOutRL->MakeTree("D"); pRICH->MakeBranch("D"); - fHitMap= new AliHitMap* [kNCH]; - - for (Int_t i =0; iChamber(i)); - segmentation=iChamber->GetSegmentationModel(); - fHitMap[i] = new AliRICHHitMapA1(segmentation, fTDList); - } - -// Loop over files to digitize - fSignal = kTRUE; - fCounter = 0; - for (Int_t inputFile=0;inputFileGetNinputs();inputFile++){//files loop + for(Int_t inputFile=0;inputFileGetNinputs();inputFile++){//files loop pInAL = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(inputFile)); pInRL = pInAL->GetLoader("RICHLoader"); -// Connect RICH branches - - if (inputFile > 0 ) fSignal = kFALSE; - TBranch *branchHits = 0; - TBranch *branchSDigits = 0; - - pInRL->LoadHits("READ"); - - TTree *treeH = pInRL->TreeH(); - if(pInRL->TreeH()) { - branchHits = treeH->GetBranch("RICH"); - if(branchHits){ - fHits->Clear(); - branchHits->SetAddress(&fHits);} - else - Error("Exec","branch RICH was not found"); - } - - if(treeH) { - branchSDigits = treeH->GetBranch("RICHSpecials"); - if(branchSDigits) - branchSDigits->SetAddress(&fSDigits); - else - Error("exec","branch RICHSpecials was not found"); - } - for (fTrack=0; fTrackGetEntries(); fTrack++) {//prims loop - fHits->Clear(); fSDigits->Clear(); - fHits->Print(); - - branchHits->GetEntry(fTrack); branchSDigits->GetEntry(fTrack); - for(Int_t i=0;iGetEntriesFast();++i){//hits loop - AliRICHhit* pHit = static_cast(fHits->At(i)); - fNch = pHit->Chamber()-1; // chamber number - if (fNch >= kNCH) { - cerr<<"AliRICHDigitizer: chamber nr. fNch out of range: "<Chamber(fNch)); - - for (AliRICHSDigit* mPad=FirstPad(pHit,fSDigits);mPad;mPad=NextPad(fSDigits)){//specials loop - Int_t iqpad = mPad->QPad(); // charge per pad - fDigits[0]=mPad->PadX(); - fDigits[1]=mPad->PadY(); - fDigits[2]=iqpad; - fDigits[3]=iqpad; - fDigits[4]=mPad->HitNumber(); - if (Exists(mPad)) // build the list of fired pads and update the info - Update(mPad); - else - CreateNew(mPad); - }//specials loop - }//hits loop - }//prims loop }//files loop - if(GetDebug()) Info("Exec","END OF FILE LOOP"); - Int_t tracks[kMAXTRACKSPERRICHDIGIT]; - Int_t charges[kMAXTRACKSPERRICHDIGIT]; - Int_t nentries=fTDList->GetEntriesFast(); - - for (Int_t nent=0;nentAt(nent); - if (transDigit==0) continue; - Int_t ich=transDigit->GetChamber(); - Int_t q=transDigit->Signal(); - iChamber=&(pRICH->Chamber(ich)); - AliRICHResponse * response=iChamber->GetResponseModel(); - Int_t adcmax= (Int_t) response->MaxAdc(); - // add white noise and do zero-suppression and signal truncation (new electronics,old electronics gaus 1.2,0.2) - //printf("Treshold: %d\n",iChamber->fTresh->GetHitIndex(transDigit->PadX(),transDigit->PadY())); - -// tmp change -// Int_t pedestal = iChamber->fTresh->GetHitIndex(transDigit->PadX(),transDigit->PadY()); - Int_t pedestal = 0; - - Float_t treshold = (pedestal + 4*2.2); - - Float_t meanNoise = gRandom->Gaus(2.2, 0.3); - Float_t noise = gRandom->Gaus(0, meanNoise); - q+=(Int_t)(noise + pedestal); - //q+=(Int_t)(noise); - // magic number to be parametrised !!! - if ( q <= treshold) - { - q = q - pedestal; - continue; - } - q = q - pedestal; - if ( q >= adcmax) q=adcmax; - fDigits[0]=transDigit->PadX(); - fDigits[1]=transDigit->PadY(); - fDigits[2]=q; - fDigits[3]=transDigit->Physics(); - fDigits[4]=transDigit->Hit(); - - Int_t nptracks = transDigit->GetNTracks(); - - - if(nptracks>kMAXTRACKSPERRICHDIGIT){// this was changed to accomodate the real number of tracks - printf("Attention - tracks > 10 %d\n",nptracks); - nptracks=kMAXTRACKSPERRICHDIGIT; - } - if (nptracks > 2) { - printf("Attention - tracks > 2 %d \n",nptracks); - } - for (Int_t tr=0;trGetTrack(tr); - charges[tr]=transDigit->GetCharge(tr); - } //end loop over list of tracks for one pad - if (nptracks < kMAXTRACKSPERRICHDIGIT ) { - for (Int_t t=nptracks; tAddDigitOld(ich+1,tracks,charges,fDigits);//OLD - }//transient digits loop pOutRL->TreeD()->Fill(); - //pRICH->ResetDigits(); - fTDList->Delete(); // or fTDList->Clear(); ??? - for(Int_t ii=0;iiDigitsAddress(k); - Int_t ndigit=richDigits->GetEntriesFast(); - printf ("Chamber %d digits %d \n",k+1,ndigit); - } pRICH->ResetDigits(); /// ??? should it be here??? pOutRL->WriteDigits("OVERWRITE"); - delete [] fHitMap; - delete fTDList; pOutRL->UnloadHits(); pOutRL->UnloadDigits(); -// if (fHits) fHits->Delete(); -// if (fSDigits) fSDigits->Delete(); - if(GetDebug())Info("Exec","Stop."); }//Exec() -//__________________________________________________________________________________________________ - -static Int_t sMaxIterPad=0; // Static variables for the pad-hit iterator routines -static Int_t sCurIterPad=0; - -//__________________________________________________________________________________________________ -AliRICHSDigit* AliRICHDigitizer::FirstPad(AliRICHhit* hit,TClonesArray *clusters ) -{// Initialise the pad iterator Return the address of the first sdigit for hit - TClonesArray *theClusters = clusters; - Int_t nclust = theClusters->GetEntriesFast(); - if (nclust && hit->PHlast() > 0) { - sMaxIterPad=Int_t(hit->PHlast()); - sCurIterPad=Int_t(hit->PHfirst()); - return (AliRICHSDigit*) clusters->UncheckedAt(sCurIterPad-1); - } else { - return 0; - } - -}//FirstPad -//__________________________________________________________________________________________________ -AliRICHSDigit* AliRICHDigitizer::NextPad(TClonesArray *clusters) -{// Iterates over pads - - sCurIterPad++; - if (sCurIterPad <= sMaxIterPad) { - return (AliRICHSDigit*) clusters->UncheckedAt(sCurIterPad-1); - } else { - return 0; - } -}//NextPad -//__________________________________________________________________________________________________ diff --git a/RICH/AliRICHDigitizer.h b/RICH/AliRICHDigitizer.h index 748a27db07c..85d8a326f1d 100644 --- a/RICH/AliRICHDigitizer.h +++ b/RICH/AliRICHDigitizer.h @@ -1,48 +1,20 @@ -#ifndef ALIRICHDIGITIZER_H -#define ALIRICHDIGITIZER_H +#ifndef AliRICHDigitizer_h +#define AliRICHDigitizer_h /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ #include "AliDigitizer.h" -class AliRunDigitizer; -class AliRICHSDigit; -class AliHitMap; -class AliRICHhit; - class AliRICHDigitizer : public AliDigitizer { public: - enum {kBgTag = -1}; - AliRICHDigitizer(); AliRICHDigitizer(AliRunDigitizer * manager); virtual ~AliRICHDigitizer(); - Bool_t Exists(const AliRICHSDigit *p); //Compare pad hits - void Update(AliRICHSDigit *sdigit); //Update a pad hit - void CreateNew(AliRICHSDigit *sdigit); //Create a new hit - Bool_t Init(); //virtual Initialize merging and digitisation - void Exec(Option_t* option=0); //virtual Do the main work - Int_t GetDebug() {return fDebug;} //get debug level - void SetDebug(Int_t level){fDebug = level;} //set debug level - - AliRICHSDigit* FirstPad(AliRICHhit *hit, TClonesArray *clusters); - AliRICHSDigit* NextPad(TClonesArray *clusters); + void Exec(Option_t* option=0); //virtual protected: - TClonesArray *fHits; //! List of hits for one track only - TClonesArray *fSDigits; //! List of clusters for one track only - AliHitMap **fHitMap; //! pointer to array of pointers to hitmaps - Int_t fNch; //! chamber nr (loop variable) - Int_t fTrack; //! track nr (loop variable) - TObjArray *fTDList; //! list of AliRICHTransientDigit - Int_t fCounter; //! nr. of AliRICHTransientDigit - Bool_t fSignal; //! kTRUE if signal file is processed - Int_t fMask; //! mask dependent on input file - Int_t fDigits[5]; //! array with digits - Int_t fDebug; //! debug level - - ClassDef(AliRICHDigitizer,1) + ClassDef(AliRICHDigitizer,0) }; #endif diff --git a/RICH/AliRICHDisplFast.cxx b/RICH/AliRICHDisplFast.cxx index ac44ed23a0e..bc7a0f28f65 100644 --- a/RICH/AliRICHDisplFast.cxx +++ b/RICH/AliRICHDisplFast.cxx @@ -17,177 +17,105 @@ #include "AliRICHDisplFast.h" #include "AliRICHParam.h" #include -#include #include #include #include -#include #include #include -#include -#include -#define NPointsOfRing 201 +ClassImp(AliRICHDisplFast) -// Geometry of the RICH at Star... - -static const Int_t nPadX = AliRICHParam::NpadsY(); -static const Int_t nPadY = AliRICHParam::NpadsX(); -static const Float_t PadSizeX = AliRICHParam::PadSizeY(); -static const Float_t PadSizeY = AliRICHParam::PadSizeX(); -static const Float_t spacer = AliRICHParam::DeadZone(); -static const Float_t degree = 180/3.1415926535; - -static const Float_t pi = TMath::Pi(); - -static const Float_t RadiatorWidth = AliRICHParam::FreonThickness(); -static const Float_t QuartzWidth = AliRICHParam::QuartzThickness(); -static const Float_t GapWidth = AliRICHParam::RadiatorToPads(); - -static const Float_t Xmin = -AliRICHParam::PcSizeY()/2.; -static const Float_t Xmax = AliRICHParam::PcSizeY()/2.; -static const Float_t Ymin = -AliRICHParam::PcSizeX()/2.; -static const Float_t Ymax = AliRICHParam::PcSizeX()/2.; - - -AliRICHDisplFast::AliRICHDisplFast() -{ -} - -void AliRICHDisplFast::Display() +//__________________________________________________________________________________________________ +void AliRICHDisplFast::Exec() { - - TText *text; - - TH2F *h2_disp = new TH2F("h2_disp" ,"STAR-RICH Event Display",165,Xmin,Xmax,144,Ymin,Ymax); - TH2F *gHitsH2 = new TH2F("gHitsH2" ,"STAR-RICH Event Display",165,Xmin,Xmax,144,Ymin,Ymax); - TH2F *h2_dispad = new TH2F("h2_dispad","STAR-RICH Event Display",161,0.,161.,145,0.,145.); - TH2F *gClustersH2 = new TH2F("gClusH2" ,"STAR-RICH Event Display",165,Xmin,Xmax,144,Ymin,Ymax); - - TCanvas *Display = new TCanvas("Display","Star Display",0,0,800,800); + TH2F *pHitsH2 = new TH2F("pHitsH2" , "Event Display",165,-AliRICHParam::PcSizeY()/2,AliRICHParam::PcSizeY()/2, + 144,-AliRICHParam::PcSizeX()/2,AliRICHParam::PcSizeX()/2); + pHitsH2->SetStats(kFALSE); + TH2F *pDigitsH2 = new TH2F("pDigitsH2" ,"Event Display",165,-AliRICHParam::PcSizeY()/2,AliRICHParam::PcSizeY()/2, + 144,-AliRICHParam::PcSizeX()/2,AliRICHParam::PcSizeX()/2); + TH2F *pClustersH2 = new TH2F("pClustersH2","Event Display",165,-AliRICHParam::PcSizeY()/2,AliRICHParam::PcSizeY()/2, + 144,-AliRICHParam::PcSizeX()/2,AliRICHParam::PcSizeX()/2); + + TCanvas *Display = new TCanvas("Display","RICH Display",0,0,600,600); - // Display event... - gStyle->SetPalette(1); AliRICH *pRich = (AliRICH*)gAlice->GetDetector("RICH"); pRich->GetLoader()->LoadRecPoints(); pRich->GetLoader()->LoadDigits(); pRich->GetLoader()->LoadHits(); - pRich->GetLoader()->TreeD()->GetEntry(0); - pRich->GetLoader()->TreeR()->GetEntry(0); + for(Int_t iEventN=0;iEventNGetEventsPerRun();iEventN++){//events Loop + pRich->GetLoader()->GetRunLoader()->GetEvent(iEventN); + pRich->GetLoader()->TreeD()->GetEntry(0); + pRich->GetLoader()->TreeR()->GetEntry(0); - cout << " start to display..." << endl; - Int_t nPrimaries = (Int_t)pRich->GetLoader()->TreeH()->GetEntries(); - TObjArray * Hits = new TObjArray[nPrimaries]; + Int_t nPrimaries = (Int_t)pRich->GetLoader()->TreeH()->GetEntries(); + TObjArray * Hits = new TObjArray[nPrimaries]; - for(Int_t i=0;iGetLoader()->TreeH()->GetEntry(i); - Int_t nHits = pRich->Hits()->GetEntries(); - for(Int_t k=0;kHits()->At(k)); + for(Int_t i=0;iGetLoader()->TreeH()->GetEntry(i); + Int_t nHits = pRich->Hits()->GetEntries(); + for(Int_t k=0;kHits()->At(k)); + } - } - for(Int_t iChamber=1;iChamber<=7;iChamber++) { + for(Int_t iChamber=1;iChamber<=7;iChamber++){//modules loop - Int_t nDigits = pRich->Digits(iChamber)->GetEntries(); + Int_t nDigits = pRich->Digits(iChamber)->GetEntries(); Int_t nClusters = pRich->Clusters(iChamber)->GetEntries(); - Display->ToggleEventStatus(); - Display->Modified(); - - text = new TText(0,0,""); - text->SetTextFont(61); - text->SetTextSize(0.03); - text->SetTextAlign(22); - -// Display->Resize(); - - h2_disp->Reset(); - gHitsH2->Reset(); - gClustersH2->Reset(); -// h2_dispad->Reset(); + pHitsH2->Reset(); pDigitsH2->Reset(); pClustersH2->Reset(); Double_t xpad,ypad; - for(Int_t i=0;iGetLoader()->TreeH()->GetEntry(i); Int_t nHits = pRich->Hits()->GetEntries(); - - for(Int_t j=0;jChamber() << endl; - if(pHit->C()==iChamber) { + if(pHit->C()==iChamber){ TVector3 xyzhit(pHit->X(),pHit->Y(),pHit->Z()); TVector3 hitlocal = pRich->C(iChamber)->Glob2Loc(xyzhit); - gHitsH2->Fill(hitlocal.X(),hitlocal.Y()); -// pHit->Print(""); - } - } - } + pHitsH2->Fill(hitlocal.X(),hitlocal.Y(),200); + }//if + }//hits loop + }//prims loop - for(Int_t j=0;jDigits(iChamber)->At(j); - AliRICHParam::Pad2Loc(pDigit->X(),pDigit->Y(),xpad,ypad); - Float_t charge = (Float_t)pDigit->Q(); - h2_disp->Fill(xpad,ypad,charge); - h2_dispad->Fill(pDigit->X(),pDigit->Y(),pDigit->Q()); - pDigit->Print(""); - } - - for(Int_t j=0;jClusters(iChamber)->At(j); -// gClustersH2->Fill(pCluster->X(),pCluster->Y(),pCluster->Q()); - gClustersH2->Fill(pCluster->X(),pCluster->Y(),100); - } - + for(Int_t j=0;jDigits(iChamber)->At(j); + AliRICHParam::Pad2Loc(pDigit->X(),pDigit->Y(),xpad,ypad); + pDigitsH2->Fill(xpad,ypad,100); + }//digits loop - - - cout << " -----------------" << endl; - - - // end loop - - - h2_disp->SetMaximum(200); - h2_disp->SetStats(0); - h2_disp->Draw("colz"); - h2_disp->SetTitle(Form("Chamber %2i",iChamber)); - -/* - h2_dispad->SetTitle(Form("Chamber %2i",iChamber)); - h2_dispad->SetMaximum(200); - h2_dispad->SetStats(0); - h2_dispad->Draw("colz"); -*/ + for(Int_t j=0;jClusters(iChamber)->At(j); + pClustersH2->Fill(pCluster->X(),pCluster->Y(),50); + }//clusters loop + + pHitsH2->SetTitle(Form("event %i module %2i",iEventN,iChamber)); + pHitsH2->SetMarkerColor(kRed); pHitsH2->SetMarkerStyle(29); pHitsH2->SetMarkerSize(0.4); + pHitsH2->Draw(); Display->Update(); Display->Modified(); - getchar(); - gHitsH2->SetTitle(Form("Chamber %2i",iChamber)); - gHitsH2->SetMarkerColor(kBlue); - gHitsH2->SetMarkerStyle(29); - gHitsH2->SetMarkerSize(0.4); - gHitsH2->Draw("same"); + + pDigitsH2->SetMarkerColor(kGreen); pDigitsH2->SetMarkerStyle(29); pDigitsH2->SetMarkerSize(0.4); + pDigitsH2->Draw("same"); Display->Update(); - Display->Modified(); - + Display->Modified(); getchar(); - gClustersH2->SetTitle(Form("Chamber %2i",iChamber)); - gClustersH2->SetMarkerColor(kBlue); - gClustersH2->SetMarkerStyle(29); - gClustersH2->SetMarkerSize(0.4); - gClustersH2->Draw("same"); + + pClustersH2->SetMarkerColor(kBlue); pClustersH2->SetMarkerStyle(29); pClustersH2->SetMarkerSize(0.4); + pClustersH2->Draw("same"); Display->Update(); Display->Modified(); getchar(); - } - delete [] Hits; -} - + }//modules loop + delete [] Hits; + }////events Loop + pRich->GetLoader()->UnloadRecPoints(); + pRich->GetLoader()->UnloadDigits(); + pRich->GetLoader()->UnloadHits(); +}//Exec() +//__________________________________________________________________________________________________ diff --git a/RICH/AliRICHDisplFast.h b/RICH/AliRICHDisplFast.h index a6de097302f..fdc554909b2 100644 --- a/RICH/AliRICHDisplFast.h +++ b/RICH/AliRICHDisplFast.h @@ -10,15 +10,15 @@ class AliRICH; -class AliRICHDisplFast : public TTask { - public : +class AliRICHDisplFast : public TTask +{ +public : - AliRICHDisplFast(); - ~AliRICHDisplFast(){;} - void Display(); - -ClassDef(AliRICHDisplFast,0) - + AliRICHDisplFast() {;} + ~AliRICHDisplFast() {;} + void Exec();//virtual +protected: + ClassDef(AliRICHDisplFast,0) }; #endif // #ifdef AliRICHDisplFast_cxx diff --git a/RICH/AliRICHDisplay.cxx b/RICH/AliRICHDisplay.cxx index 8ff8656d9f4..fa96fdc79fb 100644 --- a/RICH/AliRICHDisplay.cxx +++ b/RICH/AliRICHDisplay.cxx @@ -13,7 +13,6 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id$ */ ////////////////////////////////////////////////////////////////////////// // // @@ -61,8 +60,6 @@ #include "AliHeader.h" #include "AliRICHSDigit.h" -#include "AliRICHDigit.h" -#include "AliRICHRawCluster.h" #include "AliMC.h" ClassImp(AliRICHDisplay) @@ -741,19 +738,15 @@ void AliRICHDisplay::LoadCoG(Int_t chamber, Int_t cathode) // Read raw clusters info and store x,y,z info in arrays fRpoints // Loop on all detectors - if (chamber > 6) return; - - //printf("Entering LoadCoG\n"); - + if (chamber > 7) return; AliRICH *pRICH = (AliRICH*)gAlice->GetModule("RICH"); AliRICHChamber* iChamber; - TClonesArray *pRICHrawclust = pRICH->RawClustAddress(chamber); - //printf ("Chamber:%d has adress:%p\n", chamber, pRICHrawclust ); + TClonesArray *pRICHrawclust = pRICH->Clusters(chamber); if (pRICHrawclust == 0) return; - pRICH->ResetRawClusters(); + pRICH->ResetClusters(); Int_t nent=(Int_t)gAlice->TreeR()->GetEntries(); @@ -764,13 +757,13 @@ void AliRICHDisplay::LoadCoG(Int_t chamber, Int_t cathode) if (fRpoints == 0) fRpoints = new TObjArray(nrawcl); iChamber = &(pRICH->Chamber(chamber)); - AliRICHRawCluster *mRaw; + AliRICHcluster *mRaw; AliRICHPoints *points = 0; // //loop over all raw clusters and store their position points = new AliRICHPoints(nrawcl); for (Int_t iraw=0;irawUncheckedAt(iraw); + mRaw = (AliRICHcluster*)pRICHrawclust->UncheckedAt(iraw); fRpoints->AddAt(points,iraw); points->SetMarkerColor(3); points->SetMarkerStyle(3); @@ -779,12 +772,12 @@ void AliRICHDisplay::LoadCoG(Int_t chamber, Int_t cathode) points->SetHitIndex(-1); points->SetTrackIndex(-1); points->SetDigitIndex(-1); - Float_t vectorLoc[3]={mRaw->fX,5,mRaw->fY}; + Float_t vectorLoc[3]={mRaw->X(),5,mRaw->Y()}; Float_t vectorGlob[3]; iChamber->LocaltoGlobal(vectorLoc,vectorGlob); points->SetPoint(iraw,vectorGlob[0],vectorGlob[1],vectorGlob[2]); } -} +}//LoadCoG() //___________________________________________ void AliRICHDisplay::LoadRecHits(Int_t chamber, Int_t cathode) { @@ -808,21 +801,19 @@ void AliRICHDisplay::LoadDigits() if (gAlice->TreeD()) { - for (ich=0; ichDigitsAddress(ich); - //printf ("Chamber:%d has adress:%p\n", ich, pRICHdigits ); + for (ich=1; ich<=kNCH; ich++) { + TClonesArray *pRICHdigits = pRICH->Digits(ich); if (pRICHdigits == 0) continue; gAlice->ResetDigits(); gAlice->TreeD()->GetEvent(0); Int_t ndigits = pRICHdigits->GetEntriesFast(); - //printf("ndigits:%d\n",ndigits); nAllDigits+=ndigits; } if (fPoints == 0) fPoints = new TObjArray(nAllDigits); Int_t counter=0; - for (ich=0; ichDigitsAddress(ich); + for (ich=1; ich<=kNCH; ich++) { + TClonesArray *pRICHdigits = pRICH->Digits(ich); if (pRICHdigits == 0) continue; gAlice->ResetDigits(); gAlice->TreeD()->GetEvent(0); @@ -835,7 +826,7 @@ void AliRICHDisplay::LoadDigits() //printf("Dpx:%d, Dpy:%d\n",dpx,dpy); - AliRICHDigit *mdig; + AliRICHdigit *mdig; AliRICHPoints *points = 0; TMarker3DBox *marker = 0; // @@ -843,11 +834,11 @@ void AliRICHDisplay::LoadDigits() Int_t npoints=1; for (Int_t digit=0;digitUncheckedAt(digit); + mdig = (AliRICHdigit*)pRICHdigits->UncheckedAt(digit); points = new AliRICHPoints(npoints); fPoints->AddAt(points,counter); counter++; - Int_t charge=mdig->Signal(); + Int_t charge=(Int_t)mdig->Q(); Int_t index=Int_t(TMath::Log(charge)/(TMath::Log(kadc_satm)/22)); Int_t color=701+index; if (color>722) color=722; @@ -855,7 +846,7 @@ void AliRICHDisplay::LoadDigits() points->SetMarkerStyle(21); points->SetMarkerSize(0.5); Float_t xpad, ypad, zpad; - segmentation->GetPadC(mdig->PadX(), mdig->PadY(),xpad, ypad, zpad); + segmentation->GetPadC(mdig->X(), mdig->Y(),xpad, ypad, zpad); Float_t vectorLoc[3]={xpad,5,ypad}; Float_t vectorGlob[3]; iChamber->LocaltoGlobal(vectorLoc,vectorGlob); @@ -866,7 +857,7 @@ void AliRICHDisplay::LoadDigits() points->SetPoint(0,vectorGlob[0],vectorGlob[1],vectorGlob[2]); //printf("Y position (digit): %f\n", vectorGlob[1]); - segmentation->GetPadC(mdig->PadX(), mdig->PadY(), xpad, ypad, zpad); + segmentation->GetPadC(mdig->X(), mdig->Y(), xpad, ypad, zpad); Float_t theta = iChamber->GetRotMatrix()->GetTheta(); Float_t phi = iChamber->GetRotMatrix()->GetPhi(); marker=new TMarker3DBox(vectorGlob[0],vectorGlob[1],vectorGlob[2], @@ -879,10 +870,8 @@ void AliRICHDisplay::LoadDigits() } // loop over digits } // loop over chambers } //if TreeD -} - - -//___________________________________________ +}//LoadDigits(); +//__________________________________________________________________________________________________ void AliRICHDisplay::LoadHits(Int_t chamber) { // Read hits info and store x,y,z info in arrays fPhits @@ -949,10 +938,8 @@ void AliRICHDisplay::LoadHits(Int_t chamber) npoints++; } } -} - -//_____________________________________________________________________________ - +}//LoadHits() +//__________________________________________________________________________________________________ void AliRICHDisplay::LoadCerenkovs(Int_t chamber) { // Read cerenkov hits info and store x,y,z info in array fPCerenkovs diff --git a/RICH/AliRICHHitMapA1.cxx b/RICH/AliRICHHitMapA1.cxx deleted file mode 100644 index 1ee6e6d6491..00000000000 --- a/RICH/AliRICHHitMapA1.cxx +++ /dev/null @@ -1,166 +0,0 @@ -/************************************************************************** - * 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$ */ - - -#include "AliRICHHitMapA1.h" -#include "AliSegmentation.h" -#include "AliRICHDigit.h" - -#include -#include - -ClassImp(AliRICHHitMapA1) - -AliRICHHitMapA1::AliRICHHitMapA1() -{ -// Default constructor - fSegmentation = 0; - fNpx = 0; - fNpy = 0; - fMaxIndex = 0; - - fHitMap = 0; - fDigits = 0; -} - - -AliRICHHitMapA1::AliRICHHitMapA1(AliSegmentation *seg, TObjArray *dig) -{ - -// Constructor for AliRICHMapA1 - - fSegmentation = seg; - fNpx = fSegmentation->Npx(); - fNpy = fSegmentation->Npy(); - fMaxIndex=2*(fNpx+1)*2*(fNpy+1)+2*fNpy; - - fHitMap = new Int_t[fMaxIndex]; - fDigits = dig; - fNdigits = fDigits->GetEntriesFast(); - Clear(); -} - - -AliRICHHitMapA1::~AliRICHHitMapA1() -{ -// Destructor -// if (fDigits) delete fDigits; - if (fHitMap) delete[] fHitMap; -} - -void AliRICHHitMapA1::Clear(const char */*opt*/) -{ - -// Clear contents of hit map - - memset(fHitMap,0,sizeof(int)*fMaxIndex); -} - -Int_t AliRICHHitMapA1::CheckedIndex(Int_t ix, Int_t iy) const -{ - -// Check if index is valid - - Int_t index=2*fNpy*(ix+fNpx)+(iy+fNpy); - if (index > fMaxIndex) { - printf("\n \n \n Try to read/write outside array !!!! \n \n %d %d %d %d %d %d",ix,iy, fMaxIndex, index, fNpx, fNpy); - return fMaxIndex-1; - } else { - return index; - } -} - - -void AliRICHHitMapA1::FillHits() -{ - -// Fill hits into HitMap - - Int_t ndigits = fDigits->GetEntriesFast(); - //printf("\n Filling hits into HitMap\n"); - //printf("FindRawClusters -- ndigits %d \n",ndigits); - if (!ndigits) return; - AliRICHDigit *dig; - for (Int_t ndig=0; ndigUncheckedAt(ndig); - SetHit(dig->PadX(),dig->PadY(),ndig); - } -} - - -void AliRICHHitMapA1::SetHit(Int_t ix, Int_t iy, Int_t idigit) -{ -// -// Set current hit -// fHitMap[kMaxNpady*(ix+fNpx)+(iy+fNpy)]=idigit+1; - fHitMap[CheckedIndex(ix, iy)]=idigit+1; -} - -void AliRICHHitMapA1::DeleteHit(Int_t ix, Int_t iy) -{ -// Delete hit -// -// fHitMap[kMaxNpady*(ix+fNpx)+(iy+fNpy)]=0; - fHitMap[CheckedIndex(ix, iy)]=0; -} - -void AliRICHHitMapA1::FlagHit(Int_t ix, Int_t iy) -{ -// -// Flag hit - - fHitMap[CheckedIndex(ix, iy)]= - -TMath::Abs(fHitMap[CheckedIndex(ix, iy)]); -} - -Int_t AliRICHHitMapA1::GetHitIndex(Int_t ix, Int_t iy) const -{ - -// Return hit coordinates from index - - //printf("ix:%d, iy:%d, index:%d\n",ix,iy,CheckedIndex(ix, iy)); - - return TMath::Abs(fHitMap[CheckedIndex(ix, iy)])-1; - -} - -TObject* AliRICHHitMapA1::GetHit(Int_t ix, Int_t iy) const -{ - -// Return index from coordinates - - Int_t index=GetHitIndex(ix,iy); - // Force crash if index does not exist ! (Manu) - return (index <0) ? 0 : fDigits->UncheckedAt(GetHitIndex(ix,iy)); -} - -FlagType AliRICHHitMapA1::TestHit(Int_t ix, Int_t iy) -{ - -// Is there a hit? - - Int_t inf=fHitMap[CheckedIndex(ix, iy)]; - if (inf < 0) { - return kUsed; - } else if (inf == 0) { - return kEmpty; - } else { - return kUnused; - } -} - - diff --git a/RICH/AliRICHHitMapA1.h b/RICH/AliRICHHitMapA1.h deleted file mode 100644 index 832bae5186d..00000000000 --- a/RICH/AliRICHHitMapA1.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef ALIRICHHITMAPA1_H -#define ALIRICHHITMAPA1_H - - -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id$ */ -#include "AliHitMap.h" - -class TObjArray; -class AliSegmentation; - - -class AliRICHHitMapA1 : -public AliHitMap -{ - - public: - AliRICHHitMapA1(); - AliRICHHitMapA1(AliSegmentation *seg, TObjArray *dig); - virtual ~AliRICHHitMapA1(); - virtual void FillHits(); - virtual void Clear(const char *opt = ""); - virtual void SetHit(Int_t ix, Int_t iy, Int_t idigit); - virtual void DeleteHit(Int_t ix, Int_t iy); - virtual Int_t GetHitIndex(Int_t ix, Int_t iy) const; - virtual TObject* GetHit(Int_t ix, Int_t iy) const; - virtual void FlagHit(Int_t ix, Int_t iy); - virtual Bool_t ValidateHit(Int_t, Int_t) {return 1;} - virtual FlagType TestHit(Int_t ix, Int_t iy); - private: - Int_t CheckedIndex(Int_t ix, Int_t iy) const; - - private: - AliSegmentation *fSegmentation; //Segmentation model - Int_t fNpx; //Pads in x - Int_t fNpy; //Pads in y - TObjArray *fDigits; //List of digits - Int_t fNdigits; //Number of digits - Int_t *fHitMap; // ! - Int_t fMaxIndex; //Index size - - ClassDef(AliRICHHitMapA1,2) // Implements HitMap as a 2-dim array -}; -#endif - - - - - diff --git a/RICH/AliRICHPoints.cxx b/RICH/AliRICHPoints.cxx index c095a5becf5..d7ecfae7495 100644 --- a/RICH/AliRICHPoints.cxx +++ b/RICH/AliRICHPoints.cxx @@ -38,11 +38,9 @@ #include #include "AliRICHDisplay.h" #include "AliRICHPoints.h" -#include "AliRun.h" +#include #include "AliRICHSDigit.h" -#include "AliRICHDigit.h" -#include "AliRICHRawCluster.h" -#include "AliMC.h" +#include const Int_t kMaxNipx=400, kMaxNipy=800; @@ -100,7 +98,7 @@ void AliRICHPoints::DumpDigit() // // Dump digit corresponding to this point // - AliRICHDigit *digit = GetDigit(); + AliRICHdigit *digit = GetDigit(); if (digit) digit->Dump(); } @@ -120,7 +118,7 @@ void AliRICHPoints::InspectDigit() // // Inspect digit corresponding to this point // - AliRICHDigit *digit = GetDigit(); + AliRICHdigit *digit = GetDigit(); if (digit) digit->Inspect(); } @@ -159,7 +157,7 @@ AliRICHhit *AliRICHPoints::GetHit() const } //_____________________________________________________________________________ -AliRICHDigit *AliRICHPoints::GetDigit() const +AliRICHdigit *AliRICHPoints::GetDigit() const { // // Returns pointer to digit index in AliRun::fParticles @@ -170,11 +168,11 @@ AliRICHDigit *AliRICHPoints::GetDigit() const Int_t cathode=display->GetCathode(); AliRICH *pRICH = (AliRICH*)gAlice->GetDetector("RICH"); - TClonesArray *pRICHdigits = pRICH->DigitsAddress(chamber-1); + TClonesArray *pRICHdigits = pRICH->Digits(chamber); gAlice->TreeD()->GetEvent(cathode); Int_t ndigits = pRICHdigits->GetEntriesFast(); if (fDigitIndex < 0 || fDigitIndex >= ndigits) return 0; - return (AliRICHDigit*)pRICHdigits->UncheckedAt(fDigitIndex); + return (AliRICHdigit*)pRICHdigits->UncheckedAt(fDigitIndex); } //---------------------------------------------------------------------------- void AliRICHPoints::ShowRing(Int_t highlight) { @@ -195,7 +193,7 @@ void AliRICHPoints::ShowRing(Int_t highlight) { printf("Hit %d on chamber: %d\n",fHitIndex, mHit->Chamber()); - TClonesArray *digits = pRICH->DigitsAddress(mHit->Chamber() - 1); + TClonesArray *digits = pRICH->Digits(mHit->Chamber()); iChamber = &(pRICH->Chamber(mHit->Chamber() - 1)); segmentation=iChamber->GetSegmentationModel(); @@ -207,17 +205,16 @@ void AliRICHPoints::ShowRing(Int_t highlight) { printf("Show Ring called with %d digits\n",ndigits); for (int digit=0;digitUncheckedAt(digit); + AliRICHdigit *mdig = (AliRICHdigit*)digits->UncheckedAt(digit); points = new AliRICHPoints(1); //printf("Particle %d belongs to ring %d \n", fTrackIndex, mdig->fTracks[1]); if (!points) continue; - if (fTrackIndex == mdig->Track(0)) { + if (fTrackIndex == mdig->T(0)) { - printf("Digit %d from particle %d belongs to ring %d \n", digit, fTrackIndex, mdig->Track(0)); - Int_t charge=mdig->Signal(); + Int_t charge=(Int_t)mdig->Q(); Int_t index=Int_t(TMath::Log(charge)/(TMath::Log(kadc_satm)/22)); Int_t color=701+index; if (color>722) color=722; @@ -225,7 +222,7 @@ void AliRICHPoints::ShowRing(Int_t highlight) { points->SetMarkerStyle(21); points->SetMarkerSize(.5); Float_t xpad, ypad, zpad; - segmentation->GetPadC(mdig->PadX(), mdig->PadY(),xpad, ypad, zpad); + segmentation->GetPadC(mdig->X(), mdig->Y(),xpad, ypad, zpad); Float_t vectorLoc[3]={xpad,6.276,ypad}; Float_t vectorGlob[3]; points->SetParticle(-1); @@ -235,7 +232,7 @@ void AliRICHPoints::ShowRing(Int_t highlight) { iChamber->LocaltoGlobal(vectorLoc,vectorGlob); points->SetPoint(0,vectorGlob[0],vectorGlob[1],vectorGlob[2]); - segmentation->GetPadC(mdig->PadX(), mdig->PadY(), xpad, ypad, zpad); + segmentation->GetPadC(mdig->X(), mdig->Y(), xpad, ypad, zpad); Float_t theta = iChamber->GetRotMatrix()->GetTheta(); Float_t phi = iChamber->GetRotMatrix()->GetPhi(); marker=new TMarker3DBox(vectorGlob[0],vectorGlob[1],vectorGlob[2], diff --git a/RICH/AliRICHPoints.h b/RICH/AliRICHPoints.h index 2174d3c845b..cfe4bafd334 100644 --- a/RICH/AliRICHPoints.h +++ b/RICH/AliRICHPoints.h @@ -4,13 +4,11 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/* $Id$ */ #include #include #include "AliRICH.h" #include "AliPoints.h" -class AliRICHDigit; class AliRICHPoints : public AliPoints { public: @@ -23,7 +21,7 @@ public: Int_t GetDigitIndex() {return fDigitIndex;} Int_t GetIndex() {return fIndex;} AliRICHhit *GetHit() const; - AliRICHDigit *GetDigit() const; + AliRICHdigit *GetDigit() const; virtual const Text_t *GetName() const; virtual Text_t *GetObjectInfo(Int_t px, Int_t py); TMarker3DBox *GetMarker(Int_t i) {return fMarker[i];} diff --git a/RICH/AliRICHRawCluster.cxx b/RICH/AliRICHRawCluster.cxx deleted file mode 100644 index ce54ee05a4c..00000000000 --- a/RICH/AliRICHRawCluster.cxx +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************** - * 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. * - **************************************************************************/ - -#include "AliRICHRawCluster.h" -#include - - -ClassImp(AliRICHRawCluster) -//__________________________________________________________________________________________________ - -AliRICHRawCluster :: AliRICHRawCluster() -{//default ctor - fTracks[0]=fTracks[1]=fTracks[2]=-1; - fX=fY=0; - fQ=fMultiplicity=0; - for (int k=0;k<50;k++) { - fIndexMap[k]=-1; - fContMap[k]=0; - fPhysicsMap[k]=-1; - fCtype=-1; - } - fNcluster[0]=fNcluster[1]=-1; -}//ctor -//__________________________________________________________________________________________________ -Int_t AliRICHRawCluster::Compare(const TObject *obj) const -{//Compare two clusters - AliRICHRawCluster *raw=(AliRICHRawCluster *)obj; - Float_t y=fY; - Float_t yo=raw->fY; - if(y>yo) return 1; - else if(yClustersOld(ich+1)->GetEntries(); + nClusters[ich] = Rich()->Clusters(ich+1)->GetEntries(); for(Int_t k=0;kClustersOld(ich+1)->At(k); - clusX[ich][k] = pCluster->fX; - clusY[ich][k] = pCluster->fY; - clusQ[ich][k] = pCluster->fQ; - clusMul[ich][k] = pCluster->fMultiplicity; + AliRICHcluster *pCluster = (AliRICHcluster *)Rich()->Clusters(ich+1)->At(k); + clusX[ich][k] = pCluster->X(); + clusY[ich][k] = pCluster->Y(); + clusQ[ich][k] = pCluster->Q(); + clusMul[ich][k] = pCluster->Size(); pCluster->Print(); } } diff --git a/RICH/AliRICHTransientDigit.cxx b/RICH/AliRICHTransientDigit.cxx deleted file mode 100644 index 922d359efa6..00000000000 --- a/RICH/AliRICHTransientDigit.cxx +++ /dev/null @@ -1,81 +0,0 @@ -/************************************************************************** - * 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$ */ - -#include "AliRICHTransientDigit.h" -#include -#include "TVector.h" - -ClassImp(AliRICHTransientDigit) - -//____________________________________________________________________________ -AliRICHTransientDigit::AliRICHTransientDigit(Int_t ich, Int_t *digits): - AliRICHDigit(digits) -{ - // - // Creates a RICH digit list object - // - - fChamber = ich; - fTrackList = new TObjArray; - -} -//_____________________________________________________________________________ - -AliRICHTransientDigit::~AliRICHTransientDigit() -{ - fTrackList->Delete(); - delete fTrackList; -} - -//////////////////////////////////////////////////////////////////////// -void AliRICHTransientDigit::AddToTrackList(Int_t track, Int_t charge) -{ - TVector *pTrInfo = new TVector(2); - TVector &trInfo = *pTrInfo; - trInfo(0) = track; - trInfo(1) = charge; - fTrackList->Add(pTrInfo); -} - -//////////////////////////////////////////////////////////////////////// -void AliRICHTransientDigit::UpdateTrackList(Int_t track, Int_t charge) -{ - Int_t lastEntry = fTrackList->GetLast(); - TVector *pVect = static_cast(fTrackList->At(lastEntry)); - if ( static_cast((*pVect)(0)) == track) { - (*pVect)(1) += charge; // update charge - } else { - AddToTrackList(track,charge); - } -} - -//////////////////////////////////////////////////////////////////////// -Int_t AliRICHTransientDigit::GetTrack(Int_t i) const -{ - if (i > fTrackList->GetEntriesFast()) return 0; - TVector *pVect = static_cast(fTrackList->At(i)); - return static_cast((*pVect)(0)); -} - - -//////////////////////////////////////////////////////////////////////// -Int_t AliRICHTransientDigit::GetCharge(Int_t i) const -{ - if (i > fTrackList->GetEntriesFast()) return 0; - TVector *pVect = static_cast(fTrackList->At(i)); - return static_cast((*pVect)(1)); -} diff --git a/RICH/AliRICHTransientDigit.h b/RICH/AliRICHTransientDigit.h deleted file mode 100644 index 3c62e06bdf9..00000000000 --- a/RICH/AliRICHTransientDigit.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ALIRICHTRANSIENTDIGIT_H -#define ALIRICHTRANSIENTDIGIT_H - - -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id$ */ -#include "AliRICHDigit.h" -#include "TObjArray.h" - -class AliRICHTransientDigit : public AliRICHDigit { - protected: - Int_t fRpad; // r_pos of pad - Int_t fChamber; // chamber number of pad - TObjArray *fTrackList; // list of tracks - public: - AliRICHTransientDigit() {fTrackList=0;} - AliRICHTransientDigit(Int_t ich, Int_t *digits); - virtual ~AliRICHTransientDigit(); - -// TObjArray *TrackList() {return fTrackList;} - Int_t GetChamber() const {return fChamber;} - Int_t GetNTracks() const {return fTrackList->GetEntriesFast();} - Int_t GetTrack(Int_t i) const; - Int_t GetCharge(Int_t i) const; - void AddToTrackList(Int_t track, Int_t charge); - void UpdateTrackList(Int_t track, Int_t charge); - - ClassDef(AliRICHTransientDigit,1) //Digits for set:RICH -}; - -#endif diff --git a/RICH/AliRICHTresholdMap.cxx b/RICH/AliRICHTresholdMap.cxx index 9f9f72ca918..c018f1d8bcb 100644 --- a/RICH/AliRICHTresholdMap.cxx +++ b/RICH/AliRICHTresholdMap.cxx @@ -13,12 +13,10 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id$ */ #include "AliRICHTresholdMap.h" #include "AliSegmentation.h" -#include "AliRICHDigit.h" #include #include diff --git a/RICH/AliRICHv3.cxx b/RICH/AliRICHv3.cxx index 7f4056d5118..ab9ef0eddaa 100644 --- a/RICH/AliRICHv3.cxx +++ b/RICH/AliRICHv3.cxx @@ -38,8 +38,6 @@ #include "AliRICHSegmentationV1.h" #include "AliRICHv3.h" #include "AliRun.h" -#include "AliRICHRawCluster.h" -#include "AliRICHDigit.h" #include "AliMC.h" @@ -617,508 +615,3 @@ Int_t AliRICHv3::Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss, Int_t idv return iNdigits; }//Int_t AliRICHv3::Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss, Int_t idvol, ResponseType res) //__________________________________________________________________________________________________ -void AliRICHv3::DiagnosticsFE(Int_t evNumber1,Int_t evNumber2) -{ - - Int_t NpadX = 162; // number of pads on X - Int_t NpadY = 162; // number of pads on Y - - Int_t Pad[162][162]; - for (Int_t i=0;i3 GeV primary tracks",100,0,50); - TH2F *production = new TH2F("production","Mother production vertices",100,-300,300,100,0,600); - - - - -// Start loop over events - - Int_t pion=0, kaon=0, proton=0, electron=0, positron=0, neutron=0, highneutrons=0, muon=0; - Int_t chargedpions=0,primarypions=0,highprimarypions=0,chargedkaons=0,primarykaons=0,highprimarykaons=0; - Int_t photons=0, primaryphotons=0, highprimaryphotons=0; - TRandom* random=0; - - for (int nev=0; nev<= evNumber2; nev++) { - Int_t nparticles = gAlice->GetEvent(nev); - - - if (nev < evNumber1) continue; - if (nparticles <= 0) return; - -// Get pointers to RICH detector and Hits containers - - AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH"); - - TTree *treeH = TreeH(); - Int_t ntracks =(Int_t) treeH->GetEntries(); - -// Start loop on tracks in the hits containers - - for (Int_t track=0; trackResetHits(); - treeH->GetEvent(track); - - for(AliRICHhit* mHit=(AliRICHhit*)pRICH->FirstHit(-1); - mHit; - mHit=(AliRICHhit*)pRICH->NextHit()) - { - //Int_t nch = mHit->fChamber; // chamber number - //Float_t x = mHit->X(); // x-pos of hit - //Float_t y = mHit->Z(); // y-pos - //Float_t z = mHit->Y(); - //Float_t phi = mHit->Phi(); //Phi angle of incidence - Float_t theta = mHit->Theta(); //Theta angle of incidence - Float_t px = mHit->MomX(); - Float_t py = mHit->MomY(); - Int_t index = mHit->Track(); - Int_t particle = (Int_t)(mHit->Particle()); - Float_t R; - Float_t PTfinal; - Float_t PTvertex; - - TParticle *current = gAlice->GetMCApp()->Particle(index); - - //Float_t energy=current->Energy(); - - R=TMath::Sqrt(current->Vx()*current->Vx() + current->Vy()*current->Vy()); - PTfinal=TMath::Sqrt(px*px + py*py); - PTvertex=TMath::Sqrt(current->Px()*current->Px() + current->Py()*current->Py()); - - - - if (TMath::Abs(particle) < 10000000) - { - hitsTheta->Fill(theta,(float) 1); - if (R<5) - { - if (PTvertex>.5 && PTvertex<=1) - { - hitsTheta500MeV->Fill(theta,(float) 1); - } - if (PTvertex>1 && PTvertex<=2) - { - hitsTheta1GeV->Fill(theta,(float) 1); - } - if (PTvertex>2 && PTvertex<=3) - { - hitsTheta2GeV->Fill(theta,(float) 1); - } - if (PTvertex>3) - { - hitsTheta3GeV->Fill(theta,(float) 1); - } - } - - } - - //if (nch == 3) - //{ - - if (TMath::Abs(particle) < 50000051) - { - //if (TMath::Abs(particle) == 50000050 || TMath::Abs(particle) == 2112) - if (TMath::Abs(particle) == 2112 || TMath::Abs(particle) == 50000050) - { - //gMC->Rndm(&random, 1); - if (random->Rndm() < .1) - production->Fill(current->Vz(),R,(float) 1); - if (TMath::Abs(particle) == 50000050) - //if (TMath::Abs(particle) > 50000000) - { - photons +=1; - if (R<5) - { - primaryphotons +=1; - if (current->Energy()>0.001) - highprimaryphotons +=1; - } - } - if (TMath::Abs(particle) == 2112) - { - neutron +=1; - if (current->Energy()>0.0001) - highneutrons +=1; - } - } - if (TMath::Abs(particle) < 50000000) - { - production->Fill(current->Vz(),R,(float) 1); - } - //mip->Fill(x,y,(float) 1); - } - - if (TMath::Abs(particle)==211 || TMath::Abs(particle)==111) - { - if (R<5) - { - pionptspectravertex->Fill(PTvertex,(float) 1); - pionptspectrafinal->Fill(PTfinal,(float) 1); - } - } - - if (TMath::Abs(particle)==321 || TMath::Abs(particle)==130 || TMath::Abs(particle)==310 - || TMath::Abs(particle)==311) - { - if (R<5) - { - kaonptspectravertex->Fill(PTvertex,(float) 1); - kaonptspectrafinal->Fill(PTfinal,(float) 1); - } - } - - - if (TMath::Abs(particle)==211 || TMath::Abs(particle)==111) - { - pionspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5) - pionspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (R>250 && R<450) - { - pionspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - } - pion +=1; - if (TMath::Abs(particle)==211) - { - chargedpions +=1; - if (R<5) - { - primarypions +=1; - if (current->Energy()>1) - highprimarypions +=1; - } - } - } - if (TMath::Abs(particle)==2212) - { - protonspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - //ptspectra->Fill(Pt,(float) 1); - if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5) - protonspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (R>250 && R<450) - protonspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - proton +=1; - } - if (TMath::Abs(particle)==321 || TMath::Abs(particle)==130 || TMath::Abs(particle)==310 - || TMath::Abs(particle)==311) - { - kaonspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - //ptspectra->Fill(Pt,(float) 1); - if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5) - kaonspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (R>250 && R<450) - kaonspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - kaon +=1; - if (TMath::Abs(particle)==321) - { - chargedkaons +=1; - if (R<5) - { - primarykaons +=1; - if (current->Energy()>1) - highprimarykaons +=1; - } - } - } - if (TMath::Abs(particle)==11) - { - electronspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - //ptspectra->Fill(Pt,(float) 1); - if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5) - electronspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (R>250 && R<450) - electronspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (particle == 11) - electron +=1; - if (particle == -11) - positron +=1; - } - if (TMath::Abs(particle)==13) - { - muonspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - //ptspectra->Fill(Pt,(float) 1); - if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5) - muonspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (R>250 && R<450) - muonspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - muon +=1; - } - if (TMath::Abs(particle)==2112) - { - neutronspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - //ptspectra->Fill(Pt,(float) 1); - if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5) - neutronspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (R>250 && R<450) - { - neutronspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - } - neutron +=1; - } - if(TMath::Abs(particle)==211 || TMath::Abs(particle)==2212 || TMath::Abs(particle)==321) - { - if (current->Energy()-current->GetCalcMass()>1) - { - chargedspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5) - chargedspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - if (R>250 && R<450) - chargedspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1); - } - } - // Fill the histograms - //Nh1+=nhits; - //h->Fill(x,y,(float) 1); - //} - //} - } - - } - - } - // } - - TStyle *mystyle=new TStyle("Plain","mystyle"); - mystyle->SetPalette(1,0); - mystyle->cd(); - - //Create canvases, set the view range, show histograms - - TCanvas *c2 = new TCanvas("c2","Angles of incidence",150,150,100,150); - c2->Divide(2,2); - //c2->SetFillColor(42); - - c2->cd(1); - hitsTheta500MeV->SetFillColor(5); - hitsTheta500MeV->Draw(); - c2->cd(2); - hitsTheta1GeV->SetFillColor(5); - hitsTheta1GeV->Draw(); - c2->cd(3); - hitsTheta2GeV->SetFillColor(5); - hitsTheta2GeV->Draw(); - c2->cd(4); - hitsTheta3GeV->SetFillColor(5); - hitsTheta3GeV->Draw(); - - - - TCanvas *c15 = new TCanvas("c15","Mothers Production Vertices",50,50,600,600); - c15->cd(); - production->SetFillColor(42); - production->SetXTitle("z (m)"); - production->SetYTitle("R (m)"); - production->Draw(); - - TCanvas *c10 = new TCanvas("c10","Pt Spectra",50,50,600,700); - c10->Divide(2,2); - c10->cd(1); - pionptspectravertex->SetFillColor(5); - pionptspectravertex->SetXTitle("Pt (GeV)"); - pionptspectravertex->Draw(); - c10->cd(2); - pionptspectrafinal->SetFillColor(5); - pionptspectrafinal->SetXTitle("Pt (GeV)"); - pionptspectrafinal->Draw(); - c10->cd(3); - kaonptspectravertex->SetFillColor(5); - kaonptspectravertex->SetXTitle("Pt (GeV)"); - kaonptspectravertex->Draw(); - c10->cd(4); - kaonptspectrafinal->SetFillColor(5); - kaonptspectrafinal->SetXTitle("Pt (GeV)"); - kaonptspectrafinal->Draw(); - - - TCanvas *c16 = new TCanvas("c16","Particles Spectra II",150,150,600,350); - c16->Divide(2,1); - - c16->cd(1); - //TCanvas *c13 = new TCanvas("c13","Electron Spectra",400,10,600,700); - electronspectra1->SetFillColor(5); - electronspectra1->SetXTitle("log(GeV)"); - electronspectra2->SetFillColor(46); - electronspectra2->SetXTitle("log(GeV)"); - electronspectra3->SetFillColor(10); - electronspectra3->SetXTitle("log(GeV)"); - //c13->SetLogx(); - electronspectra1->Draw(); - electronspectra2->Draw("same"); - electronspectra3->Draw("same"); - - c16->cd(2); - //TCanvas *c14 = new TCanvas("c14","Muon Spectra",400,10,600,700); - muonspectra1->SetFillColor(5); - muonspectra1->SetXTitle("log(GeV)"); - muonspectra2->SetFillColor(46); - muonspectra2->SetXTitle("log(GeV)"); - muonspectra3->SetFillColor(10); - muonspectra3->SetXTitle("log(GeV)"); - //c14->SetLogx(); - muonspectra1->Draw(); - muonspectra2->Draw("same"); - muonspectra3->Draw("same"); - - //c16->cd(3); - //TCanvas *c16 = new TCanvas("c16","Neutron Spectra",400,10,600,700); - //neutronspectra1->SetFillColor(42); - //neutronspectra1->SetXTitle("log(GeV)"); - //neutronspectra2->SetFillColor(46); - //neutronspectra2->SetXTitle("log(GeV)"); - //neutronspectra3->SetFillColor(10); - //neutronspectra3->SetXTitle("log(GeV)"); - //c16->SetLogx(); - //neutronspectra1->Draw(); - //neutronspectra2->Draw("same"); - //neutronspectra3->Draw("same"); - - TCanvas *c9 = new TCanvas("c9","Particles Spectra",150,150,600,700); - //TCanvas *c9 = new TCanvas("c9","Pion Spectra",400,10,600,700); - c9->Divide(2,2); - - c9->cd(1); - pionspectra1->SetFillColor(5); - pionspectra1->SetXTitle("log(GeV)"); - pionspectra2->SetFillColor(46); - pionspectra2->SetXTitle("log(GeV)"); - pionspectra3->SetFillColor(10); - pionspectra3->SetXTitle("log(GeV)"); - //c9->SetLogx(); - pionspectra1->Draw(); - pionspectra2->Draw("same"); - pionspectra3->Draw("same"); - - c9->cd(2); - //TCanvas *c10 = new TCanvas("c10","Proton Spectra",400,10,600,700); - protonspectra1->SetFillColor(5); - protonspectra1->SetXTitle("log(GeV)"); - protonspectra2->SetFillColor(46); - protonspectra2->SetXTitle("log(GeV)"); - protonspectra3->SetFillColor(10); - protonspectra3->SetXTitle("log(GeV)"); - //c10->SetLogx(); - protonspectra1->Draw(); - protonspectra2->Draw("same"); - protonspectra3->Draw("same"); - - c9->cd(3); - //TCanvas *c11 = new TCanvas("c11","Kaon Spectra",400,10,600,700); - kaonspectra1->SetFillColor(5); - kaonspectra1->SetXTitle("log(GeV)"); - kaonspectra2->SetFillColor(46); - kaonspectra2->SetXTitle("log(GeV)"); - kaonspectra3->SetFillColor(10); - kaonspectra3->SetXTitle("log(GeV)"); - //c11->SetLogx(); - kaonspectra1->Draw(); - kaonspectra2->Draw("same"); - kaonspectra3->Draw("same"); - - c9->cd(4); - //TCanvas *c12 = new TCanvas("c12","Charged Particles Spectra",400,10,600,700); - chargedspectra1->SetFillColor(5); - chargedspectra1->SetXTitle("log(GeV)"); - chargedspectra2->SetFillColor(46); - chargedspectra2->SetXTitle("log(GeV)"); - chargedspectra3->SetFillColor(10); - chargedspectra3->SetXTitle("log(GeV)"); - //c12->SetLogx(); - chargedspectra1->Draw(); - chargedspectra2->Draw("same"); - chargedspectra3->Draw("same"); - - - - printf("*****************************************\n"); - printf("* Particle * Counts *\n"); - printf("*****************************************\n"); - - printf("* Pions: * %4d *\n",pion); - printf("* Charged Pions: * %4d *\n",chargedpions); - printf("* Primary Pions: * %4d *\n",primarypions); - printf("* Primary Pions (p>1GeV/c): * %4d *\n",highprimarypions); - printf("* Kaons: * %4d *\n",kaon); - printf("* Charged Kaons: * %4d *\n",chargedkaons); - printf("* Primary Kaons: * %4d *\n",primarykaons); - printf("* Primary Kaons (p>1GeV/c): * %4d *\n",highprimarykaons); - printf("* Muons: * %4d *\n",muon); - printf("* Electrons: * %4d *\n",electron); - printf("* Positrons: * %4d *\n",positron); - printf("* Protons: * %4d *\n",proton); - printf("* All Charged: * %4d *\n",(chargedpions+chargedkaons+muon+electron+positron+proton)); - printf("*****************************************\n"); - //printf("* Photons: * %3.1f *\n",photons); - //printf("* Primary Photons: * %3.1f *\n",primaryphotons); - //printf("* Primary Photons (p>1MeV/c):* %3.1f *\n",highprimaryphotons); - //printf("*****************************************\n"); - //printf("* Neutrons: * %3.1f *\n",neutron); - //printf("* Neutrons (p>100keV/c): * %3.1f *\n",highneutrons); - //printf("*****************************************\n"); - - if (gAlice->TreeD()) - { - gAlice->TreeD()->GetEvent(0); - - Float_t occ[7]; - Float_t sum=0; - Float_t mean=0; - printf("\n*****************************************\n"); - printf("* Chamber * Digits * Occupancy *\n"); - printf("*****************************************\n"); - - for (Int_t ich=0;ich<7;ich++) - { - TClonesArray *Digits = DigitsAddress(ich); // Raw clusters branch - Int_t ndigits = Digits->GetEntriesFast(); - occ[ich] = Float_t(ndigits)/(160*144); - sum += Float_t(ndigits)/(160*144); - printf("* %d * %d * %3.1f%% *\n",ich,ndigits,occ[ich]*100); - } - mean = sum/7; - printf("*****************************************\n"); - printf("* Mean occupancy * %3.1f%% *\n",mean*100); - printf("*****************************************\n"); - } - - printf("\nEnd of analysis\n"); - -}//void AliRICHv3::DiagnosticsFE(Int_t evNumber1,Int_t evNumber2) -//__________________________________________________________________________________________________ - diff --git a/RICH/AliRICHv3.h b/RICH/AliRICHv3.h index bc777e84481..5171dba1582 100644 --- a/RICH/AliRICHv3.h +++ b/RICH/AliRICHv3.h @@ -17,7 +17,6 @@ public: virtual ~AliRICHv3(); virtual Int_t IsVersion() const{return 3;} virtual void StepManager(); - void DiagnosticsFE(Int_t evNumber1,Int_t evNumber2); Int_t Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss, Int_t idvol, ResponseType res); void SetGeometryModel(Int_t c,AliRICHGeometry *pRICHGeo) {C(c)->SetGeometryModel(pRICHGeo);} void SetSegmentationModel(Int_t c, AliSegmentation *pAliSeg) {C(c)->SetSegmentationModel(pAliSeg);} diff --git a/RICH/ConfigRich.C b/RICH/ConfigRich.C index d034ae63a96..044db81a7bd 100644 --- a/RICH/ConfigRich.C +++ b/RICH/ConfigRich.C @@ -3,7 +3,7 @@ const static Bool_t IsRichUp=kFALSE; const static Int_t kEventsPerFile=50; enum EGenTypes {kGun0,kGun1,kGun7,kPP7}; -const static EGenTypes kGen=kGun1; +const static EGenTypes kGen=kGun7; Int_t iPIPE = 0;//central before RICH Int_t iITS = 0; diff --git a/RICH/Opticals.h b/RICH/Opticals.h index 6647e5eb712..4fc018fac48 100644 --- a/RICH/Opticals.h +++ b/RICH/Opticals.h @@ -5,91 +5,68 @@ void Opticals() #endif int i; const Int_t kNbins=30; - Float_t aPckov[kNbins]; - for(i=0;iDivide(3,2); pC->cd(1); - TGraph *pAbsFreonGr=new TGraph(kNbins,aPckov,aAbsFreon); - pAbsFreonGr->SetMarkerStyle(kFreonMarker); pAbsFreonGr->SetMarkerColor(kFreonColor); - TGraph *pAbsSiO2Gr=new TGraph(kNbins,aPckov,aAbsSiO2); - pAbsSiO2Gr->SetMarkerStyle(kSiO2Marker); pAbsSiO2Gr->SetMarkerColor(kSiO2Color); - TMultiGraph *pAbsMG=new TMultiGraph(); - TLegend *pAbsLegend=new TLegend(0.6,0.3,0.85,0.5); - pAbsMG->Add(pAbsFreonGr); pAbsLegend->AddEntry(pAbsFreonGr, "freon","p"); //1 - pAbsMG->Add(pAbsSiO2Gr); pAbsLegend->AddEntry(pAbsSiO2Gr, "SiO2","p"); //2 - pAbsMG->Draw("APL"); - pAbsMG->GetXaxis()->SetTitle("energy, GeV"); - pAbsMG->GetYaxis()->SetTitle("absorption length, cm"); - pAbsMG->Draw("APL"); - pAbsLegend->Draw(); + TGraph *pIdxC6F14G=new TGraph(kNbins,aPckov,aIdxC6F14);pIdxC6F14G->SetMarkerStyle(kC6F14M); pIdxC6F14G->SetMarkerColor(kC6F14C); + TGraph *pIdxSiO2G =new TGraph(kNbins,aPckov,aIdxSiO2); pIdxSiO2G->SetMarkerStyle(kSiO2M); pIdxSiO2G->SetMarkerColor(kSiO2C); + TGraph *pIdxCH4G =new TGraph(kNbins,aPckov,aIdxCH4); pIdxCH4G->SetMarkerStyle(kCH4M); pIdxCH4G->SetMarkerColor(kCH4Color); + TMultiGraph *pIdxMG=new TMultiGraph(); TLegend *pIdxLe=new TLegend(0.6,0.2,0.85,0.4); + pIdxMG->Add(pIdxC6F14G); pIdxLe->AddEntry(pIdxC6F14G, "C6F14","p"); + pIdxMG->Add(pIdxSiO2G); pIdxLe->AddEntry(pIdxSiO2G, "SiO2","p"); + pIdxMG->Add(pIdxCH4G); pIdxLe->AddEntry(pIdxCH4G, "CH4","p"); + pIdxMG->Draw("APL");pIdxMG->GetXaxis()->SetTitle("ref index versus energy, GeV");pIdxMG->Draw("APL"); + pIdxLe->Draw(); pC->cd(2); - TGraph *pIndexFreonGr=new TGraph(kNbins,aPckov,aIndexFreon); - pIndexFreonGr->SetMarkerStyle(kFreonMarker); pIndexFreonGr->SetMarkerColor(kFreonColor); - TGraph *pIndexSiO2Gr=new TGraph(kNbins,aPckov,aIndexSiO2); - pIndexSiO2Gr->SetMarkerStyle(kSiO2Marker); pIndexSiO2Gr->SetMarkerColor(kSiO2Color); - TGraph *pIndexCH4Gr=new TGraph(kNbins,aPckov,aIndexCH4); - pIndexCH4Gr->SetMarkerStyle(kCH4Marker); pIndexCH4Gr->SetMarkerColor(kCH4Color); - TMultiGraph *pIndexMG=new TMultiGraph(); - TLegend *pIndexLegend=new TLegend(0.6,0.2,0.85,0.4); - pIndexMG->Add(pIndexFreonGr); pIndexLegend->AddEntry(pIndexFreonGr, "C6F14","p"); //1 - pIndexMG->Add(pIndexSiO2Gr); pIndexLegend->AddEntry(pIndexSiO2Gr, "SiO2","p"); - pIndexMG->Add(pIndexCH4Gr); pIndexLegend->AddEntry(pIndexCH4Gr, "CH4","p"); - pIndexMG->Draw("APL"); - pIndexMG->GetXaxis()->SetTitle("energy, GeV"); - pIndexMG->GetYaxis()->SetTitle("refraction index"); - pIndexMG->Draw("APL"); - pIndexLegend->Draw(); + TGraph *pAbsC6F14G=new TGraph(kNbins,aPckov,aAbsC6F14);pAbsC6F14G->SetMarkerStyle(kC6F14M); pAbsC6F14G->SetMarkerColor(kC6F14C); + TGraph *pAbsSiO2G =new TGraph(kNbins,aPckov,aAbsSiO2); pAbsSiO2G->SetMarkerStyle(kSiO2M); pAbsSiO2G->SetMarkerColor(kSiO2C); + TMultiGraph *pAbsMG=new TMultiGraph(); TLegend *pAbsLegend=new TLegend(0.6,0.3,0.85,0.5); + pAbsMG->Add(pAbsC6F14G); pAbsLegend->AddEntry(pAbsC6F14G, "C6F14","p"); + pAbsMG->Add(pAbsSiO2G); pAbsLegend->AddEntry(pAbsSiO2G, "SiO2", "p"); + pAbsMG->Draw("APL"); pAbsMG->GetXaxis()->SetTitle("absorbtion length, cm versus energy, GeV"); pAbsMG->Draw("APL"); + pAbsLegend->Draw(); pC->cd(3); TGraph *pAbsCH4Gr=new TGraph(kNbins,aPckov,aAbsCH4); - pAbsCH4Gr->SetMarkerStyle(kCH4Marker); pAbsCH4Gr->SetMarkerColor(kCH4Color); + pAbsCH4Gr->SetMarkerStyle(kCH4M); pAbsCH4Gr->SetMarkerColor(kCH4Color); pAbsCH4Gr->Draw("APL"); pAbsCH4Gr->GetXaxis()->SetTitle("energy, GeV"); pAbsCH4Gr->SetTitle("CH4 absorption length, cm"); pAbsCH4Gr->Draw("APL"); pC->cd(4); - TGraph *pQeCsIGr=new TGraph(kNbins,aPckov,aQeCsI1); - pQeCsIGr->SetMarkerStyle(kCsIMarker); pQeCsIGr->SetMarkerColor(kCsIColor); - pQeCsIGr->Draw("APL"); - pQeCsIGr->GetXaxis()->SetTitle("energy, GeV"); - pQeCsIGr->SetTitle("QE"); - pQeCsIGr->Draw("APL"); - + TGraph *pQeCsIG=new TGraph(kNbins,aPckov,aQeCsI1); + pQeCsIG->SetMarkerStyle(kCsIMarker); pQeCsIG->SetMarkerColor(kCsIColor); + pQeCsIG->Draw("APL"); + pQeCsIG->GetXaxis()->SetTitle("energy, GeV"); + pQeCsIG->SetTitle("QE"); + pQeCsIG->Draw("APL"); +//transmission pC->cd(5); - Float_t aTrFreon[kNbins],aTrSiO2[kNbins],aTrCH4[kNbins]; + Float_t aTrC6F14[kNbins],aTrSiO2[kNbins],aTrCH4[kNbins]; Float_t aTotTr[kNbins]; for(Int_t i=0;iSetMarkerStyle(kFreonMarker);pTrFreonG->SetMarkerColor(kFreonColor); - TGraph *pTrSiO2G=new TGraph(kNbins,aPckov,aTrSiO2);pTrSiO2G->SetMarkerStyle(kSiO2Marker); pTrSiO2G->SetMarkerColor(kSiO2Color); - TGraph *pTrCH4G=new TGraph(kNbins,aPckov,aTrCH4);pTrCH4G->SetMarkerStyle(kCH4Marker); pTrCH4G->SetMarkerColor(kCH4Color); - TGraph *pTotTrG=new TGraph(kNbins,aPckov,aTotTr);pTotTrG->SetMarkerStyle(30); + TGraph *pTrC6F14G=new TGraph(kNbins,aPckov,aTrC6F14);pTrC6F14G->SetMarkerStyle(kC6F14M);pTrC6F14G->SetMarkerColor(kC6F14C); + TGraph *pTrSiO2G=new TGraph(kNbins,aPckov,aTrSiO2);pTrSiO2G->SetMarkerStyle(kSiO2M); pTrSiO2G->SetMarkerColor(kSiO2C); + TGraph *pTrCH4G=new TGraph(kNbins,aPckov,aTrCH4);pTrCH4G->SetMarkerStyle(kCH4M); pTrCH4G->SetMarkerColor(kCH4Color); + TGraph *pTotTrG=new TGraph(kNbins,aPckov,aTotTr);pTotTrG->SetMarkerStyle(30);pTotTrG->SetMarkerColor(kYellow); TMultiGraph *pTrMG=new TMultiGraph(); - TLegend *pTrLegend=new TLegend(0.6,0.2,0.85,0.4); - pTrMG->Add(pTrFreonG); pTrLegend->AddEntry(pTrFreonG, "freon","p"); //1 - pTrMG->Add(pTrSiO2G); pTrLegend->AddEntry(pTrSiO2G, "SiO2","p"); - pTrMG->Add(pTrCH4G); pTrLegend->AddEntry(pTrCH4G, "CH4","p"); - pTrMG->Add(pTotTrG); pTrLegend->AddEntry(pTotTrG, "total","p"); - pTrMG->Draw("APL"); - pTrMG->GetXaxis()->SetTitle("energy, GeV"); - pTrMG->GetYaxis()->SetTitle("transmission"); - pTrMG->Draw("APL"); + TLegend *pTrLegend=new TLegend(0.2,0.4,0.35,0.6); + pTrMG->Add(pQeCsIG); pTrLegend->AddEntry(pQeCsIG, "CsI QE", "p"); + pTrMG->Add(pTrC6F14G); pTrLegend->AddEntry(pTrC6F14G, "C6F14", "p"); + pTrMG->Add(pTrSiO2G); pTrLegend->AddEntry(pTrSiO2G, "SiO2", "p"); + pTrMG->Add(pTrCH4G); pTrLegend->AddEntry(pTrCH4G, "CH4", "p"); + pTrMG->Add(pTotTrG); pTrLegend->AddEntry(pTotTrG, "total", "p"); + pTrMG->Draw("APL");pTrMG->GetXaxis()->SetTitle("transmission versus energy, GeV");pTrMG->Draw("APL"); pTrLegend->Draw(); + pC->cd(6); + TMultiGraph *pCompMG=new TMultiGraph; + pCompMG->Add(pQeCsIG); + pCompMG->Add(new TGraph(kNbins,aPckov,aQeCsIold)); + pCompMG->Draw("APL");pCompMG->GetXaxis()->SetTitle("comparison of QE versus energy, GeV");pCompMG->Draw("APL"); + return; TCanvas *pQeC=new TCanvas("pQeC","CsI QE currently all the same",800,900); pQeC->Divide(2,4); @@ -293,5 +261,5 @@ Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola) fresn = fresn*rO; return(fresn); -}//Fresnel(...) +}//Fresnel() #endif diff --git a/RICH/RICHLinkDef.h b/RICH/RICHLinkDef.h index bd890a61202..d87945aea43 100644 --- a/RICH/RICHLinkDef.h +++ b/RICH/RICHLinkDef.h @@ -11,10 +11,7 @@ #pragma link C++ class AliRICHdigit+; #pragma link C++ class AliRICHcluster+; #pragma link C++ class AliRICHv3+; -#pragma link C++ class AliRICHDigit+; #pragma link C++ class AliRICHSDigit+; -#pragma link C++ class AliRICHTransientDigit+; -#pragma link C++ class AliRICHRawCluster+; #pragma link C++ class AliRICHSegmentationV0+; #pragma link C++ class AliRICHSegmentationV1+; #pragma link C++ class AliRICHResponse+; @@ -23,7 +20,6 @@ #pragma link C++ class AliRICHPoints+; #pragma link C++ class AliRICHDisplay+; #pragma link C++ class AliRICHMap+; -#pragma link C++ class AliRICHHitMapA1+; #pragma link C++ class AliRICHTresholdMap+; #pragma link C++ class AliRICHClusterFinder+; #pragma link C++ class AliRICHRecon+; diff --git a/RICH/libRICH.pkg b/RICH/libRICH.pkg index e1a9a89a54a..ed2168aed80 100644 --- a/RICH/libRICH.pkg +++ b/RICH/libRICH.pkg @@ -2,11 +2,10 @@ SRCS = AliRICH.cxx AliRICHv0.cxx AliRICHv1.cxx AliRICHv3.cxx\ AliRICHParam.cxx AliRICHDisplay.cxx AliRICHPoints.cxx AliRICHGeometry.cxx\ AliRICHSegmentationV0.cxx AliRICHTresholdMap.cxx\ AliRICHSegmentationV1.cxx AliRICHResponse.cxx \ - AliRICHClusterFinder.cxx AliRICHMap.cxx AliRICHHitMapA1.cxx\ + AliRICHClusterFinder.cxx AliRICHMap.cxx \ AliRICHChamber.cxx AliRICHRecon.cxx \ AliRICHSDigit.cxx AliRICHDisplFast.cxx \ - AliRICHDigit.cxx AliRICHTransientDigit.cxx \ - AliRICHRawCluster.cxx AliRICHDigitizer.cxx + AliRICHDigitizer.cxx HDRS = $(SRCS:.cxx=.h) DHDR= RICHLinkDef.h diff --git a/RICH/menu.C b/RICH/menu.C index 3485b70f299..beca37dfff7 100644 --- a/RICH/menu.C +++ b/RICH/menu.C @@ -39,12 +39,7 @@ Double_t d2r = TMath::DegToRad(); void DisplFast() { AliRICHDisplFast *d = new AliRICHDisplFast(); - - for (int nev=0; nev< a->GetEventsPerRun(); nev++) { // Event Loop - al->GetEvent(nev); - cout <Display(); - } // event loop + d->Exec(); } @@ -238,7 +233,10 @@ void Show3() cout<LoadHeader(); al->LoadKinematics(); - rl->LoadHits(); Bool_t isSdigits=!rl->LoadSDigits(); Bool_t isDigits=!rl->LoadDigits();//loaders + rl->LoadHits(); + Bool_t isSdigits=!rl->LoadSDigits(); + Bool_t isClusters=!rl->LoadRecPoints(); + Bool_t isDigits=!rl->LoadDigits();//loaders cout<GetEventsPerRun();iEventN++){//events loop @@ -270,19 +268,26 @@ void Show3() if(isDigits){ rl->TreeD()->GetEntry(0); for(int i=1;i<=7;i++) - Info("Show-DIGITS","Evt %i chamber %i contains %5i NEW digits and %5i OLD", - iEventN, i, r->Digits(i)->GetEntries(),r->DigitsOld(i)->GetEntries()); + Info("Show-DIGITS","Evt %i chamber %i contains %5i digits", + iEventN, i, r->Digits(i)->GetEntries()); + } + if(isClusters){ + rl->TreeR()->GetEntry(0); + for(int i=1;i<=7;i++) + Info("Show-CLUSTERS","Evt %i chamber %i contains %5i clusters", + iEventN, i, r->Clusters(i)->GetEntries()); } cout<UnloadHits(); if(isSdigits) rl->UnloadSDigits(); if(isDigits) rl->UnloadDigits(); + rl->UnloadHits(); + if(isSdigits) rl->UnloadSDigits(); + if(isDigits) rl->UnloadDigits(); + if(isClusters) rl->UnloadRecPoints(); al->UnloadHeader(); al->UnloadKinematics(); cout<