1 |
/* |
/* |
2 |
* TrkDedxHeCut.h |
* TrkDedxHeCut.h |
3 |
* |
* |
4 |
* Created on: 19-may-2009 |
* Created on: 28/gen/2010 |
5 |
* Author: N. Nikonov |
* Author: Nicola Mori |
6 |
*/ |
*/ |
7 |
|
|
|
/*! @file TrkDedxHeCut.h The TrkDedxHeCut.h class definition file. */ |
|
|
|
|
8 |
#ifndef TRKDEDXHECUT_H_ |
#ifndef TRKDEDXHECUT_H_ |
9 |
#define TRKDEDXHECUT_H_ |
#define TRKDEDXHECUT_H_ |
10 |
|
|
11 |
#include "../../PamCutBase/PamCutBase.h" |
#include "../../PamCutBase/PamCutBase.h" |
12 |
|
|
13 |
#include <TH2F.h> |
/*! @brief The dE/dX cut to select He |
14 |
#include <TF1.h> |
* This cut discards all the events whose rigidity modulus and dE/dX (both given by TRK) are outside a pre-defined band |
15 |
#include <TStyle.h> |
* (defined by E. Vannuccini and N. Mori). The function defining the upper and lower limits of the band is: dE/dx = a + b/R^2, |
16 |
#include <TMath.h> |
* where a and b are parameters which take different values for the upper and lower limit. |
17 |
|
* CUT DEPENDENCIES: TrkPhSinCut for object TrkTrack |
|
|
|
|
/*! @brief Cutting a band DEDX vs. Rigidity for Helium. |
|
|
* This cut discards events where DEDX vs. Rigidity by Tracker measurements are outside the helium "corridor". |
|
18 |
*/ |
*/ |
19 |
class TrkDedxHeCut: public PamCut { |
class TrkDedxHeCut: public PamCut { |
20 |
|
|
21 |
public: |
public: |
22 |
|
|
23 |
/*! @brief Constructor. |
/*! @brief Constructor. |
24 |
* |
* |
25 |
* @param cutName The cut's name. |
* @param cutName The cut's name. |
26 |
*/ |
*/ |
27 |
TrkDedxHeCut(const char *cutName) : |
TrkDedxHeCut(const char *cutName) : |
28 |
PamCut(cutName){ |
PamCut(cutName) { |
|
_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 |
|
|
|
|
|
|
|
|
#ifdef DEBUGPAMCUT |
|
|
|
|
|
#define RIG_XBIN 600 |
|
|
#define DEDX_YBIN 600 |
|
|
|
|
|
Double_t RIB[RIG_XBIN+1]; |
|
|
for(Int_t i = 0; i<RIG_XBIN+1; i++) RIB[i]=(0.01)*TMath::Power(10.,i/(Double_t(RIG_XBIN))*5.); |
|
|
h_dedx_rig_before = new TH2F("DEDX_RIG_before","DEDX(Trk) vs. Rigidity distribution", |
|
|
RIG_XBIN,RIB, DEDX_YBIN, 0., 30.); |
|
|
h_dedx_rig_before->GetYaxis()->SetTitle("Trk DE/DX (MIP)"); |
|
|
h_dedx_rig_before->GetYaxis()->SetLabelSize(0.025); |
|
|
h_dedx_rig_before->GetXaxis()->SetTitle("Rigidity (GV)"); |
|
|
h_dedx_rig_before->GetXaxis()->SetLabelSize(0.025); |
|
|
h_dedx_rig_before->SetContour(50); |
|
|
h_dedx_rig_before->SetStats(kFALSE); |
|
|
gStyle->SetPalette(1); |
|
|
Double_t sum = h_dedx_rig_before->GetBinContent(h_dedx_rig_before->GetMaximumBin()); |
|
|
Double_t lev[50]; |
|
|
for(Int_t i = 0; i<50; i++){ |
|
|
lev[i]=TMath::Power(10.,i/(50.)*TMath::Log10(sum)); |
|
|
h_dedx_rig_before->SetContourLevel(i,lev[i]); |
|
29 |
} |
} |
|
h_dedx_rig_after = (TH2F*)h_dedx_rig_before->Clone("DEDX_RIG_after"); |
|
|
#endif |
|
30 |
|
|
|
} |
|
31 |
/*! @brief Destructor. */ |
/*! @brief Destructor. */ |
32 |
~TrkDedxHeCut() { |
~TrkDedxHeCut() { |
|
|
|
|
delete _cuthededxrig; |
|
|
|
|
|
#ifdef DEBUGPAMCUT |
|
|
h_dedx_rig_before->Write(); |
|
|
h_dedx_rig_after->Write(); |
|
|
#endif |
|
33 |
} |
} |
34 |
|
|
35 |
/*! @brief The DEDX vs. beta Helium check. |
/*! @brief The tracker dE/dx vs rigidity check. |
36 |
* |
* |
37 |
* @param event The event to analyze. |
* @param event The event to analyze. |
38 |
* @return #CUTOK if event is inside helium "corridor". |
* @return #CUTOK if the event lies inside the helium band |
39 |
* @return 0 otherwise. |
* @return 0 otherwise |
40 |
*/ |
*/ |
41 |
int Check(PamLevel2 *event); |
int Check(PamLevel2 *event); |
|
|
|
|
private: |
|
|
|
|
|
TF1* _cuthededxrig; |
|
|
|
|
|
#ifdef DEBUGPAMCUT |
|
|
TH2F* h_dedx_rig_before; |
|
|
TH2F* h_dedx_rig_after; |
|
|
#endif |
|
|
|
|
|
|
|
|
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); |
|
|
Bool_t CutHeDEDXrig(Float_t rig, Float_t dedx, Float_t factor, TF1* _cuthededxrig); |
|
|
|
|
42 |
}; |
}; |
43 |
#endif /* TRKDEDXHECUT_H_ */ |
#endif /* TRKDEDXHECUT_H_ */ |