fNMCevents(),
fStandalone(kTRUE),
fMCevent(0),
- fLastTrackByStrip()
+ fLastTrackByStrip(),
+ fPrimary(kTRUE)
{
// Default constructor
DefineInput (0, TList::Class());
fNMCevents(),
fStandalone(kTRUE),
fMCevent(0),
- fLastTrackByStrip()
+ fLastTrackByStrip(),
+ fPrimary(kTRUE)
{
fStandalone = SE;
if(fStandalone) {
}
}
- if(fMCevent)
+ if(fMCevent && fPrimary)
ProcessPrimary();
if(fStandalone) {
firstTrack = kFALSE;
}
}
-
+
for(Int_t j=0; j<particle->GetNumberOfTrackReferences();j++) {
AliTrackReference* ref = particle->GetTrackReference(j);
Float_t thisStripTrack = fLastTrackByStrip.operator()(det,ring,sec,strip);
if(particle->Charge() != 0 && i != thisStripTrack ) {
//Double_t x,y,z;
- /*AliFMDGeometry* fmdgeo = AliFMDGeometry::Instance();
- fmdgeo->Detector2XYZ(det,ring,sec,strip,x,y,z);
- Float_t phi = TMath::ATan2(y,x);
- if(phi<0) phi = phi+2*TMath::Pi();
- Float_t r = TMath::Sqrt(TMath::Power(x,2)+TMath::Power(y,2));
- Float_t theta = TMath::ATan2(r,z-vertex.At(2));*/
Float_t eta = pars->GetEtaFromStrip(det,ring,sec,strip,vertex.At(2));//-1*TMath::Log(TMath::Tan(0.5*theta));
TH1F* hHits = (TH1F*)fOutputList->FindObject(Form("hHits_FMD%d%c_vtxbin%d",det,ring,vertexBin));
hHits->Fill(eta);
}
- }
+ }
- }
+ }
}
//_____________________________________________________________________
fNMCevents(o.fNMCevents),
fStandalone(o.fStandalone),
fMCevent(o.fMCevent),
- fLastTrackByStrip(o.fLastTrackByStrip) {}
+ fLastTrackByStrip(o.fLastTrackByStrip),
+ fPrimary(o.fPrimary) {}
AliFMDAnalysisTaskDndeta& operator=(const AliFMDAnalysisTaskDndeta&) { return *this; }
// Implementation of interface methods
virtual void ConnectInputData(Option_t *option = "");
void SetMCEvent(AliMCEvent* mcevent) {fMCevent = mcevent;}
void ProcessPrimary();
TList* GetOutputList() {return fOutputList;}
-
+ void SetAnalyzePrimary(Bool_t prim) {fPrimary = prim;}
private:
Int_t fDebug; // Debug flag
TList* fOutputList;
Bool_t fStandalone;
AliMCEvent* fMCevent;
AliFMDFloatMap fLastTrackByStrip;
+ Bool_t fPrimary;
ClassDef(AliFMDAnalysisTaskDndeta, 0); // Analysis task for FMD analysis
};
fSharing("Sharing",kFALSE),
fDensity("Density",kFALSE),
fBackground("BackgroundCorrected",kFALSE),
- fDndeta("dNdeta",kFALSE)
+ fDndeta("dNdeta",kFALSE),
+ fPrimary(kTRUE)
{
// Default constructor
}
fSharing("Sharing",kFALSE),
fDensity("Density",kFALSE),
fBackground("BackgroundCorrected",kFALSE),
- fDndeta("dNdeta",kFALSE)
+ fDndeta("dNdeta",kFALSE),
+ fPrimary(kTRUE)
{
-
+
DefineOutput(1, TList::Class());
}
//_____________________________________________________________________
fDndeta.SetInputVertex(vtxString1);
fDndeta.SetInputList(bgcorlist);
fDndeta.SetOutputList(fListOfHistos);
-
+ fDndeta.SetAnalyzePrimary(fPrimary);
fSharing.CreateOutputObjects();
fDensity.CreateOutputObjects();
fBackground.CreateOutputObjects();
fSharing(o.fSharing),
fDensity(o.fDensity),
fBackground(o.fBackground),
- fDndeta(o.fDndeta){}
+ fDndeta(o.fDndeta),
+ fPrimary(o.fPrimary) {}
AliFMDAnalysisTaskSE& operator=(const AliFMDAnalysisTaskSE&) { return *this; }
virtual void Init();
virtual void UserCreateOutputObjects();
virtual void UserExec(Option_t* /*option*/);
void Terminate(Option_t */*option*/);
+ void SetAnalyzePrimary(Bool_t prim) {fPrimary = prim;}
+
private:
TList* fListOfHistos;
AliFMDAnalysisTaskDensity fDensity;
AliFMDAnalysisTaskBackgroundCorrection fBackground;
AliFMDAnalysisTaskDndeta fDndeta;
+ Bool_t fPrimary;
ClassDef(AliFMDAnalysisTaskSE, 1);
};
}
if(mult > 15)
{
- std::cout<<"rejecting hit in FMD "<<det<<" "<<ring<<std::endl;
+ // std::cout<<"rejecting hit in FMD "<<det<<" "<<ring<<std::endl;
fSharedThis = kFALSE;
fSharedPrev = kFALSE;
return 0;