1 #ifndef AliD0toKpi_H
2 #define AliD0toKpi_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
6 //-------------------------------------------------------------------------
7 //                          Class AliD0toKpi
8 //                 Reconstructed D0 -> K^- pi^+ class
9 //
10 //         Origin: A. Dainese    andrea.dainese@pd.infn.it
11 //-------------------------------------------------------------------------
13 #include <TMath.h>
15 //----------------------------------------------------------------------------
16 //     Some constants (masses + parameterized TOF PID)
17 //
18 // particle masses
19 const Double_t kMD0 = 1.8645;  // D0  mass
20 const Double_t kMK  = 0.49368; // K+  mass
21 const Double_t kMPi = 0.13957; // Pi+ mass
23 //  --- TOF tagging probabilities ---
24 //  central HIJING
25 //  B = 0.4 T
26 //  tracking errors in TPC included
27 //  With TRD
28 //
29 //  *** Pb-Pb dNch/dy=6000 ***
30 //
31 //  PIONS
32 const Int_t kPiBins_PbPb = 10;
33 const Double_t kPiBinWidth_PbPb = 0.250;
34 const Double_t kPiTagPi_PbPb[kPiBins_PbPb] = {0.211421,0.652184,0.624421,0.614727,0.610777,0.628015,0.631520,0.630324,0.637551,0.575235};
35 const Double_t kPiTagNid_PbPb[kPiBins_PbPb] = {0.788579,0.347816,0.375579,0.385273,0.389223,0.371985,0.368480,0.369676,0.362449,0.424765};
36 //  KAONS
37 const Int_t kKBins_PbPb = 10;
38 const Double_t kKBinWidth_PbPb = 0.250;
39 const Double_t kKTagK_PbPb[kKBins_PbPb] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.584185,0.519029,0.464117,0.247308};
40 const Double_t kKTagPi_PbPb[kKBins_PbPb] = {0.102049,0.289930,0.101930,0.057771,0.040286,0.028567,0.053108,0.094369,0.066302,0.247308};
41 const Double_t kKTagNid_PbPb[kKBins_PbPb] = {0.897951,0.608815,0.500408,0.474643,0.442705,0.416410,0.362707,0.386603,0.469580,0.505383};
42 //  PROTONS
43 const Int_t kPBins_PbPb = 9;
44 const Double_t kPBinWidth_PbPb = 0.500;
45 const Double_t kPTagP_PbPb[kPBins_PbPb] = {0.017940,0.350681,0.535286,0.583264,0.562935,0.560524,0.545992,0.598060,0.351245};
46 const Double_t kPTagPi_PbPb[kPBins_PbPb] = {0.195955,0.094949,0.039962,0.026039,0.007556,0.016986,0.030333,0.000000,0.000000};
47 const Double_t kPTagNid_PbPb[kPBins_PbPb] = {0.786105,0.554370,0.424751,0.390697,0.429508,0.422491,0.423675,0.401940,0.648755};
48 //
49 // pp PYTHIA
50 //
51 // *** cuts for pp ***
52 //
53 //  PIONS
54 const Int_t kPiBins_pp = 10;
55 const Double_t kPiBinWidth_pp = 0.250;
56 const Double_t kPiTagPi_pp[kPiBins_pp] = {0.194528,0.447097,0.603364,0.646413,0.647125,0.669157,0.688139,0.682564,0.689910,0.665710};
57 const Double_t kPiTagNid_pp[kPiBins_pp] = {0.805472,0.552903,0.396636,0.353587,0.352875,0.330843,0.311861,0.317436,0.310090,0.334290};
58 //  KAONS
59 const Int_t kKBins_pp = 10;
60 const Double_t kKBinWidth_pp = 0.250;
61 const Double_t kKTagK_pp[kKBins_pp] = {0.000000,0.173393,0.439690,0.519423,0.587025,0.605372,0.586021,0.650139,0.444444,0.299363};
62 const Double_t kKTagPi_pp[kKBins_pp] = {0.000000,0.001495,0.000000,-0.000000,-0.000000,0.000000,0.032258,0.060572,0.101449,0.242038};
63 const Double_t kKTagNid_pp[kKBins_pp] = {1.000000,0.825112,0.560310,0.480577,0.412975,0.394628,0.381720,0.289289,0.454106,0.458599};
64 //  PROTONS
65 const Int_t kPBins_pp = 9;
66 const Double_t kPBinWidth_pp = 0.500;
67 const Double_t kPTagP_pp[kPBins_pp] = {0.029404,0.438640,0.613710,0.665152,0.634961,0.657711,0.703704,0.685714,0.235294};
68 const Double_t kPTagPi_pp[kPBins_pp] = {0.000000,0.000000,0.000000,-0.000000,0.000000,0.000000,-0.000000,0.014286,-0.000000};
69 const Double_t kPTagNid_pp[kPBins_pp] = {0.970596,0.561360,0.386290,0.334848,0.365039,0.342289,0.296296,0.300000,0.764706};
74 //-----------------------------------------------------------------------------
75 class AliD0toKpi : public TObject {
76  public:
77   //
78   AliD0toKpi();
79   AliD0toKpi(Int_t ev,Int_t trkNum,
80              Double_t v1,Double_t v2,Double_t dca,
81              Double_t mom,Double_t d0);
82   virtual ~AliD0toKpi();
83   AliD0toKpi(const AliD0toKpi& d0toKpi);
85   Double_t Alpha() const { return (Ql(0)-Ql(1))/(Ql(0)+Ql(1)); }
86   void     ApplyPID(TString pidScheme="TOFparam_PbPb");
87   Double_t ChildrenRelAngle() const;
88   void     ComputeWgts();
89   void     CorrectWgt4BR(Double_t factor);
90   Double_t CosPointing() const;
91   Double_t CosPointingXY() const;
92   void     CosThetaStar(Double_t&,Double_t&) const;
93   Double_t Ct() const {return Length()*kMD0/P();}
94   Double_t Energy() const { return TMath::Sqrt(P()*P()+kMD0*kMD0); }
95   Double_t Eta() const;
96   Double_t EtaChild(Int_t child) const;
97   Int_t    EventNo() const {return TMath::Abs(fEvent);}
98   Double_t GetDCA() const { return 10000.*fDCA; }
99   Int_t    GetTrkNum(Int_t child) const { return fTrkNum[child]; }
100   Double_t Getd0Child(Int_t child) const { return fd0[child]; }
101   Int_t    GetPdgChild(Int_t child) const { return fPdg[child]; }
102   Int_t    GetPdgMum(Int_t child) const {return fMum[child]; }
103   void     GetWgts(Double_t&,Double_t&,TString sample) const;
104   void     GetPrimaryVtx(Double_t vtx) const
105     { vtx=fV1x; vtx=fV1y; vtx=fV1z; return; }
106   void     GetSecondaryVtx(Double_t vtx) const
107     { vtx=fV2x; vtx=fV2y; vtx=fV2z; return; }
109   void     InvMass(Double_t&,Double_t&) const;
110   Bool_t   IsSignal() const { if(fSignal) return kTRUE; return kFALSE; }
111   Double_t Length() const
112     { return TMath::Sqrt((fV1x-fV2x)*(fV1x-fV2x)
113                          +(fV1y-fV2y)*(fV1y-fV2y)+(fV1z-fV2z)*(fV1z-fV2z)); }
114   Double_t P()  const { return TMath::Sqrt(Pt()*Pt()+Pz()*Pz()); }
115   Double_t PChild(Int_t child)   const { return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]+fPz[child]*fPz[child]); }
116   Double_t ProdImpParams() const { return fd0*fd0; }
117   Double_t Pt() const { return TMath::Sqrt(Px()*Px()+Py()*Py()); }
118   Double_t PtChild(Int_t child)  const { return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]); }
119   Double_t Px() const { return (fPx+fPx); }
120   Double_t Py() const { return (fPy+fPy); }
121   Double_t Pz() const { return (fPz+fPz); }
122   Double_t Ql(Int_t child) const;
123   Double_t Qt() const;
124   Double_t Rapidity() const { return 0.5*TMath::Log((Energy()+Pz())/(Energy()-Pz()+1.e-13)); }
125   Bool_t   Select(const Double_t* cuts,Int_t&,Int_t&) const;
126   void     SetPrimaryVtx(Double_t vtx)
127     { fV1x=vtx; fV1y=vtx; fV1z=vtx; return; }
128   void     SetSignal() { fSignal =  kTRUE; return; }
129   void     SetTOFmasses(Double_t mass)
130     { fTOFmass=mass; fTOFmass=mass; return; }
131   void     SetPIDresponse(Double_t resp0,Double_t resp1);
132   void     SetPdgCodes(Int_t pdg) {fPdg=pdg;fPdg=pdg;return;}
133   void     SetMumPdgCodes(Int_t mum) {fMum=mum;fMum=mum;return;}
135   void     DrawPIDinTOF(TString pidScheme="TOFparam_PbPb") const;
136   Double_t LinearInterpolation(Double_t p,Int_t nBins,Double_t Bin,
137                                const Double_t *values) const;
138   //  void     SetPtWgts4pp();
139   //
140  private:
141   //
142   Bool_t   fSignal; // TRUE if signal, FALSE if background (for simulation)
143   Int_t    fEvent;  // number of the event this D0 comes from
144                     // -1 if the D0 comes from ev. mixing
146   Int_t fTrkNum; // numbers of the two decay tracks
148   Double_t fV1x; //
149   Double_t fV1y; // position of the primary vertex of the event
150   Double_t fV1z; //
151   Double_t fV2x; //
152   Double_t fV2y; // position of the reconstructed secondary vertex
153   Double_t fV2z; //
154   Double_t fDCA; // DCA of the two tracks
156   Double_t fPx;  //
157   Double_t fPy;  // momenta of the two tracks
158   Double_t fPz;  // at the reconstructed vertex
160   Double_t fd0;  //  impact parameters in the bending plane
162   Int_t fPdg;  // PDG codes of the two tracks (for sim.)
163   Int_t fMum;  // PDG codes of the mothers    (for sim.)
165   Double_t fTagPi;  // probability to be tagged as pion
166   Double_t fTagKa;  // probability to be tagged as kaon
167   Double_t fTagPr;  // probability to be tagged as proton
168   Double_t fTagNid; // probability to be tagged as "non-identified"
170   Double_t fPIDrespEl; // det. response to be electron
171   Double_t fPIDrespMu; // det. response to be muon
172   Double_t fPIDrespPi; // det. response to be pion
173   Double_t fPIDrespKa; // det. response to be kaon
174   Double_t fPIDrespPr; // det. response to be proton
175   Double_t fTOFmass; // mass estimated by the TOF (-1000. if track not reached TOF)
{"ft_lang_label":"__label__en","ft_lang_prob":0.6138086,"math_prob":0.9428604,"size":8104,"snap":"2022-40-2023-06","text_gpt3_token_len":3198,"char_repetition_ratio":0.23753086,"word_repetition_ratio":0.017321017,"special_character_ratio":0.50777394,"punctuation_ratio":0.27872583,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9750443,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-29T10:31:46Z\",\"WARC-Record-ID\":\"<urn:uuid:47c69308-4fd6-4afd-9b0d-3951a9f663ed>\",\"Content-Length\":\"54346\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:145d1ee1-e1c0-46a7-9e7a-d0828139d642>\",\"WARC-Concurrent-To\":\"<urn:uuid:f4da5968-328f-4bad-9037-14653b54740c>\",\"WARC-IP-Address\":\"129.240.118.59\",\"WARC-Target-URI\":\"http://git.uio.no/git/?p=u/mrichter/AliRoot.git;a=blob;f=ANALYSIS/AliD0toKpi.h;hb=dab957fbf36d1a4f7da85c912375371b91584285\",\"WARC-Payload-Digest\":\"sha1:PV5ALVK4NM44OU3KZEEDBCENW2IFLMMN\",\"WARC-Block-Digest\":\"sha1:Q77JZJG46NLXANLK45T33JQFLKCZAFED\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499710.49_warc_CC-MAIN-20230129080341-20230129110341-00481.warc.gz\"}"}