Skip to content
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

B/D hadron track monitoring for offline DQM #17444

Merged

Conversation

smoortga
Copy link
Contributor

@smoortga smoortga commented Feb 7, 2017

This PR contains currently a standalone version of a DQM tool to monitor track properties of tracks from B and D hadron decays (or more generally bottom and charmed hadron decays).
This information is needed by the BTV POG to monitor any possible effects on b-tagging (and c-tagging) performance.

We would like to add this to the standard DQM sequence for release validation to be able to compare between pre-releases.

Note 1: As already discussed over e-mail, this code should be ran over a TTbar RECODEBUG sample, since it uses track history information (TrackingParticles). Therefore a small TTbar RECODEBUG sample should be produced for every new release on which this code will be ran. Previous tests have shown that it would already be sufficient to run over only 1000 events. I was told this was something that should be looked into by the PDMV group.

Note 2: I have no previous experience in DQM code, but I managed to run my code in a standalone way (first the Analyzer, then the Harvester) and produce the required output histograms. You can see my standalone test configuration in:
Analyzer: Validation/RecoB/test/test_BDHadronTrackMonitoringAnalyzer_cfg.py
Harvester: Validation/RecoB/test/test_BDHadronTrackMonitoringHarvester_cfg.py
As you can see I require PAT to be ran (I use PF2PAT followed by switchJetCollection, which follows as close as possible the code used by the BTV POG to make testing ntuples, called the BTagAnalyzer). I just mention this since this might not be the usual procedure in DQM applications.

I am looking forward to your feedback on how to proceed in order to finally get this tool included in the standard DQM sequence.

@imarches, @JyothsnaKomaragiri, @mverzett you might want to follow this discussion as well.

Thanks,
Cheers,
Seth Moortgat

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

A new Pull Request was created by @smoortga for CMSSW_9_0_X.

It involves the following packages:

Validation/RecoB

@cmsbuild, @dmitrijus, @vanbesien, @davidlange6 can you please review it and eventually sign? Thanks.
@imarches, @acaudron, @JyothsnaKomaragiri, @mverzett, @ferencek, @pvmulder this is something you requested to watch as well.
@davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@dmitrijus
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 14, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/17784/console Started: 2017/02/14 17:08

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar

@makortel
Copy link
Contributor

Note that in MC RelVals TrackingParticles are available in the GEN-SIM-DIGI-RAW(-HLTDEBUG) samples that are used as the input to RECO (+VALIDATION). Tracking validation uses TrackingParticles from there.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

using namespace std;


std::map<unsigned int, std::string> TrkHistCat{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smoortga -please move this into a header where it can be properly shared (eg, this link has some examples that should work http://stackoverflow.com/questions/23504339/creating-and-populating-a-map-in-a-header-file-in-c)

e(1,1)=0.0015*0.0015;
e(2,2)=15.*15.;
reco::Vertex::Point p(0,0,0);
pv= new reco::Vertex(p,e,1,1,1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this get deleted?


// -------- Loop Over Jets ----------
for ( pat::JetCollection::const_iterator jet = patJetsColl->begin(); jet != patJetsColl->end(); ++jet ) {
if ( ( jet->pt() < minJetPt_ || std::fabs( jet->eta() ) > maxJetEta_ ) ) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The double (( are confusing (and not needed)



unsigned int nseltracks = 0;
int nseltracksCat[6] = {0,0,0,0,0,0}; // following the order of TrkHistCat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::vector nseltracksCat(TrkHistCat.size(),0)

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@davidlange6
Copy link
Contributor

Hi @smoortga - the real motivation was to remove the global variables. I think a good approach is to change the map to a vector and a set of enums inside a class public interface

enum Types( BCWeakDecay=0, BWeakDecay=1, CWeakDecay=2, PU=3, Other=4, Fake=5};
static const std::vectorstd::string typeNames;

then in the c++
std::vector<std::string MyClass::typeNames = {"BCWeakDecay", "BWeakDecay", "CWeakDecay", "PU", "Other", "Fake"};

(maybe the enums are not needed )

Can you try this?

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #17444 was updated. @cmsbuild, @dmitrijus, @vanbesien, @davidlange6 can you please check and sign again.

@smoortga
Copy link
Contributor Author

@davidlange6
Ok I see, I followed your proposal and now all global variables should be gone. The enum is indeed in principle not needed, but it makes the code a bit more understandable at some places so I leave it in.
Could you check if it seems ok like this? if everything seems fine I can ask for a final revision + signing of the PR.

Thanks
Cheers
Seth

@davidlange6
Copy link
Contributor

please test
thanks

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 24, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/17955/console Started: 2017/02/24 19:13

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants