fTrigdefs=0;
fToffset=0;
fMctoffset=0;
+ fMctracks=3;
}
///////////////////////////////////////////////////////////////////////////
IceF2k::~IceF2k()
fMctoffset=toffset;
}
///////////////////////////////////////////////////////////////////////////
+void IceF2k::SelectMcTracks(Int_t mode)
+{
+// User selection of MC tracks to be stored in the event structure.
+//
+// mode = 0 : No MC tracks are stored
+// 1 : Only muon and muon-neutrino MC tracks are stored
+// 2 : All lepton MC tracks are stored
+// 3 : All MC tracks (incl. brems, pairprod etc...) are stored
+//
+// By default mode=3 is set in the constructor of this class.
+
+ if (mode<0 || mode >3) return;
+ fMctracks=mode;
+}
+///////////////////////////////////////////////////////////////////////////
void IceF2k::SetInputFile(TString name)
{
// Set the name of the F2K input file.
// See the introductory docs of this IceF2k class for further details.
fToffset=fMctoffset;
+ if (!fMctracks) return;
+
// Loop over all the tracks and add them to the current event
AliTrack t;
Double_t vec[3];
if (idf2k==206) idpdg=-16;
}
+ // Check for the user selected MC track storage
+ if (fMctracks==1) // Store only muon and muon-neutrino tracks
+ {
+ if (abs(idpdg)!=13 && abs(idpdg)!=14) continue;
+ }
+ else if (fMctracks==2) // Store all lepton tracks
+ {
+ if (abs(idpdg)<11 || abs(idpdg)>16) continue;
+ }
+
t.SetParticleCode(idpdg);
t.SetName(fPdg->GetParticle(idpdg)->GetName());
t.SetTitle("MC track");
void SetOutputFile(TFile* ofile); // Set output file for the ROOT data structures
void SetOutputFile(TString name); // Create output file for the ROOT data structures
void SetMcToffset(Float_t toffset); // Set user defined time offset for MC data
+ void SelectMcTracks(Int_t mode); // User selection of MC tracks to be stored
TFile* GetOutputFile(); // Provide pointer to the ROOT output file
TDatabasePDG* GetPDG(); // Provide pointer to the PDG database
AliObjMatrix* GetOMdbase(); // Provide pointer to the OM geometry, calib. etc... database
AliDevice* fTrigdefs; // Trigger definitions as indicated in the header of the F2000 input file
Float_t fToffset; // Trigger time offset which might have been introduced during filtering
Float_t fMctoffset; // Trigger time offset which might have been introduced during MC generation
+ Int_t fMctracks; // MC tracks selection flag
void FillOMdbase(); // Fill geometry and calib. parameters of all devices
void SetFitdefs(); // Set the fit definitions as used in the F2000 input file
array fHeader; //! Structure holding the file header info
mevt fEvent; //! Structure holding the actual event data (hits, tracks, etc...)
- ClassDef(IceF2k,6) // Job for conversion of F2K data into IceEvent physics event structures.
+ ClassDef(IceF2k,7) // Job for conversion of F2K data into IceEvent physics event structures.
};
#endif