#include "TChain.h"
#include "TTree.h"
#include "TH2F.h"
+#include "TF1.h"
#include "TMath.h"
#include "TCanvas.h"
#include "THnSparse.h"
,fMomDtoE(0)
,fLabelCheck(0)
,fgeoFake(0)
+ ,ftimingEle(0)
{
//Named constructor
,fMomDtoE(0)
,fLabelCheck(0)
,fgeoFake(0)
+ ,ftimingEle(0)
{
//Default constructor
fPID = new AliHFEpid("hfePid");
Int_t label = TMath::Abs(track->GetLabel());
mcLabel = track->GetLabel();
- //if(mcLabel>-1)
+ if(mcLabel>-1)
{
Bool_t MChijing = fMC->IsFromBGEvent(label);
}
}
+ //cout << "===================="<<endl;
+ //cout << "mcDtoE : " << mcDtoE << endl;
+ //cout << "mcBtoE : " << mcBtoE << endl;
+ //cout << "mcPho : " << mcPho << endl;
+
+ if(fabs(mcpid)==11)mcele= 0.;
+ //cout << "check e: " << mcele << endl;
if(fabs(mcpid)==11 && mcDtoE)mcele= 1.;
+ //cout << "check D->e: " << mcele << endl;
if(fabs(mcpid)==11 && mcBtoE)mcele= 2.;
+ //cout << "check B->e: " << mcele << endl;
if(fabs(mcpid)==11 && mcPho)mcele= 3.;
+ //cout << "check Pho->e: " << mcele << endl;
+ cout << "check PID " << endl;
+ if(fabs(mcpid)!=11)
+ {
+ cout << "!= 11" << endl;
+ cout << mcpid << endl;
+ }
+ if(mcele==-1)
+ {
+ cout << "mcele==-1" << endl;
+ cout << mcele << endl;
+ cout << mcpid << endl;
+ }
+
} // end of mcLabel>-1
} // end of MC info.
eta = track->Eta();
dEdx = track->GetTPCsignal();
fTPCnSigma = fPID->GetPIDResponse() ? fPID->GetPIDResponse()->NumberOfSigmasTPC(track, AliPID::kElectron) : 1000;
- if(mcLabel==-1) // nsigma mean correction
- {
- double mean_corr = NsigCorr(cent);
- printf("correction %f\n",mean_corr);
- fTPCnSigma -= mean_corr;
- }
double ncells = -1.0;
double m20 = -1.0;
double rmatch = -1.0;
double nmatch = -1.0;
double oppstatus = 0.0;
+ double emctof = 0.0;
Bool_t fFlagPhotonicElec = kFALSE;
Bool_t fFlagConvinatElec = kFALSE;
double clustE = clust->E();
eop = clustE/fabs(mom);
+ cout << "eop org = "<< eop << endl;
+ if(mcLabel>-1.0)
+ {
+ double mceopcorr = MCEopMeanCorrection(pt,cent);
+ eop += mceopcorr;
+ }
+ cout << "eop corr = " << eop << endl;
+
//double clustT = clust->GetTOF();
ncells = clust->GetNCells();
m02 = clust->GetM02();
double deleta = clust->GetTrackDz();
rmatch = sqrt(pow(delphi,2)+pow(deleta,2));
nmatch = clust->GetNTracksMatched();
+ emctof = clust->GetTOF();
+ //cout << "emctof = " << emctof << endl;
if(fTPCnSigma>-1.5 && fTPCnSigma<3.0)
{
if(m20>0.0 && m20<0.3)
{
- fIncpTM20->Fill(cent,pt);
+ fIncpTM20->Fill(cent,pt);
+ ftimingEle->Fill(pt,emctof);
if(fFlagPhotonicElec) fPhoElecPtM20->Fill(cent,pt);
if(fFlagConvinatElec) fSameElecPtM20->Fill(cent,pt);
}
fgeoFake = new TH2D("fgeoFake","Label==0 eta and phi",628,0,6.28,200,-1,1);
fOutputList->Add(fgeoFake);
+ ftimingEle = new TH2D("ftimingEle","electron TOF",100,0,20,100,1e-7,1e-6);
+ fOutputList->Add(ftimingEle);
+
PostData(1,fOutputList);
}
// part 2 go through the clusters here -----------------------------------
//cout << " part 2 go through the clusters here ----------------------------------- " << endl;
Int_t nCluster=0, nCell=0, iCell=0, gCell=0;
- Short_t cellAddr, nSACell, mclabel;
+ Short_t cellAddr, nSACell;
+ Int_t mclabel;
//Int_t nSACell, iSACell, mclabel;
Int_t iSACell;
Double_t cellAmp=0, cellTimeT=0, clusterTime=0, efrac=0;
}
-double AliAnalysisTaskHFECal::NsigCorr(float cent)
+double AliAnalysisTaskHFECal::MCEopMeanCorrection(double pTmc, float central)
{
+ TF1 *fcorr0 = new TF1("fcorr0","[0]*tanh([1]+[2]*x)");
+ TF1 *fcorr1 = new TF1("fcorr1","[0]*tanh([1]+[2]*x)");
+
double shift = 0.0;
- if(cent>=20 && cent<30)shift = 0.156;
- if(cent>=30 && cent<40)shift = 0.316;
- if(cent>=40 && cent<50)shift = 0.336;
- if(cent>=50 && cent<70)shift = 0.440;
- if(cent>=70 && cent<90)shift = 0.534;
+
+ if(central>0 && central<=10)
+ {
+ fcorr0->SetParameters(1.045,1.288,3.18e-01); //
+ fcorr1->SetParameters(9.91e-01,3.466,2.344);
+ }
+
+ if(central>10 && central<=20)
+ {
+ fcorr0->SetParameters(1.029,8.254e-01,4.07e-01);
+ fcorr1->SetParameters(0.975,2.276,1.501e-01);
+ }
+ else if(central>20 && central<=30)
+ {
+ fcorr0->SetParameters(1.01,8.795e-01,3.904e-01);
+ fcorr1->SetParameters(9.675e-01,1.654,2.583e-01);
+ }
+ else if(central>30 && central<=40)
+ {
+ fcorr0->SetParameters(1.00,1.466,2.305e-1);
+ fcorr1->SetParameters(9.637e-01,1.473,2.754e-01);
+ }
+ else if(central>40 && central<=50)
+ {
+ fcorr0->SetParameters(1.00,1.422,1.518e-01);
+ fcorr1->SetParameters(9.59e-01,1.421,2.931e-01);
+ }
+
+ else if(central>50 && central<=70)
+ {
+ fcorr0->SetParameters(0.989,2.495,2.167);
+ fcorr1->SetParameters(0.961e-1,1.734,1.438e-01);
+ }
+ else if(central>70 && central<=100)
+ {
+ fcorr0->SetParameters(0.981,-3.373,3.93327);
+ fcorr1->SetParameters(9.574e-01,1.698,1.58e-01);
+ }
+
+
+ shift = fcorr0->Eval(pTmc)-fcorr1->Eval(pTmc);
+
return shift;
}