delete fHRapMuon;
delete fHRapResonance;
delete fHPtResonance;
- delete fHInvMassAll_vs_Pt;
+ delete fHInvMassAllvsPt;
}
/*********************************************************/
Int_t AliMuonAnalysis::Init()
{
- //Initilizes anaysis
+ //Initilizes analysis
Info("Init","Histo initialized for MUON Analysis");
fHistoFile = new TFile("MUONmassPlot.root", "RECREATE");
fHRapMuon = new TH1F("hRapMuon"," Muon Rapidity",50,-4.5,-2);
fHRapResonance = new TH1F("hRapResonance"," Resonance Rapidity",50,-4.5,-2);
fHPtResonance = new TH1F("hPtResonance", "Resonance Pt (GeV/c)", 100, 0., 20.);
- fHInvMassAll_vs_Pt = new TH2F("hInvMassAll_vs_Pt","hInvMassAll_vs_Pt",480,0.,12.,80,0.,20.);
+ fHInvMassAllvsPt = new TH2F("hInvMassAll_vs_Pt","hInvMassAll_vs_Pt",480,0.,12.,80,0.,20.);
return 0;
}
Int_t AliMuonAnalysis::ProcessEvent(AliAOD* aodrec, AliAOD* aodsim)
{
-
+ //
+ // process the event
+ //
if (aodrec) {
GetInvMass(aodrec);
// Info("ProcessEvent","Inv Mass Rec");
void AliMuonAnalysis::GetInvMass(AliAOD* aod)
{
-
+ // get the invariant mass distribution
+ // from the oad events
+
TLorentzVector lorV1, lorV2, lorVtot;
Float_t massMin = 9.17;
Float_t massMax = 9.77;
continue;
}
- lorV1 = aodPart1->FourMomentum();
+ lorV1.SetPxPyPzE(aodPart1->Px(),
+ aodPart1->Py(),
+ aodPart1->Pz(),
+ aodPart1->E());
fHPtMuon->Fill(lorV1.Pt());
fHPMuon->Fill(lorV1.P());
AliAODParticle* aodPart2 = (AliAODParticle*)aod->GetParticle(iPart2);
- lorV2 = aodPart2->FourMomentum();
+ lorV2.SetPxPyPzE(aodPart2->Px(),
+ aodPart2->Py(),
+ aodPart2->Pz(),
+ aodPart2->E());
+
charge2 = TMath::Sign(1,aodPart2->GetPdgCode());
if ((charge1 * charge2) == -1) {
- lorVtot = lorV1 + lorV2;
+ lorVtot = lorV1;
+ lorVtot += lorV2;
Float_t invMass = lorVtot.M();
fHInvMassAll->Fill(invMass);
- fHInvMassAll_vs_Pt->Fill(invMass,lorVtot.Pt());
+ fHInvMassAllvsPt->Fill(invMass,lorVtot.Pt());
if (invMass > massMin && invMass < massMax) {
fHRapResonance->Fill(lorVtot.Rapidity());