fkLightWeight ( kFALSE ),
fkFastOnly ( "" ),
fkpAVertexSelection( kFALSE ),
+ fkRunV0Vertexer ( kFALSE ),
+ fkRejectPileup ( kTRUE ),
+ fkSpecialExecution( kFALSE ),
+ fkSkipTrigger ( kFALSE ),
+ fExtraDCAHeavyToPrimVertex(0),
+ fExtraDCALightToPrimVertex(0),
//------------------------------------------------
// Initialize
fTreeVariableChi2V0(0),
fTreeVariableNegTrackStatus(0),
fTreeVariablePosTrackStatus(0),
+ fTreeVariableNegTPCSignal(0),
+ fTreeVariablePosTPCSignal(0),
+ fTreeVariableNegInnerP(0),
+ fTreeVariablePosInnerP(0),
+
+ fTreeVariableNegPx(0),
+ fTreeVariableNegPy(0),
+ fTreeVariableNegPz(0),
+ fTreeVariablePosPx(0),
+ fTreeVariablePosPy(0),
+ fTreeVariablePosPz(0),
+
+
//------------------------------------------------
// HISTOGRAMS
// --- Filled on an Event-by-event basis
fHistPVxAnalysis(0),
fHistPVyAnalysis(0),
fHistPVzAnalysis(0),
- fHistSwappedV0Counter(0)
+ fHistSwappedV0Counter(0),
+ f2dHistdEdxPos(0),
+ f2dHistdEdxNeg(0)
{
// Dummy Constructor
+ for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; }
}
AliAnalysisTaskExtractV0::AliAnalysisTaskExtractV0(const char *name)
fkLightWeight ( kFALSE ),
fkFastOnly ( "" ),
fkpAVertexSelection( kFALSE ),
+ fkRunV0Vertexer ( kFALSE ),
+ fkRejectPileup ( kTRUE ),
+ fkSpecialExecution( kFALSE ),
+ fkSkipTrigger ( kFALSE ),
+ fExtraDCAHeavyToPrimVertex(0),
+ fExtraDCALightToPrimVertex(0),
//------------------------------------------------
// Initialize
fTreeVariableChi2V0(0),
fTreeVariableNegTrackStatus(0),
fTreeVariablePosTrackStatus(0),
+ fTreeVariableNegTPCSignal(0),
+ fTreeVariablePosTPCSignal(0),
+ fTreeVariableNegInnerP(0),
+ fTreeVariablePosInnerP(0),
+
+ fTreeVariableNegPx(0),
+ fTreeVariableNegPy(0),
+ fTreeVariableNegPz(0),
+ fTreeVariablePosPx(0),
+ fTreeVariablePosPy(0),
+ fTreeVariablePosPz(0),
+
//------------------------------------------------
// HISTOGRAMS
// --- Filled on an Event-by-event basis
fHistPVxAnalysis(0),
fHistPVyAnalysis(0),
fHistPVzAnalysis(0),
- fHistSwappedV0Counter(0)
+ fHistSwappedV0Counter(0),
+ f2dHistdEdxPos(0),
+ f2dHistdEdxNeg(0)
{
// Constructor
+ // Set Loose cuts or not here...
+ // REALLY LOOSE? Be careful when attempting to run over PbPb if fkRunV0Vertexer is set!
+ fV0Sels[0] = 33. ; // max allowed chi2
+ fV0Sels[1] = 0.02; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
+ fV0Sels[2] = 0.02; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
+ fV0Sels[3] = 2.0 ; // max allowed DCA between the daughter tracks (LHC09a4 : 0.5)
+ fV0Sels[4] = 0.95; // min allowed cosine of V0's pointing angle (LHC09a4 : 0.99)
+ fV0Sels[5] = 0.5 ; // min radius of the fiducial volume (LHC09a4 : 0.2)
+ fV0Sels[6] = 200. ; // max radius of the fiducial volume (LHC09a4 : 100.0)
+
// Output slot #0 writes into a TList container (Lambda Histos and fTree)
DefineOutput(1, TList::Class());
DefineOutput(2, TTree::Class());
fTree->Branch("fTreeVariableNegTrackStatus",&fTreeVariableNegTrackStatus,"fTreeVariableNegTrackStatus/l");
fTree->Branch("fTreeVariablePosTrackStatus",&fTreeVariablePosTrackStatus,"fTreeVariablePosTrackStatus/l");
}
+ if( fkSpecialExecution == kTRUE ){
+ fTree->Branch("fTreeVariablePosTPCSignal",&fTreeVariablePosTPCSignal,"fTreeVariablePosTPCSignal/F");
+ fTree->Branch("fTreeVariableNegTPCSignal",&fTreeVariableNegTPCSignal,"fTreeVariableNegTPCSignal/F");
+ fTree->Branch("fTreeVariablePosInnerP",&fTreeVariablePosInnerP,"fTreeVariablePosInnerP/F");
+ fTree->Branch("fTreeVariableNegInnerP",&fTreeVariableNegInnerP,"fTreeVariableNegInnerP/F");
+
+ fTree->Branch("fTreeVariablePosPx",&fTreeVariablePosPx,"fTreeVariablePosPx/F");
+ fTree->Branch("fTreeVariablePosPy",&fTreeVariablePosPy,"fTreeVariablePosPy/F");
+ fTree->Branch("fTreeVariablePosPz",&fTreeVariablePosPz,"fTreeVariablePosPz/F");
+ fTree->Branch("fTreeVariableNegPx",&fTreeVariableNegPx,"fTreeVariableNegPx/F");
+ fTree->Branch("fTreeVariableNegPy",&fTreeVariableNegPy,"fTreeVariableNegPy/F");
+ fTree->Branch("fTreeVariableNegPz",&fTreeVariableNegPz,"fTreeVariableNegPz/F");
+ }
//------------------------------------------------
// Particle Identification Setup
2, 0, 2);
fListHistV0->Add(fHistSwappedV0Counter);
}
+
+ //Create dE/dx histograms
+ if(! f2dHistdEdxPos ){
+ f2dHistdEdxPos = new TH2F("f2dHistdEdxPos","Pos. Daughter dE/dx;p (GeV/c);TPC Signal",
+ 200,0,10,500,0,1000);
+ if (fkSpecialExecution) fListHistV0->Add(f2dHistdEdxPos);
+ }
+ if(! f2dHistdEdxNeg ){
+ f2dHistdEdxNeg = new TH2F("f2dHistdEdxNeg","Neg. Daughter dE/dx;p (GeV/c);TPC Signal",
+ 200,0,10,500,0,1000);
+ if (fkSpecialExecution) fListHistV0->Add(f2dHistdEdxNeg);
+ }
+
//Regular output: Histograms
PostData(1, fListHistV0);
//TTree Object: Saved to base directory. Should cache to disk while saving.
AliWarning("ERROR: lESDevent not available \n");
return;
}
+
+ //------------------------------------------------
+ // Rerun V0 vertexer, if asked for
+ // --- WARNING: Be careful when using in PbPb
+ //------------------------------------------------
+ if( fkRunV0Vertexer ){
+ lESDevent->ResetV0s();
+ AliV0vertexer lV0vtxer;
+ lV0vtxer.SetDefaultCuts(fV0Sels);
+ lV0vtxer.Tracks2V0vertices(lESDevent);
+ }
+
fTreeVariableRunNumber = lESDevent->GetRunNumber();
fTreeVariableEventNumber =
( ( ((ULong64_t)lESDevent->GetPeriodNumber() ) << 36 ) |
Int_t lMultiplicityV0A = -100;
Int_t lMultiplicityZNA = -100;
Int_t lMultiplicityTRK = -100;
- Int_t lMultiplicitySPD = -100;
+ Int_t lMultiplicitySPD = -100;
if(fkIsNuclear == kFALSE) lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC,0.5);
Bool_t isSelectedExtra = kTRUE; //extra sel, default YES
isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
- //pA triggering: CINT7
- if( fkSwitchINT7 ) isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7;
-
- //Extra selection applies if with/without SDD is to be dealth with
- if( fkFastOnly == "kFastOnly"){
- //If not kFastOnly, isSelectedExtra will be kFALSE; procedure will reject it
- isSelectedExtra = (maskIsSelected & AliVEvent::kFastOnly) == AliVEvent::kFastOnly;
- }
- if( fkFastOnly == "NotkFastOnly"){
- //If not kFastOnly, isSelectedExtra will be kTRUE; procedure will accept it
- isSelectedExtra = !( (maskIsSelected & AliVEvent::kFastOnly) == AliVEvent::kFastOnly );
- }
-
- //Standard Min-Bias Selection
- if ( !isSelected ) {
- PostData(1, fListHistV0);
- PostData(2, fTree);
- return;
- }
- //Check if goes through extra selections
- //isSelectedExtra will be true in case -> fkFastOnly==""
- //isSelectedExtra will be true in case -> fkFastOnly=="kFastOnly" && bit kFastOnly ON
- //isSelectedExtra will be true in case -> fkFastOnly=="NotkFastOnly" && bit kFastOnly OFF
- if ( !isSelectedExtra ) {
- PostData(1, fListHistV0);
- PostData(2, fTree);
- return;
+ if( fkSkipTrigger == kFALSE ){
+ //pA triggering: CINT7
+ if( fkSwitchINT7 ) isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7;
+
+ //Extra selection applies if with/without SDD is to be dealth with
+ if( fkFastOnly == "kFastOnly"){
+ //If not kFastOnly, isSelectedExtra will be kFALSE; procedure will reject it
+ isSelectedExtra = (maskIsSelected & AliVEvent::kFastOnly) == AliVEvent::kFastOnly;
+ }
+ if( fkFastOnly == "NotkFastOnly"){
+ //If not kFastOnly, isSelectedExtra will be kTRUE; procedure will accept it
+ isSelectedExtra = !( (maskIsSelected & AliVEvent::kFastOnly) == AliVEvent::kFastOnly );
+ }
+
+ //Standard Min-Bias Selection
+ if ( !isSelected ) {
+ PostData(1, fListHistV0);
+ PostData(2, fTree);
+ return;
+ }
+ //Check if goes through extra selections
+ //isSelectedExtra will be true in case -> fkFastOnly==""
+ //isSelectedExtra will be true in case -> fkFastOnly=="kFastOnly" && bit kFastOnly ON
+ //isSelectedExtra will be true in case -> fkFastOnly=="NotkFastOnly" && bit kFastOnly OFF
+ if ( !isSelectedExtra ) {
+ PostData(1, fListHistV0);
+ PostData(2, fTree);
+ return;
+ }
}
-
//------------------------------------------------
// After Trigger Selection
//------------------------------------------------
//------------------------------------------------
// FIXME : quality selection regarding pile-up rejection
- if(lESDevent->IsPileupFromSPD() && !fkIsNuclear){// minContributors=3, minZdist=0.8, nSigmaZdist=3., nSigmaDiamXY=2., nSigmaDiamZ=5. -> see http://alisoft.cern.ch/viewvc/trunk/STEER/AliESDEvent.h?root=AliRoot&r1=41914&r2=42199&pathrev=42199
+ if(lESDevent->IsPileupFromSPD() && !fkIsNuclear && fkRejectPileup){// minContributors=3, minZdist=0.8, nSigmaZdist=3., nSigmaDiamXY=2., nSigmaDiamZ=5. -> see http://alisoft.cern.ch/viewvc/trunk/STEER/AliESDEvent.h?root=AliRoot&r1=41914&r2=42199&pathrev=42199
PostData(1, fListHistV0);
PostData(2, fTree);
return;
//Daughter Eta for Eta selection, afterwards
fTreeVariableNegEta = nTrack->Eta();
fTreeVariablePosEta = pTrack->Eta();
+
+ if( fkSpecialExecution ){
+ fTreeVariableNegPx = lMomNeg[0]; fTreeVariableNegPy = lMomNeg[1]; fTreeVariableNegPz = lMomNeg[2];
+ fTreeVariablePosPx = lMomPos[0]; fTreeVariablePosPy = lMomPos[1]; fTreeVariablePosPz = lMomPos[2];
+ //Need to acquire info to do dEdx cut afterwards...
+ fTreeVariablePosTPCSignal = pTrack->GetTPCsignal();
+ fTreeVariableNegTPCSignal = nTrack->GetTPCsignal();
+ //Get Inner momentum if possible
+ fTreeVariableNegInnerP = nTrack->GetP();
+ fTreeVariablePosInnerP = pTrack->GetP();
+ const AliExternalTrackParam *innerpos=pTrack->GetInnerParam();
+ const AliExternalTrackParam *innerneg=nTrack->GetInnerParam();
+ if(innerpos) { fTreeVariablePosInnerP = innerpos->GetP(); }
+ if(innerneg) { fTreeVariableNegInnerP = innerneg->GetP(); }
+
+ f2dHistdEdxPos->Fill( fTreeVariablePosInnerP , fTreeVariablePosdEdxSig );
+ f2dHistdEdxNeg->Fill( fTreeVariableNegInnerP , fTreeVariableNegdEdxSig );
+ }
// Filter like-sign V0 (next: add counter and distribution)
if ( pTrack->GetSign() == nTrack->GetSign()){
//------------------------------------------------
// Fill Tree!
//------------------------------------------------
-
-// The conditionals are meant to decrease excessive
-// memory usage!
-
-//First Selection: Reject OnFly
- if( (lOnFlyStatus == 0 && fkUseOnTheFly == kFALSE) || (lOnFlyStatus != 0 && fkUseOnTheFly == kTRUE ) ){
- //Second Selection: rough 20-sigma band, parametric.
- //K0Short: Enough to parametrize peak broadening with linear function.
- Double_t lUpperLimitK0Short = (5.63707e-01) + (1.14979e-02)*fTreeVariablePt;
- Double_t lLowerLimitK0Short = (4.30006e-01) - (1.10029e-02)*fTreeVariablePt;
- //Lambda: Linear (for higher pt) plus exponential (for low-pt broadening)
- //[0]+[1]*x+[2]*TMath::Exp(-[3]*x)
- Double_t lUpperLimitLambda = (1.13688e+00) + (5.27838e-03)*fTreeVariablePt + (8.42220e-02)*TMath::Exp(-(3.80595e+00)*fTreeVariablePt);
- Double_t lLowerLimitLambda = (1.09501e+00) - (5.23272e-03)*fTreeVariablePt - (7.52690e-02)*TMath::Exp(-(3.46339e+00)*fTreeVariablePt);
- //Do Selection
- if( (fTreeVariableInvMassLambda < lUpperLimitLambda && fTreeVariableInvMassLambda > lLowerLimitLambda ) ||
- (fTreeVariableInvMassAntiLambda < lUpperLimitLambda && fTreeVariableInvMassAntiLambda > lLowerLimitLambda ) ||
- (fTreeVariableInvMassK0s < lUpperLimitK0Short && fTreeVariableInvMassK0s > lLowerLimitK0Short ) ){
- //Pre-selection in case this is AA...
- if( fkIsNuclear == kFALSE ) fTree->Fill();
- if( fkIsNuclear == kTRUE){
- //If this is a nuclear collision___________________
- // ... pre-filter with TPC, daughter eta selection
- if( (fTreeVariableInvMassLambda < lUpperLimitLambda && fTreeVariableInvMassLambda > lLowerLimitLambda
- && TMath::Abs(fTreeVariableNSigmasPosProton) < 6.0 && TMath::Abs(fTreeVariableNSigmasNegPion) < 6.0 ) ||
- (fTreeVariableInvMassAntiLambda < lUpperLimitLambda && fTreeVariableInvMassAntiLambda > lLowerLimitLambda
- && TMath::Abs(fTreeVariableNSigmasNegProton) < 6.0 && TMath::Abs(fTreeVariableNSigmasPosPion) < 6.0 ) ||
- (fTreeVariableInvMassK0s < lUpperLimitK0Short && fTreeVariableInvMassK0s > lLowerLimitK0Short
- && TMath::Abs(fTreeVariableNSigmasNegPion) < 6.0 && TMath::Abs(fTreeVariableNSigmasPosPion) < 6.0 ) ){
- //insane test
- if ( TMath::Abs(fTreeVariableNegEta)<0.8 && TMath::Abs(fTreeVariablePosEta)<0.8 ) fTree->Fill();
- }
- }//end nuclear_____________________________________
- }
- }
+
+ // The conditionals are meant to decrease excessive
+ // memory usage!
+
+ //First Selection: Reject OnFly
+ if( (lOnFlyStatus == 0 && fkUseOnTheFly == kFALSE) || (lOnFlyStatus != 0 && fkUseOnTheFly == kTRUE ) ){
+ //Second Selection: rough 20-sigma band, parametric.
+ //K0Short: Enough to parametrize peak broadening with linear function.
+ Double_t lUpperLimitK0Short = (5.63707e-01) + (1.14979e-02)*fTreeVariablePt;
+ Double_t lLowerLimitK0Short = (4.30006e-01) - (1.10029e-02)*fTreeVariablePt;
+ //Lambda: Linear (for higher pt) plus exponential (for low-pt broadening)
+ //[0]+[1]*x+[2]*TMath::Exp(-[3]*x)
+ Double_t lUpperLimitLambda = (1.13688e+00) + (5.27838e-03)*fTreeVariablePt + (8.42220e-02)*TMath::Exp(-(3.80595e+00)*fTreeVariablePt);
+ Double_t lLowerLimitLambda = (1.09501e+00) - (5.23272e-03)*fTreeVariablePt - (7.52690e-02)*TMath::Exp(-(3.46339e+00)*fTreeVariablePt);
+ //Do Selection
+ if( (fTreeVariableInvMassLambda < lUpperLimitLambda && fTreeVariableInvMassLambda > lLowerLimitLambda ) ||
+ (fTreeVariableInvMassAntiLambda < lUpperLimitLambda && fTreeVariableInvMassAntiLambda > lLowerLimitLambda ) ||
+ (fTreeVariableInvMassK0s < lUpperLimitK0Short && fTreeVariableInvMassK0s > lLowerLimitK0Short ) ){
+ //Pre-selection in case this is AA...
+ if( fkIsNuclear == kFALSE ) fTree->Fill();
+ if( fkIsNuclear == kTRUE){
+ //If this is a nuclear collision___________________
+ // ... pre-filter with TPC, daughter eta selection
+ if( (fTreeVariableInvMassLambda < lUpperLimitLambda && fTreeVariableInvMassLambda > lLowerLimitLambda
+ && TMath::Abs(fTreeVariableNSigmasPosProton) < 6.0 && TMath::Abs(fTreeVariableNSigmasNegPion) < 6.0 ) ||
+ (fTreeVariableInvMassAntiLambda < lUpperLimitLambda && fTreeVariableInvMassAntiLambda > lLowerLimitLambda
+ && TMath::Abs(fTreeVariableNSigmasNegProton) < 6.0 && TMath::Abs(fTreeVariableNSigmasPosPion) < 6.0 ) ||
+ (fTreeVariableInvMassK0s < lUpperLimitK0Short && fTreeVariableInvMassK0s > lLowerLimitK0Short
+ && TMath::Abs(fTreeVariableNSigmasNegPion) < 6.0 && TMath::Abs(fTreeVariableNSigmasPosPion) < 6.0 ) ){
+ //insane test
+ if ( TMath::Abs(fTreeVariableNegEta)<0.8 && TMath::Abs(fTreeVariablePosEta)<0.8 && !fkSpecialExecution) fTree->Fill();
+ }
+ }//end nuclear_____________________________________
+ }
+ }
+
+ if(lOnFlyStatus == 0 && fkSpecialExecution){
+ if(
+ (fTreeVariableNSigmasPosProton > 6 && TMath::Abs(fTreeVariableNSigmasNegPion)< 6
+ && fTreeVariableDcaPosToPrimVertex > fExtraDCAHeavyToPrimVertex && fTreeVariableDcaNegToPrimVertex > fExtraDCALightToPrimVertex ) ||
+ (fTreeVariableNSigmasNegProton > 6 && TMath::Abs(fTreeVariableNSigmasPosPion)< 6
+ && fTreeVariableDcaPosToPrimVertex > fExtraDCALightToPrimVertex && fTreeVariableDcaNegToPrimVertex > fExtraDCAHeavyToPrimVertex ) ){
+ fTree->Fill();
+ }
+ }
//------------------------------------------------
// Fill tree over.