| 1 | pam-fi | 1.1 | /* | 
| 2 |  |  | * TrkDedxHeCut.h | 
| 3 |  |  | * | 
| 4 |  |  | *  Created on: 19-may-2009 | 
| 5 |  |  | *      Author: N. Nikonov | 
| 6 |  |  | */ | 
| 7 |  |  |  | 
| 8 |  |  | /*! @file TrkDedxHeCut.h  The TrkDedxHeCut.h class definition file. */ | 
| 9 |  |  |  | 
| 10 |  |  | #ifndef TRKDEDXHECUT_H_ | 
| 11 |  |  | #define TRKDEDXHECUT_H_ | 
| 12 |  |  |  | 
| 13 |  |  | #include "../../PamCutBase/PamCutBase.h" | 
| 14 |  |  |  | 
| 15 |  |  | #include <TH2F.h> | 
| 16 |  |  | #include <TF1.h> | 
| 17 |  |  | #include <TStyle.h> | 
| 18 |  |  | #include <TMath.h> | 
| 19 |  |  |  | 
| 20 |  |  |  | 
| 21 |  |  | /*! @brief Cutting a band DEDX vs. Rigidity for Helium. | 
| 22 |  |  | * This cut discards events where DEDX vs. Rigidity by Tracker measurements are outside the helium "corridor". | 
| 23 |  |  | */ | 
| 24 |  |  | class TrkDedxHeCut: public PamCut { | 
| 25 |  |  |  | 
| 26 |  |  | public: | 
| 27 |  |  | /*! @brief Constructor. | 
| 28 |  |  | * | 
| 29 |  |  | * @param cutName The cut's name. | 
| 30 |  |  | */ | 
| 31 |  |  | TrkDedxHeCut(const char *cutName) : | 
| 32 |  |  | PamCut(cutName){ | 
| 33 |  |  | _cuthededxrig = BBbetagamma(4*.938, 2, 14, 28.0855, 173, 0, 500, 4.44, .1492, 3.3, .2014, 2.87,1.); //Bethe-Bloch for He in Si | 
| 34 |  |  |  | 
| 35 |  |  |  | 
| 36 |  |  | #ifdef DEBUGPAMCUT | 
| 37 |  |  |  | 
| 38 |  |  | #define RIG_XBIN 600 | 
| 39 |  |  | #define DEDX_YBIN 600 | 
| 40 |  |  |  | 
| 41 |  |  | Double_t RIB[RIG_XBIN+1]; | 
| 42 |  |  | for(Int_t i = 0; i<RIG_XBIN+1; i++) RIB[i]=(0.01)*TMath::Power(10.,i/(Double_t(RIG_XBIN))*5.); | 
| 43 |  |  | h_dedx_rig_before = new TH2F("DEDX_RIG_before","DEDX(Trk) vs. Rigidity distribution", | 
| 44 |  |  | RIG_XBIN,RIB, DEDX_YBIN, 0., 30.); | 
| 45 |  |  | h_dedx_rig_before->GetYaxis()->SetTitle("Trk DE/DX (MIP)"); | 
| 46 |  |  | h_dedx_rig_before->GetYaxis()->SetLabelSize(0.025); | 
| 47 |  |  | h_dedx_rig_before->GetXaxis()->SetTitle("Rigidity (GV)"); | 
| 48 |  |  | h_dedx_rig_before->GetXaxis()->SetLabelSize(0.025); | 
| 49 |  |  | h_dedx_rig_before->SetContour(50); | 
| 50 |  |  | h_dedx_rig_before->SetStats(kFALSE); | 
| 51 |  |  | gStyle->SetPalette(1); | 
| 52 |  |  | Double_t sum = h_dedx_rig_before->GetBinContent(h_dedx_rig_before->GetMaximumBin()); | 
| 53 |  |  | Double_t lev[50]; | 
| 54 |  |  | for(Int_t i = 0; i<50; i++){ | 
| 55 |  |  | lev[i]=TMath::Power(10.,i/(50.)*TMath::Log10(sum)); | 
| 56 |  |  | h_dedx_rig_before->SetContourLevel(i,lev[i]); | 
| 57 |  |  | } | 
| 58 |  |  | h_dedx_rig_after = (TH2F*)h_dedx_rig_before->Clone("DEDX_RIG_after"); | 
| 59 |  |  | #endif | 
| 60 |  |  |  | 
| 61 |  |  | } | 
| 62 |  |  | /*! @brief Destructor. */ | 
| 63 |  |  | ~TrkDedxHeCut() { | 
| 64 |  |  |  | 
| 65 |  |  | delete _cuthededxrig; | 
| 66 |  |  |  | 
| 67 |  |  | #ifdef DEBUGPAMCUT | 
| 68 |  |  | h_dedx_rig_before->Write(); | 
| 69 |  |  | h_dedx_rig_after->Write(); | 
| 70 |  |  | #endif | 
| 71 |  |  | } | 
| 72 |  |  |  | 
| 73 |  |  | /*! @brief The DEDX vs. beta Helium check. | 
| 74 |  |  | * | 
| 75 |  |  | * @param event The event to analyze. | 
| 76 |  |  | * @return #CUTOK if event is inside helium "corridor". | 
| 77 |  |  | * @return 0 otherwise. | 
| 78 |  |  | */ | 
| 79 |  |  | int Check(PamLevel2 *event); | 
| 80 |  |  |  | 
| 81 |  |  | private: | 
| 82 |  |  |  | 
| 83 |  |  | TF1* _cuthededxrig; | 
| 84 |  |  |  | 
| 85 |  |  | #ifdef DEBUGPAMCUT | 
| 86 |  |  | TH2F* h_dedx_rig_before; | 
| 87 |  |  | TH2F* h_dedx_rig_after; | 
| 88 |  |  | #endif | 
| 89 |  |  |  | 
| 90 |  |  |  | 
| 91 |  |  | TF1* BBbetagamma(Float_t m_GeV, Float_t z, Int_t Z, Float_t A, Float_t I_eV, Double_t xmin, Double_t xmax, Float_t C_positive, Float_t a, Float_t m, Float_t x0, Float_t x1, Float_t scale); | 
| 92 |  |  | Bool_t CutHeDEDXrig(Float_t rig, Float_t dedx, Float_t factor, TF1* _cuthededxrig); | 
| 93 |  |  |  | 
| 94 |  |  | }; | 
| 95 |  |  | #endif /* TRKDEDXHECUT_H_  */ |