-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting same size output file when running on multiple input files in MadAnalysis expert mode? #273
Comments
Hi Meena. I do not understand what you are trying to do... Can you please be a bit more explicit. Thanks in advance. In principle, you are supposed to list all the paths to the root files in the input file, and MA5 will take care of the rest. Cheers, Benjamin |
Dear Benjamin, Hopefully now I am clear, if not please let me know. Thank you in advance, |
Hi Meena,
I want to run sampleAnalyzer on multiples file and need different output files corresponding to each input files. But with the current above script, I am able to get different root files corresponding to each input files but size of the all files are same or events are same in all output files for same histogram.
Yes, I am giving list of all input files (with path) in .txt files.
In this case, all event files are combined into a single output file. If you want one output file per event file, you need to run MA5 on different input files, each of them containing the path to one single event file.
I hope it helps.
Cheers,
Benjamin
|
Dear Benjamin, Thank you for your reply. you mean I can kept only one .root file in one .txt file and 2nd root file in 2nd .txt file to get different output files. Best Regards, |
Precisely.
Cheers,
B>
… On 15 Nov 2024, at 09:50, meena91 ***@***.***> wrote:
Dear Benjamin,
Thank you for your reply. you mean I can kept only one .root file in one .txt file and 2nd root file in 2nd .txt file to get different output files.
Best Regards,
Meena
—
Reply to this email directly, view it on GitHub <#273 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIWJNJZWEP3EGU24VKH5RBL2AWYUVAVCNFSM6AAAAABRZXTIKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZYGI2TONRTHE>.
You are receiving this because you commented.
|
Question
Dear Expert,
I tried below method to run on multiple files at one time, I am getting different root files but size and events are same in both root files.
Command to Run .ccp file is ./MadAnalysis5job input_files.txt.
Where input_files.txt has name of root files.
Could you please help me in this case?
bool ALP::Initialize(const MA5::Configuration& cfg, const std::mapstd::string,std::string& parameters)
{
gamma_size_gen_FSR= new TH1F("gamma_size_gen_FSR","",21,-0.5,20.5);
cout << "END Initialization" << endl;
return true;
}
void ALP::Finalize(const SampleFormat& summary, const std::vector& files)
{
const std::string outputDirectory = "output_files";
// Loop over all input files
for (size_t i = 0; i < files.size(); ++i)
{
const SampleFormat& file = files[i];
gamma_size_gen_FSR->Write();
bool ALP::Execute(SampleFormat& sample, const EventFormat& event)
{
std::vector<const MCParticleFormat*> gamma_FSR;
if (event.mc()!=0)
{
for (MAuint32 i = 0; i < event.mc()->particles().size(); i++) {
const MCParticleFormat* part = &(event.mc()->particles()[i]); // Access particle
gamma_FSR.push_back(part);
gamma_size_gen_FSR->Fill(gamma_FSR.size(),wgt);
}}
}
The text was updated successfully, but these errors were encountered: