diff --git a/GEMCSCBendingAnalyzer/MuonAnalyser/plugins/BuildFile.xml b/GEM_Alignment/plugins/BuildFile.xml similarity index 100% rename from GEMCSCBendingAnalyzer/MuonAnalyser/plugins/BuildFile.xml rename to GEM_Alignment/plugins/BuildFile.xml diff --git a/GEMCSCBendingAnalyzer/MuonAnalyser/plugins/analyser.cc b/GEM_Alignment/plugins/analyser.cc similarity index 98% rename from GEMCSCBendingAnalyzer/MuonAnalyser/plugins/analyser.cc rename to GEM_Alignment/plugins/analyser.cc index c41fd53..52c0175 100644 --- a/GEMCSCBendingAnalyzer/MuonAnalyser/plugins/analyser.cc +++ b/GEM_Alignment/plugins/analyser.cc @@ -268,7 +268,7 @@ analyser::analyser(const edm::ParameterSet& iConfig) Segment_prop = iConfig.getParameter("Segment_prop"); debug = iConfig.getParameter("debug"); isCosmic = iConfig.getParameter("isCosmic"); - cout << "tracker_prop " << tracker_prop << " CSC_prop " << CSC_prop << " debug " << debug << std::endl; + cout << "tracker_prop " << tracker_prop << " CSC_prop " << CSC_prop << " Segment_prop " << Segment_prop << " debug " << debug << std::endl; if(CSC_prop){CSC_tree = data_.book(CSC_tree, 1); prop_list.push_back(1);} if(tracker_prop){Tracker_tree = data_.book(Tracker_tree, 2); prop_list.push_back(2);} @@ -298,9 +298,9 @@ analyser::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){ if (! iEvent.getByToken(muons_, muons)) return; if (muons->size() == 0) return; - cout << "new evt numb is " << iEvent.eventAuxiliary().event() << " and new lumiblock is " << iEvent.eventAuxiliary().luminosityBlock() << endl; + if (debug) cout << "new evt numb is " << iEvent.eventAuxiliary().event() << " and new lumiblock is " << iEvent.eventAuxiliary().luminosityBlock() << endl; - cout << "Run Number is " << iEvent.run() << std::endl; + if (debug) cout << "Run Number is " << iEvent.run() << std::endl; for (size_t i = 0; i < muons->size(); ++i){ //cout << "new muon" << endl; edm::RefToBase muRef = muons->refAt(i); @@ -308,9 +308,9 @@ analyser::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){ //if (mu->pt() < 2.0) continue; //can apply a pt cut later if (not mu->standAloneMuon()) continue; - cout << "new standalone" << endl; + if (debug) cout << "new standalone" << endl; for(auto it = std::begin(prop_list); it != std::end(prop_list); ++it){ - std::cout << "prop " << *it << "about to start propagate" << std::endl; + if (debug) std::cout << "prop " << *it << "about to start propagate" << std::endl; int prop_type = *it; propagate(mu, prop_type, iEvent, i); } @@ -425,7 +425,7 @@ void analyser::propagate_to_GEM(const reco::Muon* mu, const GEMEtaPartition* ch, const LocalPoint pos2D_local_ch(pos_local_ch.x(), pos_local_ch.y(), 0); if (!(tsos_ch.globalPosition().z() * tsos_seg.globalPosition().z() < 0) and bps.bounds().inside(pos2D_local_ch) and ch->id().station() == 1 and ch->id().ring() == 1){ tmp_has_prop = true; - std::cout << "Delta to GEM!!! = " << used_delta << " prop " << prop_type << std::endl; + if (debug) std::cout << "Delta to GEM!!! = " << used_delta << " prop " << prop_type << std::endl; pos_GP = tsos_ch.globalPosition(); pos_startingPoint_GP = tsos_seg.globalPosition(); } diff --git a/GEMCSCBendingAnalyzer/MuonAnalyser/test/analyser.py b/GEM_Alignment/test/analyser.py similarity index 83% rename from GEMCSCBendingAnalyzer/MuonAnalyser/test/analyser.py rename to GEM_Alignment/test/analyser.py index b6489b1..b1ba543 100644 --- a/GEMCSCBendingAnalyzer/MuonAnalyser/test/analyser.py +++ b/GEM_Alignment/test/analyser.py @@ -19,8 +19,6 @@ from Configuration.AlCa.GlobalTag import GlobalTag #process.CSCGeometryESModule.applyAlignment = cms.bool(False) -#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T15', '') -#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_design', '') process.MessageLogger.cerr.FwkReport.reportEvery = 5000 @@ -49,7 +47,8 @@ ) ) -process.source.fileNames.append('file:step2.root') +#process.source.fileNames.append('file:step2.root') +process.source.fileNames.append('/store/data/Commissioning2021/ZeroBias0/AOD/PromptReco-v1/000/346/490/00000/9d646c8b-8067-42e4-adfe-ea69403eaa64.root') process.options = cms.untracked.PSet( SkipEvent = cms.untracked.vstring('ProductNotFound') @@ -63,11 +62,12 @@ gemSimHits = cms.InputTag("g4SimHits", "MuonGEMHits"), muons = cms.InputTag("muons"), vertexCollection = cms.InputTag("offlinePrimaryVerticies"), - tracker_prop = cms.bool(False), - CSC_prop = cms.bool(True), - Segment_prop = cms.bool(True), + #Which propagations to do + tracker_prop = cms.bool(True), #From inner track + CSC_prop = cms.bool(True), #From CSC track + Segment_prop = cms.bool(True), #From ME1/1 segment debug = cms.bool(False), - isCosmic = cms.bool(True) + isCosmic = cms.bool(True) #Cosmics go in opposite direction, ignores inner track ) #process.p = cms.EndPath(process.analyser) diff --git a/GEMCSCBendingAnalyzer/MuonAnalyser/test/crab3_runana_MC.py b/GEM_Alignment/test/crab3_runana_MC.py similarity index 100% rename from GEMCSCBendingAnalyzer/MuonAnalyser/test/crab3_runana_MC.py rename to GEM_Alignment/test/crab3_runana_MC.py diff --git a/README.md b/README.md index e917ffb..fc5f057 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,16 @@ # alignment GEM alignment studies -CMSSW_12_0_3 - +``` +scram p -n DirectoryName CMSSW_12_0_3 +cd DirectoryName/src/ +git clone git@github.com:gem-sw/alignment.git +cd alignment/GEM_Alignment/ +cmsenv +scram b -j8 +cd test +voms-proxy-init --rfc --voms cms cmsRun analyser.py +``` + +Currently set to run all 3 propagation methods on a test file from 2021 Comissioning ZeroBias0 dataset