-/**************************************************************************\r\r\r * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r\r\r * *\r\r\r * Author: The ALICE Off-line Project. *\r\r\r * Contributors are mentioned in the code where appropriate. *\r\r\r * *\r\r\r * Permission to use, copy, modify and distribute this software and its *\r\r\r * documentation strictly for non-commercial purposes is hereby granted *\r\r\r * without fee, provided that the above copyright notice appears in all *\r\r\r * copies and that both the copyright notice and this permission notice *\r\r\r * appear in the supporting documentation. The authors make no claims *\r\r\r * about the suitability of this software for any purpose. It is *\r\r\r * provided "as is" without express or implied warranty. *\r\r\r **************************************************************************/\r\r\r\r\r\r/* $Id: AliTPCclusterKr.cxx,v 1.7 2008/01/22 17:24:53 matyja Exp $ */\r\r\r\r\r\r//-----------------------------------------------------------------\r\r\r// Implementation of the TPC Kr cluster class\r\r\r//\r\r\r// Origin: Adam Matyja, INP PAN, adam.matyja@ifj.edu.pl\r\r\r//-----------------------------------------------------------------\r\r\r\r\r\r#include "AliTPCclusterKr.h"\r\r\r#include "AliCluster.h"\r\r\r#include "AliTPCvtpr.h"\r\r\r#include "TObjArray.h"\r\r\r//#include "TH1F.h"\r\r\r#include "TMath.h"\r\r\r#include "TArrayI.h"\r\r\r\r\r\rClassImp(AliTPCclusterKr)\r\r\r\r\r\r\r\r\rAliTPCclusterKr::AliTPCclusterKr()\r\r\r:AliCluster(),\r\r\r fMax(),\r\r\r fADCcluster(0),\r\r\r fSec(0),\r\r\r fNPads(0),\r\r\r fNRows(0),\r\r\r fTimebins1D(0),\r\r\r fPads1D(0),\r\r\r fPadRMS(0),\r\r\r fRowRMS(0),\r\r\r fTimebinRMS(0),\r\r\r fSize(0),\r\r\r fCenterX(0),\r\r\r fCenterY(0),\r\r\r fCenterT(0),\r\r\r fCluster(0),\r\r\r fTimeStamp(0),\r fRun(0)\r\r\r{\r\r\r//\r\r\r// default constructor\r\r\r//\r\r\r fCluster=new TObjArray();\r\r\r}\r\r\r\r\r\rAliTPCclusterKr::AliTPCclusterKr(const AliTPCclusterKr ¶m)\r\r\r:AliCluster(param),\r\r\r fMax(),\r\r\r fADCcluster(0),\r\r\r fSec(0),\r\r\r fNPads(0),\r\r\r fNRows(0),\r\r\r fTimebins1D(0),\r\r\r fPads1D(0),\r\r\r fPadRMS(0),\r\r\r fRowRMS(0),\r\r\r fTimebinRMS(0),\r\r\r fSize(0),\r\r\r fCenterX(0),\r\r\r fCenterY(0),\r\r\r fCenterT(0),\r\r\r fCluster(0),\r\r\r fTimeStamp(0),\r fRun(0)\r\r\r{\r\r\r//\r\r\r// copy constructor\r\r\r//\r\r\r fADCcluster = param.fADCcluster;\r\r\r fSec = param.fSec ;\r\r\r fNPads = param.fNPads;\r\r\r fNRows = param.fNRows;\r\r\r fMax = param.fMax;\r\r\r // fCluster = param.fCluster;\r\r\r fCenterX = param.fCenterX;\r\r\r fCenterY = param.fCenterY;\r\r\r fCenterT = param.fCenterT;\r\r\r fCluster=new TObjArray(*(param.fCluster));\r\r\r fSize = param.fSize;\r\r\r fTimebins1D = param.fTimebins1D;\r\r\r fPads1D = param.fPads1D;\r\r\r fPadRMS = param.fPadRMS;\r\r\r fRowRMS = param.fRowRMS;\r\r\r fTimebinRMS = param.fTimebinRMS;\r\r\r fTimeStamp = param.fTimeStamp;\r fRun = param.fRun;\r\r\r} \r\r\r\r\r\rAliTPCclusterKr &AliTPCclusterKr::operator = (const AliTPCclusterKr & param)\r\r\r{\r\r\r //\r\r\r // assignment operator\r\r\r // \r\r\r (AliCluster&)(*this) = (AliCluster&)param;\r\r\r fADCcluster = param.fADCcluster;\r\r\r fSec = param.fSec ;\r\r\r fNPads = param.fNPads;\r\r\r fNRows = param.fNRows;\r\r\r fMax = param.fMax;\r\r\r // fCluster=param.fCluster;\r\r\r fCenterX = param.fCenterX;\r\r\r fCenterY = param.fCenterY;\r\r\r fCenterT = param.fCenterT;\r\r\r delete fCluster;\r\r\r fCluster=new TObjArray(*(param.fCluster));\r\r\r fSize=param.fSize;\r\r\r fTimebins1D = param.fTimebins1D;\r\r\r fPads1D = param.fPads1D;\r\r\r fPadRMS = param.fPadRMS;\r\r\r fRowRMS = param.fRowRMS;\r\r\r fTimebinRMS = param.fTimebinRMS;\r\r\r fTimeStamp = param.fTimeStamp;\r fRun = param.fRun;\r\r\r return (*this);\r\r\r}\r\r\r\r\r\rAliTPCclusterKr::~AliTPCclusterKr()\r\r\r{\r\r\r //\r\r\r // destructor\r\r\r //\r\r\r if(fCluster) {\r\r\r fCluster->SetOwner(kTRUE);\r\r\r fCluster->Delete();\r\r\r delete fCluster;\r\r\r }\r\r\r fCluster=0;\r\r\r}\r\r\r\r\r\r////____________________________________________________________________________\r\r\rvoid AliTPCclusterKr::SetCenter(){\r\r\r //\r\r\r // calculate geometrical center of the cluster\r\r\r //\r\r\r Double_t rX=0;\r\r\r Double_t rY=0;\r\r\r Double_t rT=0;\r\r\r\r\r\r Short_t adc;\r\r\r fADCcluster=0;\r\r\r for(Int_t iter = 0; iter < fCluster->GetEntriesFast(); ++iter) {\r\r\r AliTPCvtpr *iclus=(AliTPCvtpr *)fCluster->At(iter);\r\r\r\r\r\r //for( std::vector<AliTPCvtpr*>::iterator iclus = fCluster.begin();\r\r\r //iclus != fCluster.end(); ++iclus ) {\r\r\r adc = (iclus)->GetAdc();\r\r\r fADCcluster+=adc;\r\r\r rX += ((iclus)->GetX() * adc);\r\r\r rY += ((iclus)->GetY() * adc);\r\r\r rT += ((iclus)->GetT() * adc);\r\r\r }\r\r\r fCenterX=rX/fADCcluster;\r\r\r fCenterY=rY/fADCcluster;\r\r\r fCenterT=rT/fADCcluster;\r\r\r\r\r\r return;\r\r\r}\r\r\r\r\r\rvoid AliTPCclusterKr::SetPadRMS(){\r\r\r //\r\r\r // calculate RMS in pad direction\r\r\r //\r\r\r // TH1F *histo= new TH1F("","",200,0,200);\r\r\r TArrayI *array= new TArrayI(fCluster->GetEntriesFast());\r\r\r for(Int_t i=0;i<fCluster->GetEntriesFast();i++)\r\r\r {\r\r\r array->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetPad(),i);\r\r\r //histo->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetPad() );\r\r\r }\r\r\r // fPadRMS=histo->GetRMS();\r\r\r fPadRMS=TMath::RMS(array->GetSize(),array->GetArray());\r\r\r // delete histo;\r\r\r delete array;\r\r\r return;\r\r\r}\r\r\r\r\r\rvoid AliTPCclusterKr::SetRowRMS(){\r\r\r //\r\r\r // calculate RMS in row direction\r\r\r //\r\r\r TArrayI *array= new TArrayI(fCluster->GetEntriesFast());\r\r\r // TH1F *histo= new TH1F("","",120,0,120);\r\r\r for(Int_t i=0;i<fCluster->GetEntriesFast();i++)\r\r\r {\r\r\r array->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetRow(),i);\r\r\r // histo->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetRow() );\r\r\r }\r\r\r // fRowRMS=histo->GetRMS();\r\r\r fRowRMS=TMath::RMS(array->GetSize(),array->GetArray());\r\r\r // delete histo;\r\r\r delete array;\r\r\r return;\r\r\r}\r\r\r\r\r\rvoid AliTPCclusterKr::SetTimebinRMS(){\r\r\r //\r\r\r // calculate RMS in timebin direction\r\r\r //\r\r\r TArrayI *array= new TArrayI(fCluster->GetEntriesFast());\r\r\r // TH1F *histo= new TH1F("","",1000,0,1000);\r\r\r for(Int_t i=0;i<fCluster->GetEntriesFast();i++)\r\r\r {\r\r\r array->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetTime(),i);\r\r\r // histo->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetTime() );\r\r\r }\r\r\r fTimebinRMS=TMath::RMS(array->GetSize(),array->GetArray());\r\r\r //histo->GetRMS();\r\r\r // delete histo;\r\r\r delete array;\r\r\r return;\r\r\r}\r\r\r\r\r\rvoid AliTPCclusterKr::SetRMS(){\r\r\r //\r\r\r // calculate RMS in pad,row,timebin direction\r\r\r //\r\r\r TArrayI *arrayPad = new TArrayI(fCluster->GetEntriesFast());\r\r\r TArrayI *arrayRow = new TArrayI(fCluster->GetEntriesFast());\r\r\r TArrayI *arrayTime= new TArrayI(fCluster->GetEntriesFast());\r\r\r // TH1F *histoPad= new TH1F("p","p",200,0,200);\r\r\r // TH1F *histoRow= new TH1F("r","r",120,0,120);\r\r\r // TH1F *histoTime= new TH1F("t","t",1000,0,1000);\r\r\r for(Int_t i=0;i<fCluster->GetEntriesFast();i++)\r\r\r {\r\r\r arrayPad->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetPad(),i);\r\r\r arrayRow->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetRow(),i);\r\r\r arrayTime->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetTime(),i);\r\r\r\r\r\r //histoPad->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetPad() );\r\r\r //histoRow->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetRow() );\r\r\r //histoTime->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetTime() );\r\r\r }\r\r\r // fPadRMS=histoPad->GetRMS();\r\r\r fPadRMS=TMath::RMS(arrayPad->GetSize(),arrayPad->GetArray());\r\r\r fRowRMS=TMath::RMS(arrayRow->GetSize(),arrayRow->GetArray());\r\r\r //histoRow->GetRMS();\r\r\r fTimebinRMS=TMath::RMS(arrayTime->GetSize(),arrayTime->GetArray());\r\r\r //histoTime->GetRMS();\r\r\r\r\r\r delete arrayPad;\r\r\r delete arrayRow;\r\r\r delete arrayTime;\r\r\r // delete histoPad;\r\r\r // delete histoRow;\r\r\r // delete histoTime;\r\r\r\r\r\r return;\r\r\r}\r\r\r\r\r\r\r\r\rvoid AliTPCclusterKr::Set1D(){\r\r\r //\r\r\r //\r\r\r //\r\r\r Short_t maxTime=0;\r\r\r Short_t minTime=1000;\r\r\r Short_t maxPad=0;\r\r\r Short_t minPad=1000;\r\r\r \r\r\r for(Int_t i=0;i<fCluster->GetEntriesFast();i++)\r\r\r {\r\r\r if(((AliTPCvtpr *)(fCluster->At(i)))->GetPad()>maxPad)maxPad =((AliTPCvtpr *)(fCluster->At(i)))->GetPad();\r\r\r if(((AliTPCvtpr *)(fCluster->At(i)))->GetPad()<minPad)minPad =((AliTPCvtpr *)(fCluster->At(i)))->GetPad();\r\r\r if(((AliTPCvtpr *)(fCluster->At(i)))->GetTime()>maxTime)maxTime=((AliTPCvtpr *)(fCluster->At(i)))->GetTime();\r\r\r if(((AliTPCvtpr *)(fCluster->At(i)))->GetTime()<minTime)minTime=((AliTPCvtpr *)(fCluster->At(i)))->GetTime();\r\r\r }\r\r\r fPads1D=maxPad-minPad+1;\r\r\r fTimebins1D=maxTime-minTime+1;\r\r\r return;\r\r\r}\r\r\r
\ No newline at end of file
+/**************************************************************************
+
+
+ * 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: AliTPCclusterKr.cxx,v 1.7 2008/01/22 17:24:53 matyja Exp $ */
+
+
+
+
+
+//-----------------------------------------------------------------
+
+
+// Implementation of the TPC Kr cluster class
+
+
+//
+
+
+// Origin: Adam Matyja, INP PAN, adam.matyja@ifj.edu.pl
+
+
+//-----------------------------------------------------------------
+
+
+
+
+
+#include "AliTPCclusterKr.h"
+
+
+#include "AliCluster.h"
+
+
+#include "AliTPCvtpr.h"
+
+
+#include "TObjArray.h"
+
+
+//#include "TH1F.h"
+
+
+#include "TMath.h"
+
+
+#include "TArrayI.h"
+
+
+
+
+
+ClassImp(AliTPCclusterKr)
+
+
+
+
+
+
+
+
+AliTPCclusterKr::AliTPCclusterKr()
+
+
+:AliCluster(),
+
+
+ fMax(),
+
+
+ fADCcluster(0),
+
+
+ fSec(0),
+
+
+ fNPads(0),
+
+
+ fNRows(0),
+
+
+ fTimebins1D(0),
+
+
+ fPads1D(0),
+
+
+ fPadRMS(0),
+
+
+ fRowRMS(0),
+
+
+ fTimebinRMS(0),
+
+
+ fSize(0),
+
+
+ fCenterX(0),
+
+
+ fCenterY(0),
+
+
+ fCenterT(0),
+
+
+ fCluster(0),
+
+
+ fTimeStamp(0),
+ fRun(0)
+
+
+{
+
+
+//
+
+
+// default constructor
+
+
+//
+
+
+ fCluster=new TObjArray();
+
+
+}
+
+
+
+
+
+AliTPCclusterKr::AliTPCclusterKr(const AliTPCclusterKr ¶m)
+
+
+:AliCluster(param),
+
+
+ fMax(),
+
+
+ fADCcluster(0),
+
+
+ fSec(0),
+
+
+ fNPads(0),
+
+
+ fNRows(0),
+
+
+ fTimebins1D(0),
+
+
+ fPads1D(0),
+
+
+ fPadRMS(0),
+
+
+ fRowRMS(0),
+
+
+ fTimebinRMS(0),
+
+
+ fSize(0),
+
+
+ fCenterX(0),
+
+
+ fCenterY(0),
+
+
+ fCenterT(0),
+
+
+ fCluster(0),
+
+
+ fTimeStamp(0),
+ fRun(0)
+
+
+{
+
+
+//
+
+
+// copy constructor
+
+
+//
+
+
+ fADCcluster = param.fADCcluster;
+
+
+ fSec = param.fSec ;
+
+
+ fNPads = param.fNPads;
+
+
+ fNRows = param.fNRows;
+
+
+ fMax = param.fMax;
+
+
+ // fCluster = param.fCluster;
+
+
+ fCenterX = param.fCenterX;
+
+
+ fCenterY = param.fCenterY;
+
+
+ fCenterT = param.fCenterT;
+
+
+ fCluster=new TObjArray(*(param.fCluster));
+
+
+ fSize = param.fSize;
+
+
+ fTimebins1D = param.fTimebins1D;
+
+
+ fPads1D = param.fPads1D;
+
+
+ fPadRMS = param.fPadRMS;
+
+
+ fRowRMS = param.fRowRMS;
+
+
+ fTimebinRMS = param.fTimebinRMS;
+
+
+ fTimeStamp = param.fTimeStamp;
+ fRun = param.fRun;
+
+
+}
+
+
+
+
+
+AliTPCclusterKr &AliTPCclusterKr::operator = (const AliTPCclusterKr & param)
+
+
+{
+
+
+ //
+
+
+ // assignment operator
+
+
+ //
+
+
+ (AliCluster&)(*this) = (AliCluster&)param;
+
+
+ fADCcluster = param.fADCcluster;
+
+
+ fSec = param.fSec ;
+
+
+ fNPads = param.fNPads;
+
+
+ fNRows = param.fNRows;
+
+
+ fMax = param.fMax;
+
+
+ // fCluster=param.fCluster;
+
+
+ fCenterX = param.fCenterX;
+
+
+ fCenterY = param.fCenterY;
+
+
+ fCenterT = param.fCenterT;
+
+
+ delete fCluster;
+
+
+ fCluster=new TObjArray(*(param.fCluster));
+
+
+ fSize=param.fSize;
+
+
+ fTimebins1D = param.fTimebins1D;
+
+
+ fPads1D = param.fPads1D;
+
+
+ fPadRMS = param.fPadRMS;
+
+
+ fRowRMS = param.fRowRMS;
+
+
+ fTimebinRMS = param.fTimebinRMS;
+
+
+ fTimeStamp = param.fTimeStamp;
+ fRun = param.fRun;
+
+
+ return (*this);
+
+
+}
+
+
+
+
+
+AliTPCclusterKr::~AliTPCclusterKr()
+
+
+{
+
+
+ //
+
+
+ // destructor
+
+
+ //
+
+
+ if(fCluster) {
+
+
+ fCluster->SetOwner(kTRUE);
+
+
+ fCluster->Delete();
+
+
+ delete fCluster;
+
+
+ }
+
+
+ fCluster=0;
+
+
+}
+
+
+
+
+
+////____________________________________________________________________________
+
+
+void AliTPCclusterKr::SetCenter(){
+
+
+ //
+
+
+ // calculate geometrical center of the cluster
+
+
+ //
+
+
+ Double_t rX=0;
+
+
+ Double_t rY=0;
+
+
+ Double_t rT=0;
+
+
+
+
+
+ Short_t adc;
+
+
+ fADCcluster=0;
+
+
+ for(Int_t iter = 0; iter < fCluster->GetEntriesFast(); ++iter) {
+
+
+ AliTPCvtpr *iclus=(AliTPCvtpr *)fCluster->At(iter);
+
+
+
+
+
+ //for( std::vector<AliTPCvtpr*>::iterator iclus = fCluster.begin();
+
+
+ //iclus != fCluster.end(); ++iclus ) {
+
+
+ adc = (iclus)->GetAdc();
+
+
+ fADCcluster+=adc;
+
+
+ rX += ((iclus)->GetX() * adc);
+
+
+ rY += ((iclus)->GetY() * adc);
+
+
+ rT += ((iclus)->GetT() * adc);
+
+
+ }
+
+
+ fCenterX=rX/fADCcluster;
+
+
+ fCenterY=rY/fADCcluster;
+
+
+ fCenterT=rT/fADCcluster;
+
+
+
+
+
+ return;
+
+
+}
+
+
+
+
+
+void AliTPCclusterKr::SetPadRMS(){
+
+
+ //
+
+
+ // calculate RMS in pad direction
+
+
+ //
+
+
+ // TH1F *histo= new TH1F("","",200,0,200);
+
+
+ TArrayI *array= new TArrayI(fCluster->GetEntriesFast());
+
+
+ for(Int_t i=0;i<fCluster->GetEntriesFast();i++)
+
+
+ {
+
+
+ array->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetPad(),i);
+
+
+ //histo->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetPad() );
+
+
+ }
+
+
+ // fPadRMS=histo->GetRMS();
+
+
+ fPadRMS=TMath::RMS(array->GetSize(),array->GetArray());
+
+
+ // delete histo;
+
+
+ delete array;
+
+
+ return;
+
+
+}
+
+
+
+
+
+void AliTPCclusterKr::SetRowRMS(){
+
+
+ //
+
+
+ // calculate RMS in row direction
+
+
+ //
+
+
+ TArrayI *array= new TArrayI(fCluster->GetEntriesFast());
+
+
+ // TH1F *histo= new TH1F("","",120,0,120);
+
+
+ for(Int_t i=0;i<fCluster->GetEntriesFast();i++)
+
+
+ {
+
+
+ array->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetRow(),i);
+
+
+ // histo->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetRow() );
+
+
+ }
+
+
+ // fRowRMS=histo->GetRMS();
+
+
+ fRowRMS=TMath::RMS(array->GetSize(),array->GetArray());
+
+
+ // delete histo;
+
+
+ delete array;
+
+
+ return;
+
+
+}
+
+
+
+
+
+void AliTPCclusterKr::SetTimebinRMS(){
+
+
+ //
+
+
+ // calculate RMS in timebin direction
+
+
+ //
+
+
+ TArrayI *array= new TArrayI(fCluster->GetEntriesFast());
+
+
+ // TH1F *histo= new TH1F("","",1000,0,1000);
+
+
+ for(Int_t i=0;i<fCluster->GetEntriesFast();i++)
+
+
+ {
+
+
+ array->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetTime(),i);
+
+
+ // histo->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetTime() );
+
+
+ }
+
+
+ fTimebinRMS=TMath::RMS(array->GetSize(),array->GetArray());
+
+
+ //histo->GetRMS();
+
+
+ // delete histo;
+
+
+ delete array;
+
+
+ return;
+
+
+}
+
+
+
+
+
+void AliTPCclusterKr::SetRMS(){
+
+
+ //
+
+
+ // calculate RMS in pad,row,timebin direction
+
+
+ //
+
+
+ TArrayI *arrayPad = new TArrayI(fCluster->GetEntriesFast());
+
+
+ TArrayI *arrayRow = new TArrayI(fCluster->GetEntriesFast());
+
+
+ TArrayI *arrayTime= new TArrayI(fCluster->GetEntriesFast());
+
+
+ // TH1F *histoPad= new TH1F("p","p",200,0,200);
+
+
+ // TH1F *histoRow= new TH1F("r","r",120,0,120);
+
+
+ // TH1F *histoTime= new TH1F("t","t",1000,0,1000);
+
+
+ for(Int_t i=0;i<fCluster->GetEntriesFast();i++)
+
+
+ {
+
+
+ arrayPad->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetPad(),i);
+
+
+ arrayRow->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetRow(),i);
+
+
+ arrayTime->SetAt(((AliTPCvtpr *)(fCluster->At(i)))->GetTime(),i);
+
+
+
+
+
+ //histoPad->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetPad() );
+
+
+ //histoRow->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetRow() );
+
+
+ //histoTime->Fill( ((AliTPCvtpr *)(fCluster->At(i)))->GetTime() );
+
+
+ }
+
+
+ // fPadRMS=histoPad->GetRMS();
+
+
+ fPadRMS=TMath::RMS(arrayPad->GetSize(),arrayPad->GetArray());
+
+
+ fRowRMS=TMath::RMS(arrayRow->GetSize(),arrayRow->GetArray());
+
+
+ //histoRow->GetRMS();
+
+
+ fTimebinRMS=TMath::RMS(arrayTime->GetSize(),arrayTime->GetArray());
+
+
+ //histoTime->GetRMS();
+
+
+
+
+
+ delete arrayPad;
+
+
+ delete arrayRow;
+
+
+ delete arrayTime;
+
+
+ // delete histoPad;
+
+
+ // delete histoRow;
+
+
+ // delete histoTime;
+
+
+
+
+
+ return;
+
+
+}
+
+
+
+
+
+
+
+
+void AliTPCclusterKr::Set1D(){
+
+
+ //
+
+
+ //
+
+
+ //
+
+
+ Short_t maxTime=0;
+
+
+ Short_t minTime=1000;
+
+
+ Short_t maxPad=0;
+
+
+ Short_t minPad=1000;
+
+
+
+
+
+ for(Int_t i=0;i<fCluster->GetEntriesFast();i++)
+
+
+ {
+
+
+ if(((AliTPCvtpr *)(fCluster->At(i)))->GetPad()>maxPad)maxPad =((AliTPCvtpr *)(fCluster->At(i)))->GetPad();
+
+
+ if(((AliTPCvtpr *)(fCluster->At(i)))->GetPad()<minPad)minPad =((AliTPCvtpr *)(fCluster->At(i)))->GetPad();
+
+
+ if(((AliTPCvtpr *)(fCluster->At(i)))->GetTime()>maxTime)maxTime=((AliTPCvtpr *)(fCluster->At(i)))->GetTime();
+
+
+ if(((AliTPCvtpr *)(fCluster->At(i)))->GetTime()<minTime)minTime=((AliTPCvtpr *)(fCluster->At(i)))->GetTime();
+
+
+ }
+
+
+ fPads1D=maxPad-minPad+1;
+
+
+ fTimebins1D=maxTime-minTime+1;
+
+
+ return;
+
+
+}
+
+
-#ifndef ALITPCCLUSTERKR_H\r\r\r#define ALITPCCLUSTERKR_H\r\r\r/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r\r\r * See cxx source for full Copyright notice */\r\r\r\r\r\r/* $Id: AliTPCclusterKr.h,v 1.8 2008/01/22 16:07:15 matyja Exp $ */\r\r\r\r\r\r//-------------------------------------------------------\r\r\r// TPC Kr Cluster Class\r\r\r//\r\r\r// Origin: Adam Matyja, INP PAN, adam.matyja@ifj.edu.pl\r\r\r//-------------------------------------------------------\r\r\r\r\r\r#include "AliCluster.h"\r\r\r#include "TObjArray.h"\r\r\r#include "AliTPCvtpr.h"\r\r\r//#include "TH1F.h"\r\r\r#include "TMath.h"\r\r\r#include "TArrayI.h"\r\r\r\r\r\r//_____________________________________________________________________________\r\r\rclass AliTPCclusterKr: public AliCluster{\r\r\rpublic:\r\r\r AliTPCclusterKr();\r\r\r AliTPCclusterKr(const AliTPCclusterKr & param);//copy constructor\r\r\r AliTPCclusterKr &operator = (const AliTPCclusterKr & param); \r\r\r virtual ~AliTPCclusterKr();\r\r\r\r\r\r virtual void SetCenter();//set center of the cluster weighted by charge\r\r\r\r\r\r virtual void SetMax(AliTPCvtpr q){fMax=q;}//set values of max. in cluster\r\r\r virtual void SetADCcluster(Int_t q){fADCcluster=q;}\r\r\r virtual void SetSec(Short_t q){fSec=q;}\r\r\r virtual void SetNPads(Short_t q){fNPads=q;}\r\r\r virtual void SetNRows(Short_t q){fNRows=q;}\r\r\r virtual void SetSize(){fSize=fCluster->GetEntriesFast();}\r\r\r virtual void SetCenterX(Double_t q){fCenterX=q;}\r\r\r virtual void SetCenterY(Double_t q){fCenterY=q;}\r\r\r virtual void SetCenterT(Double_t q){fCenterT=q;}\r\r\r\r\r\r virtual void SetTimebins1D(Short_t q){fTimebins1D=q;}\r\r\r virtual void SetPads1D(Short_t q){fPads1D=q;}\r\r\r virtual void Set1D();\r\r\r virtual void SetPadRMS(Double_t q){fPadRMS=q;}\r\r\r virtual void SetRowRMS(Double_t q){fRowRMS=q;}\r\r\r virtual void SetTimebinRMS(Double_t q){fTimebinRMS=q;}\r\r\r virtual void SetPadRMS();\r\r\r virtual void SetRowRMS();\r\r\r virtual void SetTimebinRMS();\r\r\r virtual void SetRMS();\r\r\r virtual void SetTimeStamp(UInt_t timestamp){ fTimeStamp = timestamp; }\r virtual void SetRun(UInt_t run){ fRun = run; }\r\r\r //void AddDigitToCluster(AliTPCvtpr *q){fCluster.push_back(q);}\r\r\r virtual void AddDigitToCluster(AliTPCvtpr *q){\r\r\r fCluster->AddLast(q);\r\r\r //fCluster->Compress();\r\r\r }\r\r\r\r\r\r AliTPCvtpr GetMax() const {return fMax;}\r\r\r Int_t GetADCcluster() const {return fADCcluster;}\r\r\r Short_t GetSec() const {return fSec;}\r\r\r Short_t GetNPads() const {return fNPads;}\r\r\r Short_t GetNRows() const {return fNRows;}\r\r\r Short_t GetSize() const {return fSize;}\r\r\r\r\r\r Short_t GetTimebins1D(){return fTimebins1D;}\r\r\r Short_t GetPads1D(){return fPads1D;}\r\r\r Double_t GetPadRMS(){return fPadRMS;}\r\r\r Double_t GetRowRMS(){return fRowRMS;}\r\r\r Double_t GetTimebinRMS(){return fTimebinRMS;}\r\r\r\r\r\r Double_t GetCenterX() const {return fCenterX;}\r\r\r Double_t GetCenterY() const {return fCenterY;}\r\r\r Double_t GetCenterT() const {return fCenterT;}\r\r\r AliTPCvtpr *GetDigitFromCluster(Int_t i) const {return (AliTPCvtpr*)fCluster->At(i);}\r\r\r UInt_t GetTimeStamp() const {return fTimeStamp;}\r UInt_t GetRun() const {return fRun;}\r\r\r\r\r\rprivate:\r\r\r AliTPCvtpr fMax;//max (ADC,timebin,pad,row) in cluster\r\r\r Int_t fADCcluster; //ADC of cluster\r\r\r Short_t fSec; //sector of the cluster\r\r\r Short_t fNPads; //number of pads in cluster\r\r\r Short_t fNRows; //number of rows in cluster or row max - min\r\r\r\r\r\r Short_t fTimebins1D; //Timebin max - min\r\r\r Short_t fPads1D; //Pad max - min\r\r\r Double_t fPadRMS; //Pad RMS\r\r\r Double_t fRowRMS; //Row RMS\r\r\r Double_t fTimebinRMS; //Timebin RMS\r\r\r\r\r\r Short_t fSize; //size of vector\r\r\r Double_t fCenterX;// X coordinate of the cluster center in cm\r\r\r Double_t fCenterY;// Y coordinate of the cluster center in cm\r\r\r Double_t fCenterT;// time coordinate of the cluster center in timebins\r\r\r //std::vector< AliTPCvtpr*> fCluster;//cluster contents(adc,nt,np,nr)\r\r\r TObjArray *fCluster;//cluster contents(adc,nt,np,nr)\r\r\r UInt_t fTimeStamp; //time stamp from event header\r UInt_t fRun; //run from event header\r\r\r\r\r\r ClassDef(AliTPCclusterKr,8) // Time Projection Chamber Kr clusters\r\r\r};\r\r\r\r\r\r\r\r\r#endif\r\r\r\r\r\r\r\r\r
\ No newline at end of file
+#ifndef ALITPCCLUSTERKR_H
+
+
+#define ALITPCCLUSTERKR_H
+
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+
+
+ * See cxx source for full Copyright notice */
+
+
+
+
+
+/* $Id: AliTPCclusterKr.h,v 1.8 2008/01/22 16:07:15 matyja Exp $ */
+
+
+
+
+
+//-------------------------------------------------------
+
+
+// TPC Kr Cluster Class
+
+
+//
+
+
+// Origin: Adam Matyja, INP PAN, adam.matyja@ifj.edu.pl
+
+
+//-------------------------------------------------------
+
+
+
+
+
+#include "AliCluster.h"
+
+
+#include "TObjArray.h"
+
+
+#include "AliTPCvtpr.h"
+
+
+//#include "TH1F.h"
+
+
+#include "TMath.h"
+
+
+#include "TArrayI.h"
+
+
+
+
+
+//_____________________________________________________________________________
+
+
+class AliTPCclusterKr: public AliCluster{
+
+
+public:
+
+
+ AliTPCclusterKr();
+
+
+ AliTPCclusterKr(const AliTPCclusterKr & param);//copy constructor
+
+
+ AliTPCclusterKr &operator = (const AliTPCclusterKr & param);
+
+
+ virtual ~AliTPCclusterKr();
+
+
+
+
+
+ virtual void SetCenter();//set center of the cluster weighted by charge
+
+
+
+
+
+ virtual void SetMax(AliTPCvtpr q){fMax=q;}//set values of max. in cluster
+
+
+ virtual void SetADCcluster(Int_t q){fADCcluster=q;}
+
+
+ virtual void SetSec(Short_t q){fSec=q;}
+
+
+ virtual void SetNPads(Short_t q){fNPads=q;}
+
+
+ virtual void SetNRows(Short_t q){fNRows=q;}
+
+
+ virtual void SetSize(){fSize=fCluster->GetEntriesFast();}
+
+
+ virtual void SetCenterX(Double_t q){fCenterX=q;}
+
+
+ virtual void SetCenterY(Double_t q){fCenterY=q;}
+
+
+ virtual void SetCenterT(Double_t q){fCenterT=q;}
+
+
+
+
+
+ virtual void SetTimebins1D(Short_t q){fTimebins1D=q;}
+
+
+ virtual void SetPads1D(Short_t q){fPads1D=q;}
+
+
+ virtual void Set1D();
+
+
+ virtual void SetPadRMS(Double_t q){fPadRMS=q;}
+
+
+ virtual void SetRowRMS(Double_t q){fRowRMS=q;}
+
+
+ virtual void SetTimebinRMS(Double_t q){fTimebinRMS=q;}
+
+
+ virtual void SetPadRMS();
+
+
+ virtual void SetRowRMS();
+
+
+ virtual void SetTimebinRMS();
+
+
+ virtual void SetRMS();
+
+
+ virtual void SetTimeStamp(UInt_t timestamp){ fTimeStamp = timestamp; }
+ virtual void SetRun(UInt_t run){ fRun = run; }
+
+
+ //void AddDigitToCluster(AliTPCvtpr *q){fCluster.push_back(q);}
+
+
+ virtual void AddDigitToCluster(AliTPCvtpr *q){
+
+
+ fCluster->AddLast(q);
+
+
+ //fCluster->Compress();
+
+
+ }
+
+
+
+
+
+ AliTPCvtpr GetMax() const {return fMax;}
+
+
+ Int_t GetADCcluster() const {return fADCcluster;}
+
+
+ Short_t GetSec() const {return fSec;}
+
+
+ Short_t GetNPads() const {return fNPads;}
+
+
+ Short_t GetNRows() const {return fNRows;}
+
+
+ Short_t GetSize() const {return fSize;}
+
+
+
+
+
+ Short_t GetTimebins1D(){return fTimebins1D;}
+
+
+ Short_t GetPads1D(){return fPads1D;}
+
+
+ Double_t GetPadRMS(){return fPadRMS;}
+
+
+ Double_t GetRowRMS(){return fRowRMS;}
+
+
+ Double_t GetTimebinRMS(){return fTimebinRMS;}
+
+
+
+
+
+ Double_t GetCenterX() const {return fCenterX;}
+
+
+ Double_t GetCenterY() const {return fCenterY;}
+
+
+ Double_t GetCenterT() const {return fCenterT;}
+
+
+ AliTPCvtpr *GetDigitFromCluster(Int_t i) const {return (AliTPCvtpr*)fCluster->At(i);}
+
+
+ UInt_t GetTimeStamp() const {return fTimeStamp;}
+ UInt_t GetRun() const {return fRun;}
+
+
+
+
+
+private:
+
+
+ AliTPCvtpr fMax;//max (ADC,timebin,pad,row) in cluster
+
+
+ Int_t fADCcluster; //ADC of cluster
+
+
+ Short_t fSec; //sector of the cluster
+
+
+ Short_t fNPads; //number of pads in cluster
+
+
+ Short_t fNRows; //number of rows in cluster or row max - min
+
+
+
+
+
+ Short_t fTimebins1D; //Timebin max - min
+
+
+ Short_t fPads1D; //Pad max - min
+
+
+ Double_t fPadRMS; //Pad RMS
+
+
+ Double_t fRowRMS; //Row RMS
+
+
+ Double_t fTimebinRMS; //Timebin RMS
+
+
+
+
+
+ Short_t fSize; //size of vector
+
+
+ Double_t fCenterX;// X coordinate of the cluster center in cm
+
+
+ Double_t fCenterY;// Y coordinate of the cluster center in cm
+
+
+ Double_t fCenterT;// time coordinate of the cluster center in timebins
+
+
+ //std::vector< AliTPCvtpr*> fCluster;//cluster contents(adc,nt,np,nr)
+
+
+ TObjArray *fCluster;//cluster contents(adc,nt,np,nr)
+
+
+ UInt_t fTimeStamp; //time stamp from event header
+ UInt_t fRun; //run from event header
+
+
+
+
+
+ ClassDef(AliTPCclusterKr,8) // Time Projection Chamber Kr clusters
+
+
+};
+
+
+
+
+
+
+
+
+#endif
+
+
+
+
+
+
+
+