6 #define PBINNING 100, 0., 20.
7 #define THETABINNING 180, 0., 180.
8 #define PTBINNING 100, 0., 10.
9 #define YBINNING 100, -2., 6.
10 #define MBINNING 400, 0., 4.
25 #include "CbmTofHit.h"
33 #include "FairRootManager.h"
34 #include "FairTrackParam.h"
36 #include "TClonesArray.h"
37 #include "TDirectory.h"
41 #include "TLorentzVector.h"
42 #include "TMCProcess.h"
51 : FairTask(
"AnaDimuonAnalysis")
55 , fStsTrackMatches(NULL)
57 , fMuchTrackMatches(NULL)
61 , fMuPlus(new TClonesArray(
"CbmAnaMuonCandidate", 1))
62 , fMuMinus(new TClonesArray(
"CbmAnaMuonCandidate", 1))
100 FairRootManager* fManager = FairRootManager::Instance();
101 fMCTracks = (TClonesArray*) fManager->GetObject(
"MCTrack");
102 if (
nullptr ==
fMCTracks) LOG(FATAL) <<
"No MCTrack in input";
104 fStsTracks = (TClonesArray*) fManager->GetObject(
"StsTrack");
105 if (
nullptr ==
fStsTracks) LOG(FATAL) <<
"No StsTrack in input";
110 LOG(FATAL) <<
"No StsTrackMatch in input";
112 fMuchTracks = (TClonesArray*) fManager->GetObject(
"MuchTrack");
113 if (
nullptr ==
fMuchTracks) LOG(FATAL) <<
"No MuchTrack in input";
118 LOG(FATAL) <<
"No MuchTrackMatch in input";
120 fGlobalTracks = (TClonesArray*) fManager->GetObject(
"GlobalTrack");
121 if (
nullptr ==
fGlobalTracks) LOG(FATAL) <<
"No GlobalTrack in input";
123 fTrdTracks = (TClonesArray*) fManager->GetObject(
"TrdTrack");
124 if (
nullptr ==
fTrdTracks) LOG(FATAL) <<
"No TrdTrack in input";
126 fTofHit = (TClonesArray*) fManager->GetObject(
"TofHit");
127 if (
nullptr ==
fTofHit) LOG(FATAL) <<
"No TofHit in input";
133 fManager->Register(
"MuPlus",
"Much",
fMuPlus, kTRUE);
134 fManager->Register(
"MuMinus",
"Much",
fMuMinus, kTRUE);
157 fParticles =
new TClonesArray(
"PParticle", 100);
161 for (
int iEvent = 0; iEvent <
fInputTree->GetEntries(); iEvent++) {
166 TLorentzVector mom1 = Part1->
Vect4();
167 TLorentzVector mom2 = Part2->
Vect4();
168 TLorentzVector Mom = mom1 + mom2;
170 Mom.Rapidity(), Mom.Pt(), 1. / (Double_t)
fInputTree->GetEntries());
175 TString title1 =
"STS accepted MC signal";
176 TString title2 =
"STS+MUCH accepted MC signal";
177 TString title3 =
"STS+MUCH+TRD accepted MC signal";
178 TString title4 =
"STS+MUCH+TRD+TOF accepted MC signal";
182 YPt_StsAcc->GetYaxis()->SetTitle(
"P_{t} (GeV/c)");
194 acc_P[0][0] =
new TProfile(
"signal_accP_Sts", title1,
PBINNING);
195 acc_P[0][0]->GetXaxis()->SetTitle(
"P (GeV/c)");
196 acc_P[0][0]->GetYaxis()->SetTitle(
"%");
198 acc_P[1][0] = (TProfile*)
acc_P[0][0]->Clone(
"signal_accP_StsMuch");
199 acc_P[1][0]->SetTitle(title2);
200 acc_P[2][0] = (TProfile*)
acc_P[0][0]->Clone(
"signal_accP_StsMuchTrd");
201 acc_P[2][0]->SetTitle(title3);
202 acc_P[3][0] = (TProfile*)
acc_P[0][0]->Clone(
"signal_accP_StsMuchTrdTof");
203 acc_P[3][0]->SetTitle(title4);
206 acc_Theta[0][0]->GetXaxis()->SetTitle(
"#Theta (#circ)");
207 acc_Theta[0][0]->GetYaxis()->SetTitle(
"%");
210 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_accTheta_StsMuch");
213 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_accTheta_StsMuchTrd");
216 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_accTheta_StsMuchTrdTof");
219 title1 =
"STS accepted MC #mu+";
220 title2 =
"STS+MUCH accepted MC #mu+";
221 title3 =
"STS+MUCH+TRD accepted MC #mu+";
222 title4 =
"STS+MUCH+TRD+TOF accepted MC #mu+";
224 acc_P[0][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_accP_Sts");
225 acc_P[0][1]->SetTitle(title1);
226 acc_P[1][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_accP_StsMuch");
227 acc_P[1][1]->SetTitle(title2);
228 acc_P[2][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_accP_StsMuchTrd");
229 acc_P[2][1]->SetTitle(title3);
230 acc_P[3][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_accP_StsMuchTrdTof");
231 acc_P[3][1]->SetTitle(title4);
238 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_accTheta_StsMuchTrd");
241 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_accTheta_StsMuchTrdTof");
244 title1 =
"STS accepted MC #mu-";
245 title2 =
"STS+MUCH accepted MC #mu-";
246 title3 =
"STS+MUCH+TRD accepted MC #mu-";
247 title4 =
"STS+MUCH+TRD+TOF accepted MC #mu-";
249 acc_P[0][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_accP_Sts");
250 acc_P[0][2]->SetTitle(title1);
251 acc_P[1][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_accP_StsMuch");
252 acc_P[1][2]->SetTitle(title2);
253 acc_P[2][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_accP_StsMuchTrd");
254 acc_P[2][2]->SetTitle(title3);
255 acc_P[3][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_accP_StsMuchTrdTof");
256 acc_P[3][2]->SetTitle(title4);
263 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_accTheta_StsMuchTrd");
266 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_accTheta_StsMuchTrdTof");
270 "reconstructed MC signal after primary vertex cut (PVC)";
272 "reconstructed MC signal after PVC and STS cuts (StsCs)";
274 "reconstructed MC signal after PVC+StsCs and MUCH cuts (MuchCs)";
276 "reconstructed MC signal after PVC+StsCs+MuchCs and TRD cut (TrdC)";
278 "reconstructed MC signal after PVC+StsCs+MuchCs+TrdC and TOF cut";
280 effReco_P[0][0] = (TProfile*)
acc_P[0][0]->Clone(
"signal_effRecoP_VtxSts");
283 (TProfile*)
acc_P[0][0]->Clone(
"signal_effRecoP_VtxStsMuch");
286 (TProfile*)
acc_P[0][0]->Clone(
"signal_effRecoP_VtxStsMuchTrd");
289 (TProfile*)
acc_P[0][0]->Clone(
"signal_effRecoP_VtxStsMuchTrdTof");
293 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_effRecoTheta_VtxSts");
296 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_effRecoTheta_VtxStsMuch");
299 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_effRecoTheta_VtxStsMuchTrd");
302 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_effRecoTheta_VtxStsMuchTrdTof");
305 eff4pi_P[0][0] = (TProfile*)
acc_P[0][0]->Clone(
"signal_eff4piP_Vtx");
307 eff4pi_P[1][0] = (TProfile*)
acc_P[0][0]->Clone(
"signal_eff4piP_VtxSts");
309 eff4pi_P[2][0] = (TProfile*)
acc_P[0][0]->Clone(
"signal_eff4piP_VtxStsMuch");
312 (TProfile*)
acc_P[0][0]->Clone(
"signal_eff4piP_VtxStsMuchTrd");
315 (TProfile*)
acc_P[0][0]->Clone(
"signal_eff4piP_VtxStsMuchTrdTof");
319 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_eff4piTheta_Vtx");
322 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_eff4piTheta_VtxSts");
325 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_eff4piTheta_VtxStsMuch");
328 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_eff4piTheta_VtxStsMuchTrd");
331 (TProfile*)
acc_Theta[0][0]->Clone(
"signal_eff4piTheta_VtxStsMuchTrdTof");
343 (TH2D*)
YPt_StsAcc->Clone(
"YPt_VtxStsMuchTrdTofReco");
346 title0 =
"reconstructed MC #mu+ after primary vertex cut (PVC)";
347 title1 =
"reconstructed MC #mu+ after PVC and STS cuts (StsCs)";
348 title2 =
"reconstructed MC #mu+ after PVC+StsCs and MUCH cuts (MuchCs)";
349 title3 =
"reconstructed MC #mu+ after PVC+StsCs+MuchCs and TRD cut (TrdC)";
350 title4 =
"reconstructed MC #mu+ after PVC+StsCs+MuchCs+TrdC and TOF cut";
352 effReco_P[0][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_effRecoP_VtxSts");
354 effReco_P[1][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_effRecoP_VtxStsMuch");
357 (TProfile*)
acc_P[0][0]->Clone(
"muPl_effRecoP_VtxStsMuchTrd");
360 (TProfile*)
acc_P[0][0]->Clone(
"muPl_effRecoP_VtxStsMuchTrdTof");
364 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_effRecoTheta_VtxSts");
367 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_effRecoTheta_VtxStsMuch");
370 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_effRecoTheta_VtxStsMuchTrd");
373 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_effRecoTheta_VtxStsMuchTrdTof");
376 eff4pi_P[0][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_eff4piP_Vtx");
378 eff4pi_P[1][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_eff4piP_VtxSts");
380 eff4pi_P[2][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_eff4piP_VtxStsMuch");
382 eff4pi_P[3][1] = (TProfile*)
acc_P[0][0]->Clone(
"muPl_eff4piP_VtxStsMuchTrd");
385 (TProfile*)
acc_P[0][0]->Clone(
"muPl_eff4piP_VtxStsMuchTrdTof");
389 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_eff4piTheta_Vtx");
392 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_eff4piTheta_VtxSts");
395 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_eff4piTheta_VtxStsMuch");
398 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_eff4piTheta_VtxStsMuchTrd");
401 (TProfile*)
acc_Theta[0][0]->Clone(
"muPl_eff4piTheta_VtxStsMuchTrdTof");
404 title0 =
"reconstructed MC #mu- after primary vertex cut (PVC)";
405 title1 =
"reconstructed MC #mu- after PVC and STS cuts (StsCs)";
406 title2 =
"reconstructed MC #mu- after PVC+StsCs and MUCH cuts (MuchCs)";
407 title3 =
"reconstructed MC #mu- after PVC+StsCs+MuchCs and TRD cut (TrdC)";
408 title4 =
"reconstructed MC #mu- after PVC+StsCs+MuchCs+TrdC and TOF cut";
410 effReco_P[0][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_effRecoP_VtxSts");
412 effReco_P[1][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_effRecoP_VtxStsMuch");
415 (TProfile*)
acc_P[0][0]->Clone(
"muMn_effRecoP_VtxStsMuchTrd");
418 (TProfile*)
acc_P[0][0]->Clone(
"muMn_effRecoP_VtxStsMuchTrdTof");
422 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_effRecoTheta_VtxSts");
425 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_effRecoTheta_VtxStsMuch");
428 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_effRecoTheta_VtxStsMuchTrd");
431 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_effRecoTheta_VtxStsMuchTrdTof");
434 eff4pi_P[0][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_eff4piP_Vtx");
436 eff4pi_P[1][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_eff4piP_VtxSts");
438 eff4pi_P[2][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_eff4piP_VtxStsMuch");
440 eff4pi_P[3][2] = (TProfile*)
acc_P[0][0]->Clone(
"muMn_eff4piP_VtxStsMuchTrd");
443 (TProfile*)
acc_P[0][0]->Clone(
"muMn_eff4piP_VtxStsMuchTrdTof");
447 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_eff4piTheta_Vtx");
450 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_eff4piTheta_VtxSts");
453 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_eff4piTheta_VtxStsMuch");
456 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_eff4piTheta_VtxStsMuchTrd");
459 (TProfile*)
acc_Theta[0][0]->Clone(
"muMn_eff4piTheta_VtxStsMuchTrdTof");
463 BgSup[0]->GetXaxis()->SetTitle(
"P (GeV/c)");
464 BgSup[0]->GetYaxis()->SetTitle(
"suppression");
466 title0 =
"reconstructed tracks after primary vertex cut (PVC)";
467 title1 =
"reconstructed tracks after PVC and STS cuts (StsCs)";
468 title2 =
"reconstructed tracks after PVC+StsCs and MUCH cuts (MuchCs)";
469 title3 =
"reconstructed tracks after PVC+StsCs+MuchCs and TRD cut (TrdC)";
470 title4 =
"reconstructed tracks after PVC+StsCs+MuchCs+TrdC and TOF cut";
473 BgSup[1]->SetTitle(title0);
475 BgSup[2]->SetTitle(title1);
477 BgSup[3]->SetTitle(title2);
479 BgSup[4]->SetTitle(title3);
481 BgSup[5]->SetTitle(title4);
483 TString dir = getenv(
"VMCWORKDIR");
484 TString name = dir +
"/parameters/much/TOF8gev_fitParam_sigma"
487 TFile* FF =
new TFile(name);
489 TTree* MinParamMu = (TTree*) FF->Get(
"MinParam");
490 MinParamMu->SetBranchAddress(
"p0", &
p0min);
491 MinParamMu->SetBranchAddress(
"p1", &
p1min);
492 MinParamMu->SetBranchAddress(
"p2", &
p2min);
493 MinParamMu->GetEntry(0);
495 TTree* MaxParamMu = (TTree*) FF->Get(
"MaxParam");
496 MaxParamMu->SetBranchAddress(
"p0", &
p0max);
497 MaxParamMu->SetBranchAddress(
"p1", &
p1max);
498 MaxParamMu->SetBranchAddress(
"p2", &
p2max);
499 MaxParamMu->GetEntry(0);
509 Int_t nStsTracks =
fStsTracks->GetEntriesFast();
513 LOG(
DEBUG) <<
"------------------------";
515 LOG(
DEBUG) <<
"Number of tracks: MC - " <<
nMCTracks <<
", global - "
516 << nGlobalTracks <<
", STS - " << nStsTracks <<
", MUCH - "
518 LOG(
DEBUG) <<
"------------------------";
520 TLorentzVector pMC1, pMC2, M;
551 : Mu(kFALSE), Nsts(kFALSE), Nmuch(kFALSE), Ntrd(kFALSE), Ntof(kFALSE) {
565 for (Int_t iMCTrack = 0; iMCTrack <
nMCTracks; iMCTrack++) {
568 if (TMath::Abs(mcTrack->
GetPdgCode()) != 13)
continue;
572 muMn_mc.Nsts = kTRUE;
574 muMn_mc.Nmuch = kTRUE;
576 muMn_mc.Ntrd = kTRUE;
578 muMn_mc.Ntof = kTRUE;
585 muPl_mc.Nsts = kTRUE;
587 muPl_mc.Nmuch = kTRUE;
589 muPl_mc.Ntrd = kTRUE;
591 muPl_mc.Ntof = kTRUE;
598 if (muPl_mc.Mu && muMn_mc.Mu) signal_mc.Mu = kTRUE;
599 if (muPl_mc.Nsts && muMn_mc.Nsts) signal_mc.Nsts = kTRUE;
600 if (muPl_mc.Nmuch && muMn_mc.Nmuch) signal_mc.Nmuch = kTRUE;
601 if (muPl_mc.Ntrd && muMn_mc.Ntrd) signal_mc.Ntrd = kTRUE;
602 if (muPl_mc.Ntof && muMn_mc.Ntof) signal_mc.Ntof = kTRUE;
611 for (Int_t iTrack = 0; iTrack < nGlobalTracks; iTrack++) {
613 Bool_t analysis = kFALSE;
626 if (iStsTrack < 0)
continue;
631 if (!stsTrack)
continue;
635 Double_t chi2sts = 1000;
636 if (stsTrack->
GetNDF() != 0)
645 mom.SetVectM(p,
fMass);
647 Double_t momentum = mom.P();
649 BgSup[0]->Fill(momentum);
651 Int_t q = par.GetQp() > 0 ? 1 : -1;
656 Double_t chi2much = 1000;
658 if (iMuchTrack > -1) {
662 if (muchTrack->
GetNDF() != 0)
670 Double_t chi2trd = 1000;
672 if (iTrdTrack > -1) {
676 if (trdTrack->
GetNDF() != 0)
685 Double_t mass = -1000;
694 globalTrack->
GetLength() * 0.01 / (time * 1e-9 * TMath::C());
698 FairTrackParam* stpl = (FairTrackParam*) globalTrack->
GetParamLast();
699 stpl->Momentum(momL);
701 if (beta != 0) mass = momL.Mag() * momL.Mag() * (1. / beta / beta - 1.);
724 muMn_reco.Mu = kTRUE;
727 muMn_reco.Chi2V = kTRUE;
730 muMn_reco.Nsts = kTRUE;
733 muMn_reco.Nmuch = kTRUE;
736 muMn_reco.Ntrd = kTRUE;
739 +
p2min * momentum * momentum)
741 +
p2max * momentum * momentum))
742 muMn_reco.Ntof = kTRUE;
748 muPl_reco.Mu = kTRUE;
750 muPl_reco.Chi2V = kTRUE;
753 muPl_reco.Nsts = kTRUE;
756 muPl_reco.Nmuch = kTRUE;
759 muPl_reco.Ntrd = kTRUE;
762 +
p2min * momentum * momentum)
764 +
p2max * momentum * momentum))
765 muPl_reco.Ntof = kTRUE;
776 if (muPl_reco.Mu && muMn_reco.Mu) signal_reco.Mu = kTRUE;
777 if (muPl_reco.Chi2V && muMn_reco.Chi2V) signal_reco.Chi2V = kTRUE;
778 if (muPl_reco.Nsts && muMn_reco.Nsts) signal_reco.Nsts = kTRUE;
779 if (muPl_reco.Nmuch && muMn_reco.Nmuch) signal_reco.Nmuch = kTRUE;
780 if (muPl_reco.Ntrd && muMn_reco.Ntrd) signal_reco.Ntrd = kTRUE;
781 if (muPl_reco.Ntof && muMn_reco.Ntof) signal_reco.Ntof = kTRUE;
784 BgSup[1]->Fill(momentum);
787 BgSup[2]->Fill(momentum);
790 BgSup[3]->Fill(momentum);
793 BgSup[4]->Fill(momentum);
798 BgSup[5]->Fill(momentum);
819 if (!analysis)
continue;
849 int NofPlus =
fMuPlus->GetEntriesFast();
850 int NofMinus =
fMuMinus->GetEntriesFast();
851 for (
int iPart = 0; iPart < NofPlus; iPart++) {
854 for (
int jPart = 0; jPart < NofMinus; jPart++) {
858 YPtM->Fill(M.Rapidity(), M.Pt(), M.M());
870 TLorentzVector mom1 = Part1->
Vect4();
871 TLorentzVector mom2 = Part2->
Vect4();
879 acc_Theta[0][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Nsts);
881 acc_Theta[1][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Nmuch);
883 acc_Theta[2][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Ntrd);
885 acc_Theta[3][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Ntof);
889 mom2.Theta() * TMath::RadToDeg(),
895 mom2.Theta() * TMath::RadToDeg(),
901 mom2.Theta() * TMath::RadToDeg(),
907 mom2.Theta() * TMath::RadToDeg(),
919 eff4pi_Theta[0][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Chi2V);
921 eff4pi_Theta[1][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Nsts);
923 eff4pi_Theta[2][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Nmuch);
925 eff4pi_Theta[3][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Ntrd);
927 eff4pi_Theta[4][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Ntof);
936 acc_Theta[0][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Nsts);
938 acc_Theta[1][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Nmuch);
940 acc_Theta[2][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Ntrd);
942 acc_Theta[3][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Ntof);
946 mom1.Theta() * TMath::RadToDeg(),
952 mom1.Theta() * TMath::RadToDeg(),
958 mom1.Theta() * TMath::RadToDeg(),
964 mom1.Theta() * TMath::RadToDeg(),
976 eff4pi_Theta[0][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Chi2V);
978 eff4pi_Theta[1][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Nsts);
980 eff4pi_Theta[2][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Nmuch);
982 eff4pi_Theta[3][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Ntrd);
984 eff4pi_Theta[4][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Ntof);
987 TLorentzVector Mom = mom1 + mom2;
994 acc_Theta[0][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Nsts);
996 acc_Theta[1][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Nmuch);
998 acc_Theta[2][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Ntrd);
1000 acc_Theta[3][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Ntof);
1001 if (signal_mc.Nsts) {
1004 Mom.Theta() * TMath::RadToDeg(),
1008 if (signal_mc.Nmuch) {
1011 Mom.Theta() * TMath::RadToDeg(),
1015 if (signal_mc.Ntrd) {
1018 Mom.Theta() * TMath::RadToDeg(),
1022 if (signal_mc.Ntof) {
1025 Mom.Theta() * TMath::RadToDeg(),
1030 if (signal_reco.Mu) {
1031 if (signal_reco.Chi2V)
YPt_VtxReco->Fill(Mom.Rapidity(), Mom.Pt());
1032 if (signal_reco.Nsts)
YPt_VtxStsReco->Fill(Mom.Rapidity(), Mom.Pt());
1034 if (signal_reco.Ntrd)
1036 if (signal_reco.Ntof)
1045 eff4pi_Theta[0][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Chi2V);
1047 eff4pi_Theta[1][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Nsts);
1049 eff4pi_Theta[2][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Nmuch);
1051 eff4pi_Theta[3][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Ntrd);
1053 eff4pi_Theta[4][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Ntof);
1062 profile->Fill(param, 100);
1064 profile->Fill(param, 0);
1070 TFile*
f =
new TFile(
"YPt_histo.root",
"recreate");
1097 TFile* ff =
new TFile(
"eff_histo.root",
"recreate");
1098 TDirectory* dir1 = ff->mkdir(
"mu Plus");
1101 TDirectory* dir1a = dir1->mkdir(
"accepted mu Plus");
1103 for (
int j = 0; j < 4; j++)
1104 acc_P[j][1]->Write();
1105 for (
int j = 0; j < 4; j++)
1109 TDirectory* dir1b = dir1->mkdir(
"reconstructed mu Plus");
1111 for (
int j = 0; j < 4; j++)
1113 for (
int j = 0; j < 4; j++)
1115 for (
int j = 0; j < 5; j++)
1117 for (
int j = 0; j < 5; j++)
1120 TDirectory* dir2 = ff->mkdir(
"mu Minus");
1123 TDirectory* dir2a = dir2->mkdir(
"accepted mu Minus");
1125 for (
int j = 0; j < 4; j++)
1126 acc_P[j][2]->Write();
1127 for (
int j = 0; j < 4; j++)
1131 TDirectory* dir2b = dir2->mkdir(
"reconstructed mu Minus");
1133 for (
int j = 0; j < 4; j++)
1135 for (
int j = 0; j < 4; j++)
1137 for (
int j = 0; j < 5; j++)
1139 for (
int j = 0; j < 5; j++)
1142 TDirectory* dir3 = ff->mkdir(
"signal");
1145 TDirectory* dir3a = dir3->mkdir(
"accepted signal");
1147 for (
int j = 0; j < 4; j++)
1148 acc_P[j][0]->Write();
1149 for (
int j = 0; j < 4; j++)
1153 TDirectory* dir3b = dir3->mkdir(
"reconstructed signal");
1155 for (
int j = 0; j < 4; j++)
1157 for (
int j = 0; j < 4; j++)
1159 for (
int j = 0; j < 5; j++)
1161 for (
int j = 0; j < 5; j++)
1166 TFile*
f =
new TFile(
"sup_histo.root",
"recreate");
1167 for (
int j = 0; j < 6; j++)
1172 TFile*
f =
new TFile(
"YPtM.root",
"recreate");