p/He flux reference selection

  • For nuclei and new MCs, please see Nuclei page NEW
  • For test beam Data/MC analysis, a new twiki entry is created please go to ProtonTestBeamAnalysis NEW
  • There was a report that track->iTrTrackPar(1, 0, 20) gives -2 when there is no L1/L9 hit (i.e. inner only) this feature is already fixed but you should use the latest AMS software as of Mar./09/2015 or later (Build >= 1012) NEW
  • Tentative suggestion to process pass6 ISS data NEW
    • No need to refit (already fit with the optimum condition and alignment)
    • No need to apply magnetic field correction (already applied on rigidities in pass6 data)
track->iTrTrackPar(1, 0, 20);  // Max Span: instead of 23, no mass/charge needed <= valid only for the latest software (Mar/09 Build>=1012)
track->iTrTrackPar(1, 3, 20);  // Inner Only: instead of 23, no mass/charge needed <= valid only for the latest software (Mar/09 Build>=1012)
track->iTrTrackPar(1, 5, 20);  // Inner+L1: instead of 23, no mass/charge needed
track->iTrTrackPar(1, 6, 20);  // Inner+L9: instead of 23, no mass/charge needed
track->iTrTrackPar(1, 7, 20);  // Full Span: instead of 23, no mass/charge needed

// For all the other patterns, use refit=21 because some of them are not available in AMSRoot file
track->iTrTrackPar(1, 1, 21);  // Upper half: instead of 23, no mass/charge needed
track->iTrTrackPar(1, 2, 21);  // Lower half: instead of 23, no mass/charge needed
track->iTrTrackPar(1, 4, 21);  // 2+2 external: instead of 23, no mass/charge needed

  • Binning
    • New binning is used for p/He flux (hist1)
TFile**      /afs/cern.ch/ams/Offline/AMSDataDir/v5.00/phe_bin2.root   
 TFile*      /afs/cern.ch/ams/Offline/AMSDataDir/v5.00/phe_bin2.root   
  KEY: TH1F   hist0;1   Std binning
  KEY: TH1F   hist1;1   New binning
  KEY: TGraph   gr0;1   Bin center (Std)
  KEY: TGraph   gr1;1   Bin center (New)

  • Update the latest (as of Mar./09/2015 or later, Build >= 1012) NEW

  • Use the latest RTI (Version=3 pass4 )
AMSSetupR::RTI::UseLatest();   // pass4

  • Use the latest RTI (Version=604 pass6 )
AMSSetupR::RTI::UseLatest(6);   // pass6

  • Enable the final alignment (for pass4 refit, ISS only (not for Test Beam), before event loop) NEW
TkDBc::UseFinal();

  • Disable overwriting of datacards from file (before event loop)
TRMCFFKEY_DEF::ReadFromFile = 0;
TRFITFFKEY_DEF::ReadFromFile = 0;
TRFITFFKEY.magtemp = 0;

  • Sets of all the resolution tunings (for every event) NEW
event->SetDefaultMCTuningParameters();

  • Resolution tuning (before event loop)
//// This piece of code is needed only when you don't call event->SetDefaultMCTuningParameters() and you want to study the variation of tunings
TRMCFFKEY.MCtuneDmax = 100e-4;  // For all the MC versions including B9**
TRMCFFKEY.MCtuneDs[0] = -9.0e-4;   // NEW: For proton (for He not yet defined all the MC versions including B9** ) 
TRMCFFKEY.MCtuneDs[1] =  2.0e-4;   // For proton (for He, -3.0e-4 all the MC versions including B9** ) 
TRMCFFKEY.MCtuneDy9  = 1.0e-4;  // Only for MC ver < B817 which had propagation problem
TRMCFFKEY.MCscat[0] = -15;    // (proton only)
TRMCFFKEY.MCscat[1] = -440.06;   // proton only, and effective only for Rgen<440, negative value means further tuning in low energy by VC
TRMCFFKEY.MCscat[2] = -440.05;   // proton only, and effective only for Rgen<440, negative value means further tuning in low energy by VC
TRMCFFKEY.OuterSmearing[0][1] = -7.5e-4;   // Note: Negative value. Both for proton and He but not for Test beam MC
TRMCFFKEY.OuterSmearing[1][1] = -8.3e-4;   // Note: Negative value. Both for proton and He but not for Test beam MC
//// This piece of code is needed only when you don't call event->SetDefaultMCTuningParameters() and you want to study the variation of tunings

  • SAA cut (by geographic coordinates)
    • int AMSEventR::IsInSAA(int time = 0); // 0 : use current event time

  • RTI cut : NEW
    • Good RTI, Life time > 0.5, Zenith < 40 deg,
    • R_FS > 1.2 *IGRF (25 deg+)
    • |PG-MD| < 35e-4 (L1), 45e-4 (L9),

AMSPoint pn1, pn9, pd1, pd9;
event->GetRTIdL1L9(0, pn1, pd1, event->UTime(), 60);
event->GetRTIdL1L9(1, pn9, pd9, event->UTime(), 60);
if (pd1.y() > 35 || pd9.y() > 45) continue; // Skip current second 

  • Remove bad runs (Trigger study)
    • 1306219312, 1306219522, 1306233745, 1307125541<= RUN<=1307218054, 1321198167 (Ecal)

  • TrTrack selection
    • pParticle(0)->pTrTrack()
    • At least one Y hit in all the inner planes
    • Both X and Y hits in L1 and L9
    • |X(L9)| < 33cm (proton only)

  • Rigidity cuts (below the lowest bin boundary)
    • 1/Rigidity < 1/0.8

  • Beta cuts

  • Charge cuts
    • Rebuild BetaH and use BetaH for QTOF
    • pr: 0.5<QTOFL< 3 NEW
    • He: 1.25<QTOFU
    • p and He: Mean-0.3<Qin<Mean+0.5, Mean-0.4<QL1<Mean+0.9, Mean-0.4<QL9<Mean+0.9

  • Cuts on number of in-time TOF clusters (both for MC and ISS data) NEW
int ncls[4];
if (event->GetNTofClustersInTime(betah, ncls) > 4) return; // Skip this event

  • Mass cuts (both for MC and ISS data, cut values should be tuned for low energy) NEW
double ra = fabs(rigidity_inner);
if (1/beta < sqrt(1+1.5*1.5/(ra+0.5)/(ra+0.5))-0.25) return; // Skip this event 

  • (Optional) Simulate geomagnetic cutoff (only for MC) NEW
// in the event loop
{
...
// A trick in case you run on your DST without AMSEventR object
     if (!AMSEventR::Head()) AMSEventR::Head() = new AMSEventR;
     AMSEventR *event = AMSEventR::Head();
    { // In case you have RNDMSeed in your DST                                    
      event->fHeader.RNDMSeed[0] = rndmseed[0];                                   
    }                                                                             
    { // If you don't have RNDMSeed in your DST                                   
      static TRandom3 *rnd = 0;
      if (!rnd) rnd = new TRandom3(run_number);
      event->fHeader.RNDMSeed[0] = rnd->Integer(0x7fffffff);
    }
// A trick in case you run on your DST without AMSEventR object

  double weight = event->GetMCCutoffWeight(rgen, rrec);
  hAcc->Fill(rgen, weight);   //  Acceptance histogram
...
}

// after the event loop, rescale the acceptance by exposure time
hAcc->Divide(LxMCcutoff::GetHead()->GetExp());

  • Outer layer smearing (only for MC, to be called for every event before Track refit)
if (pMCEventg(0)) TrExtAlignDB::SmearExtAlign();

  • Cancel inner sensors disalignment (only for MC, to be called for every event before Track refit) NEW
if (pMCEventg(0)) TRCLFFKEY.UseSensorAlign = 0;

  • Track refit (only for pass4 and MC after tuning/smearing)
    • track->iTrTrackPar(1, 7, 23, mass=TrFit::Mproton/Mhelium, charge= 1/2)
    • Additional fitting error on L1 (9e-4/1.4) and L9 (11.5e-4/1.4)
    • Magnet temp. correction (only for pass4 ISS data)
if (!pMCEventg(0)) {
  int bret1= MagnetVarp::btempcor(bcor1, 0, 1);
  int bret2= MagnetVarp::btempcor(bcor2, 0, 2);
  if (bret1==0 && bret2==0) rigidity *= (bcor1+bcor2)/2; 
  else if (bret1!=0 && bret2 == 0) rigidity *= bcor2;
}

  • For pass6 ISS data NEW
    • No need to refit (already fit with the optimum condition and alignment)
    • No need to apply magnetic field correction (already applied on rigidities in pass6 data)
track->iTrTrackPar(1, 7, 20);  // instead of 23, no mass/charge needed

  • Track quality cuts (Inner) NEW
    • pr: track->GetNormChisqY() < 10
    • He: track->GetNormChisqY() < 20 (or 10) NEW
    • It should be applied in the denominator when we estimate the full span pickup efficiency

  • Track quality cuts (Full span)
    • pr: track->GetNormChisqY() < 10
    • He: track->GetNormChisqY() < 20 (or 10) NEW

  • L1 and L9 fiducial volume cut by LD NEW
// x1,y1 (x9,y9) are the extrapolation of the inner tracker to layer L1 (L9). 
      double xL1Size = 62.14;
      double yL1Size = 47.40;
      double FidVolSize = 0; // margin
      if( (x1>-xL1Size-FidVolSize)&& (x1<xL1Size+FidVolSize)&&
          (y1>-yL1Size-FidVolSize)&& (y1<yL1Size+FidVolSize)&&
          (sqrt(x1*x1+y1*y1)<xL1Size+FidVolSize)
          && (y9 > .5 || y9 < -.5)  && fabs(y9) < 29.5+FidVolSize && fabs(x9) < 33+FidVolSize) {
    // Event selected  
        }

  • Cut interacting event by true rigidity at Tracker by LD

  • Dump of rigidities with TkDBc::UseFinal() : AMS/example/dump_rig.C
 
AMSEventR::DumpTrTrackPar-I-Dump:                                               
Run/Event : 1356913970 205713                                                   
btempcor= 1.0103                                                                
iTrTrackPar(1, 3,  3)=      17 Rigidity=  -277.397 NormChisqY=    4.930         
iTrTrackPar(1, 7, 23)= 8391697 Rigidity=   210.638 NormChisqY=    5.468         
Hit(L1): PG=  24.5378  -3.4279  159.0276  MD=  24.5402  -3.4267  159.0322       
Hit(L9): PG=  28.4353 -12.3547 -136.0149  MD=  28.4360 -12.3567 -136.0137       
HeaderR-W-EventSeqSeemsToBeBroken 280313 205713 0                               
                                                                                
AMSEventR::DumpTrTrackPar-I-Dump:                                               
Run/Event : 1356913970 280313                                                   
btempcor= 1.0103                                                                
iTrTrackPar(1, 3,  3)=      17 Rigidity=  -171.346 NormChisqY=    0.537         
iTrTrackPar(1, 7, 23)= 8391697 Rigidity=   236.841 NormChisqY=    1.470         
Hit(L1): PG=  13.5556  -2.0039  159.0275  MD=  13.5577  -2.0032  159.0313       
Hit(L9): PG= -26.4866 -15.1504 -136.0509  MD= -26.4859 -15.1497 -136.0496       
HeaderR-W-EventSeqSeemsToBeBroken 381090 280313 0                               

-- SadakazuHaino - 03 Mar 2014

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf LD_SH.pdf r2 r1 manage 73.4 K 2014-05-13 - 04:42 SadakazuHaino Ratio (LD/SH) of histograms of proton standard selection from June/2011 to June/2013
Texttxt common.txt r1 manage 489.3 K 2014-05-15 - 22:30 SadakazuHaino Common run list
PDFpdf comp_1356913970.pdf r3 r2 r1 manage 27.9 K 2014-05-08 - 17:29 SadakazuHaino Ratio (LD/SH) of exposure time and event count in run 1356913970 which passed the standard proton selection
Texttxt dump_LD.txt r1 manage 23.8 K 2014-05-08 - 16:49 SadakazuHaino Dump of event and rigidity for the first 1000 event in run 1356913970 which passed the standard proton selection (by L.Derome)
Texttxt dump_MIT.txt r1 manage 15.6 K 2014-05-09 - 21:06 SadakazuHaino Dump of event and rigidity for the first 1000 event in run 1356913970 which passed the standard proton selection (by S.Haino on MIT/microDST)
Texttxt dump_SH.txt r2 r1 manage 15.6 K 2014-05-08 - 17:18 SadakazuHaino Dump of event and rigidity for the first 1000 event in run 1356913970 which passed the standard proton selection (by S.Haino)
Unknown file formatroot ld.root r1 manage 2328.6 K 2014-05-09 - 10:38 SadakazuHaino Histograms of proton standard selection from June/2011 to June/2013 (by L.Derome)
C source code filec psel.C r1 manage 1.9 K 2014-05-09 - 21:05 SadakazuHaino Simple macro of proton standard selection for MIT/microDST
Unknown file formatroot sh.root r1 manage 35.0 K 2014-05-09 - 10:46 SadakazuHaino Histograms of proton standard selection from June/2011 to June/2013 (by S.Haino)
Edit | Attach | Watch | Print version | History: r41 < r40 < r39 < r38 < r37 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r41 - 2015-05-01 - SadakazuHaino
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    AMS All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback