pid->SetPIDtype(AliSpectraBothPID::kNSigmaTPC);\r
else if (pidmethod==1)\r
pid->SetPIDtype(AliSpectraBothPID::kNSigmaTOF);\r
- else \r
- pid->SetPIDtype(AliSpectraBothPID::kNSigmaTPCTOF);\r
+ else if (pidmethod==2) \r
+ pid->SetPIDtype(AliSpectraBothPID::kNSigmacircleTPCTOF);\r
+ else \r
+ pid->SetPIDtype(AliSpectraBothPID::kNSigmasquareTPCTOF); \r
\r
AliSpectraBothTrackCuts * trcuts = new AliSpectraBothTrackCuts("Track Cuts"); \r
trcuts->SetDCA(DCA);\r
#include "TLegend.h"\r
#include "TH1F.h"\r
#include "TH2F.h"\r
+#include "TH3F.h"\r
#include "TCanvas.h"\r
#include "AliAnalysisTask.h"\r
#include "AliAnalysisManager.h"\r
if (!fEventCuts) AliFatal("Event Cuts should be set in the steering macro");\r
if (!fPID) AliFatal("PID object should be set in the steering macro");\r
fTrackCuts->SetAliESDtrackCuts(fCuts);\r
+ fEventCuts->InitHisto();\r
+ fTrackCuts->InitHisto();\r
+\r
PostData(1, fHistMan );\r
PostData(2, fEventCuts);\r
PostData(3, fTrackCuts);\r
PostData(4, fPID );\r
-\r
}\r
//________________________________________________________________________\r
void AliAnalysisTaskSpectraBoth::UserExec(Option_t *)\r
// main event loop\r
Int_t ifAODEvent=AliSpectraBothTrackCuts::kotherobject;\r
fAOD = dynamic_cast<AliVEvent*>(InputEvent());\r
- \r
// AliESDEvent* esdevent=0x0;\r
// AliAODEvent* aodevent=0x0;\r
\r
AliFatal("Not processing AODs or ESDS") ;\r
if(fdotheMCLoopAfterEventCuts)\r
if(!fEventCuts->IsSelected(fAOD,fTrackCuts))return;//event selection\r
- \r
- \r
TClonesArray *arrayMC = 0;\r
Int_t npar=0;\r
AliStack* stack=0x0;\r
}\r
if(!fdotheMCLoopAfterEventCuts)\r
if(!fEventCuts->IsSelected(fAOD,fTrackCuts,fIsMC,mcZ))return;//event selection\r
-\r
//main loop on tracks\r
Int_t ntracks=0;\r
//cout<<fAOD->GetNumberOfTracks()<<endl;\r
AliAODTrack* aodtrack=0;\r
AliESDtrack* esdtrack=0;\r
Float_t dca=-999.;\r
+ Float_t dcaz=-999.;\r
+ Short_t ncls=-1; \r
+ Float_t chi2perndf=-1.0;\r
if(ifAODEvent==AliSpectraBothTrackCuts::kESDobject)\r
{\r
esdtrack=dynamic_cast<AliESDtrack*>(track);\r
if(!esdtrack)\r
continue;\r
- Float_t dcaz=0.0;\r
esdtrack->GetImpactParameters(dca,dcaz);\r
+ ncls=esdtrack->GetTPCNcls();\r
+ if ( ncls > 5) \r
+ chi2perndf=(esdtrack->GetTPCchi2()/Float_t(ncls - 5));\r
+ \r
+ else \r
+ chi2perndf=-1;\r
+ \r
}\r
else if (ifAODEvent==AliSpectraBothTrackCuts::kAODobject)\r
{\r
if(!aodtrack)\r
continue; \r
dca=aodtrack->DCA();\r
+ dcaz=aodtrack->ZAtDCA();\r
+ ncls=aodtrack->GetTPCNcls();\r
+ chi2perndf=aodtrack->Chi2perNDF();\r
}\r
else\r
continue;\r
if(!isDCA)\r
d[0]=-999.;\r
dca=d[0];\r
+ dcaz=d[1]; \r
}\r
+ \r
fHistMan->GetPtHistogram(kHistPtRec)->Fill(track->Pt(),dca); // PT histo\r
// get identity and charge\r
Bool_t rec[3]={false,false,false};\r
\r
// Fill histograms, only if inside y and nsigma acceptance\r
if(idRec != kSpUndefined && fTrackCuts->CheckYCut ((BothParticleSpecies_t)idRec))\r
+ {\r
fHistMan->GetHistogram2D(kHistPtRecSigma,idRec,charge)->Fill(track->Pt(),dca);\r
+ fTrackCuts->GetHistoDCAzQA()->Fill(idRec,track->Pt(),dcaz);\r
+ fTrackCuts->GetHistoNclustersQA()->Fill(idRec,track->Pt(),ncls);\r
+ fTrackCuts->GetHistochi2perNDFQA()->Fill(idRec,track->Pt(),chi2perndf);\r
+ }\r
//can't put a continue because we still have to fill allcharged primaries, done later\r
\r
/* MC Part */\r
// cout<<" functions "<<partMC->IsPhysicalPrimary()<<" "<<partMC->IsSecondaryFromWeakDecay()<<" "<<partMC->IsSecondaryFromMaterial()<<endl;\r
\r
if (isPrimary&&irec==kSpPion)\r
- fHistMan->GetPtHistogram(kHistPtRecPrimaryAll)->Fill(track->Pt(),dca); // PT histo of primaries\r
+ fHistMan->GetPtHistogram(kHistPtRecPrimaryAll)->Fill(track->Pt(),dca); // PT histo of reconstrutsed primaries in defined eta\r
\r
//nsigma cut (reconstructed nsigma)\r
if(idRec == kSpUndefined) \r
\r
// Get true ID\r
\r
- //if(TMath::Abs(partMC->Y()) > fTrackCuts->GetY() ) continue; // FIXME: do we need a rapidity cut on the generated?\r
- // Fill histograms for primaries\r
\r
if (idRec == idGen) fHistMan->GetHistogram2D(kHistPtRecTrue, idGen, charge)->Fill(track->Pt(),dca); \r
\r
\r
\r
} // end loop on tracks\r
+\r
// cout<< ntracks<<endl;\r
fHistMan->GetGenMulvsRawMulHistogram("hHistGenMulvsRawMul")->Fill(npar,ntracks);\r
PostData(1, fHistMan );\r
AliSpectraBothEventCuts::AliSpectraBothEventCuts(const char *name) : TNamed(name, "AOD Event Cuts"), fAOD(0),fAODEvent(AliSpectraBothTrackCuts::kAODobject), fTrackBits(0),fIsMC(0),fCentEstimator(""), fUseCentPatchAOD049(0), fUseSDDPatchforLHC11a(kDoNotCheckforSDD),fTriggerSettings(AliVEvent::kMB),fTrackCuts(0),
fIsSelected(0), fCentralityCutMin(0), fCentralityCutMax(0), fQVectorCutMin(0), fQVectorCutMax(0), fVertexCutMin(0), fVertexCutMax(0), fMultiplicityCutMin(0), fMultiplicityCutMax(0),fMaxChi2perNDFforVertex(0),
+fMinRun(0),fMaxRun(0),
fHistoCuts(0),fHistoVtxBefSel(0),fHistoVtxAftSel(0),fHistoEtaBefSel(0),fHistoEtaAftSel(0),fHistoNChAftSel(0),fHistoQVector(0)
-,fHistoEP(0),fHistoVtxAftSelwithoutZvertexCut(0),fHistoVtxalltriggerEventswithMCz(0),fHistoVtxAftSelwithoutZvertexCutusingMCz(0)
+,fHistoEP(0),fHistoVtxAftSelwithoutZvertexCut(0),fHistoVtxalltriggerEventswithMCz(0),fHistoVtxAftSelwithoutZvertexCutusingMCz(0),fHistoRunNumbers(0)
{
// Constructori
- Bool_t oldStatus = TH1::AddDirectoryStatus();
- TH1::AddDirectory(kFALSE);
- fHistoCuts = new TH1I("fEventCuts", "Event Cuts", kNVtxCuts, -0.5, kNVtxCuts - 0.5);
- fHistoVtxBefSel = new TH1F("fHistoVtxBefSel", "Vtx distr before event selection",300,-15,15);
- fHistoVtxAftSel = new TH1F("fHistoVtxAftSel", "Vtx distr after event selection",300,-15,15);
- fHistoVtxAftSelwithoutZvertexCut=new TH1F("fHistoVtxAftSelwithoutZvertexcut", "Vtx distr after event selection without Z vertex cut",300,-15,15);
- fHistoVtxalltriggerEventswithMCz=new TH1F("fHistoVtxalltriggerEventswithMCz", "generated z vertex position",300,-15,15);
- fHistoVtxAftSelwithoutZvertexCutusingMCz=new TH1F("fHistoVtxAftSelwithoutZvertexCutusingMCz", "Vtx distr after event selection without Z vertex cut using MC z",300,-15,15);
- fHistoEtaBefSel = new TH1F("fHistoEtaBefSel", "Eta distr before event selection",500,-2,2);
- fHistoEtaAftSel = new TH1F("fHistoEtaAftSel", "Eta distr after event selection",500,-2,2);
- fHistoNChAftSel = new TH1F("fHistoNChAftSel", "NCh distr after event selection",2000,-0.5,1999.5);
+ // Bool_t oldStatus = TH1::AddDirectoryStatus();
+ //TH1::AddDirectory(kFALSE);
+ // fHistoCuts = new TH1I("fEventCuts", "Event Cuts", kNVtxCuts, -0.5, kNVtxCuts - 0.5);
+ // fHistoVtxBefSel = new TH1F("fHistoVtxBefSel", "Vtx distr before event selection",300,-15,15);
+// fHistoVtxAftSel = new TH1F("fHistoVtxAftSel", "Vtx distr after event selection",300,-15,15);
+// fHistoVtxAftSelwithoutZvertexCut=new TH1F("fHistoVtxAftSelwithoutZvertexcut", "Vtx distr after event selection without Z vertex cut",300,-15,15);
+// fHistoVtxalltriggerEventswithMCz=new TH1F("fHistoVtxalltriggerEventswithMCz", "generated z vertex position",300,-15,15);
+// fHistoVtxAftSelwithoutZvertexCutusingMCz=new TH1F("fHistoVtxAftSelwithoutZvertexCutusingMCz", "Vtx distr after event selection without Z vertex cut using MC z",300,-15,15);
+// fHistoEtaBefSel = new TH1F("fHistoEtaBefSel", "Eta distr before event selection",500,-2,2);
+// fHistoEtaAftSel = new TH1F("fHistoEtaAftSel", "Eta distr after event selection",500,-2,2);
+ // fHistoNChAftSel = new TH1F("fHistoNChAftSel", "NCh distr after event selection",2000,-0.5,1999.5);
//fHistoQVectorPos = new TH1F("fHistoQVectorPos", "QVectorPos distribution",100,0,10);
//fHistoQVectorNeg = new TH1F("fHistoQVectorNeg", "QVectorNeg distribution",100,0,10);
- fHistoQVector = new TH1F("fHistoQVector", "QVector with VZERO distribution",100,0,10);
- fHistoEP = new TH1F("fHistoEP", "EP with VZERO distribution",100,-10,10);
+ // fHistoQVector = new TH1F("fHistoQVector", "QVector with VZERO distribution",100,0,10);
+ // fHistoEP = new TH1F("fHistoEP", "EP with VZERO distribution",100,-10,10);
fCentralityCutMin = 0.0; // default value of centrality cut minimum, 0 ~ no cut
fCentralityCutMax = 10000.0; // default value of centrality cut maximum, ~ no cut
// fQVectorPosCutMin=0.0;
fTrackBits=1;
fCentEstimator="V0M";
fMaxChi2perNDFforVertex=-1;
- TH1::AddDirectory(oldStatus);
+ // TH1::AddDirectory(oldStatus);
}
//______________________________________________________
delete fHistoQVector;
if(fHistoEP)
delete fHistoEP;
+ if(fHistoRunNumbers)
+ delete fHistoRunNumbers;
}
+//______________________________________________________
+void AliSpectraBothEventCuts::InitHisto()
+{
+ Bool_t oldStatus = TH1::AddDirectoryStatus();
+ TH1::AddDirectory(kFALSE);
+ if(!fHistoCuts)
+ fHistoCuts = new TH1I("fEventCuts", "Event Cuts", kNVtxCuts, -0.5, kNVtxCuts - 0.5);
+ if(!fHistoVtxBefSel )
+ fHistoVtxBefSel = new TH1F("fHistoVtxBefSel", "Vtx distr before event selection",300,-15,15);
+ if(!fHistoVtxAftSel)
+ fHistoVtxAftSel = new TH1F("fHistoVtxAftSel", "Vtx distr after event selection",300,-15,15);
+ if(!fHistoVtxAftSelwithoutZvertexCut)
+ fHistoVtxAftSelwithoutZvertexCut=new TH1F("fHistoVtxAftSelwithoutZvertexcut", "Vtx distr after event selection without Z vertex cut",300,-15,15);
+ if(!fHistoVtxalltriggerEventswithMCz)
+ fHistoVtxalltriggerEventswithMCz=new TH1F("fHistoVtxalltriggerEventswithMCz", "generated z vertex position",300,-15,15);
+ if(!fHistoVtxAftSelwithoutZvertexCutusingMCz)
+ fHistoVtxAftSelwithoutZvertexCutusingMCz=new TH1F("fHistoVtxAftSelwithoutZvertexCutusingMCz", "Vtx distr after event selection without Z vertex cut using MC z",300,-15,15);
+ if(!fHistoEtaBefSel)
+ fHistoEtaBefSel = new TH1F("fHistoEtaBefSel", "Eta distr before event selection",500,-2,2);
+ if(!fHistoEtaAftSel)
+ fHistoEtaAftSel = new TH1F("fHistoEtaAftSel", "Eta distr after event selection",500,-2,2);
+ if(!fHistoNChAftSel)
+ fHistoNChAftSel = new TH1F("fHistoNChAftSel", "NCh distr after event selection",2000,-0.5,1999.5);
+ //fHistoQVectorPos = new TH1F("fHistoQVectorPos", "QVectorPos distribution",100,0,10);
+ //fHistoQVectorNeg = new TH1F("fHistoQVectorNeg", "QVectorNeg distribution",100,0,10);
+ if(!fHistoQVector)
+ fHistoQVector = new TH1F("fHistoQVector", "QVector with VZERO distribution",100,0,10);
+ if(!fHistoEP)
+ fHistoEP = new TH1F("fHistoEP", "EP with VZERO distribution",100,-10,10);
+ if(!fHistoRunNumbers)
+ {
+ if(fMaxRun>fMinRun&&fMinRun>=0)
+ fHistoRunNumbers=new TH1F("fHistoRunNumbers","Run numbers",fMaxRun-fMinRun+1,fMinRun-0.5,fMaxRun+0.5);
+ else
+ fHistoRunNumbers=new TH1F("fHistoRunNumbers","Run numbers",1001,120000-.5,121000+0.5);
+ }
+ TH1::AddDirectory(oldStatus);
+}
//______________________________________________________
Bool_t AliSpectraBothEventCuts::IsSelected(AliVEvent * aod,AliSpectraBothTrackCuts* trackcuts,Bool_t isMC,Double_t mcZ)
{
fAOD = aod;
fTrackCuts = trackcuts;
fHistoCuts->Fill(kProcessedEvents);
-
+ fHistoRunNumbers->Fill(aod->GetRunNumber());
Bool_t IsPhysSel = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & fTriggerSettings);//FIXME we can add the trigger mask here
if(!IsPhysSel)return IsPhysSel;
if(isMC)
fHistoVtxalltriggerEventswithMCz->Fill(mcZ);
-
//loop on tracks, before event selection, filling QA histos
AliESDEvent* esdevent=0x0;
AliAODEvent* aodevent=0x0;
if(fUseSDDPatchforLHC11a==kwithoutSDD&&isSDD==kTRUE)
return false;
-
fHistoCuts->Fill(kPhysSelEvents);
Nch++;
}
}
- //Printf("NCHARGED_EvSel : %d",Nch);
if(fIsSelected)fHistoNChAftSel->Fill(Nch);
return fIsSelected;
}
{
// print info about event cuts
cout << "Event Stats" << endl;
- cout << " > Number of accepted events: " << fHistoCuts->GetBinContent(kAcceptedEvents + 1) << endl;
- cout << " > Number of processed events: " << fHistoCuts->GetBinContent(kProcessedEvents + 1) << endl;
- cout << " > Number of PhysSel events: " << fHistoCuts->GetBinContent(kPhysSelEvents + 1) << endl;
- cout << " > Vertex out of range: " << fHistoCuts->GetBinContent(kVtxRange + 1) << endl;
- cout << " > Events cut by centrality: " << fHistoCuts->GetBinContent(kVtxCentral + 1) << endl;
- cout << " > Events without vertex: " << fHistoCuts->GetBinContent(kVtxNoEvent + 1) << endl;
- cout << " > QVector cut: " << fHistoCuts->GetBinContent(kQVector + 1) << endl;
+ if(fHistoCuts)
+ {
+ cout << " > Number of accepted events: " << fHistoCuts->GetBinContent(kAcceptedEvents + 1) << endl;
+ cout << " > Number of processed events: " << fHistoCuts->GetBinContent(kProcessedEvents + 1) << endl;
+ cout << " > Number of PhysSel events: " << fHistoCuts->GetBinContent(kPhysSelEvents + 1) << endl;
+ cout << " > Vertex out of range: " << fHistoCuts->GetBinContent(kVtxRange + 1) << endl;
+ cout << " > Events cut by centrality: " << fHistoCuts->GetBinContent(kVtxCentral + 1) << endl;
+ cout << " > Events without vertex: " << fHistoCuts->GetBinContent(kVtxNoEvent + 1) << endl;
+ cout << " > QVector cut: " << fHistoCuts->GetBinContent(kQVector + 1) << endl;
+ }
cout << " > Track type used for the QVector calculation: " << fTrackBits << endl;
// cout << " > QPosRange: [" << fQVectorPosCutMin <<"," <<fQVectorPosCutMax<<"]"<< endl;
// cout << " > QNegRange: [" << fQVectorNegCutMin <<"," <<fQVectorNegCutMax<<"]"<< endl;
TList collections_histoVtxAftSelwithoutZvertexCut;
TList collections_histoVtxalltriggerEventswithMCz;
TList collections_histoVtxAftSelwithoutZvertexCutusingMCz;
-
+ TList collections_histoRunNumbers;
Int_t count = 0;
while ((obj = iter->Next())) {
collections_histoVtxAftSelwithoutZvertexCut.Add(histo_histoVtxAftSelwithoutZvertexCut);
TH1F* histo_histoVtxalltriggerEventswithMCz=entry->GetHistoVtxGenerated();
collections_histoVtxalltriggerEventswithMCz.Add(histo_histoVtxalltriggerEventswithMCz);
- TH1F* histo_histoVtxAftSelwithoutZvertexCutusingMCz=entry->GetHistoVtxAftSelwithoutZvertexCutusingMCz();
+
+ TH1F* histo_histoVtxAftSelwithoutZvertexCutusingMCz=entry->GetHistoVtxAftSelwithoutZvertexCutusingMCz();
collections_histoVtxAftSelwithoutZvertexCutusingMCz.Add(histo_histoVtxAftSelwithoutZvertexCutusingMCz);
-
+
+ TH1F* histo_histoRunNumbers=entry->GetHistoRunNumbers();
+ collections_histoRunNumbers.Add(histo_histoRunNumbers);
count++;
}
fHistoVtxAftSelwithoutZvertexCut->Merge(&collections_histoVtxAftSelwithoutZvertexCut);
fHistoVtxalltriggerEventswithMCz->Merge(&collections_histoVtxalltriggerEventswithMCz);
fHistoVtxAftSelwithoutZvertexCutusingMCz->Merge(&collections_histoVtxAftSelwithoutZvertexCutusingMCz);
-
+ fHistoRunNumbers->Merge(&collections_histoRunNumbers);
delete iter;
return count+1;
}
-
+//__________________________________________________________________________________________________________
+void AliSpectraBothEventCuts::SetRunNumberRange(Int_t min, Int_t max)
+{
+ if(max>min&&min>=0)
+ {
+ fMinRun=min;
+ fMaxRun=max;
+ }
+}
// Constructors
AliSpectraBothEventCuts() : TNamed(), fAOD(0),fAODEvent(AliSpectraBothTrackCuts::kAODobject),fTrackBits(0), fIsMC(0), fCentEstimator(""), fUseCentPatchAOD049(0),fUseSDDPatchforLHC11a(kDoNotCheckforSDD),fTriggerSettings(AliVEvent::kMB),fTrackCuts(0),
fIsSelected(0), fCentralityCutMin(0), fCentralityCutMax(0), fQVectorCutMin(0), fQVectorCutMax(0), fVertexCutMin(0),
-fVertexCutMax(0), fMultiplicityCutMin(0), fMultiplicityCutMax(0), fMaxChi2perNDFforVertex(0),fHistoCuts(0),
-fHistoVtxBefSel(0),fHistoVtxAftSel(0),fHistoEtaBefSel(0),fHistoEtaAftSel(0),
-fHistoNChAftSel(0),fHistoQVector(0),fHistoEP(0), fHistoVtxAftSelwithoutZvertexCut(0),fHistoVtxalltriggerEventswithMCz(0),fHistoVtxAftSelwithoutZvertexCutusingMCz(0)
+fVertexCutMax(0), fMultiplicityCutMin(0), fMultiplicityCutMax(0), fMaxChi2perNDFforVertex(0),fMinRun(0),fMaxRun(0),
+fHistoCuts(0),fHistoVtxBefSel(0),fHistoVtxAftSel(0),fHistoEtaBefSel(0),fHistoEtaAftSel(0),
+fHistoNChAftSel(0),fHistoQVector(0),fHistoEP(0), fHistoVtxAftSelwithoutZvertexCut(0),fHistoVtxalltriggerEventswithMCz(0),fHistoVtxAftSelwithoutZvertexCutusingMCz(0),fHistoRunNumbers(0)
{}
AliSpectraBothEventCuts(const char *name);
virtual ~AliSpectraBothEventCuts();// {}
void SetMultiplicityCut(Float_t min,Float_t max) { fMultiplicityCutMin = min; fMultiplicityCutMax = max; }
void SetTrackBits(UInt_t TrackBits) {fTrackBits=TrackBits;}
void SetMaxChi2perNDFforVertex(Float_t cut) { fMaxChi2perNDFforVertex=cut;}
+ void SetRunNumberRange(Int_t min,Int_t max);
UInt_t GetTrackType() const { return fTrackBits;}
TH1I * GetHistoCuts() { return fHistoCuts; }
/* TH1F * GetHistoQVectorNeg() { return fHistoQVectorNeg; } */
TH1F * GetHistoQVector() { return fHistoQVector; }
TH1F * GetHistoEP() { return fHistoEP; }
+ TH1F * GetHistoRunNumbers() { return fHistoRunNumbers; }
Float_t GetCentralityMin() const { return fCentralityCutMin; }
Float_t GetCentralityMax() const { return fCentralityCutMax; }
//Float_t GetQVectorPosCutMin() const { return fQVectorPosCutMin; }
Float_t GetMultiplicityCutMin() const { return fMultiplicityCutMin; }
Float_t GetMultiplicityCutMax() const { return fMultiplicityCutMax; }
Float_t GetMaxChi2perNDFforVertex() const {return fMaxChi2perNDFforVertex;}
+
+
+ void InitHisto();
void PrintCuts();
Double_t ApplyCentralityPatchAOD049();
Float_t fVertexCutMax; // maximum vertex position
Float_t fMultiplicityCutMin; // minimum multiplicity position
Float_t fMultiplicityCutMax; // maximum multiplicity position
- Float_t fMaxChi2perNDFforVertex; // maximum value of Chi2perNDF of vertex
+ Float_t fMaxChi2perNDFforVertex; // maximum value of Chi2perNDF of vertex
+ Int_t fMinRun; //minmum run number
+ Int_t fMaxRun; //maximum run number
TH1I *fHistoCuts; // Cuts statistics
TH1F *fHistoVtxBefSel; // Vtx distr before event selection
TH1F *fHistoVtxAftSel; // Vtx distr after event selection
TH1F *fHistoVtxAftSelwithoutZvertexCut; // Vtx distr after event selection but without z vertex cut
TH1F *fHistoVtxalltriggerEventswithMCz; // MC z vertex ditribution of generated events
TH1F *fHistoVtxAftSelwithoutZvertexCutusingMCz; // Vtx distr after event selection but without z vertex cut
+ TH1F *fHistoRunNumbers; // histogram of numbers of events per run
+
+
AliSpectraBothEventCuts(const AliSpectraBothEventCuts&);
AliSpectraBothEventCuts& operator=(const AliSpectraBothEventCuts&);
- ClassDef(AliSpectraBothEventCuts, 7);
+ ClassDef(AliSpectraBothEventCuts, 8);
};
#endif
ClassImp(AliSpectraBothPID)
-AliSpectraBothPID::AliSpectraBothPID() : TNamed("PID", "PID object"), fPIDType(kNSigmaTPCTOF), fNSigmaPID(3), fPIDResponse(0),fshiftTPC(0),fshiftTOF(0)
+AliSpectraBothPID::AliSpectraBothPID() : TNamed("PID", "PID object"), fPIDType(kNSigmacircleTPCTOF), fNSigmaPID(3), fPIDResponse(0),fshiftTPC(0),fshiftTOF(0)
{
}
}
- nsigmaTPCTOFkProton = TMath::Sqrt((nsigmaTPCkProton*nsigmaTPCkProton+nsigmaTOFkProton*nsigmaTOFkProton)/2);
- nsigmaTPCTOFkKaon = TMath::Sqrt((nsigmaTPCkKaon*nsigmaTPCkKaon+nsigmaTOFkKaon*nsigmaTOFkKaon)/2);
- nsigmaTPCTOFkPion = TMath::Sqrt((nsigmaTPCkPion*nsigmaTPCkPion+nsigmaTOFkPion*nsigmaTOFkPion)/2);
+ nsigmaTPCTOFkProton = TMath::Sqrt((nsigmaTPCkProton*nsigmaTPCkProton+nsigmaTOFkProton*nsigmaTOFkProton)/2.0);
+ nsigmaTPCTOFkKaon = TMath::Sqrt((nsigmaTPCkKaon*nsigmaTPCkKaon+nsigmaTOFkKaon*nsigmaTOFkKaon)/2.0);
+ nsigmaTPCTOFkPion = TMath::Sqrt((nsigmaTPCkPion*nsigmaTPCkPion+nsigmaTOFkPion*nsigmaTOFkPion)/2.0);
}
- Double_t nsigmaTOFkProton=100.0,nsigmaTOFkKaon=100.0,nsigmaTOFkPion=100.0;
+ Double_t nsigmaTOFkProton=0.0,nsigmaTOFkKaon=0.0,nsigmaTOFkPion=0.0;
+
+
Double_t nsigmaTPCTOFkProton = TMath::Abs(nsigmaTPCkProton);
Double_t nsigmaTPCTOFkKaon = TMath::Abs(nsigmaTPCkKaon);
nsigmaTPCTOFkProton = 100.0;
nsigmaTPCTOFkKaon = 100.0;
nsigmaTPCTOFkPion =100.0;
+ nsigmaTOFkProton = 100.0;
+ nsigmaTOFkKaon = 100.0;
+ nsigmaTOFkPion =100.0;
}
nsigmaKaon = nsigmaTOFkKaon ;
nsigmaPion = nsigmaTOFkPion ;
break;
- case kNSigmaTPCTOF:
+ case kNSigmacircleTPCTOF:
nsigmaProton = nsigmaTPCTOFkProton;
nsigmaKaon = nsigmaTPCTOFkKaon ;
nsigmaPion = nsigmaTPCTOFkPion ;
break;
+ case kNSigmasquareTPCTOF:
+ nsigmaProton = TMath::Max(nsigmaTPCkProton,nsigmaTOFkProton);
+ nsigmaKaon = TMath::Max(nsigmaTPCkKaon,nsigmaTOFkKaon);
+ nsigmaPion = TMath::Max(nsigmaTPCkPion,nsigmaTOFkPion) ;
+ break;
+
}
if(nsigmaPion < fNSigmaPID)
class AliSpectraBothPID : public TNamed
{
public:
- enum BothPIDType_t {kNSigmaTPC,kNSigmaTOF,kNSigmaTPCTOF};
+ enum BothPIDType_t {kNSigmaTPC,kNSigmaTOF,kNSigmacircleTPCTOF,kNSigmasquareTPCTOF};
AliSpectraBothPID() ;
AliSpectraBothPID(BothPIDType_t pidType);
AliSpectraBothPID(const AliSpectraBothPID&);
AliSpectraBothPID& operator=(const AliSpectraBothPID&);
- ClassDef(AliSpectraBothPID, 2);
+ ClassDef(AliSpectraBothPID, 3);
};
#endif
#include "TH1F.h"
#include "TH1I.h"
#include "TH2F.h"
+#include "TH3F.h"
#include "TCanvas.h"
#include "AliAnalysisTask.h"
#include "AliAnalysisManager.h"
AliSpectraBothTrackCuts::AliSpectraBothTrackCuts(const char *name) : TNamed(name, "AOD Track Cuts"), fIsSelected(0), fTrackBits(0), fMinTPCcls(0), fEtaCutMin(0), fEtaCutMax(0), fDCACut(0), fPCut(0), fPtCut(0), fYCutMax(0),fYCutMin(0),
fPtCutTOFMatching(0),fAODtrack(kotherobject), fHashitinSPD1(0),fusedadditionalcuts(kTRUE),
-fHistoCuts(0), fHistoNSelectedPos(0), fHistoNSelectedNeg(0), fHistoNMatchedPos(0), fHistoNMatchedNeg(0), fHistoEtaPhiHighPt(0), fHistoNclustersITS(0),fTrack(0),fCuts(0)
+fHistoCuts(0), fHistoNSelectedPos(0), fHistoNSelectedNeg(0), fHistoNMatchedPos(0), fHistoNMatchedNeg(0), fHistoEtaPhiHighPt(0), fHistoNclustersITS(0),
+fHistoDCAzQA(0),fHistoNclustersQA(0),fHistochi2perNDFQA(0),
+fTrack(0),fCuts(0)
{
+/*
Bool_t oldStatus = TH1::AddDirectoryStatus();
TH1::AddDirectory(kFALSE);
// Constructor
fHistoEtaPhiHighPt->SetXTitle("eta");
fHistoEtaPhiHighPt->SetYTitle("phi");
fHistoNclustersITS=new TH1F("fHistoNclustersITS","fHistoNclustersITS;N;ITSLayer",6,-0.5,5.5);
-
+ */
fEtaCutMin = -100000.0; // default value of eta cut ~ no cut
fEtaCutMax = 100000.0; // default value of eta cut ~ no cut
fDCACut = 100000.0; // default value of dca cut ~ no cut
fYCutMax = 100000.0; // default value of y cut ~ no cut
fYCutMin = -100000.0; // default value of y cut ~ no cut
fMinTPCcls=70; // ncls in TPC
- TH1::AddDirectory(oldStatus);
+ // TH1::AddDirectory(oldStatus);
+}
+//__________________________________________________________________
+void AliSpectraBothTrackCuts::InitHisto()
+{
+ Bool_t oldStatus = TH1::AddDirectoryStatus();
+ TH1::AddDirectory(kFALSE);
+
+ fHistoCuts = new TH1I("fTrkCuts", "Track Cuts", kNTrkCuts, -0.5, kNTrkCuts - 0.5);
+ for(Int_t ibin=1;ibin<=kNTrkCuts;ibin++)fHistoCuts->GetXaxis()->SetBinLabel(ibin,kBinLabel[ibin-1]);
+ //standard histo
+ const Double_t templBins[] = {0.05,0.1,0.12,0.14,0.16,0.18,0.20,0.25,0.30,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3.0,3.2,3.4,3.6,3.8,4.0,4.2,4.4,4.6,4.8,5.0};
+ Int_t nbinsTempl=52;
+ const Double_t parBins[]={-0.5,0.5,1.5,2.5};
+ Int_t nbinsnpar=3;
+ const Double_t dcazBins[] ={-4.0,-3.8,-3.6,-3.4,-3.2,-3.0,-2.8,-2.6,-2.4,-2.2,-2.0,-1.8,-1.6,-1.4,-1.2,-1.0,-0.8,-0.6,-0.4,-0.2,0.0,0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0,2.2,2.4,2.6,2.8,3.0,3.2,3.4,3.6,3.8,4.0};
+ Int_t nbinsdcaz=40;
+ const Double_t nclsBins[]={45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160};
+ Int_t nbinsncls=23;
+ const Double_t chindfBins[]={0.0,0.4,0.8,1.2,1.6,2.0,2.4,2.8,3.2,3.6,4.0,4.4,4.8,5.2,5.6,6.0,6.4,6.8,7.2,7.6,8.0};
+ Int_t nbinchindf=20;
+
+ if(!fHistoNSelectedPos)
+ fHistoNSelectedPos=new TH1F("fHistoNSelectedPos","fHistoNSelectedPos",nbinsTempl,templBins);
+ fHistoNSelectedPos->GetXaxis()->SetTitle("P_{T} (GeV / c)");
+ if(!fHistoNSelectedNeg)
+ fHistoNSelectedNeg=new TH1F("fHistoNSelectedNeg","fHistoNSelectedNeg",nbinsTempl,templBins);
+ fHistoNSelectedNeg->GetXaxis()->SetTitle("P_{T} (GeV / c)");
+ if(!fHistoNMatchedPos)
+ fHistoNMatchedPos=new TH1F("fHistoNMatchedPos","fHistoNMatchedPos",nbinsTempl,templBins);
+ fHistoNMatchedPos->GetXaxis()->SetTitle("P_{T} (GeV / c)");
+ if(!fHistoNMatchedNeg)
+ fHistoNMatchedNeg=new TH1F("fHistoNMatchedNeg","fHistoNMatchedNeg",nbinsTempl,templBins);
+ fHistoNMatchedNeg->GetXaxis()->SetTitle("P_{T} (GeV / c)");
+ if(!fHistoEtaPhiHighPt)
+ fHistoEtaPhiHighPt=new TH2F("fHistoEtaPhiHighPt","fHistoEtaPhiHighPt",200,-1,1,400,0,7);
+ fHistoEtaPhiHighPt->SetXTitle("eta");
+ fHistoEtaPhiHighPt->SetYTitle("phi");
+ if(!fHistoNclustersITS)
+ fHistoNclustersITS=new TH1F("fHistoNclustersITS","fHistoNclustersITS;N;ITSLayer",6,-0.5,5.5);
+ if(!fHistoDCAzQA)
+ fHistoDCAzQA=new TH3F("fHistoDCAzQA","QA of DCA z;par type; P_{T} (GeV/C);dcaz",nbinsnpar,parBins,nbinsTempl,templBins,nbinsdcaz,dcazBins);
+ if(!fHistoNclustersQA)
+ fHistoNclustersQA=new TH3F("fHistoNclustersQA","QA of Ncls ;par type ; P_{T} (GeV/C);ncls",nbinsnpar,parBins,nbinsTempl,templBins,nbinsncls,nclsBins);
+ if(!fHistochi2perNDFQA)
+ fHistochi2perNDFQA=new TH3F("fHistochi2perNDFQA","QA of chi2/ndf ;par type; P_{T} (GeV/C);chi2ndf",nbinsnpar,parBins,nbinsTempl,templBins,nbinchindf,chindfBins);
+
+ TH1::AddDirectory(oldStatus);
+
+
+
}
//_______________________________________________________
AliSpectraBothTrackCuts::~AliSpectraBothTrackCuts()
delete fHistoEtaPhiHighPt;
if(fHistoNclustersITS)
delete fHistoNclustersITS;
+ if(fHistoDCAzQA)
+ delete fHistoDCAzQA;
+ if(fHistoNclustersQA)
+ delete fHistoNclustersQA;
+ if(fHistochi2perNDFQA)
+ delete fHistochi2perNDFQA;
TList collections_histoNMatchedPos;
TList collections_histoNMatchedNeg;
TList collections_histoEtaPhiHighPt;
-
+ TList collections_histoDCAzQA;
+ TList collections_histoNclustersQA;
+ TList collections_histochi2perNDFQA;
+
Int_t count = 0;
while ((obj = iter->Next())) {
collections_histoNMatchedNeg.Add(histoNMatchedNeg);
TH2F * histoEtaPhiHighPt = entry->GetHistoEtaPhiHighPt();
collections_histoEtaPhiHighPt.Add(histoEtaPhiHighPt);
+ TH3F* histoDCAzQA=entry->GetHistoDCAzQA();
+ collections_histoDCAzQA.Add(histoDCAzQA);
+ TH3F* histoNclustersQA=entry->GetHistoNclustersQA();
+ collections_histoNclustersQA.Add(histoNclustersQA);
+ TH3F* histochi2perNDFQA=entry->GetHistochi2perNDFQA();
+ collections_histochi2perNDFQA.Add(histochi2perNDFQA);
+
+
+
count++;
}
fHistoNMatchedPos->Merge(&collections_histoNMatchedPos);
fHistoNMatchedNeg->Merge(&collections_histoNMatchedNeg);
fHistoEtaPhiHighPt->Merge(&collections_histoEtaPhiHighPt);
-
+ fHistoDCAzQA->Merge(&collections_histoDCAzQA);
+ fHistoNclustersQA->Merge(&collections_histoNclustersQA);
+ fHistochi2perNDFQA->Merge(&collections_histochi2perNDFQA);
+
delete iter;
return count+1;
class AliAODEvent;
//class AliSpectraBothHistoManager;
class TH1I;
+class TH3F;
class AliAODMCParticle;
class AliAODTrack;
class AliESDtrackCuts;
enum {kAODobject=0,kESDobject,kotherobject};
AliSpectraBothTrackCuts() : TNamed(), fIsSelected(0), fTrackBits(0), fMinTPCcls(0), fEtaCutMin(0), fEtaCutMax(0),fDCACut(0) ,fPCut(0), fPtCut(0),fYCutMax(0),fYCutMin(0), fPtCutTOFMatching(0),fAODtrack(0), fHashitinSPD1(0),fusedadditionalcuts(kTRUE),
-fHistoCuts(0), fHistoNSelectedPos(0), fHistoNSelectedNeg(0), fHistoNMatchedPos(0), fHistoNMatchedNeg(0), fHistoEtaPhiHighPt(0), fHistoNclustersITS(0),fTrack(0),fCuts(0) {}
+fHistoCuts(0), fHistoNSelectedPos(0), fHistoNSelectedNeg(0), fHistoNMatchedPos(0), fHistoNMatchedNeg(0), fHistoEtaPhiHighPt(0), fHistoNclustersITS(0),
+fHistoDCAzQA(0),fHistoNclustersQA(0),fHistochi2perNDFQA(0),
+fTrack(0),fCuts(0) {}
AliSpectraBothTrackCuts(const char *name);
virtual ~AliSpectraBothTrackCuts();
TH1F * GetHistoNMatchedPos() { return fHistoNMatchedPos; }
TH1F * GetHistoNMatchedNeg() { return fHistoNMatchedNeg; }
TH2F * GetHistoEtaPhiHighPt() { return fHistoEtaPhiHighPt; }
- TH1F * GetHistoNclustersITS() {return fHistoNclustersITS;}
+ TH1F * GetHistoNclustersITS() {return fHistoNclustersITS;}
+ TH3F * GetHistoDCAzQA() {return fHistoDCAzQA;}
+ TH3F * GetHistoNclustersQA() {return fHistoNclustersQA ;}
+ TH3F * GetHistochi2perNDFQA() {return fHistochi2perNDFQA; }
+
void SetEta(Float_t etamin,Float_t etamax) { fEtaCutMin = etamin;fEtaCutMax = etamax; }
void SetDCA(Float_t dca) { fDCACut = dca; }
void SetP(Float_t p) { fPCut = p; }
Float_t GetPtTOFMatching() const { return fPtCutTOFMatching; }
Long64_t Merge(TCollection* list);
void SetAliESDtrackCuts(AliESDtrackCuts* cuts ){fCuts=cuts;}
-
+ void InitHisto();
private:
Bool_t fIsSelected; // True if cuts are selected
TH1F *fHistoNMatchedNeg; // Matched negative tracks
TH2F *fHistoEtaPhiHighPt; // EtaPhi distr at high pt (>1.5 GeV/c)
TH1F *fHistoNclustersITS; // Number of clusters in ITS
-
+ TH3F *fHistoDCAzQA; //QA histo for DCZ monitoring histo
+ TH3F *fHistoNclustersQA; //QA histo for N clusters QA monitoring histo
+ TH3F *fHistochi2perNDFQA; //QA histo for chi2/ndf
+
AliVTrack *fTrack; //! Track pointer
AliESDtrackCuts *fCuts; //! cuts
AliSpectraBothTrackCuts(const AliSpectraBothTrackCuts&);
AliSpectraBothTrackCuts& operator=(const AliSpectraBothTrackCuts&);
- ClassDef(AliSpectraBothTrackCuts, 5);
+ ClassDef(AliSpectraBothTrackCuts, 6);
};
#endif