fReplaceString1("B0"),
fReplaceString2("B%d"),
fSubtraction(k4Area),
+ fKeepJets(kFALSE),
fInJetArrayList(0x0),
fOutJetArrayList(0x0),
fh2CentvsRho(0x0),
fReplaceString1("B0"),
fReplaceString2("B%d"),
fSubtraction(k4Area),
+ fKeepJets(kFALSE),
fInJetArrayList(0x0),
fOutJetArrayList(0x0),
fh2CentvsRho(0x0),
}
if(ptSub<0){
// optionally rescale it and keep??
- bAdd = false; // RescaleJetMomentum(&tmpNewJet,0.1);
+ if(fKeepJets){
+ bAdd = RescaleJetMomentum(&tmpNewJet,0.1);
+ }
+ else{
+ bAdd = false;
+ }
}
else{
bAdd = RescaleJetMomentum(&tmpNewJet,ptSub);
// add background estimates to the new jet object
// allows to recover old p_T and rho...
tmpNewJet.SetBgEnergy(background,0);
+ tmpNewJet.SetPtSubtracted(ptSub,0);
}// kAREA
else if(fSubtraction==kRhoRecalc){
Double_t background = rho * jet->EffectiveAreaCharged();
if(fDebug>2){
Printf("%s:%d Jet %d %3.3f %3.3f %3.3f %3.3f",(char*)__FILE__,__LINE__,i,jet->Pt(),ptSub,background,rho);}
if(ptSub<0){
- // optionally rescale it and keep??
- bAdd = false;// RescaleJetMomentum(&tmpNewJet,0.1);
+ // optionally rescale it and keep
+ if(fKeepJets){
+ bAdd = RescaleJetMomentum(&tmpNewJet,0.1);
+ }
+ else{
+ bAdd = false;
+ }
}
else{
bAdd = RescaleJetMomentum(&tmpNewJet,ptSub);
// add background estimates to the new jet object
// allows to recover old p_T and rho...
tmpNewJet.SetBgEnergy(background,0);
+ tmpNewJet.SetPtSubtracted(ptSub,0);
}//kRhoRecalc
else if(fSubtraction==kRhoRC){
Double_t background = rho * jet->EffectiveAreaCharged();
ptSub = jet->Pt() - background;
if(fDebug>2){ Printf("%s:%d Jet %d %3.3f %3.3f %3.3f %3.3f",(char*)__FILE__,__LINE__,i,jet->Pt(),ptSub,background,rho);}
if(ptSub<0){
- // optionally rescale it and keep??
- bAdd = false; // RescaleJetMomentum(&tmpNewJet,0.1);
+ if(fKeepJets){
+ bAdd = RescaleJetMomentum(&tmpNewJet,0.1);
+ }
+ else{
+ bAdd = false;
+ }
}
else{
bAdd = RescaleJetMomentum(&tmpNewJet,ptSub);
// add background estimates to the new jet object
// allows to recover old p_T and rho...
tmpNewJet.SetBgEnergy(background,0);
-
+ tmpNewJet.SetPtSubtracted(ptSub,0);
}//kRhoRC
else if(fSubtraction==k4Area&&jet->VectorAreaCharged()){
backgroundv.SetPxPyPzE(rho*(jet->VectorAreaCharged())->Px(),rho*(jet->VectorAreaCharged())->Py(),rho*(jet->VectorAreaCharged())->Pz(),rho*(jet->VectorAreaCharged())->E());
ptSub = jet->Pt()-backgroundv.Pt();
if((backgroundv.E()>jet->E())&&(backgroundv.Pt()>jet->Pt())){
- // optionally rescale it and keep??
- bAdd = false; // RescaleJetMomentum(&tmpNewJet,0.1);
+ if(fKeepJets){
+ bAdd = RescaleJetMomentum(&tmpNewJet,0.1);
+ }
+ else{
+ bAdd = false;
+ }
}
else{
bAdd = RescaleJet4vector(&tmpNewJet,backgroundv);
}
// add background estimates to the new jet object
// allows to recover old p_T and rho...
- tmpNewJet.SetBgEnergy(backgroundv.P(),0);
+ tmpNewJet.SetBgEnergy(backgroundv.Pt(),0);
+ tmpNewJet.SetPtSubtracted(ptSub,0);
}//kArea4vector
-
-
-
-
-
if(bAdd){
AliAODJet *newJet = new ((*jarrayOut)[nOut++]) AliAODJet(tmpNewJet);
// what about track references, clear for now...
virtual void AddJetBranch(const char* c){fJBArray->Add(new TObjString(c));}
virtual void SetSubtractionMethod(Int_t i){fSubtraction = i;}
virtual Int_t GetSubtractionMethod(){return fSubtraction;}
+ virtual void SetKeepJets(Bool_t b = kTRUE){fKeepJets = b;}
virtual void SetBackgroundBranch(char* c){fBackgroundBranch = c;}
virtual void SetNonStdOutputFile(char* c){fNonStdFile = c;}
virtual void SetToReplace(char* c){fReplaceString1 = c;}
TString fReplaceString1; // To construct the new output name
TString fReplaceString2; // To construct the new output name
Int_t fSubtraction; // Parameter for subtraction mode
+ Bool_t fKeepJets; // keeps the jets with negative p_t rescaled to 0.1 GeV
TList *fInJetArrayList; //! transient list to make ease the handling of input jets
TList *fOutJetArrayList; //! transient list to make ease the reset of output jets
TList *fHistList; //! the histograms output list
- ClassDef(AliAnalysisTaskJetBackgroundSubtract, 5)
+ ClassDef(AliAnalysisTaskJetBackgroundSubtract, 6)
};
#endif
fEventSelection(kFALSE),
fFilterMask(0),
fFilterType(0),
+ fJetTypes(kJet),
fTrackTypeRec(kTrackUndef),
fTrackTypeGen(kTrackUndef),
fNSkipLeadingRan(0),
fEventSelection(kFALSE),
fFilterMask(0),
fFilterType(0),
+ fJetTypes(kJet),
fTrackTypeRec(kTrackUndef),
fTrackTypeGen(kTrackUndef),
fNSkipLeadingRan(0),
// -> cleared in the UserExec....
// here we can also have the case that the brnaches are written to a separate file
- fTCAJetsOut = new TClonesArray("AliAODJet", 0);
- fTCAJetsOut->SetName(fNonStdBranch.Data());
- AddAODBranch("TClonesArray",&fTCAJetsOut,fNonStdFile.Data());
-
+ if(fJetTypes&kJet){
+ fTCAJetsOut = new TClonesArray("AliAODJet", 0);
+ fTCAJetsOut->SetName(fNonStdBranch.Data());
+ AddAODBranch("TClonesArray",&fTCAJetsOut,fNonStdFile.Data());
+ }
-
- fTCAJetsOutRan = new TClonesArray("AliAODJet", 0);
- fTCAJetsOutRan->SetName(Form("%s_%s",fNonStdBranch.Data(),"random"));
- AddAODBranch("TClonesArray",&fTCAJetsOutRan,fNonStdFile.Data());
-
+ if(fJetTypes&kJetRan){
+ fTCAJetsOutRan = new TClonesArray("AliAODJet", 0);
+ fTCAJetsOutRan->SetName(Form("%s_%s",fNonStdBranch.Data(),"random"));
+ AddAODBranch("TClonesArray",&fTCAJetsOutRan,fNonStdFile.Data());
+ }
+
if(fUseBackgroundCalc){
if(!AODEvent()->FindListObject(Form("%s_%s",AliAODJetEventBackground::StdBranchName(),fNonStdBranch.Data()))){
fAODJetBackgroundOut = new AliAODJetEventBackground();
TString cName = Form("%sRandomConeSkip%02d",fNonStdBranch.Data(),fNSkipLeadingCone);
if(fNRandomCones>0){
- if(!AODEvent()->FindListObject(cName.Data())){
- fTCARandomConesOut = new TClonesArray("AliAODJet", 0);
- fTCARandomConesOut->SetName(cName.Data());
- AddAODBranch("TClonesArray",&fTCARandomConesOut,fNonStdFile.Data());
+ if(fJetTypes&kRC){
+ if(!AODEvent()->FindListObject(cName.Data())){
+ fTCARandomConesOut = new TClonesArray("AliAODJet", 0);
+ fTCARandomConesOut->SetName(cName.Data());
+ AddAODBranch("TClonesArray",&fTCARandomConesOut,fNonStdFile.Data());
+ }
}
// create the branch with the random for the random cones on the random event
- cName = Form("%sRandomCone_random",fNonStdBranch.Data());
- if(!AODEvent()->FindListObject(cName.Data())){
- fTCARandomConesOutRan = new TClonesArray("AliAODJet", 0);
- fTCARandomConesOutRan->SetName(cName.Data());
- AddAODBranch("TClonesArray",&fTCARandomConesOutRan,fNonStdFile.Data());
+ if(fJetTypes&kRCRan){
+ cName = Form("%sRandomCone_random",fNonStdBranch.Data());
+ if(!AODEvent()->FindListObject(cName.Data())){
+ fTCARandomConesOutRan = new TClonesArray("AliAODJet", 0);
+ fTCARandomConesOutRan->SetName(cName.Data());
+ AddAODBranch("TClonesArray",&fTCARandomConesOutRan,fNonStdFile.Data());
+ }
}
}
// now create the object that holds info about ghosts
+ /*
if(!fUseBackgroundCalc&& fNonStdBranch.Length()==0){
// reduce CPU time...
fGhostArea = 0.5;
fActiveAreaRepeats = 0;
}
-
- fastjet::GhostedAreaSpec ghostSpec(fGhostEtamax, fActiveAreaRepeats, fGhostArea);
+ */
+
+ fastjet::GhostedAreaSpec ghostSpec(fGhostEtamax, fActiveAreaRepeats, fGhostArea);
fastjet::AreaType areaType = fastjet::active_area;
fastjet::AreaDefinition areaDef = fastjet::AreaDefinition(areaType,ghostSpec);
fastjet::JetDefinition jetDef(fAlgorithm, fRparam, fRecombScheme, fStrategy);
virtual void SetCentralityCut(Float_t xLo,Float_t xUp){fCentCutLo = xLo; fCentCutUp = xUp;}
virtual void SetFilterMask(UInt_t i,Int_t iType = 0){fFilterMask = i;
fFilterType = iType;}
+ virtual void SetJetTypes(UInt_t i){fJetTypes = i;}
virtual void SetJetTriggerPtCut(Float_t x){fJetTriggerPtCut = x;}
virtual void SetVtxCuts(Float_t z,Float_t r = 1){fVtxZCut = z; fVtxR2Cut = r *r;}
virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;}
enum {kMaxCorrelation = 3};
enum {kMaxRadius = 5};
enum {kMaxCent = 4};
+ enum {kJet = 1<<0,
+ kJetRan = 1<<1,
+ kRC = 1<<2,
+ kRCRan = 1<<3
+ };
private:
Bool_t fEventSelection; // use the event selection of this task, otherwise analyse all
UInt_t fFilterMask; // filter bit for slecected tracks
UInt_t fFilterType; // filter type 0 = all, 1 = ITSTPC, 2 = TPC
+ UInt_t fJetTypes; // 1<<0 regular jets, 1<<1 << randomized event 1<<2 random cones 1<<3 random cones randomiuzed evetn
Int_t fTrackTypeRec; // type of tracks used for FF
Int_t fTrackTypeGen; // type of tracks used for FF
Int_t fNSkipLeadingRan; // number of leading tracks to be skipped in the randomized event
TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
- ClassDef(AliAnalysisTaskJetCluster, 19)
+ ClassDef(AliAnalysisTaskJetCluster, 20)
};
#endif