,fHistMesonEtAcc(0)
,fHistTMDeltaR(0)
{
-
}
AliAnalysisEt::~AliAnalysisEt()
}
void AliAnalysisEt::Init()
-{// set up cuts and PDG info
- if (!fCuts) fCuts = new AliAnalysisEtCuts();
-
- if(!fPdgDB) fPdgDB = new TDatabasePDG();
- SetParticleCodes();
+{// clear variables, set up cuts and PDG info
+ ResetEventValues();
}
void AliAnalysisEt::CreateHistograms()
fHistTMDeltaR;
*/
}
+
Int_t AliAnalysisEt::AnalyseEvent(AliVEvent *event)
-{
- //this line is basically here to eliminate a compiler warning that event is not used. Making it a virtual function did not work with the plugin.
- cout<<"This event has "<<event->GetNumberOfTracks()<<" tracks"<<endl;
+{ //this line is basically here to eliminate a compiler warning that event is not used. Making it a virtual function did not work with the plugin.
+ cout << "This event has " << event->GetNumberOfTracks() << " tracks" << endl;
+ ResetEventValues();
return 0;
}
void AliAnalysisEt::ResetEventValues()
{ // clear
- fTotEt = 0;
- fTotEtAcc = 0;
- fTotNeutralEt = 0;
- fTotNeutralEtAcc = 0;
- fTotChargedEt = 0;
- fTotChargedEtAcc = 0;
- fMultiplicity = 0;
- fChargedMultiplicity = 0;
- fNeutralMultiplicity = 0;
-
- if(!fPdgDB) fPdgDB = new TDatabasePDG();
-
- if(fPiPlusCode==0){
+ fTotEt = 0;
+ fTotEtAcc = 0;
+ fTotNeutralEt = 0;
+ fTotNeutralEtAcc = 0;
+ fTotChargedEt = 0;
+ fTotChargedEtAcc = 0;
+ fMultiplicity = 0;
+ fChargedMultiplicity = 0;
+ fNeutralMultiplicity = 0;
+
+ if (!fCuts || !fPdgDB || fPiPlusCode==0) { // some Init's needed
+ cout << __FILE__ << ":" << __LINE__ << " : Init " << endl;
+ if (!fCuts) {
+ cout << " setting up Cuts " << endl;
+ fCuts = new AliAnalysisEtCuts();
+ }
+ if(!fPdgDB) {
+ cout << " setting up PdgDB " << endl;
+ fPdgDB = new TDatabasePDG();
+ }
+
+ if (fPiPlusCode==0) {
SetParticleCodes();
}
+ }
+ return;
}
+
void AliAnalysisEt::SetParticleCodes()
{ // set PDG info
fPionMass = fPdgDB->GetParticle("pi+")->Mass();
Int_t AliAnalysisHadEt::AnalyseEvent(AliVEvent *event)
{ //this line is basically here to eliminate a compiler warning that event is not used. Making it a virtual function did not work with the plugin.
- cout<<"This event has "<<event->GetNumberOfTracks()<<" tracks"<<endl;
- ResetEventValues();
- AliMCEvent *mcEvent = dynamic_cast<AliMCEvent*>(event);
-
- // Let's play with the stack!
- AliStack *stack = mcEvent->Stack();
-
- Int_t nPrim = stack->GetNtrack();
-
- for (Int_t iPart = 0; iPart < nPrim; iPart++)
- {
-
- TParticle *part = stack->Particle(iPart);
-
- if (!part)
- {
- Printf("ERROR: Could not get particle %d", iPart);
- continue;
- }
- }
+ cout << "This event has " << event->GetNumberOfTracks() << " tracks" << endl;
+ ResetEventValues();
return 0;
}
}
void AliAnalysisHadEt::Init()
-{//Initiate member vaiables to reasonable values
- if (!fCuts) fCuts = new AliAnalysisEtCuts();
-
- if(!fPdgDB) fPdgDB = new TDatabasePDG();
- SetParticleCodes();
+{// clear variables, set up cuts and PDG info
+ ResetEventValues();
}
void AliAnalysisHadEt::CreateHistograms()
void AliAnalysisHadEt::ResetEventValues()
{//Resets event values of et to zero
- fTotEt = 0;
- fTotEtAcc = 0;
- fTotNeutralEt = 0;
- fTotNeutralEtAcc = 0;
- fTotChargedEt = 0;
- fTotChargedEtAcc = 0;
- fMultiplicity = 0;
- fChargedMultiplicity = 0;
- fNeutralMultiplicity = 0;
+ fTotEt = 0;
+ fTotEtAcc = 0;
+ fTotNeutralEt = 0;
+ fTotNeutralEtAcc = 0;
+ fTotChargedEt = 0;
+ fTotChargedEtAcc = 0;
+ fMultiplicity = 0;
+ fChargedMultiplicity = 0;
+ fNeutralMultiplicity = 0;
+
+ if (!fCuts || !fPdgDB || fPiPlusCode==0) { // some Init's needed
+ cout << __FILE__ << ":" << __LINE__ << " : Init " << endl;
+ if (!fCuts) {
+ cout << " setting up Cuts " << endl;
+ fCuts = new AliAnalysisEtCuts();
+ }
+ if(!fPdgDB) {
+ cout << " setting up PdgDB " << endl;
+ fPdgDB = new TDatabasePDG();
+ }
+
+ if (fPiPlusCode==0) {
+ SetParticleCodes();
+ }
+ }
}
void AliAnalysisHadEt::SetParticleCodes()
fAntiNeutronCode = fPdgDB->GetParticle("antineutron")->PdgCode();
fEPlusCode = fPdgDB->GetParticle("e+")->PdgCode();
fEMinusCode = fPdgDB->GetParticle("e-")->PdgCode();
+ cout << "Resetting Codes: Pion " << fPiPlusCode
+ << "," << fPiMinusCode
+ << " Kaon " << fKPlusCode
+ << "," << fKMinusCode << endl;
}
void AliAnalysisHadEt::CreateEtaPtHisto2D(TString name, TString title)
plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
// Declare the analysis source files names separated by blancs. To be compiled runtime IN THE SAME ORDER THEY ARE LISTED
// using ACLiC on the worker nodes.
- plugin->SetAnalysisSource("AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTotEt.cxx");
+ plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTotEt.cxx");
// Declare all libraries (other than the default ones for the framework. These will be
// loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
plugin->SetAdditionalLibs("AliAnalysisEtCuts.h AliAnalysisEt.h AliAnalysisEtMonteCarlo.h AliAnalysisEtMonteCarloPhos.h AliAnalysisEtMonteCarloEmcal.h AliAnalysisEtReconstructed.h AliAnalysisEtReconstructedPhos.h AliAnalysisEtReconstructedEmcal.h AliAnalysisTaskTotEt.h AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTotEt.cxx");