ClassImp(AliITSPid)
-AliITSPid::AliITSPid(const AliITSPid &source) : TObject(source){
+AliITSPid::AliITSPid(const AliITSPid &source) : TObject(source),
+fMxtrs(source.fMxtrs),
+fTrs(source.fTrs),
+fWpi(source.fWpi),
+fWk(source.fWk),
+fWp(source.fWp),
+fRpik(source.fRpik),
+fRppi(source.fRppi),
+fRpka(source.fRpka),
+fRp(source.fRp),
+fPcode(source.fPcode),
+fSigmin(source.fSigmin),
+fSilent(source.fSilent),
+fCutKa(source.fCutKa),
+fCutPr(source.fCutPr),
+fggpi(source.fggpi),
+fggka(source.fggka),
+fggpr(source.fggpr){
// Copy constructor. This is a function which is not allowed to be
- // done: protected It exits with an error.
- // Inputs:
- // AliITSPid &source An AliITSPid class.
- // Outputs:
- // none.
- // Return:
- // none.
- Error("AliITSPid","You are not allowed to make a copy of the AliITSPid\n");
+
}
+
//______________________________________________________________________
-AliITSPid& AliITSPid::operator=(const AliITSPid& /* source */){
- // Assignment operator. This is a function which is not allowed to be
- // done to the ITS. It exits with an error.
- // Inputs:
- // AliITSPid &source An AliITSPid class.
- // Outputs:
- // none.
- // Return:
- // none.
-
- Error("=operator","Assignment operator not allowed for this class\n");
+AliITSPid& AliITSPid::operator=(const AliITSPid& source){
+ // Assignment operator. This is a function which is not allowed to be
+ this->~AliITSPid();
+ new(this) AliITSPid(source);
return *this;
}
if(track==0)return 0;
// track->Propagate(track->GetAlpha(),3.,0.1/65.19*1.848,0.1*1.848);
track->PropagateTo(3.,0.0028,65.19);
- track->PropagateToVertex();
+ //track->PropagateToVertex(); Not needed. (I.B.)
Double_t xk,par[5]; track->GetExternalParameters(xk,par);
Float_t lam=TMath::ATan(par[3]);
Float_t pt1=TMath::Abs(par[4]);
else{return Proton();}
}
}
- if ( pm<=0.750 )
- if ( q>fCutPr->Eval(pm) )
- {return Proton();} else {return Wpik(pm,q);};
+ if ( pm<=0.750 ){
+ if ( q>fCutPr->Eval(pm) ){
+ return Proton();
+ }
+ else {
+ return Wpik(pm,q);
+ }
+ }
if( pm<=1.10 ){ return Wpikp(pm,q); }
return fPcode;
}
void AliITSPid::Tab(void)
{
//Make PID for tracks stored in tracks table
-if(fTrs->GetEntries()==0){cout<<"No entries in TAB"<<endl;return;}
-cout<<"------------------------------------------------------------------------"<<endl;
-cout<<"Nq"<<" q1 "<<" q2 "<<" q3 "<<" q4 "<<" q5 "<<
- " Qtrm " <<" Wpi "<<" Wk "<<" Wp "<<"Pmom "<<endl;
-cout<<"------------------------------------------------------------------------"<<endl;
-for(Int_t i=0;i<fTrs->GetEntries();i++)
-{
- TVector xx( *((TVector*)fTrs->At(i)) );
- if( xx.IsValid() && xx(0)>0 )
+ if(fTrs->GetEntries()==0){cout<<"No entries in TAB"<<endl;return;}
+ cout<<"------------------------------------------------------------------------"<<endl;
+ cout<<"Nq"<<" q1 "<<" q2 "<<" q3 "<<" q4 "<<" q5 "<<
+ " Qtrm " <<" Wpi "<<" Wk "<<" Wp "<<"Pmom "<<endl;
+ cout<<"------------------------------------------------------------------------"<<endl;
+ for(Int_t i=0;i<fTrs->GetEntries();i++)
+ {
+ TVector xxx( *((TVector*)fTrs->At(i)) );
+ if( xxx.IsValid() && xxx(0)>0 )
{
- TVector xx( *((TVector*)fTrs->At(i)) );
- if(xx(0)>=2)
- {
-// 1)Calculate Qtrm
- xx(6)=(this->Qtrm(i));
+ TVector xx( *((TVector*)fTrs->At(i)) );
+ if(xx(0)>=2)
+ {
+ // 1)Calculate Qtrm
+ xx(6)=(this->Qtrm(i));
- }else{
- xx(6)=xx(1);
- }
-// 2)Calculate Wpi,Wk,Wp
- this->GetPcode(xx(6),xx(10)/1000.);
- xx(7)=GetWpi();
- xx(8)=GetWk();
- xx(9)=GetWp();
-// 3)Print table
- if(xx(0)>0){
-// cout<<xx(0)<<" ";
- for(Int_t j=1;j<11;j++){
- if(i<7){ cout.width(7);cout.precision(4);cout<<xx(j);}
- if(i>7){ cout.width(7);cout.precision(5);cout<<xx(j);}
- }
- cout<<endl;
- }
-// 4)Update data in TVector
- TClonesArray &arr=*fTrs;
- new(arr[i])TVector(xx);
+ }else{
+ xx(6)=xx(1);
+ }
+ // 2)Calculate Wpi,Wk,Wp
+ this->GetPcode(xx(6),xx(10)/1000.);
+ xx(7)=GetWpi();
+ xx(8)=GetWk();
+ xx(9)=GetWp();
+ // 3)Print table
+ if(xx(0)>0){
+ // cout<<xx(0)<<" ";
+ for(Int_t j=1;j<11;j++){
+ if(i<7){ cout.width(7);cout.precision(4);cout<<xx(j);}
+ if(i>7){ cout.width(7);cout.precision(5);cout<<xx(j);}
+ }
+ cout<<endl;
+ }
+ // 4)Update data in TVector
+ TClonesArray &arr=*fTrs;
+ new(arr[i])TVector(xx);
}
- else
- {/*cout<<"No data for track "<<i<<endl;*/}
-}// End loop for tracks
+ else
+ {/*cout<<"No data for track "<<i<<endl;*/}
+ }// End loop for tracks
}
void AliITSPid::Reset(void)
{
}
}
//-----------------------------------------------------------
-AliITSPid::AliITSPid(Int_t ntrack)
-{
+AliITSPid::AliITSPid(Int_t ntrack):
+fMxtrs(0),
+fTrs(0),
+fWpi(0),
+fWk(0),
+fWp(0),
+fRpik(0),
+fRppi(0),
+fRpka(0),
+fRp(0),
+fPcode(0),
+fSigmin(0.01),
+fSilent(0),
+fCutKa(0),
+fCutPr(0),
+fggpi(0),
+fggka(0),
+fggpr(0){
//Constructor for AliITSPid class
- fSigmin=0.01;
+
fTrs = new TClonesArray("TVector",ntrack);
TClonesArray &arr=*fTrs;
for(Int_t i=0;i<ntrack;i++)new(arr[i])TVector(0,11);
- fMxtrs=0;
- //
+ //
fCutKa=new TF1("fcutka","pol4",0.05,0.4);
Double_t ka[5]={25.616, -161.59, 408.97, -462.17, 192.86};
fCutKa->SetParameters(ka);