HighLAND
Public Member Functions | List of all members
TPCExpecteddEdxCorrection Class Reference

#include <TPCExpecteddEdxCorrection.hxx>

Inheritance diagram for TPCExpecteddEdxCorrection:
CorrectionBase

Public Member Functions

void Apply (AnaSpillC &spill)
 
- Public Member Functions inherited from CorrectionBase
 CorrectionBase (const CorrectionBase &corr)
 Copy constructor.
 
virtual ~CorrectionBase ()
 Everyone should have a destructor.
 
virtual const char * GetName () const
 Return the name of this correction. This overrides the TObject::GetName() interface.
 
const std::string & Name () const
 Return the name of this correction.
 
void SetName (const std::string &name)
 Set the name of this correction.
 
void Enable ()
 Enable the correction.
 
void Disable ()
 Disable the correction.
 
bool IsEnabled () const
 Is the correction enabled.
 
void SetAppliedInInput (bool ap)
 Set the correction as applied in the input file.
 
bool IsAppliedInInput () const
 Is the correction already applied in the input file ?
 
Int_t GetIndex () const
 Return the index of this correction.
 
void SetIndex (Int_t index)
 Set the index of this correction.
 
 ClassDef (CorrectionBase, 2)
 

Additional Inherited Members

- Protected Attributes inherited from CorrectionBase
std::string _name
 The name of this correction.
 
bool _enabled
 Is the correction enabled?
 
bool _appliedInInput
 Is the correction already applied in the input file ?
 
Int_t _index
 The index of the correction.
 

Detailed Description

This correction uses a new parameterisation of the TPC dEdx lines to re-calculate the TPC pulls. The parameterisation is different to that use in tpcRecon, and comes from work Claudio Giganti did to improve the Data/MC comparisons for Production 5.

Definition at line 11 of file TPCExpecteddEdxCorrection.hxx.

Member Function Documentation

§ Apply()

void TPCExpecteddEdxCorrection::Apply ( AnaSpillC spill)
virtual

Apply the TPCExpecteddEdxCorrection. Updates the expected dEdx for all particle hypotheses, and recomputes the pulls based on these values.

Reimplemented from CorrectionBase.

Definition at line 11 of file TPCExpecteddEdxCorrection.cxx.

11  {
12 //********************************************************************
13 
14  AnaSpill& spill = *static_cast<AnaSpill*>(&spillBB);
15 
16  for (unsigned int i = 0; i < spill.Bunches.size(); i++) {
17  AnaTrackB* allTpcTracks[100];
18  AnaBunch* bunch = static_cast<AnaBunch*>(spill.Bunches[i]);
19  int nTPC = anaUtils::GetAllTracksUsingDet(*bunch, SubDetId::kTPC, allTpcTracks);
20  for (Int_t j = 0; j < nTPC; j++) {
21  for (int k = 0; k < allTpcTracks[j]->nTPCSegments; k++) {
22 
23  // The raw TPC track
24  AnaTPCParticleB* original = static_cast<const AnaTrackB*>(allTpcTracks[j]->Original)->TPCSegments[k];
25 
26  // The corrected TPC track
27  AnaTPCParticle* tpcTrack = static_cast<AnaTPCParticle*>(allTpcTracks[j]->TPCSegments[k]);
28 
29  // Get the raw CT
30  double CT0 = original->dEdxMeas;
31 
32  // Apply the correction
33  if (CT0 != 999999) {
34  tpcTrack->dEdxexpEle = anaUtils::ExpectedTPCdEdx(*tpcTrack, "electron");
35  tpcTrack->dEdxexpMuon = anaUtils::ExpectedTPCdEdx(*tpcTrack, "muon");
36  tpcTrack->dEdxexpProton = anaUtils::ExpectedTPCdEdx(*tpcTrack, "proton");
37  tpcTrack->dEdxexpPion = anaUtils::ExpectedTPCdEdx(*tpcTrack, "pion");
38  tpcTrack->dEdxexpKaon = anaUtils::ExpectedTPCdEdx(*tpcTrack, "kaon");
39 
40 
41  //recompute TPC pulls
42  Float_t pulls[4];
43  anaUtils::ComputeTPCPull(*tpcTrack, pulls);
44 
45  tpcTrack->Pullele = pulls[1];
46  tpcTrack->Pullmu = pulls[0];
47  tpcTrack->Pullp = pulls[2];
48  tpcTrack->Pullpi = pulls[3];
49 
50  //for the kaon need to recompute explicitely
51  tpcTrack->Pullk = ((tpcTrack->dEdxMeas - tpcTrack->dEdxexpKaon) / tpcTrack->dEdxSigmaKaon);
52 
53  }
54  }
55  }
56  }
57 }
Float_t dEdxexpMuon
Expected dE/dx for a muon, based on the reconstructed momentum.
Float_t Pullmu
Muon pull of the segment: (dEdxMeas-dEdxexpMuon)/dEdxSigmaMuon.
Float_t dEdxexpProton
Expected dE/dx for a proton, based on the reconstructed momentum.
Float_t Pullpi
Pion pull of the segment: (dEdxMeas-dEdxexpPion)/dEdxSigmaPion.
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
AnaTPCParticleB * TPCSegments[NMAXTPCS]
The TPC segments that contributed to this global track.
Float_t dEdxexpPion
Expected dE/dx for a pion, based on the reconstructed momentum.
Float_t dEdxexpEle
Expected dE/dx for an electron, based on the reconstructed momentum.
int nTPCSegments
How many TPC tracks are associated with this track.
const AnaParticleB * Original
Float_t dEdxSigmaKaon
Expected error on the dE/dx measurement, for the proton hypothesis.
Float_t dEdxMeas
dE/dx as measured by the TPC.
Representation of a global track.
Float_t ComputeTPCPull(const AnaTPCParticleB &track, const std::string &particle)
Function to recompute the pull for a TPC track segment.
Representation of a TPC segment of a global track.
Float_t Pullk
Kaon pull of the segment: (dEdxMeas-dEdxexpPion)/dEdxSigmaKaon.
Float_t Pullp
Proton pull of the segment: (dEdxMeas-dEdxexpProton)/dEdxSigmaProton.
Float_t ExpectedTPCdEdx(const AnaTPCParticleB &track, const std::string &particle)
Definition: PIDUtils.cxx:36
Float_t Pullele
Electron pull of the segment: (dEdxMeas-dEdxexpEle)/dEdxSigmaEle.
Representation of a TPC segment of a global track.
int GetAllTracksUsingDet(const AnaBunchB &bunch, SubDetId::SubDetEnum det, AnaTrackB *selTracks[])
Float_t dEdxexpKaon
Expected dE/dx for a proton, based on the reconstructed momentum.

The documentation for this class was generated from the following files: