@@ -73,10 +73,10 @@ struct skimmerPrimaryMuon {
7373
7474 // Configurables
7575 Configurable<bool > fillQAHistogram{" fillQAHistogram" , false , " flag to fill QA histograms" };
76- Configurable<std::string> ccdburl{" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
77- Configurable<std::string> grpPath{" grpPath" , " GLO/GRP/GRP" , " Path of the grp file" };
78- Configurable<std::string> grpmagPath{" grpmagPath" , " GLO/Config/GRPMagField" , " CCDB path of the GRPMagField object" };
79- Configurable<std::string> geoPath{" geoPath" , " GLO/Config/GeometryAligned" , " Path of the geometry file" };
76+ // Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
77+ // Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
78+ // Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
79+ // Configurable<std::string> geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
8080 Configurable<float > minpt{" minpt" , 0.2 , " min pt for muon" };
8181 Configurable<float > mineta{" mineta" , -4.0 , " eta acceptance" };
8282 Configurable<float > maxeta{" maxeta" , -2.5 , " eta acceptance" };
@@ -85,24 +85,25 @@ struct skimmerPrimaryMuon {
8585 Configurable<float > minRabs{" minRabs" , 17.6 , " min. R at absorber end" };
8686 Configurable<float > maxRabs{" maxRabs" , 89.5 , " max. R at absorber end" };
8787
88- o2::ccdb::CcdbApi ccdbApi;
89- Service<o2::ccdb::BasicCCDBManager> ccdb;
88+ // o2::ccdb::CcdbApi ccdbApi;
89+ // Service<o2::ccdb::BasicCCDBManager> ccdb;
9090 int mRunNumber ;
9191
92- o2::globaltracking::MatchGlobalFwd mMatching ;
92+ // o2::globaltracking::MatchGlobalFwd mMatching;
9393 HistogramRegistry fRegistry {" output" , {}, OutputObjHandlingPolicy::AnalysisObject, false , false };
9494 static constexpr std::string_view muon_types[5 ] = {" MFTMCHMID/" , " MFTMCHMIDOtherMatch/" , " MFTMCH/" , " MCHMID/" , " MCH/" };
9595
9696 void init (InitContext&)
9797 {
98- ccdb->setURL (ccdburl);
99- ccdb->setCaching (true );
100- ccdb->setLocalObjectValidityChecking ();
101- ccdb->setFatalWhenNull (false );
102- ccdbApi.init (ccdburl);
103-
104- addHistograms ();
98+ // ccdb->setURL(ccdburl);
99+ // ccdb->setCaching(true);
100+ // ccdb->setLocalObjectValidityChecking();
101+ // ccdb->setFatalWhenNull(false);
102+ // ccdbApi.init(ccdburl);
105103
104+ if (fillQAHistogram) {
105+ addHistograms ();
106+ }
106107 mRunNumber = 0 ;
107108 }
108109
@@ -111,47 +112,43 @@ struct skimmerPrimaryMuon {
111112 if (mRunNumber == bc.runNumber ()) {
112113 return ;
113114 }
114-
115115 mRunNumber = bc.runNumber ();
116- std::map<string, string> metadata;
117- auto soreor = o2::ccdb::BasicCCDBManager::getRunDuration (ccdbApi, mRunNumber );
118- auto ts = soreor.first ;
119- auto grpmag = ccdbApi.retrieveFromTFileAny <o2::parameters::GRPMagField>(grpmagPath, metadata, ts);
120- o2::base::Propagator::initFieldFromGRP (grpmag);
121- if (!o2::base::GeometryManager::isGeometryLoaded ()) {
122- ccdb->get <TGeoManager>(geoPath);
123- }
124- o2::mch::TrackExtrap::setField ();
116+
117+ // std::map<string, string> metadata;
118+ // auto soreor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, mRunNumber);
119+ // auto ts = soreor.first;
120+ // auto grpmag = ccdbApi.retrieveFromTFileAny<o2::parameters::GRPMagField>(grpmagPath, metadata, ts);
121+ // o2::base::Propagator::initFieldFromGRP(grpmag);
122+ // if (!o2::base::GeometryManager::isGeometryLoaded()) {
123+ // ccdb->get<TGeoManager>(geoPath);
124+ // }
125+ // o2::mch::TrackExtrap::setField();
125126 }
126127
127128 void addHistograms ()
128129 {
129- fRegistry .add (" Event/hCollisionCounter" , " collision counter" , kTH1F , {{2 , -0 .5f , 1.5 }}, false );
130-
131130 // for track
132- if (fillQAHistogram) {
133- auto hMuonType = fRegistry .add <TH1>(" Track/hMuonType" , " muon type" , kTH1F , {{5 , -0 .5f , 4 .5f }});
134- hMuonType->GetXaxis ()->SetBinLabel (1 , " MFT-MCH-MID (global muon)" );
135- hMuonType->GetXaxis ()->SetBinLabel (2 , " MFT-MCH-MID (global muon other match)" );
136- hMuonType->GetXaxis ()->SetBinLabel (3 , " MFT-MCH" );
137- hMuonType->GetXaxis ()->SetBinLabel (4 , " MCH-MID" );
138- hMuonType->GetXaxis ()->SetBinLabel (5 , " MCH standalone" );
139-
140- fRegistry .add (" Track/MFTMCHMID/hPt" , " pT;p_{T} (GeV/c)" , kTH1F , {{1000 , 0 .0f , 10 }}, false );
141- fRegistry .add (" Track/MFTMCHMID/hEtaPhi" , " #eta vs. #varphi;#varphi (rad.);#eta" , kTH2F , {{360 , 0 , 2 * M_PI}, {30 , -5 .0f , -2 .0f }}, false );
142- fRegistry .add (" Track/MFTMCHMID/hNclusters" , " Nclusters;Nclusters" , kTH1F , {{21 , -0 .5f , 20.5 }}, false );
143- fRegistry .add (" Track/MFTMCHMID/hNclustersMFT" , " NclustersMFT;Nclusters MFT" , kTH1F , {{11 , -0 .5f , 10.5 }}, false );
144- fRegistry .add (" Track/MFTMCHMID/hRatAbsorberEnd" , " R at absorber end;R at absorber end (cm)" , kTH1F , {{100 , 0 .0f , 100 }}, false );
145- fRegistry .add (" Track/MFTMCHMID/hPDCA" , " pDCA;r at absorber end (cm);p #times DCA (GeV/c #upoint cm)" , kTH2F , {{100 , 0 , 100 }, {100 , 0 .0f , 1000 }}, false );
146- fRegistry .add (" Track/MFTMCHMID/hChi2" , " chi2;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
147- fRegistry .add (" Track/MFTMCHMID/hChi2MatchMCHMID" , " chi2 match MCH-MID;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
148- fRegistry .add (" Track/MFTMCHMID/hChi2MatchMCHMFT" , " chi2 match MCH-MFT;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
149- fRegistry .add (" Track/MFTMCHMID/hDCAxy2D" , " DCA xy;DCA_{x} (cm);DCA_{y} (cm)" , kTH2F , {{200 , -10 , 10 }, {200 , -10 , +10 }}, false );
150- fRegistry .add (" Track/MFTMCHMID/hDCAxy2DinSigma" , " DCA xy;DCA_{x} (#sigma);DCA_{y} (#sigma)" , kTH2F , {{200 , -10 , 10 }, {200 , -10 , +10 }}, false );
151- fRegistry .add (" Track/MFTMCHMID/hDCAxResolutionvsPt" , " DCA_{x} vs. p_{T,#mu};p_{T,#mu} (GeV/c);DCA_{x} resolution (#mum);" , kTH2F , {{100 , 0 , 10 .f }, {100 , 0 , 100 }}, false );
152- fRegistry .add (" Track/MFTMCHMID/hDCAyResolutionvsPt" , " DCA_{y} vs. p_{T,#mu};p_{T,#mu} (GeV/c);DCA_{y} resolution (#mum);" , kTH2F , {{100 , 0 , 10 .f }, {100 , 0 , 100 }}, false );
153- fRegistry .addClone (" Track/MFTMCHMID/" , " Track/MCHMID/" );
154- }
131+ auto hMuonType = fRegistry .add <TH1>(" Track/hMuonType" , " muon type" , kTH1F , {{5 , -0 .5f , 4 .5f }});
132+ hMuonType->GetXaxis ()->SetBinLabel (1 , " MFT-MCH-MID (global muon)" );
133+ hMuonType->GetXaxis ()->SetBinLabel (2 , " MFT-MCH-MID (global muon other match)" );
134+ hMuonType->GetXaxis ()->SetBinLabel (3 , " MFT-MCH" );
135+ hMuonType->GetXaxis ()->SetBinLabel (4 , " MCH-MID" );
136+ hMuonType->GetXaxis ()->SetBinLabel (5 , " MCH standalone" );
137+
138+ fRegistry .add (" Track/MFTMCHMID/hPt" , " pT;p_{T} (GeV/c)" , kTH1F , {{1000 , 0 .0f , 10 }}, false );
139+ fRegistry .add (" Track/MFTMCHMID/hEtaPhi" , " #eta vs. #varphi;#varphi (rad.);#eta" , kTH2F , {{360 , 0 , 2 * M_PI}, {30 , -5 .0f , -2 .0f }}, false );
140+ fRegistry .add (" Track/MFTMCHMID/hNclusters" , " Nclusters;Nclusters" , kTH1F , {{21 , -0 .5f , 20.5 }}, false );
141+ fRegistry .add (" Track/MFTMCHMID/hNclustersMFT" , " NclustersMFT;Nclusters MFT" , kTH1F , {{11 , -0 .5f , 10.5 }}, false );
142+ fRegistry .add (" Track/MFTMCHMID/hRatAbsorberEnd" , " R at absorber end;R at absorber end (cm)" , kTH1F , {{100 , 0 .0f , 100 }}, false );
143+ fRegistry .add (" Track/MFTMCHMID/hPDCA" , " pDCA;r at absorber end (cm);p #times DCA (GeV/c #upoint cm)" , kTH2F , {{100 , 0 , 100 }, {100 , 0 .0f , 1000 }}, false );
144+ fRegistry .add (" Track/MFTMCHMID/hChi2" , " chi2;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
145+ fRegistry .add (" Track/MFTMCHMID/hChi2MatchMCHMID" , " chi2 match MCH-MID;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
146+ fRegistry .add (" Track/MFTMCHMID/hChi2MatchMCHMFT" , " chi2 match MCH-MFT;chi2" , kTH1F , {{100 , 0 .0f , 100 }}, false );
147+ fRegistry .add (" Track/MFTMCHMID/hDCAxy2D" , " DCA xy;DCA_{x} (cm);DCA_{y} (cm)" , kTH2F , {{200 , -10 , 10 }, {200 , -10 , +10 }}, false );
148+ fRegistry .add (" Track/MFTMCHMID/hDCAxy2DinSigma" , " DCA xy;DCA_{x} (#sigma);DCA_{y} (#sigma)" , kTH2F , {{200 , -10 , 10 }, {200 , -10 , +10 }}, false );
149+ fRegistry .add (" Track/MFTMCHMID/hDCAxResolutionvsPt" , " DCA_{x} vs. p_{T,#mu};p_{T,#mu} (GeV/c);DCA_{x} resolution (#mum);" , kTH2F , {{100 , 0 , 10 .f }, {100 , 0 , 100 }}, false );
150+ fRegistry .add (" Track/MFTMCHMID/hDCAyResolutionvsPt" , " DCA_{y} vs. p_{T,#mu};p_{T,#mu} (GeV/c);DCA_{y} resolution (#mum);" , kTH2F , {{100 , 0 , 10 .f }, {100 , 0 , 100 }}, false );
151+ fRegistry .addClone (" Track/MFTMCHMID/" , " Track/MCHMID/" );
155152 }
156153
157154 template <int mu_id, typename TTrack>
@@ -178,7 +175,6 @@ struct skimmerPrimaryMuon {
178175 for (const auto & collision : collisions) {
179176 auto bc = collision.template foundBC_as <aod::BCsWithTimestamps>();
180177 initCCDB (bc);
181- fRegistry .fill (HIST (" Event/hCollisionCounter" ), 0 .f );
182178 if (!collision.isSelected ()) {
183179 continue ;
184180 }
0 commit comments