ome notes on how I generated PU 200 ttbar samples There are PU200 samples generated for MTD TDR studies. (MTD is the timing detector for Phase-2 upgrades that some of our SNT fermilab members work on) (TDR is short for Technical Design Report where people make studies on details on how MTD detector is going to be built and what it will be useful for.) At the time of the MTD study official sample generation the tracker layout was set and so these samples are good for use for segment linking study. You can find some list of PU200 samples here https://cms-pdmv.cern.ch/mcm/requests?tags=MTDTDRAutumn18PU200DR&page=0&shown=127 Of these samples, I used ```TTbar_14TeV_TuneCP5_Pythia8``` From DIS you can look this sample up (in FEVT format) http://uaf-8.t2.ucsd.edu/~namin/dis2/?query=%2FTTbar_14TeV_TuneCP5_Pythia8%2FPhaseIIMTDTDRAutumn18DR-PU200_103X_upgrade2023_realistic_v2-v1%2FFEVT&type=files&short=short Out of many events, I downloaded the first one. /store/mc/PhaseIIMTDTDRAutumn18DR/TTbar_14TeV_TuneCP5_Pythia8/FEVT/PU200_103X_upgrade2023_realistic_v2-v1/80000/DA6E99FE-92B7-514C-92C8-3DD9FD3212F1.root You can download the sample via #/bin/bash function xcp { # path should start with /store dest="." if [ $# -gt 1 ]; then dest=$2 fi xrdcp root://xrootd.unl.edu/$1 $dest } xcp /store/mc/PhaseIIMTDTDRAutumn18DR/TTbar_14TeV_TuneCP5_Pythia8/FEVT/PU200_103X_upgrade2023_realistic_v2-v1/80000/DA6E99FE-92B7-514C-92C8-3DD9FD3212F1.root I downloaded them here: /home/users/phchang/public_html/analysis/sdl/trackingNtuple/CMSSamples/ttbarPU200 To generate the trackingNtuple.root from here one needs to setup a similar setup as shown here: https://github.com/slava77/sdlTracking/wiki But we need ```CMSSW_10_4_0_mtd5```. And some modifications: The modification shown here is necessary because the pileup truth information is not present and hence need to skip some stuff. diff --git a/Validation/RecoTrack/plugins/TrackingNtuple.cc b/Validation/RecoTrack/plugins/TrackingNtuple.cc index f89510568ea..e5c64f441c7 100644 --- a/Validation/RecoTrack/plugins/TrackingNtuple.cc +++ b/Validation/RecoTrack/plugins/TrackingNtuple.cc @@ -2433,9 +2433,20 @@ TrackingNtuple::SimHitData TrackingNtuple::matchCluster(const OmniClusterRef& cl } }//loop over matching hits + auto search = simHitRefKeyToIndex.find(std::make_pair(simHitKey, simHitID)); + if (search != simHitRefKeyToIndex.end()) + { auto simHitIndex = simHitRefKeyToIndex.at(std::make_pair(simHitKey, simHitID)); ret.matchingSimHit.push_back(simHitIndex); + simhit_hitIdx[simHitIndex].push_back(clusterKey); + simhit_hitType[simHitIndex].push_back(static_cast(hitType)); + } + else + { + // ret.matchingSimHit.push_back(-1); + } + double chargeFraction = 0.; for(const SimTrack& simtrk: trackingParticle->g4Tracks()) { auto found = simTrackIdToChargeFraction.find(simtrk.trackId()); @@ -2450,9 +2461,6 @@ TrackingNtuple::SimHitData TrackingNtuple::matchCluster(const OmniClusterRef& cl ret.bunchCrossing.push_back(bx); ret.event.push_back(event); - simhit_hitIdx[simHitIndex].push_back(clusterKey); - simhit_hitType[simHitIndex].push_back(static_cast(hitType)); - } else {//save all matching hits for(auto ip = range.first; ip != range.second; ++ip) { TrackPSimHitRef TPhit = ip->second; @@ -2498,6 +2506,9 @@ TrackingNtuple::SimHitData TrackingNtuple::matchCluster(const OmniClusterRef& cl if(foundElectron && !keepEleSimHits_) continue; + // ignore + continue; + auto ex = cms::Exception("LogicError") << "Did not find SimHit for reco hit DetId " << hitId.rawId() << " for TP " << trackingParticle.key() << " bx:event " << bx << ":" << event << " PDGid " << trackingParticle->pdgId() << " q " << trackingParticle->charge() Once it is compiled run a command like the following where ```step2.root``` is the same as the ```DA6E99FE-92B7-514C-92C8-3DD9FD3212F1.root``` cmsDriver.py step3 --conditions auto:phase2_realistic -n 10 --era Phase2C4_timing_layer_bar\ --eventcontent FEVTDEBUGHLT,MINIAODSIM,DQM --runUnscheduled\ -s RAW2DIGI,L1Reco,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM\ --datatier GEN-SIM-RECO,MINIAODSIM,DQMIO --geometry Extended2023D35\ --customise Validation/RecoTrack/customiseTrackingNtuple.customiseTrackingNtuple \ --customise_command="process.trackingParticlesIntime.intimeOnly = False\nprocess.trackingNtuple.includeOOT = True\nprocess.trackingNtuple.keepEleSimHits = True\nprocess.trackingNtuple.saveSimHitsP3 = True\nprocess.trackingNtuple.addSeedCartesianCov = True\nprocess.trackingNtuple.simHitBySignificance = True\n"\ -n -1 --filein file:step2.root --lazy_download --fileout file:step3.root --nThreads 16 --processName=TrkNtuple >& step3.log For example look here for where I did this ```/home/users/phchang/public_html/analysis/sdl/trackingNtuple/CMSSW_10_4_0_mtd5/src```. I used ```run.sh```. And one can find several outputs