Delphes with MA5tune card in MA5v1.3

Asked by xbyuan

Hi,

Recently, I try to recast the analysis in the CMS paper arXiv:1404.5801, focusing on the WZ+jets background. Since CMS uses the lepton isolation based on the relative PT in the cone containing the lepton, I choose Delphes with MA5tune card in MA5v1.3 and analyse the generated .root file in the reconstruction level.

After reading arXiv:1405.3982, 1407.3278 and the slide
https://madanalysis.irmp.ucl.ac.be/attachment/wiki/PublicAnalysisDatabase/MA5-1.2.pdf, I still have some questions on the Delphes with MA5tune card in MA5.

1. For my event file, PHYSICS->Isol->eflow->sumIsolation(myMuon, event.rec(), 0.5, 1) is always larger than myMuon->pt(), i.e. relIsolation() always larger than 1. Is it right?

I think the relative isolation measure is usually defined as I_rel=sumPT_cone/sumPT_lepton, as in the CMS paper. Here, sumPT_cone is the sum of the pt of all objects within a cone around the lepton and do not include the pt of the lepton. Therefore, I_rel is always smaller than 1.

Since relIsolation() > 1 in MA5, I’m not sure if it is due to my event file, or the specific definition of the isolation in MA5.

2. For my event file, myMuon->isolCones().size() always gives 0. Is isolCones() not supported in MA5v1.3?

3. When running ./MadAnalysis5job file_path, I get the follow warning
WARNING: GenParticle corresponding to a photon is not found in the gen table

4. In normal mode of MA5 and reconstruction level, i.e. ./ma5 -R, the figure generated by “plot THT 100 0 500 [logY]” shows THT is always 0. But, the figure generated in ./ma5 -P mode shows THT is non-zero and distributed from 0 to 500. In the expert mode, event.rec()->THT() also gives non-zero value.

I addition, my event file is generated by MadGraph5v2.3.3 + Pythia, with the commands
import model sm-lepton_masses_no_b_mass

define j = j b b~

generate p p > w- z , (w- > l- vl~), (z > l- l+)
add process p p > w- z j , (w- > l- vl~), (z > l- l+)
add process p p > w- z j j, (w- > l- vl~), (z > l- l+)
add process p p > w- z , (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
add process p p > w- z j , (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
add process p p > w- z j j, (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
add process p p > w- z , (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))
add process p p > w- z j , (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))
add process p p > w- z j j, (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))

Thank you for your help.

Best Regards,
Xing-Bo Yuan

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Hi Xing-Bo,

> 1. For my event file, PHYSICS->Isol->eflow->sumIsolation(myMuon, event.rec(), 0.5, 1) is always larger than myMuon->pt(), i.e. relIsolation() always larger than 1. Is it right?
>
> I think the relative isolation measure is usually defined as I_rel=sumPT_cone/sumPT_lepton, as in the CMS paper. Here, sumPT_cone is the sum of the pt of all objects within a cone around the lepton and do not include the pt of the lepton. Therefore, I_rel is always smaller than 1.
>
> Since relIsolation() > 1 in MA5, I’m not sure if it is due to my event file, or the specific definition of the isolation in MA5.
I_rel can be larger than 1. Take a non-isolated particle for instance.

> 2. For my event file, myMuon->isolCones().size() always gives 0. Is isolCones() not supported in MA5v1.3?
IsolCones is supported within delphesMA5tune and not with delphes. Please install the correct fastsim module.

> 3. When running ./MadAnalysis5job file_path, I get the follow warning
> WARNING: GenParticle corresponding to a photon is not found in the gen table
That's fine. Just ignore it.

> 4. In normal mode of MA5 and reconstruction level, i.e. ./ma5 -R, the figure generated by “plot THT 100 0 500 [logY]” shows THT is always 0. But, the figure generated in ./ma5 -P mode shows THT is non-zero and distributed from 0 to 500. In the expert mode, event.rec()->THT() also gives non-zero value.
Have you checked the saf output of the figure and the cross section associated with your sample. If this cross section is zero, you will always get a zero histogram.

Cheers,

Benjamin

Revision history for this message
xbyuan (yuanxingbo) said :
#2

Hi, Benjamin,

Thank you for your reply.

1.
"I_rel can be larger than 1. Take a non-isolated particle for instance.”

The problem is, my events always give l_rel > 1, i.e. relIsolation() always larger than 1.

2.
"IsolCones is supported within delphesMA5tune and not with delphes. Please install the correct fastsim module."

As discussed in https://madanalysis.irmp.ucl.ac.be/attachment/wiki/PublicAnalysisDatabase/MA5-1.2.pdf, the best method in MAv1.3 is to use delphes with special cards. When generating .root events, I use the following code as suggested in the above link,

set main.fastsim.package = delphes
set main.fastsim.detector = cms-ma5tune

However, myMuon->isolCones().size() always gives 0.

Is IsolCones() only supported in delphesMA5tune, but not in delphes with cmd-ma5tune card?

3."That's fine. Just ignore it.”
OK.

4."Have you checked the saf output of the figure and the cross section associated with your sample. If this cross section is zero, you will always get a zero histogram.”

The cross section is non-zero. Since all other plots look correct, e.g. "plot MET 100 0 200”. In addition, I have checked the saf output of the figure, THT is 0. The code is
  TH1F *selection_41_40 = new TH1F("selection_41_40","selection_41_40",100,0,500);
   selection_41_40->SetBinContent(1,346783);
   selection_41_40->SetEntries(100);
   selection_41_40->SetFillColor(9);
   selection_41_40->SetLineColor(9);
   selection_41_40->GetXaxis()->SetLabelFont(42);
   selection_41_40->GetXaxis()->SetLabelSize(0.035);
   selection_41_40->GetXaxis()->SetTitleSize(0.035);
   selection_41_40->GetXaxis()->SetTitleFont(42);
   selection_41_40->GetYaxis()->SetLabelFont(42);
   selection_41_40->GetYaxis()->SetLabelSize(0.035);
   selection_41_40->GetYaxis()->SetTitleSize(0.035);
   selection_41_40->GetYaxis()->SetTitleFont(42);
   selection_41_40->GetZaxis()->SetLabelFont(42);
   selection_41_40->GetZaxis()->SetLabelSize(0.035);
   selection_41_40->GetZaxis()->SetTitleSize(0.035);
   selection_41_40->GetZaxis()->SetTitleFont(42);
   mystack->Add(selection_41_40,"");
   mystack->Draw("");
   tempo85->Modified();
   tempo85->cd();
   tempo85->SetSelected(tempo85);
}

Thank you again for your time.

Best Regards,
Xing-Bo Yuan

Revision history for this message
Benjamin Fuks (fuks) said :
#3

Hi Xing-Bo,

> 1.
> "I_rel can be larger than 1. Take a non-isolated particle for instance.”
>
> The problem is, my events always give l_rel > 1, i.e. relIsolation()
> always larger than 1.
I do not know neither details of your event file nor how the fastsim has been run. Maybe can you run delphes together with one of the cards provided on the PAD webpage?

> 2.
> "IsolCones is supported within delphesMA5tune and not with delphes. Please install the correct fastsim module."
>
> As discussed in
> https://madanalysis.irmp.ucl.ac.be/attachment/wiki/PublicAnalysisDatabase/MA5-1.2.pdf,
> the best method in MAv1.3 is to use delphes with special cards. When
> generating .root events, I use the following code as suggested in the
> above link,
>
> set main.fastsim.package = delphes
> set main.fastsim.detector = cms-ma5tune
>
> However, myMuon->isolCones().size() always gives 0.
>
> Is IsolCones() only supported in delphesMA5tune, but not in delphes with
> cmd-ma5tune card?
This is indeed the case.

> 4."Have you checked the saf output of the figure and the cross section associated with your sample. If this cross section is zero, you will always get a zero histogram.”
>
> The cross section is non-zero. Since all other plots look correct, e.g. "plot MET 100 0 200”. In addition, I have checked the saf output of the figure, THT is 0. The code is
> TH1F *selection_41_40 = new TH1F("selection_41_40","selection_41_40",100,0,500);
> selection_41_40->SetBinContent(1,346783);
> selection_41_40->SetEntries(100);
> selection_41_40->SetFillColor(9);
> selection_41_40->SetLineColor(9);
> selection_41_40->GetXaxis()->SetLabelFont(42);
> selection_41_40->GetXaxis()->SetLabelSize(0.035);
> selection_41_40->GetXaxis()->SetTitleSize(0.035);
> selection_41_40->GetXaxis()->SetTitleFont(42);
> selection_41_40->GetYaxis()->SetLabelFont(42);
> selection_41_40->GetYaxis()->SetLabelSize(0.035);
> selection_41_40->GetYaxis()->SetTitleSize(0.035);
> selection_41_40->GetYaxis()->SetTitleFont(42);
> selection_41_40->GetZaxis()->SetLabelFont(42);
> selection_41_40->GetZaxis()->SetLabelSize(0.035);
> selection_41_40->GetZaxis()->SetTitleSize(0.035);
> selection_41_40->GetZaxis()->SetTitleFont(42);
> mystack->Add(selection_41_40,"");
> mystack->Draw("");
> tempo85->Modified();
> tempo85->cd();
> tempo85->SetSelected(tempo85);
> }
This indeed means that the histogram is empty. Could you please check the C++ code that has been generated by ma5 (in Build/SampleAnalyzer/User/Analyzer)? I have tried on my side and it works (I even have non zero plots). According to the above problem, I suspect something with your event file.

Regards,

Benjamin

Revision history for this message
xbyuan (yuanxingbo) said :
#4

Hi, Benjamin,

Thank you for the reply.

1. “I do not know neither details of your event file nor how the fastsim has been run. Maybe can you run delphes together with one of the cards provided on the PAD webpage?”

a) My event file is generated by MadGraph5v2.3.3 + Pythia, with the following commands
import model sm-lepton_masses_no_b_mass

define j = j b b~

generate p p > w- z , (w- > l- vl~), (z > l- l+)
add process p p > w- z j , (w- > l- vl~), (z > l- l+)
add process p p > w- z j j, (w- > l- vl~), (z > l- l+)
add process p p > w- z , (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
add process p p > w- z j , (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
add process p p > w- z j j, (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
add process p p > w- z , (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))
add process p p > w- z j , (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))
add process p p > w- z j j, (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))

b) I follow the official guide in the link https://madanalysis.irmp.ucl.ac.be/attachment/wiki/PublicAnalysisDatabase/MA5-1.2.pdf to run the fastsim, i.e. ./ma5 -R -s wz.cmd. where wz.cmd contains the following commands,

set main.fastsim.package = delphes
set main.fastsim.detector = cms-ma5tune

import /home/xbyuan/Nu/FL_check/w_z_jet_3/Events/run_01/tag_1_pythia_events.hep.gz

submit MA_Delphes
exit

As shown in the PAD webpage, all delphes cards are only used in MA5tune or v1.2/Delphes3. However, PHYSICS->Isol()->eflow->sumIsolation(), relIsolation() is only available in MA5v1.3 with atlas-ma5tune/cms-ma5tune cards. Are you sure the cards in the PAD webpage doesn’t conflict with MA5v1.3 and the methods e.g. sumIsolation()?

c) In addition, I want to know what’s the definition of relIsolation(lepton,,,) in MA5v1.3. Is it I_rel = sumPT_cone/PT_lepton? Here,
I_rel : relIsolation(lepton,,,)
PT_lepton : the pt value of the lepton,
sumPT_cone : the sum of the pt of all objects within a cone around the lepton and do not include the pt of the lepton.
Therefore, relIsolation(lepton)<0.15 (typical CMS value) is considered as an isolated lepton. Is it right?

However, after checking the source code in /MAv1.3/tools/SampleAnalyzer/Commons/Service/IsolationEFlow.h, I find sumIsolation(lepton) sums pt of event.rec()->EFlowTracks(), EFlowPhotons() and EFlowNeutralHadrons() and EFlowTracks() contains the lepton. Therefore, the source code show MA5v1.3 use I_rel = (sumPT_cone + PT_lepton)/PT_lepton.

Therefore, I feel confused about the definition of relIsolation(lepton,,,).

2. "This is indeed the case.”
Thank you for the information.

3. "This indeed means that the histogram is empty. Could you please check the C++ code that has been generated by ma5 (in Build/SampleAnalyzer/User/Analyzer)? I have tried on my side and it works (I even have non zero plots). According to the above problem, I suspect something with your event file.”

I have checked.
In normal mode, i.e. ./ma5 -R, "plot MET 100 0 200” gives empty distribution.
In expert mode, i.e. ./MadAnalysis5job, "event.rec()->THT()” gives non-zero values.

In normal mode, I find THT is generated by the following command in Build/SampleAnalyzer/User/Analyzer

H41_->IncrementNEvents(__event_weight__);
H41_->Fill(PHYSICS->Transverse->EventTHT(event.rec()),__event_weight__);

Then, I use this command in expert mode and find PHYSICS->Transverse->EventTHT(event.rec()) is non-zero and equal to event.rec()->THT(). Therefore, I guess my problem is not due to the event file.

Thank you again for your time.

Best Regards,
Xing-Bo Yuan

Revision history for this message
Benjamin Fuks (fuks) said :
#5

Hi Xing-Bo,

> a) My event file is generated by MadGraph5v2.3.3 + Pythia, with the following commands
> import model sm-lepton_masses_no_b_mass
>
> define j = j b b~
>
> generate p p > w- z , (w- > l- vl~), (z > l- l+)
> add process p p > w- z j , (w- > l- vl~), (z > l- l+)
> add process p p > w- z j j, (w- > l- vl~), (z > l- l+)
> add process p p > w- z , (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
> add process p p > w- z j , (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
> add process p p > w- z j j, (w- > ta- vt~, (ta- > l- vl~ vt)), (z > l- l+)
> add process p p > w- z , (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))
> add process p p > w- z j , (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))
> add process p p > w- z j j, (w- > l- vl~), (z > ta- ta+, (ta- > l- vl~ vt), (ta+ > l+ vl vt~ ))
This is unfortunately too heavy for my computer. I cannot generate that sample.

> As shown in the PAD webpage, all delphes cards are only used in MA5tune or v1.2/Delphes3. However, PHYSICS->Isol()->eflow->sumIsolation(), relIsolation() is only available in MA5v1.3 with atlas-ma5tune/cms-ma5tune cards. Are you sure the cards in the PAD webpage doesn’t conflict with MA5v1.3 and the methods e.g. sumIsolation()?
That's not correct. You have both v1.2 and v1.3 cards. v1.2 cards are compatible with delphesMA5tune and v1.3cards are compatible with delphes.

> c) In addition, I want to know what’s the definition of relIsolation(lepton,,,) in MA5v1.3. Is it I_rel = sumPT_cone/PT_lepton? Here,
> I_rel : relIsolation(lepton,,,)
> PT_lepton : the pt value of the lepton,
> sumPT_cone : the sum of the pt of all objects within a cone around the lepton and do not include the pt of the lepton.
> Therefore, relIsolation(lepton)<0.15 (typical CMS value) is considered as an isolated lepton. Is it right?
That's correct.

> However, after checking the source code in
> /MAv1.3/tools/SampleAnalyzer/Commons/Service/IsolationEFlow.h, I find
> sumIsolation(lepton) sums pt of event.rec()->EFlowTracks(),
> EFlowPhotons() and EFlowNeutralHadrons() and EFlowTracks() contains the
> lepton. Therefore, the source code show MA5v1.3 use I_rel = (sumPT_cone
> + PT_lepton)/PT_lepton.
Oh I was confused with your previous statement. If you add as an argument: 'type==ALL_COMPONENTS', then the pt of the lepton will be subtracted. This will be fixed in v1.4. Thanks for pointing it out.

> 3. "This indeed means that the histogram is empty. Could you please
> check the C++ code that has been generated by ma5 (in
> Build/SampleAnalyzer/User/Analyzer)? I have tried on my side and it
> works (I even have non zero plots). According to the above problem, I
> suspect something with your event file.”
Can you please provide me a small event sample (100 events) and the exact set of commands that are used in ma5?

Regards,

Benjamin

Revision history for this message
xbyuan (yuanxingbo) said :
#6

Hi, Benjamin,

Thank you for the detailed explanation.

1. "That's not correct. You have both v1.2 and v1.3 cards. v1.2 cards are compatible with delphesMA5tune and v1.3cards are compatible with delphes.”
Thank you for the explanation.

2. "Oh I was confused with your previous statement. If you add as an argument: 'type==ALL_COMPONENTS', then the pt of the lepton will be subtracted. This will be fixed in v1.4. Thanks for pointing it out.”

I have tried your suggestion. However, I find there are still problems. I use the following definitions

const RecLeptonFormat* MyElectron = &event.rec()->electrons()[i];

double I_rel_1 = PHYSICS->Isol->eflow->relIsolation(MyElectron
, event.rec(),0.3,0.5,IsolationEFlow::ALL_COMPONENTS);

double I_rel_2 = PHYSICS->Isol->eflow->relIsolation(MyElectron
,event.rec(),0.3,0.5);

As expected, I_rel_1 is smaller than 1 for most events. However, for some event, I_rel_1 is negative.
As expected, I_rel_2 should equal (I_rel_1+1). But, for some event, it is not.

3. "Can you please provide me a small event sample (100 events) and the exact set of commands that are used in ma5?”

Please find the file in the following link
https://www.dropbox.com/s/fy2vutajy6gs91z/w_z_sample.zip?dl=0
where the MadGraph and MadAnalysis commands are included.

Thank you again for your time.

Best Regards,
Xing-Bo Yuan

Revision history for this message
Benjamin Fuks (fuks) said :
#7

Hi Xing-Bo,

We are investigating it and will come back to you asap.

Cheers,

Benjamin

On 13 May 2016, at 09:47 , xbyuan <email address hidden> wrote:

> Question #293501 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/293501
>
> Status: Answered => Open
>
> xbyuan is still having a problem:
> Hi, Benjamin,
>
> Thank you for the detailed explanation.
>
> 1. "That's not correct. You have both v1.2 and v1.3 cards. v1.2 cards are compatible with delphesMA5tune and v1.3cards are compatible with delphes.”
> Thank you for the explanation.
>
> 2. "Oh I was confused with your previous statement. If you add as an
> argument: 'type==ALL_COMPONENTS', then the pt of the lepton will be
> subtracted. This will be fixed in v1.4. Thanks for pointing it out.”
>
> I have tried your suggestion. However, I find there are still problems.
> I use the following definitions
>
> const RecLeptonFormat* MyElectron = &event.rec()->electrons()[i];
>
> double I_rel_1 = PHYSICS->Isol->eflow->relIsolation(MyElectron
> , event.rec(),0.3,0.5,IsolationEFlow::ALL_COMPONENTS);
>
> double I_rel_2 = PHYSICS->Isol->eflow->relIsolation(MyElectron
> ,event.rec(),0.3,0.5);
>
> As expected, I_rel_1 is smaller than 1 for most events. However, for some event, I_rel_1 is negative.
> As expected, I_rel_2 should equal (I_rel_1+1). But, for some event, it is not.
>
>
> 3. "Can you please provide me a small event sample (100 events) and the exact set of commands that are used in ma5?”
>
> Please find the file in the following link
> https://www.dropbox.com/s/fy2vutajy6gs91z/w_z_sample.zip?dl=0
> where the MadGraph and MadAnalysis commands are included.
>
>
> Thank you again for your time.
>
> Best Regards,
> Xing-Bo Yuan
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Can you help with this problem?

Provide an answer of your own, or ask xbyuan for more information if necessary.

To post a message you must log in.