From: schutz Date: Thu, 18 Jul 2002 14:20:35 +0000 (+0000) Subject: added a data member that decides at which energyto switch from one PCA analysis to... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=6f969528b1fd2f3f4aa1969ba16669727d2a8305;hp=64c4ea9969effb50a871bf68ca0e0eeb2495bf12 added a data member that decides at which energyto switch from one PCA analysis to the other --- diff --git a/PHOS/AliPHOSPIDv1.cxx b/PHOS/AliPHOSPIDv1.cxx index 09f2d3fa888..574b7b70942 100644 --- a/PHOS/AliPHOSPIDv1.cxx +++ b/PHOS/AliPHOSPIDv1.cxx @@ -80,9 +80,9 @@ // --- Standard library --- -#include -#include -#include +#include +#include +#include // --- AliRoot header files --- @@ -136,9 +136,9 @@ AliPHOSPIDv1::~AliPHOSPIDv1() delete [] fX ; // Principal input delete [] fP ; // Principal components - delete fParameters ; // Matrix of Parameters - delete fParameters5 ; // Matrix of Parameters - delete fParameters100 ; // Matrix of Parameters +// delete fParameters ; // Matrix of Parameters +// delete fParameters5 ; // Matrix of Parameters +// delete fParameters100 ; // Matrix of Parameters if (!fDefaultInit) { @@ -504,12 +504,13 @@ void AliPHOSPIDv1::SetParameters() // for the principal file from 0.5-5 GeV and for the other one P1(95%,79%), // P2(89%,90%) and P3(72%,96%) + fEnergyAnalysisCut = 5.; // Energy cut to change PCA fParameters5 = new TMatrixD(21,3) ; fParameters100 = new TMatrixD(22,3) ; fParameters = new TMatrixD(22,3) ; - ifstream paramFile5(fFileNamePar5, ios::in) ; + ifstream paramFile5(fFileNamePar5, ios_base::out) ; Int_t i,j ; @@ -520,7 +521,7 @@ void AliPHOSPIDv1::SetParameters() } paramFile5.close(); - ifstream paramFile100(fFileNamePar100, ios::in) ; + ifstream paramFile100(fFileNamePar100, ios_base::out) ; Int_t l,k ; @@ -531,7 +532,7 @@ void AliPHOSPIDv1::SetParameters() } paramFile100.close(); - ifstream paramFile(fFileNamePar100, ios::in) ; + ifstream paramFile(fFileNamePar100, ios_base::out) ; Int_t h,n; for(h = 0; h< 22; h++){ for(n = 0; n< 3; n++){ @@ -554,7 +555,7 @@ void AliPHOSPIDv1::SetParameters() //_____________________________________________________________________________ void AliPHOSPIDv1::GetAnalysisParameters(Float_t Cluster_En) { - if(Cluster_En <= 5.){ + if(Cluster_En <= fEnergyAnalysisCut){ fPrincipal = fPrincipal5; fParameters = fParameters5; fMatrixExtraRow = 0; @@ -573,7 +574,7 @@ void AliPHOSPIDv1::GetClusterOption(const Float_t Cluster_En, const Bool_t rang { // Gives the cluster energy range. - // range = kFALSE Default analisys range from 0.5 to 5 GeV + // range = kFALSE Default analysis range from 0.5 to 5 GeV // range = kTRUE analysis range from 0.5 to 100 GeV @@ -753,23 +754,20 @@ void AliPHOSPIDv1::MakeRecParticles(){ // Choose the cluster energy range Float_t e = emc->GetEnergy() ; - - - GetAnalysisParameters(e); - + + GetAnalysisParameters(e);// Gives value to fCluster, fClusterrcpv, fMatrixExtraRow, and to fPrincipal and fParameters depending on the energy. + if((fCluster== -1)||(fClusterrcpv == -1)) continue ; - // Ellipse and rcpv cut in function of the cluster energy + Float_t lambda[2] ; + emc->GetElipsAxis(lambda) ; + Float_t time =emc->GetTime() ; - // Loop of Efficiency-Purity (the 3 points of purity or efficiency are taken - // into account to set the particle identification) - for(Int_t eff_pur = 0; eff_pur < 3 ; eff_pur++){ - - Float_t lambda[2] ; - emc->GetElipsAxis(lambda) ; - Float_t time =emc->GetTime() ; + if((lambda[0]>0.01) && (lambda[1]>0.01) && time > 0.){ - if((lambda[0]>0.01) && (lambda[1]>0.01) && time > 0.){ + // Loop of Efficiency-Purity (the 3 points of purity or efficiency are taken + // into account to set the particle identification) + for(Int_t eff_pur = 0; eff_pur < 3 ; eff_pur++){ // Looking at the CPV detector. If RCPV greater than CpvEmcDistance, 1st, // 2nd or 3rd bit (depending on the efficiency-purity point )is set to 1 . diff --git a/PHOS/AliPHOSPIDv1.h b/PHOS/AliPHOSPIDv1.h index db2b7054216..704b630b5f0 100644 --- a/PHOS/AliPHOSPIDv1.h +++ b/PHOS/AliPHOSPIDv1.h @@ -74,6 +74,10 @@ public: void SetBCalParameter(Float_t b) { fBCalParameter = b ;} void SetCCalParameter(Float_t c) { fCCalParameter = c ;} + + Float_t GetEnergyAnalysisCut() {return fEnergyAnalysisCut ;} + void SetEnergyAnalysisCut(Float_t e) { fEnergyAnalysisCut = e ;} + virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;} virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;} virtual const char * Version() const { return "pid-v1" ; } @@ -130,7 +134,7 @@ public: TMatrixD * fParameters5 ; //! Matrix of identification Parameters 0.5 to 5 GeV TMatrixD * fParameters100 ; //! Matrix of identification Parameters 5-100 GeV TMatrixD * fParameters; //! Matrix copy of identification Parameters - + Float_t fEnergyAnalysisCut; // Energy to change from one PCA to the other. Int_t fCluster; // Cluster energy range to choose parameters Int_t fClusterrcpv; // Cluster energy range to choos rcpv parameters Int_t fMatrixExtraRow; // Different size of the parameters file. Depends on range @@ -139,7 +143,7 @@ public: Float_t fBCalParameter ;// B parameter energy calibration Encal=A+B*En+C*En^2 Float_t fCCalParameter ;// B parameter energy calibration Encal=A+B*En+C*En^2 - ClassDef( AliPHOSPIDv1,4) // Particle identifier implementation version 1 + ClassDef( AliPHOSPIDv1,5) // Particle identifier implementation version 1 };