Fork me on GitHub

Opened 6 years ago

Last modified 6 years ago

#1349 new How to

Calculating Missing ET after Smearing Jets

Reported by: keanet Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: MET, Smeared Fast Jets Cc:

Description

Hi, I wonder how I can recalculate missing ET after incorporating the effects of smearing fast jets using Delphes.

I am using EFlowMerger/eflow as input for the FastJetFinder to calculate the fastjets before smearing the momenta of the fastjets (see the attached Delphes card).

Someone gave me the idea that I can do the following:

  • remove all the constituents of the smeared jets from EFlowMerger/eflow
  • sum the momenta of the smeared jets and of the objects that remained in EFlowMerger/eflow after the previous step

but I am not sure how to remove all the constituents of the smeared jets from EFlowMerger/eflow. Do I have to tweak the FastJetFinder module to do it? If so, can you give me some guidance on how to do that? Or is it possible to just modify the Delphes card that I am using to accomplish the goal?

Thank you!

Attachments (1)

delphes_card_CMS_smear.tcl (23.4 KB ) - added by keanet 6 years ago.

Download all attachments as: .zip

Change History (5)

by keanet, 6 years ago

Attachment: delphes_card_CMS_smear.tcl added

comment:1 by Pavel Demin, 6 years ago

Or is it possible to just modify the Delphes card that I am using to accomplish the goal?

I don't think that it could be done by modifying the Delphes card.

Do I have to tweak the FastJetFinder module to do it? If so, can you give me some guidance on how to do that?

Yes, it can be done by tweaking the FastJetFinder module.

There are many possible ways of doing it.

For example, you could try the following steps:

  • add to the FastJetFinder module one new output array (similar to the code on line 291)
  • fill this array with all the constituents of all the jets (similar to the code on line 451)
  • in the Delphes card, add UniqueObjectFinder with two inputs: the new FastJetFinder/constituents and EFlowMerger/eflow
  • use the second output of the UniqueObjectFinder module for the MET calculations

comment:2 by keanet, 6 years ago

Thank you pavel for your reply. After modifying the FastJetFinder module and the Delphes card, I got an error after running Delphes...

I have made the following changes to the FastJetFinder module:

starting from line 291:

  fRhoOutputArray = ExportArray(GetString("RhoOutputArray", "rho"));
  fConstArray = ExportArray(GetString("ConstArray", "constituents"));

starting from line 451:

      fConstArray->AddCandidate(constituent);
      candidate->AddCandidate(constituent);
    }

To the Delphes card I added the following changes (shown in bold):

############
# Jet finder
############

module FastJetFinder FastJetFinder {
# set InputArray Calorimeter/towers

set InputArray EFlowMerger/eflow

set OutputArray jets
set ConstArray constituents

...

#####################################################
# Find uniquely identified photons/electrons/tau/jets
#####################################################

module UniqueObjectFinder UniqueObjectFinder {

add InputArray FastJetFinder/constituents constituents
add InputArray EFlowMerger/eflow eflow
add InputArray PhotonIsolation/photons photons
add InputArray ElectronIsolation/electrons electrons
add InputArray MuonIsolation/muons muons
add InputArray JetEnergyScale/jets jets

}

###################
# Missing ET merger
###################

module Merger MissingET {

add InputArray UniqueObjectFinder/eflow
add InputArray JetsMomentumSmearing/jets
set MomentumOutputArray momentum

}

But when I ran Delphes, I get the following error:

ERROR: can't access input list 'FastJetFinder/constituents' in module 'UniqueObjectFinder'

I have also tried doing on line 451
fConstArray->Add(constituent) instead of ->AddCandidate(constituent), but I still got the same error.

Last edited 6 years ago by Pavel Demin (previous) (diff)

comment:3 by Pavel Demin, 6 years ago

ERROR: can't access input list 'FastJetFinder?/constituents' in module 'UniqueObjectFinder?'

Looks like something wasn't rebuilt. Could you try to completely rebuild Delphes with the following commands?

make clean
rm -rf tmp
make

While adding eflow and constituents to the already existing UniqueObjectFinder would probably work, I think that creating a separate UniqueObjectFinder would be a cleaner solution.

comment:4 by keanet, 6 years ago

You were right. I needed to rebuild Delphes. Additionally, before I ran the commands

make clean
rm -rf tmp
make

I also had to add the last line below to FastJetFinder.h:

from line 152

TObjArray *fOutputArray; !
TObjArray *fRhoOutputArray;
!
TObjArray *fConstArray; '''

Besides, in FastJetFinder.cc, I had to do
fConstArray->Add(constituent) instead of ->AddCandidate(constituent)
Now the code runs and seems to be doing what it's supposed to do! Thank you very much!

Last edited 6 years ago by keanet (previous) (diff)
Note: See TracTickets for help on using tickets.