mgr->SetMCtruthEventHandler(mcHandler);
}
- enum { kEta, kY, kPhi, kPt, kP3, kHit, kChi2Fit, kTrM, kChi2TrM, kContrN, kVt, kVz, kTrig, kDCA, kZcoor, kRabs, kCharge, kNVars };
- Int_t nBins[] = { 5 , 5 , 45 , 60 ,150 , 20 , 20 , 4 , 20 , 202 , 100 , 100 , 10 , 500 , 1000, 100 , 3 };
- Double_t min[] = { -4.,-4. ,-180., 0., 0., 0., 0., -0.5, 0., -2.5, 0., -100., 0., 0., -3000., 0., -1.5 };
- Double_t max[] = {-2.5.,-2.5, 180., 30.,150., 20., 20., 3.5, 10., 199.5, 200., 100., 10., 500., 1000., 100., 1.5 };
+ enum { kEta, kY, kPhi, kPt, kP3, kHit, kChi2Fit, kTrM, kChi2TrM, kContrN, kVt, kVz, kTrig, kDCA, kZcoor, kRabs, kCharge, kTheta,kNVars };
+ Int_t nBins[] = { 5 , 5 , 45 , 60 ,150 , 20 , 20 , 4 , 20 , 202 , 100 , 100 , 10 , 500 , 1000, 7 , 3 , 100 };
+ Double_t min[] = { -4.,-4. ,-180., 0., 0., 0., 0., -0.5, 0., -2.5, 0., -100., 0., 0., -3000., 171., -1.5 , 2.95 };
+ Double_t max[] = {-2.5.,-2.5, 180., 30.,150., 20., 20., 3.5, 10., 199.5, 200., 100., 10., 500., 1000., 178., 1.5 , 3.15 };
Double_t *binLimits = 0;
Int_t nSteps=1; if (isMC) nSteps=2;
999999.0, // 7, DCAmax
-999999.0, // 8, for trigger
999999.0, // 9, for trigger
- -999999.0, // 10, RabsEndMin
- 999999.0,}; // 11, RabsEndMax
+ -999999.0, // 10, ThetaAbsEndMin
+ 999999.0,}; // 11, ThetaAbsEndMax
Double_t cutsDimu[12]={-999999.0, 999999.0, // single muon cuts used for dimuon selection
-999999.0, 999999.0,
-999999.0, 999999.0,
#include "AliDimuInfoStoreRD.h"
#include "AliDimuInfoStoreMC.h"
#include "AliAnalysisTaskSEMuonsHF.h"
+#include "AliAnalysisManager.h"
ClassImp(AliAnalysisTaskSEMuonsHF)
} else { AliError("MC event not found. Nothing done!"); return; }
}
+ if (fIsOutputTree) AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kTRUE);
fHeader->SetEvent(((AliVVertex*)InputEvent()->GetPrimaryVertex()));
fHeader->FillHistosEvnH(fListOutput);
analysisChain->Add(RunFile);
}
- enum { kEta, kY, kPhi, kPt, kP3, kHit, kChi2Fit, kTrM, kChi2TrM, kContrN, kVt, kVz, kTrig, kDCA, kZcoor, kRabs, kCharge, kTheta, kNVars };
- Int_t nBins[] = { 5 , 5 , 45 , 60 ,150 , 20 , 20 , 4 , 20 , 202 , 100 , 100 , 10 , 500 , 1000, 100 , 3 , 100 };
- Double_t min[] = { -4.,-4. ,-180., 0., 0., 0., 0., -0.5, 0., -2.5, 0., -100., 0., 0., -3000., 0., -1.5 , 2.95 };
- Double_t max[] = {-2.5.,-2.5, 180., 30.,150., 20., 20., 3.5, 10., 199.5, 200., 100., 10., 500., 1000., 100., 1.5 , 3.15 };
+ enum { kEta, kY, kPhi, kPt, kP3, kHit, kChi2Fit, kTrM, kChi2TrM, kContrN, kVt, kVz, kTrig, kDCA, kZcoor, kRabs, kCharge, kTheta,kNVars };
+ Int_t nBins[] = { 5 , 5 , 45 , 60 ,150 , 20 , 20 , 4 , 20 , 202 , 100 , 100 , 10 , 500 , 1000, 7 , 3 , 100 };
+ Double_t min[] = { -4.,-4. ,-180., 0., 0., 0., 0., -0.5, 0., -2.5, 0., -100., 0., 0., -3000., 171., -1.5 , 2.95 };
+ Double_t max[] = {-2.5.,-2.5, 180., 30.,150., 20., 20., 3.5, 10., 199.5, 200., 100., 10., 500., 1000., 178., 1.5 , 3.15 };
Double_t *binLimits = 0;
Int_t nSteps=1; if (isMC) nSteps=2;
containerInput[7] = 3;
containerInput[10] = rmc ; // radius at production
- containerInput[15] = 45 ; // rabsmc
+ containerInput[15] = 175. ; // rabsmc
// fill the container at the first step
fCFManager->GetParticleContainer()->Fill(containerInput,0);
Float_t rabs = mu1->GetRAtAbsorberEnd();
Float_t thetar ;
thetar = TMath::Abs(-TMath::Pi()+TMath::ASin(ptr/pr));
-
+
// rapidity and Pt cuts (default -4<y<-2.5 et 0<pt<20)
if (!fCFManager->CheckParticleCuts(AliCFManager::kPartAccCuts,mu1)) continue;
+ Float_t thetaAbs = 180.*(1.-TMath::ATan(rabs/505.)/TMath::Pi());
+ if (thetaAbs<171 || thetaAbs>178) continue;
+
containerInput[0] = etar ;
containerInput[1] = rapr ;
containerInput[2] = phir ;
containerInput[12] = trig ;
containerInput[13] = dcar ;
containerInput[14] = zr ;
- containerInput[15] = rabs ;
+ containerInput[15] = thetaAbs;
containerInput[16] = charger ;
containerInput[17] = thetar ;
}
//-----------------------------------------------------------------------------
-Bool_t AliDimuInfoStoreRD::DimuSelection()
+Bool_t AliDimuInfoStoreRD::IsSelected()
{
// select dimuon candidates according to the corresponding two muon tracks cuts
AliMuonInfoStoreRD::SetSelectionCuts(AliDimuInfoStoreRD::fgCutd);
AliMuonInfoStoreRD *trk0 = (AliMuonInfoStoreRD*)fMuonRef[0].GetObject();
AliMuonInfoStoreRD *trk1 = (AliMuonInfoStoreRD*)fMuonRef[1].GetObject();
- if (!trk0->MuonSelection()) { AliMuonInfoStoreRD::SetSelectionCuts(cutsOld); return kFALSE; }
- if (!trk1->MuonSelection()) { AliMuonInfoStoreRD::SetSelectionCuts(cutsOld); return kFALSE; }
+ if (!trk0->IsSelected()) { AliMuonInfoStoreRD::SetSelectionCuts(cutsOld); return kFALSE; }
+ if (!trk1->IsSelected()) { AliMuonInfoStoreRD::SetSelectionCuts(cutsOld); return kFALSE; }
AliMuonInfoStoreRD::SetSelectionCuts(cutsOld);
return kTRUE;
Short_t Charge() const { return fCharge; }
Double_t InvM() const { return fInvM; }
- Bool_t DimuSelection();
+ Bool_t IsSelected();
static const char* StdBranchName() { return fgkStdBranchName.Data(); }
static void SetSelectionCuts(Double_t cuts[12]) { for (Int_t i=12; i--;) fgCutd[i]=cuts[i]; }
}
//-----------------------------------------------------------------------------
-Bool_t AliMuonInfoStoreRD::MuonSelection()
+Bool_t AliMuonInfoStoreRD::IsSelected()
{
// select muon tracks according to the selection cuts
Int_t trigger = this->MatchTrigger();
if (trigger<AliMuonInfoStoreRD::fgCuts[8] || trigger>AliMuonInfoStoreRD::fgCuts[9]) return kFALSE;
- Double_t rAbs = this->RabsEnd();
- if (rAbs<AliMuonInfoStoreRD::fgCuts[10] || rAbs>AliMuonInfoStoreRD::fgCuts[11]) return kFALSE;
+ Double_t theta = 180.*(1.-TMath::ATan(this->RabsEnd()/505.)/TMath::Pi());
+ if (theta<AliMuonInfoStoreRD::fgCuts[10] || theta>AliMuonInfoStoreRD::fgCuts[11]) return kFALSE;
return kTRUE;
}
Double_t Chi2MatchTrigger() const { return fChi2MatchTrigger; }
Double_t RabsEnd() const { return fRabsEnd; }
- Bool_t MuonSelection();
+ Bool_t IsSelected();
static const char* StdBranchName() { return fgkStdBranchName.Data(); }
static void SelectionCust(Double_t cuts[12]) { for (Int_t i=12; i--;) cuts[i]=fgCuts[i]; }
#include <TMath.h>
#include <TH1.h>
-#include <TH1F.h>
+#include <TH1D.h>
#include <TList.h>
#include "AliMuonInfoStoreRD.h"
#include "AliMuonsHFHeader.h"
class TNamed;
-class AliESDVertex;
+class AliVVertex;
ClassImp(AliMuonsHFHeader)
}
//_____________________________________________________________________________
-Bool_t AliMuonsHFHeader::EventSelection()
+Bool_t AliMuonsHFHeader::IsSelected()
{
// select event according to the event selection cuts
if (this->VtxContrsN()<fgCuts[0]) return kFALSE;
Double_t xlow[nHistos] = { -40., 0., -2.5 };
Double_t xup[nHistos] = { 40., 4., 199.5 };
- TH1F *histo = 0;
+ TH1D *histo = 0;
for (Int_t i=0; i<nHistos; i++) {
- histo = new TH1F(tname[i], tname[i].Data(), nbins[i], xlow[i], xup[i]);
+ histo = new TH1D(tname[i], tname[i].Data(), nbins[i], xlow[i], xup[i]);
histo->Sumw2(); list->Add(histo); histo = 0;
}
const Int_t nHistos = 8;
TString tName[nHistos] = { "P", "Pt", "Eta", "DCA", "TrM", "Charge", "Rabs", "UnfVtx" };
- Int_t nbins[nHistos] = { 1500 , 300 , 100 , 500 , 4 , 3 , 300 , 80 };
- Double_t xlow[nHistos] = { 0., 0., -10., 0., -0.5, -1.5, 0., -40. };
- Double_t xup[nHistos] = { 150., 30., 0., 500., 3.5, 1.5, 150., 40. };
+ Int_t nbins[nHistos] = { 1500 , 300 , 15 , 1000 , 4 , 3 , 48 , 80 };
+ Double_t xlow[nHistos] = { 0., 0., -4.0, 0., -0.5, -1.5, 17.6, -40. };
+ Double_t xup[nHistos] = { 150., 30., -2.5, 500., 3.5, 1.5, 80.0, 40. };
- TH1F *histo = 0;
+ TH1D *histo = 0;
for (Int_t i=0; i<nHistos; i++) {
char *hName = Form("h%s_%s", sName.Data(), tName[i].Data());
- histo = new TH1F(hName, hName, nbins[i], xlow[i], xup[i]);
+ histo = new TH1D(hName, hName, nbins[i], xlow[i], xup[i]);
histo->Sumw2(); list->Add(histo); histo = 0;
}
Bool_t oldStatus = TH1::AddDirectoryStatus();
TH1::AddDirectory(kFALSE);
- TH1F *histo = 0;
+ TH1D *histo = 0;
const Int_t nHistos = 3;
TString tName[nHistos] = { "P", "Pt", "InvM" };
Int_t nbins[nHistos] = { 1500 , 300 , 300 };
for (Int_t i=0; i<3; i++) {
for (Int_t j=0; j<nHistos; j++) {
char *hName = Form("h%s_%s_%s", sName.Data(), dimuName[i].Data(), tName[j].Data());
- histo = new TH1F(hName, hName, nbins[j], xlow[j], xup[j]);
+ histo = new TH1D(hName, hName, nbins[j], xlow[j], xup[j]);
histo->Sumw2(); list->Add(histo); histo = 0;
}
}
// fill histograms at event level according to event selection cuts
if (!list) return;
- if (!this->EventSelection()) return;
+ if (!this->IsSelected()) return;
const Int_t nHistos = 3;
TString tname[nHistos] = { "hVz", "hVt", "hVtxNcontr" };
Double_t dist[nHistos] = { this->Vz(), this->Vt(), this->VtxContrsN() };
- for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(tname[i].Data()))->Fill(dist[i]);
+ for (Int_t i=nHistos; i--;) ((TH1D*)list->FindObject(tname[i].Data()))->Fill(dist[i]);
return;
}
{
// fill histograms for single muon according to event & muon track selection cuts
- if (!list) return;
- if (!this->EventSelection()) return;
- if (!infoStore->MuonSelection()) return;
+ if (!list) return;
+ if (!this->IsSelected()) return;
+ if (!infoStore->IsSelected()) return;
const Int_t nHistos = 8;
TString tName[nHistos] = { "P", "Pt", "Eta", "DCA", "TrM", "Charge", "Rabs", "UnfVtx" };
infoStore->Charge(),
infoStore->RabsEnd(),
this->Vz() };
- for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s","",tName[i].Data())))->Fill(dist[i]);
+ for (Int_t i=nHistos; i--;) ((TH1D*)list->FindObject(Form("h%s_%s","",tName[i].Data())))->Fill(dist[i]);
if (fgIsMC && src>=0) {
TString sName[6] = { "BottomMu", "CharmMu", "PrimaryMu", "SecondaryMu", "Hadron", "Unidentified" };
- for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s",sName[src].Data(),tName[i].Data())))->Fill(dist[i]);
+ for (Int_t i=nHistos; i--;) ((TH1D*)list->FindObject(Form("h%s_%s",sName[src].Data(),tName[i].Data())))->Fill(dist[i]);
}
return;
{
// fill histograms for dimuon according to evnet & dimuon candidates selection cuts
- if (!list) return;
- if (!this->EventSelection()) return;
- if (!infoStore->DimuSelection()) return;
+ if (!list) return;
+ if (!this->IsSelected()) return;
+ if (!infoStore->IsSelected()) return;
TString dimuName = "DimuNN";
if (infoStore->Charge()==0) dimuName = "DimuNP";
Double_t dist[nHistos] = { infoStore->Momentum().Mag(),
infoStore->Momentum().Pt(),
infoStore->InvM() };
- for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s_%s","",dimuName.Data(),tName[i].Data())))->Fill(dist[i]);
+ for (Int_t i=nHistos; i--;) ((TH1D*)list->FindObject(Form("h%s_%s_%s","",dimuName.Data(),tName[i].Data())))->Fill(dist[i]);
if (fgIsMC && src>=0) {
TString sName[6] = { "BBdiff", "BBsame", "DDdiff", "DDsame", "Resonance", "Uncorr" };
- for (Int_t i=nHistos; i--;) ((TH1F*)list->FindObject(Form("h%s_%s_%s",sName[src].Data(),dimuName.Data(),tName[i].Data())))->Fill(dist[i]);
+ for (Int_t i=nHistos; i--;) ((TH1D*)list->FindObject(Form("h%s_%s_%s",sName[src].Data(),dimuName.Data(),tName[i].Data())))->Fill(dist[i]);
}
return;
void SetEvent(AliVVertex *vertex);
void SetFiredTriggerClass(TString trigger) { fFiredTriggerClass=trigger; }
- Bool_t EventSelection();
+ Bool_t IsSelected();
void CreateHistograms(TList *list);
void FillHistosEvnH(TList *list);