/[PAMELA software]/PamCut/TofCuts/TofBetaRigHeCut/TofBetaRigHeCut.cpp
ViewVC logotype

Annotation of /PamCut/TofCuts/TofBetaRigHeCut/TofBetaRigHeCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Sep 25 15:36:41 2009 UTC (15 years, 2 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Added to repository.

1 pam-fi 1.1 /*
2     * TofBetaRigHeCut.cpp
3     *
4     * Created on: 14/set/2009
5     * Author: Sergio Ricciarini, Nicola Mori
6     */
7    
8     /*! @file TofBetaRigHeCut.cpp The TofBetaRigHeCut class implementation file */
9    
10     #include "TofBetaRigHeCut.h"
11    
12     int TofBetaRigHeCut::Check(PamLevel2 *event) {
13    
14     TrkTrack *trkTrack = event->GetTrack(0)->GetTrkTrack();
15    
16     Int_t seqno = trkTrack->GetSeqNo();
17     Int_t ntrack_tof = 0;
18     for (Int_t i = 0; i < event->GetToFLevel2()->ntrk(); i++) {
19     if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == seqno)
20     ntrack_tof = i;
21     }
22     Float_t tofBeta = fabs(event->GetToFLevel2()->CalcBeta(ntrack_tof, 10., 10., 20.)); // beta[12]
23    
24     // Float_t rigMod = _mass*fabs(beta)*pow((1-pow(beta,2)),-0.5)/abs(_charge);
25    
26     Int_t _charge = 2;
27     Float_t mass_4He = 3.7274; // GeV (http://hyperphysics.phy-astr.gsu.edu/Hbase/pertab/He.html)
28     Float_t mass_3He = 2.8084; // GeV (http://hyperphysics.phy-astr.gsu.edu/Hbase/pertab/He.html)
29     Float_t ZR2 = (trkTrack->GetRigidity() * _charge) * (trkTrack->GetRigidity() * _charge);
30    
31     Float_t trkBeta_4He = sqrt(ZR2 / (ZR2 + mass_4He * mass_4He));
32    
33     Float_t trkBeta_3He = sqrt(ZR2 / (ZR2 + mass_3He * mass_3He));
34    
35     if ((fabs(tofBeta - trkBeta_4He) > _threshold * tofBeta) && (fabs(tofBeta - trkBeta_3He) > _threshold * tofBeta)) {
36     return 0;
37     }
38    
39     return CUTOK;
40     }

  ViewVC Help
Powered by ViewVC 1.1.23