#include "AliTRDCalibraVdriftLinearFit.h"
#include "AliTRDcalibDB.h"
#include "AliTRDCommonParam.h"
-#include "AliTRDmcmTracklet.h"
-#include "AliTRDmcm.h"
-#include "AliTRDtrigParam.h"
#include "AliTRDpadPlane.h"
#include "AliTRDcluster.h"
#include "AliTRDtrack.h"
return withInput;
-}
-//_____________________________________________________________________
-Int_t AliTRDCalibraFillHisto::ProcessEventDAQV1(AliTRDrawStreamBase *rawStream, Bool_t nocheck)
-{
- //
- // Event Processing loop - AliTRDrawStreamBase
- // Use old AliTRDmcmtracklet code
- // 0 timebin problem
- // 1 no input
- // 2 input
- //
- // Algorithm with mcm tracklet
- //
-
- Int_t withInput = 1;
-
- AliTRDmcm mcm = AliTRDmcm(0);
- AliTRDtrigParam *param = AliTRDtrigParam::Instance();
- rawStream->SetSharedPadReadout(kTRUE);
-
- fDetectorPreviousTrack = -1;
- fMCMPrevious = -1;
- fROBPrevious = -1;
- Int_t row = -1;
- Int_t nbtimebin = 0;
- Int_t baseline = 10;
-
-
- if(!nocheck){
-
- fTimeMax = 0;
-
- while (rawStream->Next()) {
-
- Int_t idetector = rawStream->GetDet(); // current detector
- Int_t imcm = rawStream->GetMCM(); // current MCM
- Int_t irob = rawStream->GetROB(); // current ROB
- row = rawStream->GetRow();
-
-
- if(((fDetectorPreviousTrack != idetector) || (fMCMPrevious != imcm) || (fROBPrevious != irob)) && (fDetectorPreviousTrack != -1)){
-
- // Fill
- withInput = TMath::Max(FillDAQ(&mcm),withInput);
-
-
- // reset
- mcm.Reset();
- mcm.SetRobId(irob);
- mcm.SetChaId(idetector);
- mcm.SetRow(row);
- mcm.SetColRange(0,21);
-
- }
- if(fDetectorPreviousTrack == -1){
-
- mcm.SetRobId(irob);
- mcm.SetChaId(idetector);
- mcm.SetRow(row);
- mcm.SetColRange(0,21);
-
- }
-
- fDetectorPreviousTrack = idetector;
- fMCMPrevious = imcm;
- fROBPrevious = irob;
-
- nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data
- if(nbtimebin == 0) return 0;
- if((fTimeMax != 0) && (nbtimebin != fTimeMax)) return 0;
- fTimeMax = nbtimebin;
- fNumberClustersf = fTimeMax;
- fNumberClusters = (Int_t)(0.6*fTimeMax);
- param->SetTimeRange(0,fTimeMax);
-
- //baseline = rawStream->GetCommonAdditive(); // common additive baseline
-
- Int_t *signal = rawStream->GetSignals(); // current ADC signal
- Int_t adc = rawStream->GetADC();
-
-
- //printf("detector %d, signal[0] %d, signal[1] %d, signal[2] %d, baseline %d\n",idetector,signal[0],signal[1],signal[2], baseline);
-
- for(Int_t itime = 0; itime < nbtimebin; itime++){
- mcm.SetADC(adc,itime,(signal[itime]-baseline));
- }
- }
-
- // fill the last one
- if(fDetectorPreviousTrack != -1){
-
- // Fill
- withInput = TMath::Max(FillDAQ(&mcm),withInput);
-
-
- // reset
- mcm.Reset();
- mcm.SetRobId(fROBPrevious);
- mcm.SetChaId(fDetectorPreviousTrack);
- mcm.SetRow(row);
- mcm.SetColRange(0,21);
-
- }
-
- }
- else{
-
- while (rawStream->Next()) {
-
- Int_t idetector = rawStream->GetDet(); // current detector
- Int_t imcm = rawStream->GetMCM(); // current MCM
- Int_t irob = rawStream->GetROB(); // current ROB
- row = rawStream->GetRow();
-
- if(((fDetectorPreviousTrack != idetector) || (fMCMPrevious != imcm) || (fROBPrevious != irob)) && (fDetectorPreviousTrack != -1)){
-
- // Fill
- withInput = TMath::Max(FillDAQ(&mcm),withInput);
-
-
- // reset
- mcm.Reset();
- mcm.SetRobId(irob);
- mcm.SetChaId(idetector);
- mcm.SetRow(row);
- mcm.SetColRange(0,21);
-
- }
-
- fDetectorPreviousTrack = idetector;
- fMCMPrevious = imcm;
- fROBPrevious = irob;
-
- //baseline = rawStream->GetCommonAdditive(); // common baseline
-
- fTimeMax = rawStream->GetNumberOfTimeBins(); // number of time bins read from data
- fNumberClustersf = fTimeMax;
- fNumberClusters = (Int_t)(0.6*fTimeMax);
- param->SetTimeRange(0,fTimeMax);
- Int_t *signal = rawStream->GetSignals(); // current ADC signal
- Int_t adc = rawStream->GetADC();
-
-
- //printf("detector %d, signal[0] %d, signal[1] %d, signal[2] %d, baseline %d\n",idetector,signal[0],signal[1],signal[2], baseline);
-
- for(Int_t itime = 0; itime < fTimeMax; itime++){
- mcm.SetADC(adc,itime,(signal[itime]-baseline));
- }
- }
-
- // fill the last one
- if(fDetectorPreviousTrack != -1){
-
- // Fill
- withInput = TMath::Max(FillDAQ(&mcm),withInput);
-
- // reset
- mcm.Reset();
- mcm.SetRobId(fROBPrevious);
- mcm.SetChaId(fDetectorPreviousTrack);
- mcm.SetRow(row);
- mcm.SetColRange(0,21);
-
- }
- }
-
- return withInput;
-
}
//_____________________________________________________________________
Int_t AliTRDCalibraFillHisto::ProcessEventDAQ(AliRawReader *rawReader, Bool_t nocheck)
return 0;
#endif
-}
-//_____________________________________________________________________
-Int_t AliTRDCalibraFillHisto::ProcessEventDAQV1(AliRawReader *rawReader, Bool_t nocheck)
-{
- //
- // Event processing loop - AliRawReader
- // use the old mcm traklet code
- //
-
- AliTRDrawStreamBase rawStream(rawReader);
-
- rawReader->Select("TRD");
-
- return ProcessEventDAQV1(&rawStream, nocheck);
-}
-//_________________________________________________________________________
-Int_t AliTRDCalibraFillHisto::ProcessEventDAQV1(
-#ifdef ALI_DATE
- eventHeaderStruct *event,
- Bool_t nocheck
-#else
- eventHeaderStruct* /*event*/,
- Bool_t /*nocheck*/
-
-#endif
- )
-{
- //
- // process date event
- // use the old mcm tracklet code
- //
-#ifdef ALI_DATE
- AliRawReader *rawReader = new AliRawReaderDate((void*)event);
- Int_t result=ProcessEventDAQV1(rawReader, nocheck);
- delete rawReader;
- return result;
-#else
- Fatal("AliTRDCalibraFillHisto", "this class was compiled without DATE");
- return 0;
-#endif
-
}
//////////////////////////////////////////////////////////////////////////////
// Routine inside the DAQ process
/////////////////////////////////////////////////////////////////////////////
//_______________________________________________________________________
-Int_t AliTRDCalibraFillHisto::FillDAQ(AliTRDmcm *mcm){
-
- //
- // Return 2 if some tracklets are found and used, 1 if nothing
- //
-
- Int_t nbev = 0;
-
- if(mcm->Run()){
-
- for (Int_t iSeed = 0; iSeed < 4; iSeed++) {
-
- if (mcm->GetSeedCol()[iSeed] < 0) {
- continue;
- }
-
- nbev += TestTracklet(mcm->GetChaId(),mcm->GetRow(),iSeed,mcm);
- }
-
- }
-
- if(nbev > 0) nbev = 2;
- else nbev = 1;
-
- return nbev;
-
-}
-//__________________________________________________________________________
-Int_t AliTRDCalibraFillHisto::TestTracklet( Int_t idet, Int_t row, Int_t iSeed, AliTRDmcm *mcm){
-
- //
- // Build the tracklet and return if the tracklet if finally used or not (1/0)
- //
-
- Int_t nbev = 0;
-
- AliTRDmcmTracklet mcmtracklet = AliTRDmcmTracklet();
- //mcmtracklet.Reset();
- mcmtracklet.SetDetector(idet);
- mcmtracklet.SetRow(row);
- mcmtracklet.SetN(0);
-
- Int_t iCol, iCol1, iCol2, track[3];
- iCol = mcm->GetSeedCol()[iSeed]; // 0....20 (MCM)
- mcm->GetColRange(iCol1,iCol2); // range in the pad plane
-
- Float_t amp[3];
- for (Int_t iTime = 0; iTime < fTimeMax; iTime++) {
-
- amp[0] = mcm->GetADC(iCol-1,iTime);
- amp[1] = mcm->GetADC(iCol ,iTime);
- amp[2] = mcm->GetADC(iCol+1,iTime);
-
- if(mcm->IsCluster(iCol,iTime)) {
-
- mcmtracklet.AddCluster(iCol+iCol1,iTime,amp,track);
-
- }
- else if ((iCol+1+1) < 21) {
-
- amp[0] = mcm->GetADC(iCol-1+1,iTime);
- amp[1] = mcm->GetADC(iCol +1,iTime);
- amp[2] = mcm->GetADC(iCol+1+1,iTime);
-
- if(mcm->IsCluster(iCol+1,iTime)) {
-
- mcmtracklet.AddCluster(iCol+1+iCol1,iTime,amp,track);
-
- }
-
- }
-
- }
-
-
- nbev = UpdateHistogramcm(&mcmtracklet);
-
- return nbev;
-
-}
-//____________Online trackling in AliTRDtrigger________________________________
-Int_t AliTRDCalibraFillHisto::UpdateHistogramcm(AliTRDmcmTracklet *trk)
-{
- //
- // Return if the tracklet is finally used or not (1/0) for calibration
- //
-
- Int_t used = 1;
-
- //fGoodTracklet = kTRUE;
-
- // Localisation of the Xbins involved
- Int_t idect = trk->GetDetector();
- Int_t idectrue = trk->GetDetector();
- //idect = 0;
-
- Int_t nbclusters = trk->GetNclusters();
-
- // Eventuelle correction due to track angle in z direction
- Float_t correction = 1.0;
- if (fMcmCorrectAngle) {
- Float_t z = trk->GetRowz();
- Float_t r = trk->GetTime0();
- correction = r / TMath::Sqrt((r*r+z*z));
- }
-
- //row
- Int_t row = trk->GetRow();
-
-
- // Boucle sur les clusters
- // Condition on number of cluster: don't come from the middle of the detector
-
- Double_t amph[36];
- for(Int_t k =0; k < 36; k++) amph[k]=0.0;
- Double_t ampTotal = 0.0;
-
- for (Int_t icl = 0; icl < trk->GetNclusters(); icl++) {
-
- Float_t amp[3] = { 0.0, 0.0, 0.0 };
- Int_t time = trk->GetClusterTime(icl);
- Int_t col = trk->GetClusterCol(icl);
-
- //CheckGoodTrackletV0(idect,row,col);
-
- amp[0] = trk->GetClusterADC(icl)[0] * correction;
- amp[1] = trk->GetClusterADC(icl)[1] * correction;
- amp[2] = trk->GetClusterADC(icl)[2] * correction;
-
- ampTotal += (Float_t) (amp[0]+amp[1]+amp[2]);
- amph[time]=amp[0]+amp[1]+amp[2];
-
- if(fDebugLevel > 0){
- if ( !fDebugStreamer ) {
- //debug stream
- TDirectory *backup = gDirectory;
- fDebugStreamer = new TTreeSRedirector("TRDdebugCalibraFill.root");
- if ( backup ) backup->cd(); //we don't want to be cd'd to the debug streamer
- }
-
- Double_t amp0 = amp[0];
- Double_t amp1 = amp[1];
- Double_t amp2 = amp[2];
-
- (* fDebugStreamer) << "UpdateHistogramcm0"<<
- "nbclusters="<<nbclusters<<
- "amp0="<<amp0<<
- "amp1="<<amp1<<
- "amp2="<<amp2<<
- "time="<<time<<
- "col="<<col<<
- "row="<<row<<
- "detector="<<idectrue<<
- "\n";
- }
-
- } // Boucle clusters
-
- if((amph[0] > 100.0) || (!fGoodTracklet) || (trk->GetNclusters() < fNumberClusters) || (trk->GetNclusters() > fNumberClustersf)) used = 0;
-
- if (used == 1) {
- for(Int_t k = 0; k < fTimeMax; k++) UpdateDAQ(idect,0,0,k,amph[k],fTimeMax);
- //((TH2I *)GetCH2d()->Fill(ampTotal/30.0,idect));
- } // Condition cut
-
-
- if(fDebugLevel > 0){
- if ( !fDebugStreamer ) {
- //debug stream
- TDirectory *backup = gDirectory;
- fDebugStreamer = new TTreeSRedirector("TRDdebugCalibraFill.root");
- if ( backup ) backup->cd(); //we don't want to be cd'd to the debug streamer
- }
-
- Double_t amph0 = amph[0];
- Double_t amphlast = amph[fTimeMax-1];
- Double_t rms = TMath::RMS(fTimeMax,amph);
- Int_t goodtracklet = (Int_t) fGoodTracklet;
-
- (* fDebugStreamer) << "UpdateHistogramcm1"<<
- "nbclusters="<<nbclusters<<
- "ampTotal="<<ampTotal<<
- "row="<<row<<
- "detector="<<idectrue<<
- "amph0="<<amph0<<
- "amphlast="<<amphlast<<
- "goodtracklet="<<goodtracklet<<
- "rms="<<rms<<
- "\n";
- }
-
- return used;
-
-}
-//_______________________________________________________________________
Int_t AliTRDCalibraFillHisto::FillDAQ(Double_t phvalue[16][144][36]){
//
#include "AliTRDCalibraVector.h"
#include "AliTRDCommonParam.h"
-#include "AliTRDarrayF.h"
-#include "AliTRDarrayI.h"
+#include "TArrayF.h"
+#include "TArrayI.h"
ClassImp(AliTRDCalibraVector)
//______________________________________________________________________________________
AliTRDCalibraVector::AliTRDCalibraVector()
:TObject()
- ,fPHEntries(0x0)
- ,fPHMean(0x0)
- ,fPHSquares(0x0)
- ,fPRFEntries(0x0)
- ,fPRFMean(0x0)
- ,fPRFSquares(0x0)
- ,fCHEntries(0x0)
+ ,fNameCH("CH2d")
+ ,fNamePH("PH2d")
+ ,fNamePRF("PRF2d")
,fDetectorPH(-1)
,fDetectorCH(-1)
,fDetectorPRF(-1)
- ,fVectorPHMean(540)
- ,fVectorPHSquares(540)
- ,fVectorPHEntries(540)
- ,fVectorCHEntries(540)
- ,fVectorPRFMean(540)
- ,fVectorPRFSquares(540)
- ,fVectorPRFEntries(540)
,fNumberBinCharge(0)
,fNumberBinPRF(0)
,fTimeMax(0)
//
// Default constructor
//
+
+ for (Int_t idet = 0; idet < 540; idet++){
+
+ fPHEntries[idet]=new TArrayI();
+ fPHMean[idet]=new TArrayF();
+ fPHSquares[idet]=new TArrayF();
+
+ fPRFEntries[idet]=new TArrayI();
+ fPRFMean[idet]=new TArrayF();
+ fPRFSquares[idet]=new TArrayF();
+
+
+ fCHEntries[idet]=new TArrayI();
+
+ }
for(Int_t k = 0; k < 3; k++){
fDetCha0[k] = 0;
//______________________________________________________________________________________
AliTRDCalibraVector::AliTRDCalibraVector(const AliTRDCalibraVector &c)
:TObject(c)
- ,fPHEntries(0x0)
- ,fPHMean(0x0)
- ,fPHSquares(0x0)
- ,fPRFEntries(0x0)
- ,fPRFMean(0x0)
- ,fPRFSquares(0x0)
- ,fCHEntries(0x0)
+ ,fNameCH("CH2d")
+ ,fNamePH("PH2d")
+ ,fNamePRF("PRF2d")
,fDetectorPH(-1)
,fDetectorCH(-1)
,fDetectorPRF(-1)
- ,fVectorPHMean(540)
- ,fVectorPHSquares(540)
- ,fVectorPHEntries(540)
- ,fVectorCHEntries(540)
- ,fVectorPRFMean(540)
- ,fVectorPRFSquares(540)
- ,fVectorPRFEntries(540)
,fNumberBinCharge(c.fNumberBinCharge)
,fNumberBinPRF(c.fNumberBinPRF)
,fTimeMax(c.fTimeMax)
//
for (Int_t idet = 0; idet < 540; idet++){
- const AliTRDarrayI *phEntries = (AliTRDarrayI*)c.fVectorPHEntries.UncheckedAt(idet);
- const AliTRDarrayF *phMean = (AliTRDarrayF*)c.fVectorPHMean.UncheckedAt(idet);
- const AliTRDarrayF *phSquares = (AliTRDarrayF*)c.fVectorPHSquares.UncheckedAt(idet);
+ const TArrayI *phEntries = (TArrayI*)c.fPHEntries[idet];
+ const TArrayF *phMean = (TArrayF*)c.fPHMean[idet];
+ const TArrayF *phSquares = (TArrayF*)c.fPHSquares[idet];
- const AliTRDarrayI *prfEntries = (AliTRDarrayI*)c.fVectorPRFEntries.UncheckedAt(idet);
- const AliTRDarrayF *prfMean = (AliTRDarrayF*)c.fVectorPRFMean.UncheckedAt(idet);
- const AliTRDarrayF *prfSquares = (AliTRDarrayF*)c.fVectorPRFSquares.UncheckedAt(idet);
+ const TArrayI *prfEntries = (TArrayI*)c.fPRFEntries[idet];
+ const TArrayF *prfMean = (TArrayF*)c.fPRFMean[idet];
+ const TArrayF *prfSquares = (TArrayF*)c.fPRFSquares[idet];
- const AliTRDarrayI *chEntries = (AliTRDarrayI*)c.fVectorCHEntries.UncheckedAt(idet);
+ const TArrayI *chEntries = (TArrayI*)c.fCHEntries[idet];
- if ( phEntries != 0x0 ) fVectorPHEntries.AddAt(new AliTRDarrayI(*phEntries), idet);
- if ( phMean != 0x0 ) fVectorPHMean.AddAt(new AliTRDarrayF(*phMean), idet);
- if ( phSquares != 0x0 ) fVectorPHSquares.AddAt(new AliTRDarrayF(*phSquares), idet);
+ if ( phEntries != 0x0 ) fPHEntries[idet]=new TArrayI(*phEntries);
+ if ( phMean != 0x0 ) fPHMean[idet]=new TArrayF(*phMean);
+ if ( phSquares != 0x0 ) fPHSquares[idet]=new TArrayF(*phSquares);
- if ( prfEntries != 0x0 ) fVectorPRFEntries.AddAt(new AliTRDarrayI(*prfEntries), idet);
- if ( prfMean != 0x0 ) fVectorPRFMean.AddAt(new AliTRDarrayF(*prfMean), idet);
- if ( prfSquares != 0x0 ) fVectorPRFSquares.AddAt(new AliTRDarrayF(*prfSquares), idet);
+ if ( prfEntries != 0x0 ) fPRFEntries[idet]=new TArrayI(*prfEntries);
+ if ( prfMean != 0x0 ) fPRFMean[idet]=new TArrayF(*prfMean);
+ if ( prfSquares != 0x0 ) fPRFSquares[idet]=new TArrayF(*prfSquares);
- if ( chEntries != 0x0 ) fVectorCHEntries.AddAt(new AliTRDarrayI(*chEntries), idet);
+ if ( chEntries != 0x0 ) fCHEntries[idet]=new TArrayI(*chEntries);
}
fDetCha2[k] = c.fDetCha2[k];
}
- fVectorPHEntries.SetName(c.fVectorPHEntries.GetName());
- fVectorCHEntries.SetName(c.fVectorCHEntries.GetName());
- fVectorPRFEntries.SetName(c.fVectorPRFEntries.GetName());
-
+
}
//_____________________________________________________________________
AliTRDCalibraVector& AliTRDCalibraVector::operator = (const AliTRDCalibraVector &source)
//
// AliTRDCalibraVector destructor
//
- fVectorPHMean.Delete();
- fVectorPHSquares.Delete();
- fVectorPHEntries.Delete();
- fVectorCHEntries.Delete();
- fVectorPRFMean.Delete();
- fVectorPRFSquares.Delete();
- fVectorPRFEntries.Delete();
if(fPHEntries) delete fPHEntries;
if(fPHMean) delete fPHMean;
if(fDetectorCH != det){
- fCHEntries = ((AliTRDarrayI *)GetCHEntries(det,kTRUE));
+ fCHEntries[det] = ((TArrayI *)GetCHEntries(det,kTRUE));
}
- Int_t entries = fCHEntries->At(group*fNumberBinCharge+bin);
+ Int_t entries = ((TArrayI *)fCHEntries[det])->At(group*fNumberBinCharge+bin);
Int_t entriesn = entries+1;
- fCHEntries->AddAt(entriesn,group*fNumberBinCharge+bin);
+ ((TArrayI *)fCHEntries[det])->AddAt(entriesn,group*fNumberBinCharge+bin);
fDetectorCH = det;
if(fDetectorPRF != det){
- fPRFEntries = ((AliTRDarrayI *)GetPRFEntries(det,kTRUE));
- fPRFMean = ((AliTRDarrayF *)GetPRFMean(det,kTRUE));
- fPRFSquares = ((AliTRDarrayF *)GetPRFSquares(det,kTRUE));
+ fPRFEntries[det] = ((TArrayI *)GetPRFEntries(det,kTRUE));
+ fPRFMean[det] = ((TArrayF *)GetPRFMean(det,kTRUE));
+ fPRFSquares[det] = ((TArrayF *)GetPRFSquares(det,kTRUE));
}
- Int_t entries = fPRFEntries->At(group*fNumberBinPRF+bin);
- Float_t mean = fPRFMean->At(group*fNumberBinPRF+bin);
- Float_t square = fPRFSquares->At(group*fNumberBinPRF+bin);
+ Int_t entries = ((TArrayI *)fPRFEntries[det])->At((Int_t)group*fNumberBinPRF+bin);
+ Float_t mean = ((TArrayI *)fPRFMean[det])->At((Int_t)group*fNumberBinPRF+bin);
+ Float_t square = ((TArrayI *)fPRFSquares[det])->At((Int_t)group*fNumberBinPRF+bin);
Int_t entriesn = entries+1;
- fPRFEntries->AddAt(entriesn,group*fNumberBinPRF+bin);
+ ((TArrayI *)fPRFEntries[det])->AddAt(entriesn,(Int_t)group*fNumberBinPRF+bin);
Float_t meann = (mean*((Float_t)entries)+y)/((Float_t)entriesn);
- fPRFMean->AddAt(meann,group*fNumberBinPRF+bin);
+ ((TArrayF *)fPRFMean[det])->AddAt(meann,(Int_t)group*fNumberBinPRF+bin);
Float_t squaren = ((square*((Float_t)entries))+(y*y))/((Float_t)entriesn);
- fPRFSquares->AddAt(squaren,group*fNumberBinPRF+bin);
+ ((TArrayF *)fPRFSquares[det])->AddAt(squaren,(Int_t)group*fNumberBinPRF+bin);
fDetectorPRF = det;
if(fDetectorPH != det){
- fPHEntries = ((AliTRDarrayI *)GetPHEntries(det,kTRUE));
- fPHMean = ((AliTRDarrayF *)GetPHMean(det,kTRUE));
- fPHSquares = ((AliTRDarrayF *)GetPHSquares(det,kTRUE));
+ fPHEntries[det] = ((TArrayI *)GetPHEntries(det,kTRUE));
+ fPHMean[det] = ((TArrayF *)GetPHMean(det,kTRUE));
+ fPHSquares[det] = ((TArrayF *)GetPHSquares(det,kTRUE));
}
- Int_t entries = fPHEntries->At(group*fTimeMax+bin);
- Float_t mean = fPHMean->At(group*fTimeMax+bin);
- Float_t square = fPHSquares->At(group*fTimeMax+bin);
+ Int_t entries = ((TArrayI *)fPHEntries[det])->At(group*fTimeMax+bin);
+ Float_t mean = ((TArrayI *)fPHMean[det])->At(group*fTimeMax+bin);
+ Float_t square = ((TArrayI *)fPHSquares[det])->At(group*fTimeMax+bin);
Int_t entriesn = entries+1;
- fPHEntries->AddAt(entriesn,group*fTimeMax+bin);
+ ((TArrayI *)fPHEntries[det])->AddAt(entriesn,group*fTimeMax+bin);
Float_t meann = (mean*((Float_t)entries)+value)/((Float_t)entriesn);
- fPHMean->AddAt(meann,group*fTimeMax+bin);
+ ((TArrayF *)fPHMean[det])->AddAt(meann,group*fTimeMax+bin);
Float_t squaren = ((square*((Float_t)entries))+(value*value))/((Float_t)entriesn);
- fPHSquares->AddAt(squaren,group*fTimeMax+bin);
+ ((TArrayF *)fPHSquares[det])->AddAt(squaren,group*fTimeMax+bin);
fDetectorPH = det;
// Add
for (Int_t idet = 0; idet < 540; idet++){
- const AliTRDarrayI *phEntriesvect = calvect->GetPHEntries(idet);
- const AliTRDarrayF *phMeanvect = calvect->GetPHMean(idet);
- const AliTRDarrayF *phSquaresvect = calvect->GetPHSquares(idet);
+ const TArrayI *phEntriesvect = calvect->GetPHEntries(idet);
+ const TArrayF *phMeanvect = calvect->GetPHMean(idet);
+ const TArrayF *phSquaresvect = calvect->GetPHSquares(idet);
- const AliTRDarrayI *prfEntriesvect = calvect->GetPRFEntries(idet);
- const AliTRDarrayF *prfMeanvect = calvect->GetPRFMean(idet);
- const AliTRDarrayF *prfSquaresvect = calvect->GetPRFSquares(idet);
+ const TArrayI *prfEntriesvect = calvect->GetPRFEntries(idet);
+ const TArrayF *prfMeanvect = calvect->GetPRFMean(idet);
+ const TArrayF *prfSquaresvect = calvect->GetPRFSquares(idet);
- const AliTRDarrayI *chEntriesvect = calvect->GetCHEntries(idet);
+ const TArrayI *chEntriesvect = calvect->GetCHEntries(idet);
//printf("idet %d!\n",idet);
if ( phEntriesvect != 0x0 ){
//Take the stuff
- fPHEntries = ((AliTRDarrayI *)GetPHEntries(idet,kTRUE));
- fPHMean = ((AliTRDarrayF *)GetPHMean(idet,kTRUE));
- fPHSquares = ((AliTRDarrayF *)GetPHSquares(idet,kTRUE));
- Int_t total = fPHEntries->GetSize();
+ fPHEntries[idet] = ((TArrayI *)GetPHEntries(idet,kTRUE));
+ fPHMean[idet] = ((TArrayF *)GetPHMean(idet,kTRUE));
+ fPHSquares[idet] = ((TArrayF *)GetPHSquares(idet,kTRUE));
+ Int_t total = ((TArrayI *)fPHEntries[idet])->GetSize();
// Add
for(Int_t k = 0; k < total; k++){
- Int_t entries = fPHEntries->At(k);
- Float_t mean = fPHMean->At(k);
- Float_t square = fPHSquares->At(k);
+ Int_t entries = ((TArrayI *)fPHEntries[idet])->At(k);
+ Float_t mean = ((TArrayF *)fPHMean[idet])->At(k);
+ Float_t square = ((TArrayF *)fPHSquares[idet])->At(k);
- Int_t entriesn = entries+phEntriesvect->At(k);
+ Int_t entriesn = entries+((TArrayI *)phEntriesvect)->At(k);
if(entriesn <= 0) continue;
- fPHEntries->AddAt(entriesn,k);
- Float_t meann = (mean*((Float_t)entries)+phMeanvect->At(k)*((Float_t)phEntriesvect->At(k)))/((Float_t)entriesn);
- fPHMean->AddAt(meann,k);
- Float_t sq = phSquaresvect->At(k)*((Float_t)phEntriesvect->At(k));
+ ((TArrayI *)fPHEntries[idet])->AddAt(entriesn,k);
+ Float_t meann = (mean*((Float_t)entries)+((TArrayF *)phMeanvect)->At(k)*((Float_t)((TArrayI *)phEntriesvect)->At(k)))/((Float_t)entriesn);
+ ((TArrayF *)fPHMean[idet])->AddAt(meann,k);
+ Float_t sq = ((TArrayF *)phSquaresvect)->At(k)*((Float_t)((TArrayI *)phEntriesvect)->At(k));
Float_t squaren = ((square*((Float_t)entries))+sq)/((Float_t)entriesn);
- fPHSquares->AddAt(squaren,k);
+ ((TArrayF *)fPHSquares[idet])->AddAt(squaren,k);
//printf("test ph!\n");
}
}
if ( prfEntriesvect != 0x0 ){
//Take the stuff
- fPRFEntries = ((AliTRDarrayI *)GetPRFEntries(idet,kTRUE));
- fPRFMean = ((AliTRDarrayF *)GetPRFMean(idet,kTRUE));
- fPRFSquares = ((AliTRDarrayF *)GetPRFSquares(idet,kTRUE));
- Int_t total = fPRFEntries->GetSize();
+ fPRFEntries[idet] = ((TArrayI *)GetPRFEntries(idet,kTRUE));
+ fPRFMean[idet] = ((TArrayF *)GetPRFMean(idet,kTRUE));
+ fPRFSquares[idet] = ((TArrayF *)GetPRFSquares(idet,kTRUE));
+ Int_t total = fPRFEntries[idet]->GetSize();
// Add
for(Int_t k = 0; k < total; k++){
- Int_t entries = fPRFEntries->At(k);
- Float_t mean = fPRFMean->At(k);
- Float_t square = fPRFSquares->At(k);
+ Int_t entries = ((TArrayI *)fPRFEntries[idet])->At(k);
+ Float_t mean = ((TArrayF *)fPRFMean[idet])->At(k);
+ Float_t square = ((TArrayF *)fPRFSquares[idet])->At(k);
//printf("entries0 %d\n",entries);
//printf("mean0 %f\n",mean);
//printf("squares1 size %d\n",prfSquaresvect->GetSize());
- Int_t entriesn = entries+prfEntriesvect->At(k);
+ Int_t entriesn = entries+((TArrayI *)prfEntriesvect)->At(k);
if(entriesn <= 0) continue;
- fPRFEntries->AddAt(entriesn,k);
- Float_t meann = (mean*((Float_t)entries)+prfMeanvect->At(k)*((Float_t)prfEntriesvect->At(k)))/((Float_t)entriesn);
- fPRFMean->AddAt(meann,k);
- Float_t sq = prfSquaresvect->At(k)*((Float_t)prfEntriesvect->At(k));
+ ((TArrayI *)fPRFEntries[idet])->AddAt(entriesn,k);
+ Float_t meann = (mean*((Float_t)entries)+((TArrayF *)prfMeanvect)->At(k)*((Float_t)((TArrayI *)prfEntriesvect)->At(k)))/((Float_t)entriesn);
+ ((TArrayF *)fPRFMean[idet])->AddAt(meann,k);
+ Float_t sq = ((TArrayF *)prfSquaresvect)->At(k)*((Float_t)((TArrayI *)prfEntriesvect)->At(k));
Float_t squaren = ((square*((Float_t)entries))+sq)/((Float_t)entriesn);
- fPRFSquares->AddAt(squaren,k);
+ ((TArrayF *)fPRFSquares[idet])->AddAt(squaren,k);
//printf("test prf!\n");
}
}
if ( chEntriesvect != 0x0 ){
//Take the stuff
- fCHEntries = ((AliTRDarrayI *)GetCHEntries(idet,kTRUE));
- Int_t total = fCHEntries->GetSize();
+ fCHEntries[idet] = ((TArrayI *)GetCHEntries(idet,kTRUE));
+ Int_t total = fCHEntries[idet]->GetSize();
//if(idet == 180) printf("total %d\n",total);
// Add
for(Int_t k = 0; k < total; k++){
- Int_t entries = fCHEntries->At(k);
- Int_t entriesn = entries+chEntriesvect->At(k);
+ Int_t entries = ((TArrayI *)fCHEntries[idet])->At(k);
+ Int_t entriesn = entries+((TArrayI *)chEntriesvect)->At(k);
//if((idet == 180) && ((entries != 0) || (entriesn != 0))) printf("for k %d we have entries %d and entriesn %d\n",k,entries,entriesn);
if(entriesn <= 0) continue;
- fCHEntries->AddAt(entriesn,k);
+ ((TArrayI *)fCHEntries[idet])->AddAt(entriesn,k);
}
//printf("test ch!\n");
}
//
// Take the info
- fPHEntries = ((AliTRDarrayI *)GetPHEntries(det,kTRUE));
- fPHMean = ((AliTRDarrayF *)GetPHMean(det,kTRUE));
- fPHSquares = ((AliTRDarrayF *)GetPHSquares(det,kTRUE));
+ fPHEntries[det] = ((TArrayI *)GetPHEntries(det,kTRUE));
+ fPHMean[det] = ((TArrayF *)GetPHMean(det,kTRUE));
+ fPHSquares[det] = ((TArrayF *)GetPHSquares(det,kTRUE));
// Init the stuff
ey[k] = 0.0;
Int_t bin = offset+k;
// Fill only if there is more than 0 something
- if (fPHEntries->At(bin) > 0) {
- ex[k] = fPHEntries->At(bin);
- y[k] = fPHMean->At(bin);
- ey[k] = fPHSquares->At(bin);
+ if (fPHEntries[det]->At(bin) > 0) {
+ ex[k] = ((TArrayI *)fPHEntries[det])->At(bin);
+ y[k] = ((TArrayF *)fPHMean[det])->At(bin);
+ ey[k] = ((TArrayF *)fPHSquares[det])->At(bin);
}
}
//
// Take the info
- fPRFEntries = ((AliTRDarrayI *)GetPRFEntries(det,kTRUE));
- fPRFMean = ((AliTRDarrayF *)GetPRFMean(det,kTRUE));
- fPRFSquares = ((AliTRDarrayF *)GetPRFSquares(det,kTRUE));
+ fPRFEntries[det] = ((TArrayI *)GetPRFEntries(det,kTRUE));
+ fPRFMean[det] = ((TArrayF *)GetPRFMean(det,kTRUE));
+ fPRFSquares[det] = ((TArrayF *)GetPRFSquares(det,kTRUE));
// Init the stuff
ey[k] = 0.0;
Int_t bin = offset+k;
// Fill only if there is more than 0 something
- if (fPRFEntries->At(bin) > 0) {
- ex[k] = fPRFEntries->At(bin);
- y[k] = fPRFMean->At(bin);
- ey[k] = fPRFSquares->At(bin);
+ if (fPRFEntries[det]->At(bin) > 0) {
+ ex[k] = ((TArrayF *)fPRFEntries[det])->At(bin);
+ y[k] = ((TArrayF *)fPRFMean[det])->At(bin);
+ ey[k] = ((TArrayF *)fPRFSquares[det])->At(bin);
}
//printf("Number of entries %f for %d\n",ex[k],k);
}
//
// Take the info
- fCHEntries = ((AliTRDarrayI *)GetCHEntries(det,kTRUE));
+ fCHEntries[det] = ((TArrayI *)GetCHEntries(det,kTRUE));
// Init the stuff
TH1F *histo = new TH1F(name,name,fNumberBinCharge,0,300);
// Fill histo
for (Int_t k = 0; k < fNumberBinCharge; k++) {
Int_t bin = offset+k;
- histo->SetBinContent(k+1,fCHEntries->At(bin));
- histo->SetBinError(k+1,TMath::Sqrt(TMath::Abs(fCHEntries->At(bin))));
+ histo->SetBinContent(k+1,((TArrayI *)fCHEntries[det])->At(bin));
+ histo->SetBinError(k+1,TMath::Sqrt(TMath::Abs(((TArrayI *)fCHEntries[det])->At(bin))));
}
return histo;
}
//_____________________________________________________________________
-AliTRDarrayI* AliTRDCalibraVector::GetPHEntries(Int_t det
+TArrayI* AliTRDCalibraVector::GetPHEntries(Int_t det
, Bool_t force) /*FOLD00*/
{
//
// return pointer to Carge ROC Calibration
// if force is true create a new histogram if it doesn't exist allready
//
- TObjArray *arr = &fVectorPHEntries;
+ TArrayI**arr = &fPHEntries[0];
return GetEntriesPH(det, arr, force);
}
//_____________________________________________________________________
-AliTRDarrayI* AliTRDCalibraVector::GetPRFEntries(Int_t det
+TArrayI* AliTRDCalibraVector::GetPRFEntries(Int_t det
, Bool_t force) /*FOLD00*/
{
//
// return pointer to Carge ROC Calibration
// if force is true create a new histogram if it doesn't exist allready
//
- TObjArray *arr = &fVectorPRFEntries;
+ TArrayI**arr = &fPRFEntries[0];
return GetEntriesPRF(det, arr, force);
}
//_____________________________________________________________________
-AliTRDarrayI* AliTRDCalibraVector::GetCHEntries(Int_t det
+TArrayI* AliTRDCalibraVector::GetCHEntries(Int_t det
, Bool_t force) /*FOLD00*/
{
//
// return pointer to Carge ROC Calibration
// if force is true create a new histogram if it doesn't exist allready
//
- TObjArray *arr = &fVectorCHEntries;
+ TArrayI**arr = &fCHEntries[0];
return GetEntriesCH(det, arr, force);
}
//_____________________________________________________________________
-AliTRDarrayF* AliTRDCalibraVector::GetPHMean(Int_t det
+TArrayF* AliTRDCalibraVector::GetPHMean(Int_t det
, Bool_t force) /*FOLD00*/
{
//
// return pointer to Carge ROC Calibration
// if force is true create a new histogram if it doesn't exist allready
//
- TObjArray *arr = &fVectorPHMean;
+ TArrayF**arr = &fPHMean[0];
return GetMeanSquaresPH(det, arr, force);
}
//_____________________________________________________________________
-AliTRDarrayF* AliTRDCalibraVector::GetPHSquares(Int_t det
+TArrayF* AliTRDCalibraVector::GetPHSquares(Int_t det
, Bool_t force) /*FOLD00*/
{
//
// return pointer to Carge ROC Calibration
// if force is true create a new histogram if it doesn't exist allready
//
- TObjArray *arr = &fVectorPHSquares;
+ TArrayF**arr = &fPHSquares[0];
return GetMeanSquaresPH(det, arr, force);
}
//_____________________________________________________________________
-AliTRDarrayF* AliTRDCalibraVector::GetPRFMean(Int_t det
+TArrayF* AliTRDCalibraVector::GetPRFMean(Int_t det
, Bool_t force) /*FOLD00*/
{
//
// return pointer to Carge ROC Calibration
// if force is true create a new histogram if it doesn't exist allready
//
- TObjArray *arr = &fVectorPRFMean;
+ TArrayF**arr = &fPRFMean[0];
return GetMeanSquaresPRF(det, arr, force);
}
//_____________________________________________________________________
-AliTRDarrayF* AliTRDCalibraVector::GetPRFSquares(Int_t det
+TArrayF* AliTRDCalibraVector::GetPRFSquares(Int_t det
, Bool_t force) /*FOLD00*/
{
//
// return pointer to Carge ROC Calibration
// if force is true create a new histogram if it doesn't exist allready
//
- TObjArray *arr = &fVectorPRFSquares;
+ TArrayF**arr = &fPRFSquares[0];
return GetMeanSquaresPRF(det, arr, force);
}
//_____________________________________________________________________
-AliTRDarrayI* AliTRDCalibraVector::GetEntriesCH(Int_t det
- , TObjArray* arr
+TArrayI* AliTRDCalibraVector::GetEntriesCH(Int_t det
+ , TArrayI** arr
, Bool_t force) /*FOLD00*/
{
//
- // return pointer to AliTRDarrayI Entries
- // if force is true create a new AliTRDarrayI if it doesn't exist allready
+ // return pointer to TArrayI Entries
+ // if force is true create a new TArrayI if it doesn't exist allready
//
- if ( !force || arr->UncheckedAt(det) )
- return (AliTRDarrayI*)arr->UncheckedAt(det);
-
- // if we are forced and AliTRDarrayI doesn't yes exist create it
- AliTRDarrayI *croc = new AliTRDarrayI();
- Int_t stack = GetStack(det);
- Int_t ngroup = 0;
- if(stack == 2) ngroup = fDetCha2[0]*fNumberBinCharge;
- else ngroup = fDetCha0[0]*fNumberBinCharge;
- // init
- croc->Expand(ngroup);
- for(Int_t k = 0; k < ngroup; k++){
- croc->AddAt(0,k);
- }
- arr->AddAt(croc,det);
- return croc;
+ if ( !force || (((TArrayI *)arr[det])->GetSize()>0))
+ return (TArrayI*)arr[det];
+
+ // if we are forced and TArrayI doesn't yes exist create it
+ Int_t stack = GetStack(det);
+ Int_t ngroup = 0;
+ if(stack == 2) ngroup = fDetCha2[0]*fNumberBinCharge;
+ else ngroup = fDetCha0[0]*fNumberBinCharge;
+ // init
+ ((TArrayI *)arr[det])->Set(ngroup);
+ for(Int_t k = 0; k < ngroup; k++){
+ ((TArrayI *)arr[det])->AddAt(0,k);
+ }
+ return (TArrayI*)arr[det];
}
//_____________________________________________________________________
-AliTRDarrayI* AliTRDCalibraVector::GetEntriesPRF(Int_t det
- , TObjArray* arr
+TArrayI* AliTRDCalibraVector::GetEntriesPRF(Int_t det
+ , TArrayI** arr
, Bool_t force) /*FOLD00*/
{
//
- // return pointer to AliTRDarrayI Entries
- // if force is true create a new AliTRDarrayI if it doesn't exist allready
+ // return pointer to TArrayI Entries
+ // if force is true create a new TArrayI if it doesn't exist allready
//
- if ( !force || arr->UncheckedAt(det) )
- return (AliTRDarrayI*)arr->UncheckedAt(det);
-
- // if we are forced and AliTRDarrayI doesn't yes exist create it
- AliTRDarrayI *croc = new AliTRDarrayI();
- Int_t stack = GetStack(det);
- Int_t ngroup = 0;
- if(stack == 2) ngroup = fDetCha2[2]*fNumberBinPRF;
- else ngroup = fDetCha0[2]*fNumberBinPRF;
- // init
- croc->Expand(ngroup);
- for(Int_t k = 0; k < ngroup; k++){
- croc->AddAt(0,k);
- }
- arr->AddAt(croc,det);
- return croc;
+ if ( !force || (((TArrayI *)arr[det])->GetSize()>0))
+ return (TArrayI*)arr[det];
+
+ // if we are forced and TArrayI doesn't yes exist create it
+ Int_t stack = GetStack(det);
+ Int_t ngroup = 0;
+ if(stack == 2) ngroup = fDetCha2[2]*fNumberBinPRF;
+ else ngroup = fDetCha0[2]*fNumberBinPRF;
+ // init
+ ((TArrayI *)arr[det])->Set(ngroup);
+ for(Int_t k = 0; k < ngroup; k++){
+ ((TArrayI *)arr[det])->AddAt(0,k);
+ }
+ return (TArrayI*)arr[det];
}
//_____________________________________________________________________
-AliTRDarrayI* AliTRDCalibraVector::GetEntriesPH(Int_t det
- , TObjArray* arr
+TArrayI* AliTRDCalibraVector::GetEntriesPH(Int_t det
+ , TArrayI** arr
, Bool_t force) /*FOLD00*/
{
//
- // return pointer to AliTRDarrayI Entries
- // if force is true create a new AliTRDarrayI if it doesn't exist allready
+ // return pointer to TArrayI Entries
+ // if force is true create a new TArrayI if it doesn't exist allready
//
- if ( !force || arr->UncheckedAt(det) )
- return (AliTRDarrayI*)arr->UncheckedAt(det);
+ if ( !force || (((TArrayI *)arr[det])->GetSize()>0))
+ return (TArrayI*)arr[det];
- // if we are forced and AliTRDarrayI doesn't yes exist create it
- AliTRDarrayI *croc = new AliTRDarrayI();
+ // if we are forced and TArrayI doesn't yes exist create it
Int_t stack = GetStack(det);
Int_t ngroup = 0;
if(stack == 2) ngroup = fDetCha2[1]*fTimeMax;
else ngroup = fDetCha0[1]*fTimeMax;
// init
- croc->Expand(ngroup);
+ ((TArrayI *)arr[det])->Set(ngroup);
for(Int_t k = 0; k < ngroup; k++){
- croc->AddAt(0,k);
+ ((TArrayI *)arr[det])->AddAt(0,k);
}
- arr->AddAt(croc,det);
- return croc;
+ return (TArrayI*)arr[det];
}
//_____________________________________________________________________
-AliTRDarrayF* AliTRDCalibraVector::GetMeanSquaresPH(Int_t det
- , TObjArray* arr
+TArrayF* AliTRDCalibraVector::GetMeanSquaresPH(Int_t det
+ , TArrayF** arr
, Bool_t force) /*FOLD00*/
{
//
- // return pointer to AliTRDarrayF Mean or Squares
- // if force is true create a new AliTRDarrayF if it doesn't exist allready
+ // return pointer to TArrayF Mean or Squares
+ // if force is true create a new TArrayF if it doesn't exist allready
//
- if ( !force || arr->UncheckedAt(det) )
- return (AliTRDarrayF*)arr->UncheckedAt(det);
+ if ( !force || (((TArrayF *)arr[det])->GetSize()>0))
+ return (TArrayF*)arr[det];
- // if we are forced and AliTRDarrayF doesn't yes exist create it
- AliTRDarrayF *croc = new AliTRDarrayF();
+ // if we are forced and TArrayF doesn't yes exist create it
Int_t stack = GetStack(det);
Int_t ngroup = 0;
if(stack == 2) ngroup = fDetCha2[1]*fTimeMax;
else ngroup = fDetCha0[1]*fTimeMax;
// init
- croc->Expand(ngroup);
+ ((TArrayF *)arr[det])->Set(ngroup);
for(Int_t k = 0; k < ngroup; k++){
- croc->AddAt(0.0,k);
+ ((TArrayF *)arr[det])->AddAt(0.0,k);
}
- arr->AddAt(croc,det);
- return croc;
+ return ((TArrayF *)arr[det]);
}
//_____________________________________________________________________
-AliTRDarrayF* AliTRDCalibraVector::GetMeanSquaresPRF(Int_t det
- , TObjArray* arr
+TArrayF* AliTRDCalibraVector::GetMeanSquaresPRF(Int_t det
+ , TArrayF** arr
, Bool_t force) /*FOLD00*/
{
//
- // return pointer to AliTRDarrayF Mean or Squares
- // if force is true create a new AliTRDarrayF if it doesn't exist allready
+ // return pointer to TArrayF Mean or Squares
+ // if force is true create a new TArrayF if it doesn't exist allready
//
- if ( !force || arr->UncheckedAt(det) )
- return (AliTRDarrayF*)arr->UncheckedAt(det);
-
- // if we are forced and AliTRDarrayF doesn't yes exist create it
- AliTRDarrayF *croc = new AliTRDarrayF();
- Int_t stack = GetStack(det);
- Int_t ngroup = 0;
- if(stack == 2) ngroup = fDetCha2[2]*fNumberBinPRF;
- else ngroup = fDetCha0[2]*fNumberBinPRF;
- // init
- croc->Expand(ngroup);
- for(Int_t k = 0; k < ngroup; k++){
- croc->AddAt(0.0,k);
- }
- arr->AddAt(croc,det);
- return croc;
+ if ( !force || (((TArrayF *)arr[det])->GetSize()>0))
+ return arr[det];
+
+ // if we are forced and TArrayF doesn't yes exist create it
+ Int_t stack = GetStack(det);
+ Int_t ngroup = 0;
+ if(stack == 2) ngroup = fDetCha2[2]*fNumberBinPRF;
+ else ngroup = fDetCha0[2]*fNumberBinPRF;
+ // init
+ ((TArrayF *)arr[det])->Set(ngroup);
+ for(Int_t k = 0; k < ngroup; k++){
+ ((TArrayF *)arr[det])->AddAt(0.0,k);
+ }
+ return ((TArrayF *)arr[det]);
}
//_____________________________________________________________________________
Int_t AliTRDCalibraVector::GetStack(Int_t d) const
class TH1F;
class TObjArray;
-class AliTRDarrayF;
-class AliTRDarrayI;
+class TArrayF;
+class TArrayI;
class AliTRDCalibraVector : public TObject {
Bool_t UpdateVectorCH(Int_t det, Int_t group, Float_t value);
Bool_t UpdateVectorPRF(Int_t det, Int_t group, Float_t x, Float_t y);
Bool_t UpdateVectorPH(Int_t det, Int_t group, Int_t time, Float_t value);
+
+
// Add
Bool_t Add(AliTRDCalibraVector *calvector);
void SetPRFRange(Float_t prfrange) { fPRFRange = prfrange; }
void SetDetCha0(Int_t i, Short_t total) { fDetCha0[i] = total; }
void SetDetCha2(Int_t i, Short_t total) { fDetCha2[i] = total; }
- void SetNamePH(const char* name) { fVectorPHEntries.SetName(name); }
- void SetNamePRF(const char* name) { fVectorPRFEntries.SetName(name); }
- void SetNameCH(const char* name) { fVectorCHEntries.SetName(name); }
+ void SetNamePH(const char* name) { fNamePH = name; }
+ void SetNamePRF(const char* name) { fNamePRF = name; }
+ void SetNameCH(const char* name) { fNameCH = name; }
Short_t GetNumberBinCharge()const { return fNumberBinCharge; }
Short_t GetNumberBinPRF()const { return fNumberBinPRF; }
Float_t GetPRFRange()const { return fPRFRange; }
Short_t GetDetCha0(Int_t i) const { return fDetCha0[i]; }
Short_t GetDetCha2(Int_t i) const { return fDetCha2[i]; }
- const char* GetNamePH() { return fVectorPHEntries.GetName(); }
- const char* GetNamePRF() { return fVectorPRFEntries.GetName(); }
- const char* GetNameCH() { return fVectorCHEntries.GetName(); }
+ const char* GetNamePH() { return fNamePH; }
+ const char* GetNamePRF() { return fNamePRF; }
+ const char* GetNameCH() { return fNameCH; }
+
- AliTRDarrayI *GetPHEntries(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPHMean(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPHSquares(Int_t det,Bool_t force = kFALSE);
+
+ TArrayI *GetPHEntries(Int_t det,Bool_t force = kFALSE);
+ TArrayF *GetPHMean(Int_t det,Bool_t force = kFALSE);
+ TArrayF *GetPHSquares(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayI *GetPRFEntries(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPRFMean(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPRFSquares(Int_t det,Bool_t force = kFALSE);
+ TArrayI *GetPRFEntries(Int_t det,Bool_t force = kFALSE);
+ TArrayF *GetPRFMean(Int_t det,Bool_t force = kFALSE);
+ TArrayF *GetPRFSquares(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayI *GetCHEntries(Int_t det,Bool_t force = kFALSE);
+ TArrayI *GetCHEntries(Int_t det,Bool_t force = kFALSE);
protected:
// Current data
- AliTRDarrayI *fPHEntries; // Current AliTRDArrayI PH entries
- AliTRDarrayF *fPHMean; // Current AliTRDArrayF PH Mean
- AliTRDarrayF *fPHSquares; // Current AliTRDArrayF PH Squares
+ TArrayI *fPHEntries[540]; // Current AliTRDArrayI PH entries
+ TArrayF *fPHMean[540]; // Current AliTRDArrayF PH Mean
+ TArrayF *fPHSquares[540]; // Current AliTRDArrayF PH Squares
- AliTRDarrayI *fPRFEntries; // Current AliTRDArrayI PH entries
- AliTRDarrayF *fPRFMean; // Current AliTRDArrayF PH Mean
- AliTRDarrayF *fPRFSquares; // Current AliTRDArrayF PH Squares
+ TArrayI *fPRFEntries[540]; // Current AliTRDArrayI PH entries
+ TArrayF *fPRFMean[540]; // Current AliTRDArrayF PH Mean
+ TArrayF *fPRFSquares[540]; // Current AliTRDArrayF PH Squares
- AliTRDarrayI *fCHEntries; // Current AliTRDArrayI PH entries
+ TArrayI *fCHEntries[540]; // Current AliTRDArrayI PH entries
+
+ const char *fNameCH; // Name for calibration mode
+ const char *fNamePH; // Name for calibration mode
+ const char *fNamePRF; // Name for calibration mode
Int_t fDetectorPH; // Current detector
Int_t fDetectorCH; // Current detector
Int_t fDetectorPRF; // Current detector
- // Arrays of these objects
-
- TObjArray fVectorPHMean; // array of AliTRDarrayF of mean
- TObjArray fVectorPHSquares; // array of AliTRDarrayF of squares
- TObjArray fVectorPHEntries; // array of AliTRDarrayI of entries
- TObjArray fVectorCHEntries; // array of AliTRDarrayI of entries
- TObjArray fVectorPRFMean; // array of AliTRDarrayF of mean
- TObjArray fVectorPRFSquares; // array of AliTRDarrayF of squares
- TObjArray fVectorPRFEntries; // array of AliTRDarrayI of entries
-
// Size of the infos
Short_t fNumberBinCharge; // Number of bins for the gain factor
// Some functions
- AliTRDarrayI *GetEntriesPH(Int_t det, TObjArray *array, Bool_t force);
- AliTRDarrayF *GetMeanSquaresPH(Int_t det, TObjArray *array, Bool_t force);
+ TArrayI *GetEntriesPH(Int_t det, TArrayI** array, Bool_t force);
+ TArrayF *GetMeanSquaresPH(Int_t det, TArrayF** array, Bool_t force);
- AliTRDarrayI *GetEntriesPRF(Int_t det, TObjArray *array, Bool_t force);
- AliTRDarrayF *GetMeanSquaresPRF(Int_t det, TObjArray *array, Bool_t force);
+ TArrayI *GetEntriesPRF(Int_t det, TArrayI** array, Bool_t force);
+ TArrayF *GetMeanSquaresPRF(Int_t det, TArrayF** array, Bool_t force);
- AliTRDarrayI *GetEntriesCH(Int_t det, TObjArray *array, Bool_t force);
+ TArrayI *GetEntriesCH(Int_t det, TArrayI** array, Bool_t force);
// Some basic geometry function
virtual Int_t GetStack(Int_t d) const;